Close

Backup Registers

A project log for Coin Cell Powered Temperature/Humidity Display

Using an ePaper Display, investigate getting the lowest possible current usage from an STM32L0.

kevin-kesslerKevin Kessler 04/26/2018 at 05:190 Comments

The biggest current hog in the entire system is updating the display, so the best way to limit current usage is to limit the number of times the ePaper display gets updated. 

STM32L0 processor have 20 32 bit registers whose contents are saved even in STANDBY mode, when all other memory is lost. Using these backup registers, the new code stores the previous values of the temperature, humidity and voltage, and during the next poll for new data, if the values have not changed, the display is not updated. While the polling occurs every 20 seconds, the display will not update more than once a minute to keep rapidly changing temperature from excessively draining the battery.

Trying the measure the current during the times when the temperature and voltage measurements are taken is very difficult. Using my oscilloscope, I can see the entire process from wake back to sleep takes about 30ms, but the uCurrent's limitations really get in the way here. In the 1mV/uA range, the uCurrent maxes out at about 1.25, which means that the current drawn is greater than 1.25 mA. In the 1mV/mA range, though, the few mAs the device is drawing is only registering a few mV on the scope, which is just down in the noise. What I really needs is a 1mV/10uA or 1mV/100uA ranges, which the uCurrent does not have. 

Using my meter, which is only updating at every 200ms, a rough estimate of the energy usage during a temperate poll is about 1/2000th of the energy used to update the display, although this could be off by an order of magnitude or 2. It is also impossible to guess how often the display updates, since an environment with very inconsistent temperatures is going to use more battery than a stable temperature environment. While difficult to quantify, this is probably the biggest energy savings technique I will be able to implement.

The updated code is tagged BackupRegisters.  

Discussions