by JASON TOLLEFSON, Microchip Technology
Through beacon technology, smartphones will passively pick up information about activities nearby, extending the IoT to a whole new range of applications.
Analysts project there will be tens of billions of “things” making up the IoT, and each of these things will require power. The IoT will necessitate innovation in energy-conservation techniques, particularly because many of the ideas envisioned involve remote nodes residing far away from power lines. Extremely low-power microcontrollers (MCUs) and Bluetooth Smart radios can help solve power problems.
There is a lot of debate about just what constitutes the Internet of Things. Is it connected car keys? Is it the connected refrigerator? Despite the debate, a few key aspects have emerged. For one thing, IoT objects are uniquely identifiable. They also connect to the existing Internet infrastructure and offer services that go beyond machine-to-machine techniques.
One particular type of IoT connection that has gotten a lot of attention is that of locale-based services. Examples include getting an instant update on ski conditions as you board the lift, or an instant coupon as you walk in the grocery store. The same capabilities could deliver customized status updates of activities that are close to home, such as your child’s tooth-brushing habits.
It looks as though locale-based services will mainly be delivered by smartphones communicating with low-power MCUs and Bluetooth Smart radio. The Bluetooth Smart spec (also called Bluetooth LE) is basically a low-power version of Bluetooth. It offers designers a simple way to add IoT capabilities. Smartphones now ship with integrated Bluetooth Smart protocol. A smartphone app can control the user experience and manage the data transfer to and from the edge device. Here, an edge device is a mechanism that provides entry into an enterprise or service provider network. Routers and network switches are both examples of edge devices.
Bluetooth Smart can work like what’s called a beacon, vastly simplifying the pairing process (that is, establishing a connection between two devices). Beacons can advertise their presence to the smartphone when the two are in close proximity. In contrast, the pairing of two WiFi devices can only take place when a user pushes a WiFi Direct button on the router, which often resides in another room.
When low-power MCUs mate to a Bluetooth Smart radio, the MCUs typically collect sensor data. Typical data might include location or hours of use. The MCU then stores the data it collects in a usable format. When a smartphone connects with the device, the data uploads and either gets transmitted or displayed.
It is useful to cover Bluetooth beacon capabilities in some detail. Bluetooth beacons are typically small transmitters (usually battery powered) that beam out information that a smartphone or tablet picks up. Beacons are not new. The Apple iBeacon standard has been out for two years. But it is proprietary and only works with Apple equipment.
The Bluetooth Smart standard is relatively new and of most interest for IoT devices. This new standard enables low-power operation, a benefit for IoT applications. The original Bluetooth spec, now called Bluetooth Classic, offers a longer range and throughput of 2.1 Mbps. But low-data-rate applications like IoT temperature sensors don’t need rates this high. Bluetooth Smart’s advantage is that it connects quickly, has throughput matching IoT needs and consumes less power.
One recent development in beacon technology is the release by Google of Eddystone, an open-source, cross-platform Bluetooth Smart beacon format. Eddystone supports multiple types of “frames,” basically data bursts performing various functions.
Bluetooth beacons communicate just one way. For beacons working with smartphones, the usual goal is to send a notification that the phone user can tap. Tapping launches another application that takes some action—accepting a store coupon, say.
The beacon spec defines something called a Universally Unique Identifier (UUID). This is a 128-bit value that uniquely identifies every specific beacon in the world. A typical use for a UUID might be to find smartphones near a store having a specific UUID, then send the phone users a coupon.
Eddystone also defines a URL frame. A specific location can send out a URL frame instead of a UUID. Doing so would open a Web browser. The typical use example is that of buying a drink from a soda machine with a smartphone. For this one-time data transaction, sending out a URL lets the phone user get a drink without having to install an app.
Ephemeral Identifiers (EIDs) are frames defined with security in mind. There seem to be few details published about this type of frame. Finally, a frame for Telemetry Data is meant for sending diagnostic information about the beacon, such as its remaining battery power.
Readers might wonder why Bluetooth beacons are necessary for locale-based services when GPS is already available. The answer is that GPS transceivers consume a lot of power and aren’t particularly accurate in densely populated areas. They also don’t work well indoors. For example, in a scenario where two bus stops are across the street from each other, GPS might get confused about which was closer to the phone user. Beacons wouldn’t have this problem.
Lowering energy dissipation
The Bluetooth SIG defines several profiles—specifications for how a device works in a particular application—for low-energy devices. Among them is a profile for heart rate. A blood pressure cuff employing Bluetooth communication, for example, might make use of the heart rate profile.
The profile might handle services such as device and blood pressure measurements. The profile would also include a UUID—in this example, probably specifying the manufacturer.
Profiles are spelled out in a section of the Bluetooth spec called the Bluetooth Smart GATT or Generic Attribute Profiles. The profiles are typically supported in the Bluetooth device directly, and all current low-energy application profiles are based on the GATT.
Bluetooth Smart employs several measures to keep energy use low. For example, it uses GFSK, or Gaussian Frequency Shift Keying, while transmitting. This method is simpler and requires less power than classic Bluetooth, which uses non-Gaussian FSK. GFSK isn’t compatible with FSK and has a preamble that is different than in Bluetooth Classic. Some Bluetooth radios will work in either of these modes, but must be configured for one mode or the other to do so.
Another benefit of Bluetooth Smart is its packet size. Bluetooth Smart packets are smaller than those of classic Bluetooth by as much as 60%. This means the Bluetooth Smart radio consumes energy for one-third as long as the older standard.
The Bluetooth Smart radio reduces energy use as well by minimizing its connection time. The radio can stay paired with a smartphone without requiring a constant connection. A constant connection consumes constant power, so removing this requirement saves energy. The Bluetooth Smart radio features a “Connect Interval” and “Slave Latency,” which make pairing this way possible.
The connection parameters for Bluetooth Smart were set up with energy efficiency in mind. These parameters determine when and how a peripheral exchanges information with a central unit. The central unit sets the connection parameters, but the peripheral can send a so-called Connection Parameter Update Request to change them.
There are basically three different connection parameters. One called the connection interval determines how often the central unit asks the peripheral for data. Here, the peripheral can set what’s called the slave latency period. This factor sets how long the peripheral can ignore the central unit’s request for data. By setting slave latency to some non-zero number, the peripheral can choose how long it can wait when the central unit asks for data. (However, the peripheral can send data any time it needs to.)
Slave latency lets a peripheral stay asleep (and thus save energy) if it doesn’t have data to send, but still send data fast if necessary. The classic example is that of wireless keyboards and mice. They can sleep when there is no data to send, but still have a low latency (and a low connection interval for the mouse).
To make sure the peripheral hasn’t died somehow, there is another parameter called the connection supervision timeout. This period determines the time from the last data exchange until a link is considered lost. A central unit won’t try to reconnect until the timeout has passed. The timeout feature is useful for handling devices that go in and out of range, where the central unit needs to notice when this happens.
All in all, connection parameters let peripherals transmit data as frequently as every 7.5 msec, or as infrequently as every 33 min, thus optimizing energy use.
Low-power MCU features
Of course, the MCU figures in the power equation. MCU power consumption is largely determined by the power-mode state and clock speed.
Many new MCUs include low-power modes and can change operating modes under software control. Typical operating modes include run, doze, idle, low-voltage sleep and deep sleep. Each of these modes reduces power consumption under specific operating conditions. For example, the PIC MCU has doze and low-voltage sleep modes. In doze, the MCU can run code more slowly than its on-chip peripherals. This reduces current consumption but still allows peripherals, such as UARTs, to communicate at the proper baud rate. Low-voltage sleep mode switches out the high-performance, on-chip regulator for a low-current regulator. This allows full MCU state retention using a current of only a few hundred nanoamps. A transition from run to low-voltage-sleep reduces current consumption by 99.9%.
Low-power MCUs also offer on-the-fly clock switching. This is the ability to change clock frequency depending on the task. For example, the MCU might run at full clock speed when computing math-intensive filter algorithms on sensor data. If the MCU is in a simple loop and awaiting an interrupt, it might dial back clock speed to reduce power. These methods can reduce current consumption from 5 mA to 26 µA—a savings of 99%.
Similarly, many low-power MCUs have smart peripherals that can operate independent of the program execution. They are independent of the MCU core in that, once they are configured, they complete the work without intervention.
For example, the PIC MCU has an integrated analog-to-digital converter (ADC) able to run in sleep mode. It accomplishes this feat by using its own clock and dedicated logic called threshold detect. Threshold detect is the ability to sample a signal, as from a temperature sensor, and wake the CPU only when a specific target is reached. Features like this one can cut ADC current in half.
All in all, use of low-power modes for core-independent peripherals, MCUs and Bluetooth Smart radios make it possible to connect a wide variety of applications to the IoT. Smartphones provide an instant gateway to get online wirelessly. This connectivity will likely let people simplify their lives.
Bluetooth Smart specs