NOTE 2/2/22: This project references the old version of the software. The software has been updated, and this project will be updated next week with the latest software links. Thanks for your patience until then!
What does the Indoor Air Quality Pi Hat measure?
The Renesas ZMOD4410 measures total volatile organic compounds (TVOCs or VOCs) to produce an Indoor Air Quality (IAQ) measurement.
Indoor air quality can be affected in ways you might not realize. Plants produce harmless VOCs in the form of terpenes, but many man-made VOCs are toxic. New furniture is the most common source of indoor VOCs, as it can off-gas for weeks or months. Lots of common cleaners, disinfectants and perfumes release toxic VOCs. Common toxic VOCs include benzene (cigarette smoke, paint), perchloroethylene (dry-cleaning), and formaldehyde (wood stains, varnish).
The concentration of indoor VOCs is likely to be 3-4 times higher in the winter than in the summer because doors and windows are closed.
Not only does the ZMOD4410 measure VOCs, it's also able to measure CO2. Wildfires release large amounts of carbon dioxide, and I was worried that being indoors with the windows closed for a week might mean elevated C02 levels, so I was anxious to check that as well.
FUN FACT: I was curious whether my half dozen house plants were offsetting any of my C02, and a friend shared this fun fact: if you were hermetically sealed in a room, you would need 400 houseplant-sized plants to be able to sustain oxygen levels and offset the CO2 of a single person. Even though they don't remove much CO2, some plants are great at removing toxic VOCs!
How does it work?
There are many different ways of measuring volatile organic compounds. The ZMOD4410 uses a metal oxide (MOx) based gas sensor to measure VOCs. This sensor is a chemiresistor that works by measuring the resistance change of the metal oxide due to adsorption of gases.
Resistance is measured using a signal conditioner that controls the sensor temperature and measure the MOx conductivity. The sensor then compares this resistance to calibration data stored in flash memory to determine which organic compounds are present, and in what quantities.
The sensor can detect all VOCs, but it doesn't detect them all equally. It's more sensitive to some than to others. Since formeldhyde is the most common toxic VOC indoors, the sensor has been optimized to measure it, and can pick it up in quantities as low as 50 parts per billion.
NOTE: The ZMOD4410 doesn't measure particulate matter (PM). Particulate matter is the reason the sky looks smoky right now, and it's also the reason we can't go outside because the smoke particles under 5um are small enough that they can damage your lungs as you breathe them in. Sites like WA Smoke report PM in their Air Quality Index, as well as NOx, CO, and SO2. Particulate matter sensors shine lasers, which scatter light off of particles. A light detector then measures the scattered light to determine the PM.
I'm using a Raspberry Pi 3 model B, but you should be able to use any Raspberry Pi.
If you happen to have a Raspberry Pi 4 model B and want to try this out, please let me know in the comments if it works for you, as one of the required libraries (pigpio) is currently experimental in Pi4B.
Set up your Pi
Plug the included header extender into the Indoor Air Quality Hat. Plug the Hat onto your Raspberry Pi.
Download the Software
- Download the “out of the box” test/validation application for the HAT which is a pre-compiled application built with Renesas’ ZMOD4410 algorithm libraries and runs under the Raspberry Pi OS (find all the ZMOD4410 downloads at idt.com/gas).
- Download Renesas’ Software License Agreement and procedure to download the ZMOD algorithm libraries and related confidential data (optional).
After the SD card is imaged, drag and drop the downloaded out of box application (it should be named something like GasSensorEvaluation-7.0.1.tgz) to your SD card. You may have to pull your SD card out and plug it back in again to do this, since Balena Etcher unmounts your SD card after it writes to it.
sudo apt update && sudo apt upgrade
sudo apt install python-pyside sudo apt install python-pyqtgraph sudo apt install python-pandas sudo apt-get install pigpio
sudo systemctl enable pigpiod.service sudo systemctl start pigpiod.service
cd /boot cp GasSensorEvaluation-7.0.1.tgz ~/zmod cd ~/zmod tar xzvf GasSensorEvaluation-7.0.1.tgz ls
cd zmod ./GasSensorEvaluation/start.sh
- The first screen will ask you to select your sensor and method of operation. I chose the IAQ Gen 2 firmware, since it's currently the latest and it's recommended.
- On the next screen, click "start sensor"
- It will ask to verify where to save data. I chose the default - Data.csv under pi/zmod/GasSensorEvaluation/bin. Note that if you would like to visualize old measurements, you can simply load them by selecting "load data file" (next to start sensor)
- The gas sensor will start collecting data. As it comes in, you can view it here using the GUI.
- You can select what to visualize under "Algorithm Parameter" (IAQ, TVOC, EtOH, or eCO2), and if you'd like to change views, you can right click and change the height of the X or Y access.
I suspect that this jump in TVOCs is caused by my desk. I varnished it in February, so it is probably still off-gassing formaldehyde.
I was thankful to see that my CO2 levels were estimated around 400ppm, which is excellent - it's equivalent to normal outdoor CO2 level. It jumped just above 500ppm around 10am this morning. Still, there's no cause for alarm here as anything under 700 is acceptable.