Close

Update for March 9, 2017

A project log for STM32L4 Sensor Tile

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

kris-winerKris Winer 03/10/2017 at 05:040 Comments

I finally got back to this project and made some progress today on several fronts.

First on the anomalous I2C address of the CCS811, which occasionally shows 0x5B even though I connected the ADO pad to GND in the design. I discovered that since this pad is connected to the large ground pad in the center of the CCS811 that the solder will wick away from the ADO pad during assembly and result in no contact between the address pad and GND, and a subsequent setting of the I2C address to 0x5B which seems to be the default. That is, the pad is pulled up by default. The solution is to butter this pad with solder paste either before (best) or after assembly (what I did) to ensure good contact. This kind of thing is a common problem with LGA packages, as I have learned the hard way on the LSM303D.

Secondly, I was getting weird results from the CCS811. I got CO2 levels way above what should have been the maximum range and the VOC always showed 144 ppb. Well, it turns out I had the register indices reversed, and now I am getting ~400 ppm CO2 and ~10 ppb VoC, unless I breathe on the Sensor Tile, and then these values go up in a pleasingly responsive way-- I have a bad breath detector!

Lastly, I took advantage of the BLE modules I finally received and assembled and started to set up broadcast of the data to the Rigado toolbox. So far I have battery voltage, BME280 pressure and humidity being written to the UART console on my iPhone every second via BLE and the BMD-350 UART bridge. It is not elegant but for the first step in a remote environmental sensor it will do.

Next step is to package all of the relevant data into a data packet and send the packet every 20 - 50 ms to the laptop, where the packet sniffer Wireshark will allow me to grab it for parsing and display. Packaging pressure, humidity, temperature, acceleration (or vibration), CO2 and VOC along with time and date will need a packet of about 60 bytes or so, small enough for BLE to handle. But there is an I2S microphone on the Sensor Tile and apart from analyzing normal modes via FFT and passing these along with the data packet, it will take some more thought to allow sound recording to be sent via BLE. There is a 1 MByte SPI flash on the board so I could simply record the I2S data from the microphone and then send it periodically in a dedicated bit stream via BLE. Preferable would be real time voice/sound transmission, but this might require wifi, as in the ESP8285, to be practical. There are a lot of possibilities in this sector, and the least mature aspect of the Sensor Tile.

The Sensor Tile is sort of a combination Start Trek Tricorder and Communicator rolled into one, but it will take me a bit longer and a lot more work to get the most utility out of it.

Discussions