Posts filed under ‘Uncategorized’

Finally some organization here.

I’ve spent entirely too much time throwing myself into my job(s) and not enough time curating my own content. I’ve added this blog,, to my domain and will begin writing about things that I either enjoy or feel are important. This means there will be astrophotography that I’ve done, along with more serious topics like failures in cybersecurity risk assessment, or management’s culpability for the dismal state of information security in many (most?) companies. There will also be a fair amount of Maker content.

If you like, drop me a comment to let me know what you’d like to read about.

December 30, 2019 at 9:42 am 1 comment

Comparing Adafruit Gas Sensors

I am comparing the performance of the Adafruit CCS811 and SGP30 gas sensors. These sensors monitor the atmosphere for effective carbon dioxide (eCO2) and total volatile organic compounds (TVOC) and report those values when polled. You can artificially test the sensors by blowing on them and watching the reported values spike.

I wanted to make this comparison because I was running these sensors independently and I noticed occasional spikes or artificially elevated periods. In order to test the sensors and remove actual environmental fluctuations, I needed both sensors connected to the same board.

At first, I used an Arduino Nano, but then switched to an Adafruit ESP32 Feather. For some reason the CCS811 board would report only zeros. I suspect this is because the CCS811 uses I2C clock stretching, and the ESP32 probably doesn’t support that in hardware.

Enter the prototype Metro M4 Express. This is a new pre-production board (which I am helping test) from Adafruit. It runs a custom cross-compiled version of CircuitPython – currently 3.0.0 alpha 1 compiled on 2/27/18. There are CircuitPython modules available in Adafruit’s GitHub repositories for both the CCS811 and SGP30 sensors. It took me almost no time at all to compile the latest firmware for the M4, flash it, and connect the circuit that I used for the ESP32 test. Both sensors work flawlessly.

There is, however, the pesky case of spurious values. On a plot of observations vs. the difference between the readings (i.e., SGP30 – CCS811 values), we should see a flat line indicating the sensor values are moving in lock-step with each other, with perhaps some minor fluctuations. That’s not what we see, though!

As you can see, the SGP30 has quite large spikes that the CCS811 does not. This indicates that the SGP30 values are considerably less reliable than the CCS811, which is unfortunate because I like the electronics in the SGP30 a lot more (true I2C for one). Unfortunately, the numbers don’t lie: the CCS811 is a more reliable gas sensor.

March 1, 2018 at 1:23 pm Leave a comment