We're currently experiencing a wild fire smoke apocalypse in the entire western USA. You can see the blanket of smoke that's currently surrounding my home in the cover photo.
I've been checking the air quality every day on WA Smoke. Because the air here is still unhealthy, we've had to close all our doors and windows and remain indoors, and I was curious to see how this has affected my indoor air quality.
Thankfully, I just happened to have Avnet's ZMOD4410 Indoor Air quality Pi Hat sitting on my desk. It's a convenient packaging of Renesas' ZMOD4410 indoor air quality sensor in a Pi Hat format.
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.
GET STARTEDI'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.
You’ll also need an SD card that’s at least 16GB. (After installing Raspbian and the ZMOD software, the image is slightly larger than 8GB).
Finally, I'm also using a keyboard, mouse, and HDMI monitor connected to my Raspberry Pi, because the included software for the Indoor Air Quality Hat has a GUI that's easiest to interact with a monitor and keyboard.
Set up your PiPlug 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).
As usual, I used Balena Etcher to image Raspian onto the SD Card. You don't even need to download Raspian to create an image. Simply enter the URL for “Raspbian Buster with desktop and recommended software.zip” (available on the Raspberry Pi downloads page) under "flash from URL". Select your SD card and click "flash."
After the SD card is imaged, drag and drop the downloaded out of box application (it should be named something like GasSensorEvaluation-7.8.0a.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.
Once the zip file is copied over, insert the SD card into your Raspberry Pi and plug your Pi into power. It will now set up Raspberry Pi OS, which can take a while.
Once the Raspberry Pi OS is installed on your Pi, open a Terminal window and to set localization and enable I2C by entering:
sudo raspi-config
On the first screen, select "Interface Options." Select "I2C" on the next screen.
Select "Yes" when it asks "Would you like the ARM 12C Interface to be enabled?"
If you plan to use SSH, enable that under Interface Options as well (you will also need to configure WIFI). You can also do this graphically using Raspbian Desktop | Preferences.
Reboot your Pi.
sudo reboot
Make a directory called “zmod” (or whatever) under your home directory.
mkdir zmod
You'll now need to install couple libraries so that the sensor software will run.
sudo apt-get install pigpio
Now we'll need to enable the last library we installed: pigpiod. This library allows periodic read/writes to the GPIO header.
sudo systemctl enable pigpiod.service
sudo systemctl start pigpiod.service
Copy the GasSensorEvaluation-7.8.0a.tgz file you put at the root of the SD card (look under “boot” in Raspbian’s file explorer, or use cp from Terminal) to your new zmod directory:
cd /boot
cp GasSensorEvaluation-7.8.0a.tgz ~/zmod
cd ~/zmod
tar xzvf GasSensorEvaluation-7.8.0a.tgz
ls
In the unzipped Gas Sensor Evaluation folder, you should see bin and log directories and also the shell script.
Reboot your raspberry pi:
sudo reboot
To run the software, go in your zmod directory run start.sh:
cd zmod
./GasSensorEvaluation/start.sh
It’ll start up in a few seconds and you'll see the GUI.
- 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.
My indoor air quality is not as bad as I thought it would be! Indoor Air Quality was measured around 1, which is "Clean Hygienic Air" according to IDT/Renesas's scale (there is no international scale for IAQ, so IDT developed their own based on different TVOC and IAQ standards). You can see the best air quality is measured between around 8pm and 8am, when I had the sensor in my bedroom. When I brought it back downstairs this morning you can see that there's a jump in CO2 and TVOCs:
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.
Comments