element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Monitor Indoor Air Quality with the IDT ZMOD4410 Pi HAT
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Raspberry Pi requires membership for participation - click to join
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
GPIO Pinout
Raspberry Pi Wishlist
Comparison Chart
Quiz
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: zebular13
  • Date Created: 18 Sep 2020 5:22 PM Date Created
  • Views 2841 views
  • Likes 9 likes
  • Comments 9 comments
Related
Recommended
  • pi hat
  • renesas
  • raspberry pi hat
  • zmod4410

Monitor Indoor Air Quality with the IDT ZMOD4410 Pi HAT

zebular13
zebular13
18 Sep 2020

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! 

shield with smoke in background

INTRO

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.
image.png

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.

 

GET STARTED

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.

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 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).
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."
Screen Shot 2020-09-17 at 17.23.07.png

 

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.
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


image.png
If you plan to use ssh, enable that here 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 update && sudo apt upgrade

sudo apt install python-pyside sudo apt install python-pyqtgraph sudo apt install python-pandas 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.0.1.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.0.1.tgz ~/zmod cd ~/zmod tar xzvf GasSensorEvaluation-7.0.1.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 again:

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.
ok.png
  • On the next screen, click "start sensor"

image

  • 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)

image

  • The gas sensor will start collecting data. As it comes in, you can view it here using the GUI.

image

  • 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.

 

The Results:
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:
airqual.png

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.image
imageimage
The original project is on Hackster here: https://www.hackster.io/monica/monitor-indoor-air-quality-with-the-idt-zmod4410-pi-hat-98b687
  • Sign in to reply

Top Comments

  • DAB
    DAB over 4 years ago +3
    Very good blog. DAB
  • vlasov01
    vlasov01 over 4 years ago +3
    Nice overview! Please note, some common houseplants are toxic as well. I'm not sure if their toxins can be detected by the VOC sensor. I've just realized that I have at least 6 from the top 20 list https…
Parents
  • vlasov01
    vlasov01 over 4 years ago

    Hi Monica,

     

    I'm following your instructions and run into some issues during installation of python libraries. I'm using Python 3.8.5.

    What was your Python version?

     

    Regards,

     

    Sergey

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • zebular13
    zebular13 over 4 years ago in reply to vlasov01

    Interesting. My python version was 3.7. I'll try installing 3.8 and see if I run into difficulties.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vlasov01
    vlasov01 over 4 years ago in reply to zebular13

    Thank you for a quick reply! I've tried to install it with Python 3.7, but got an error as well:

    Package python-pyside is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    
    E: Package 'python-pyside' has no installation candidat

     

    I've got a similar error with python3-pyside as well. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vlasov01
    vlasov01 over 4 years ago in reply to vlasov01

    I've tried as well to install pyside using pip, but got an error as well. What is the version of pyside is working for you? It seems that Qt community only supports 64-bit Linux OS as per https://wiki.qt.io/Qt_for_Python  .

     

    Collecting pyside==1.2.4
      Downloading PySide-1.2.4.tar.gz (9.3 MB)
        ERROR: Command errored out with exit status 1:
         command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k0r68kp7/pyside/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k0r68kp7/pyside/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-rt216kr2
             cwd: /tmp/pip-install-k0r68kp7/pyside/
        Complete output (1 lines):
        only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • vlasov01
    vlasov01 over 4 years ago in reply to vlasov01

    I've tried as well to install pyside using pip, but got an error as well. What is the version of pyside is working for you? It seems that Qt community only supports 64-bit Linux OS as per https://wiki.qt.io/Qt_for_Python  .

     

    Collecting pyside==1.2.4
      Downloading PySide-1.2.4.tar.gz (9.3 MB)
        ERROR: Command errored out with exit status 1:
         command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k0r68kp7/pyside/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k0r68kp7/pyside/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-rt216kr2
             cwd: /tmp/pip-install-k0r68kp7/pyside/
        Complete output (1 lines):
        only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • zebular13
    zebular13 over 4 years ago in reply to vlasov01

    Hi Sergey,

    Sorry for the delay. I tried re-installing it and got the same error, but after running sudo apt-get upgrade && sudo apt-get update it installed. I'll modify the instructions to include this.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vlasov01
    vlasov01 over 4 years ago in reply to zebular13

    Hi Monica,

     

    Thank you! It works now for me as well.

    Just wondering if you've seen any documentation on how to interact with the Avnet ZMOD4410 Pi HAT from Raspberry Pi?

    As I understand from schematic I can use GPIO24, GPIO24 and I2C. But I can't find description of the protocol or program samples. Have you seen anything that can help programmatically interact with it?

     

    Regards,

     

    Sergey

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube