SensorTile3: Continuing Evolution

A project log for STM32L4 Sensor Tile

Small, connected device for smelling and hearing in any environment.

Kris WinerKris Winer 11/06/2017 at 02:280 Comments


It's been two months since the last log entry and the Sensor Tile has gone through another redesign iteration since then. I changed the size of all of the passive footprints and made them smaller to ease assembly and I replaced the SDA/SCL exposed at the board edge with the BMD-350 SWD port to enable replacing the Rigado firmware with my own in an attempt to lower power usage of the BLE module. Turns out this is really not necessary, at least not yet. I'll get back to this point in a second.

I started with several tests of the new Sensor Tile being powered via a BQ25504 and a solar cell. I redesigned the BQ25504 to tighten up the specs and ended up wasting a lot of time because the battery would get to about 50% of the full charge and the entire Sensor Tile would stop working because the BQ25504 undervoltage threshold was too high. So I gave up trying to perfect the BQ25504 and went back to the previous design which worked just fine, but I still had some problems getting the full use of the LiPo battery. Since the number of hours of sun dropped to less than three in my testing area I went back to simple power usage tests using just a LiPo battery. In the first attempt at this rain stopped the experiment after twelve days and in the last attempt I finally got a complete experiment and was able to measure the average power; it only took two months of fooling around to get there.

The results are five hours shy of fifteen full days of running on a 350 mAH LiPo battery. This represents an average current of 987 uA, which is significantly less than in previous tests for a couple of reasons. Firstly, I turned off the microphone; I still haven't figured out how best to use this in an environmental data logger. I also took advantage of improvements to the STM32L4 Arduino core which takes care to properly put unused GPIOs in a hi-Z state to minimize power usage. I also started disabling the SPI just after writing to the SPI flash and enabling SPI just before. Likewise, I put the SPI flash into its deep power down state unless writing data. Lastly, I started using forced mode for the BME280 to get a data reading just once every ten seconds. In other words, I fussed over every uA and looked for ways to cut power while still recording all the data (except audio) every ten seconds.

Here is some of that data:

Turns out 15 days worth of data, 42 bytes every ten seconds, is a lot of data, 109500 lines of spreadsheet in fact and it takes quite some time to process this even on Windows 10 and an Intel i5 core. Fifteen days represents only about half the data the 8 MByte SPI flash can record, so as I continue to drop the average power the flash capacity will become better matched to the 350 mAH LiPo battery lifetime (yes, both arbitrary with different data write frequencies and battery size).

It is interesting to see the diurnal variations of the data as well as the longer term variations of trend. It got significantly cooler after Halloween as a weather front moved into the area; the data nicely capture the end of our Indian summer.

This < 1 mA average power usage included broadcasting pressure, temperature, humidity, eCO2 and VOC as well as battery voltage and % charge remaining every ten seconds via BLE.  I thought the BLE module was the big power hog on the Sensor Tile 3. But I measured the CCS811 average power to be 550 uA in a previous log so that now it seems it is the air quality sensor that is the dominant component even though I am using the "low-power" pulse setting reading CCS811 data once per minute.

Of course, I could just disable the CCS811 to save power but I really like having the air quality data. One thing I will try is to put the CCS811 in idle mode for, say, an hour and then let it run twenty minutes; a 25% duty cycle, which should save ~330 uA but still provide useful air quality data, which like pressure doesn't change that rapidly. Maybe a 50% duty cycle would be better; there is always a tradeoff, of course.

I discovered in an unrelated project that the MAX1555 battery charger I am using on the Sensor Tile3 is using ~75 uA even when there is no USB connected. I should have checked this before but it is only relatively recently that I have become a maniac about every little uA. The next version of the Sensor Tile is already at the fab with the MAX1555 replaced with the STBC08, which I measured to cost only 2 uA. So even doing nothing differently with the CCS811 using the new Sensor Tile I should expect to be close to 900 uA average power usage. This also means that at 550 uA for the CCS811 (once per minute low power mode), the rest of the components, including the BMD-350 BLE module, cannot be using more than ~350 uA. In other words, the BMD-350 running with stock Rigado firmware is pretty power efficient after all.