I continue to be blown away by the capabilities of today’s low power microcontrollers (uC). It’s not unusual to see active power levels in the 100uA range, standby in the 1uA range, and shutdown current measured in nanoAmps (15nA). With supply voltage ranges typically in the 1.8V to 3.6V the overall power consumption is incredible.
What does that look like in terms of battery life? As a quick example let’s consider a single CR2032 coin cell. These cells operate at 3.0V and can deliver about 200mAh of current. So, with a uC like the one mentioned above we’re looking at 2000 hours (about 83 days) of active processor time. In standby, 200,000 hours (8,333 days, or almost 23 years). Finally, if we put one of these processors to sleep, technically it could happily wake up in 1,500 years with power to spare!
Hours of operation = 200mAh / (15nA * 1nA/1,000,000mA) = 13,333,333 hours
Years of operation = 13,333,333hours / 24 / 365 = 1,522 years
Obviously some of those numbers are unrealistic in actual practice, but it does illustrate just how little the power demand of modern uC’s really is.
Where Does All the Energy Go?
If simple processing requires such a small amount of power, why don’t all simple electronic devices last forever on a single charge? Well, in reality some do. A perfect example is the keyless entry on your car. Used daily, communicates wirelessly, and typically outlasts the life of the car.
However, what we’ll be looking at is a little different. We want to build a low cost, low power, WiFi connected device. WiFi was never designed for low power, low bandwidth embedded devices, and therein lies the challenge. To answer the question above, “Where does all the energy go?” The answer is “WiFi”.
WiFi has a large connection overhead and high power demands. Quickly connecting, dumping a few bytes of data, and disconnecting is not where WiFi excels.
A Quick Peek at the ESP8266 Datasheet
We’ll be covering the power requirements of the ESP8266 (our cheap WiFi chipset of choice) in much more detail over the coming weeks, but for today I just wanted to run a few quick calculations based on the power consumption numbers available on the datasheet.
Assuming the ESP8266 could run directly off the same single CR2032 coin cell described above (it can’t - trust me, I tried), it could transmit data for about 1 hour and 40 minutes, or receive data for about 3 and a half hours. Obviously we’re now operating in a different ballpark than the power required for a simple low power processor. Even with the radio off the ESP8266 would last for just 13.5 hours in active processing mode, and sleep mode gets us to just 9 days.
We can summarize the values for both the ESP8266 and low power uC (MSP430) for a quick comparison:
|Active||83 days||3 hours|
|Standby||23 years||13.5 hours|
|Sleep||1500 years||9 days|
There is no comparison when it comes to power consumption of a processor designed for low power, versus one design for WiFi communication. We’re talking hours of life instead of years. This is exactly why our design will be incorporating 2 processors. One to handle the low power typical operation (button inputs, LED outputs, data logging, motion sensing, temperature, etc.) while the second processor just handles the uploads.
Of course, there are challenges. Even though our coin has a reasonable capacity, it has nowhere hear the power delivering capability required for a typical WiFi transmission. So why use WiFi in the first place? I’ll try find the time to answer that next week.