Close

February 14, 2017

A project log for STM32L4 Sensor Tile

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

kris-winerKris Winer 02/15/2017 at 05:140 Comments

I received an application note from AMS on how to interface with and program the CCS811 Air Quality sensor and discovered the missing bit of information, which was I needed to write to the application ready register to take the CCS811 out of boot mode (into which it enters on power up) and into application mode. Once I did this I stopped getting I2C read and write errors and started getting data as well as a data ready bit in the status register. I got the interrupt working as well as the humidity and temperature compensation from the BME280 sensor to improve CCS811 accuracy. Over all the sensor seems to be working as designed. I need to let it stay on for a while to "burn in" before I can get reliable readings, but overall the initial phase of the sensor tile is a success. All sensors on board are functioning and returning data.

I measured the current used by the Sensor tile with no great effort to minimize power usage yet and found that when the BME280 and MPU6500 are running normally as well as having the STM32L4 host run at 80 MHz the current is about 6.25 mA, more or less what I expect. However, when the CCS811 air quality sensor is enabled once every 10 seconds in the present operating mode the current jumps to about 25 mA. If it takes ~1 second to get the air quality data, this is an additional ~25/10 ~ 2.5 mA for a total of almost 9 mA average current. Way too high to be practical as a remote sensing device. So as I work towards lowering the average power used by this device I will have to pay close attention to how long I enable the CCS811. In the application note there is an example of enabling it just long enough to read I2C data, but I think the best method is to take advantage of the rather long duty cycle (once per 60 second measurement) available and interrupt on threshold capability to save power.

Discussions