Ladybug environmental data logger II
The second try with the Ladybug environmental data logger using a 150 mAH battery to read data from the BME280 pressure, humidity, and temperature sensor as well as the VEML6040 RGBW ambient light sensor and display it to the Sharp memory display every five seconds finally reached an end just before the twelfth full day of operation. This is pretty much what I was expecting, since the first experiment using an update rate of every two seconds lasted just under five days, and 5/2 x 5 ~12 days.
In the first experiment I had the BME280 sensor standby time set to 62.5 milliseconds, and for the second I reset it to 1000 ms thinking I needn't run it at more than 1 Hz if I was going to read the data at 0.2 Hz anyway. And I thought I might squeek out even more time on the battery this way. But not so.
We can take away two things from these two experiments:
The first is that the average power usage simply depends on the duty cycle of the sensor reads and data display, not surprising. This means that it is the MCU power usage that still dominates even at the 0.2 Hz sensor read rate. Using the STM32.stop(timeout); command after each read and display cycle (at the end of the loop) puts the STM32L432 into one of the low-power STOP modes, but not the lowest power mode, so there still might be some power savings to be had by using the even-lower-power STANDBY mode, for example. But this might require reinitializing the sensors each time the MCU wakes up. Will this end up saving more power or not? Looks like another experiment is in order!
And secondly, the average power usage for the second experiment was a respectably low ~550 uA. Even twelve days on a 150 mAH LiPo battery allows plenty of data to be displayed or, more usefully, recorded onto an SPI flash memory or SD Card for later plotting and anaylsis. At this power range we are well into the territory of practical remote data logging.
And to make such applications easier, I have been designing and I am now making available a collection of small add-on boards with sensors and memory for both Ladybug and Butterfly. I will continue to roll out peripherals for both development boards, with the goal of creating an ecosystem to make using these two low-cost, low-power, high-performance devices even more compelling.