Picking a low-power microcontroller is way more than just selecting the lowest-current device. Low µA/MHz may be the least of your power worries in a mobile device. Every man and his dog are now selling microcontrollers containing an ARM core. And many are very much as good as ARM can make them at around 150µA/Mhz. But the packaging around that core makes all the difference. Let’s look inside an Energy Micro FM32 microcontroller to see what it takes for their EFM32TG110 to be ahead of the pack. The keys are sleep mode and sensor power.
On a modern design you may have to sense a capacitive-touch keypad, sample ambient light level, listen to a serial port, monitor wireless communications and a swipe card. If you have to wake up your CPU 1000 times a second to check all these sensors, your battery life is shot. It’s the difference between a one-year non-rechargeable battery life and a 10-year life. And that means the difference between having a user-replaceable battery or a never-replace battery – which comes down to a quality user experience. And Steve Jobs has shown us that user experience is what sells products.
The answer is ultimate sleep and low energy peripherals.
There’s sleep and there’s SLEEP
To save power, any mobile device must spend most of its time in sleep mode – by long-established tradition. So to start with, look for the current used in sleep mode. Our example EFM32 device has 5 different low power modes each enabling various functionality. Its lowest-power nearly-dead mode draws only 20 nA (yes, really nano-amps), the real-time-clock as low as 0.5 µA on some parts, and highly functional modes only 1 µA.
The key thing to look for in sleep mode is fast start-up. If sleep mode takes more than a couple of microseconds to start up, you’re wasting power that whole time. Ideally, you want your software to sleep indefinitely every single iteration of the main loop. It should only be woken up by I/O. So your I/O all needs to be interrupt driven, and your processor needs to keep time without waking up. Only time or I/O events should wake up the processor: don’t wake up every millisecond. This has software implications: check out lightweight Protothreads or the Contiki OS.
The final key: low energy peripherals
Sleep mode is good, but by itself it is not enough of a critical power saver. 10-Year single-cell battery life, remember? The real “killer feature” is low-energy peripherals. Our EFM32 example boasts low-energy peripherals (LESense) that can run in the background while your processor stays in sleep mode. While in sleep mode it can sense a capacitive slider or buttons, send UART serial data to/from memory, check light sensors, voltage levels, scale load cells, and so on. This all happens while the processor is in sleep mode drawing just 1 µA. No need to wake up to a hungry 150 µA/MHz.
There’s one more thing to look for: why not power your sensors only briefly? Turn them off in between measurements? For example, a capacitive touch button only needs to sense, say, 20 times a second. Or to measure a weight threshold on a load cell would take an op-amp and comparator – but these only need to be powered up briefly several times a second. Similarly, a voltage divider only needs to be connected up during comparator measurement.
Our the EFM32 microcontroller achieves this by having an array of analog comparators and op-amps that are powered up for a few microseconds every time the sensor is sampled. It’s only when a finger is sensed on a button or a voltage level drops below a certain point, that the microcontroller needs to be woken up to decide what to do with the event.
We’ve been using the EFM32 as an example. There may be others “out there” that do the same kind of thing. But we haven’t found any yet. In our minds, this places Energy Micro in a league of its own. If you know of similar low-energy sensor technology in ARM microcontrollers, we’d love hear your comments.
1 November 2011 by Berwyn add a comment