Using The BME680 VOC Sensor with Raspberry Pi

May 13, 2019

I recently purchased my first Raspberry Pi and besides game emulation, I was a little lost as to some simple enough projects to get me going with Raspbian. After some hunting around, I ran across the uThing::VOC usb air quality sensor.

The device is a USB compatible temperature, humidity, barometric pressure and VOC gas reader that utilizes the BME680. It enumerates as a virtual serial port and can be easily read with a few lines of Python.

Raspberry Pi with the uThing::VOC sensor in the back. (I covered the on-board LED with tape because it is BRIGHT)

The device pairs well with this setup guide on hackster.io: https://www.hackster.io/damancuso/indoor-air-quality-monitor-b181e9

The guide is fairly comprehensive, however there were a few holes I had to work myself through:

1) Installing influxDB required a restart of the Pi to allow the “influx” command to be called successfully from the command line

2) Grafana, the online database monitoring tool used in the guide, defaults to the first data source created on your dashboard graphs. I only had this problem because when first trying to link it to my created influx database, I used the wrong URL and while the source was created, it had no valid data. This made all the graphs in the imported dashboard throw errors instead of anything readable.

3) It looks like this was edited, but the .service file you create to run your python code had some name differences between the target file and .py file names…

4) Not really related to the guide itself, but I work with my Pi through VNC viewer and I kept Grafana open so I wouldn’t have to open my browser every time I wanted to see my sensor readouts. For some reason, Grafana occasionally locks up my Pi if it’s been open too long and doesn’t allow me to log into it remotely. This results in requiring a hard reboot. Closing your browser after you’re done seems to fix this!

Just to add, I made a quick guide on using and upgrading the Grafana dashboard that’s included in the hackster.io guide. Check it out here:

Overall, this was a great project to get started with using both the Pi and linking it to a remotely viewable database. Below is a link to the sensor store page. Just note that it ships from Germany so add about 20 dollars to the total price if shipping to the US!

https://www.tindie.com/products/damancuso/uthingvoc/

Leave a Reply