According to WHO, at least 17% of lung cancer fatalities are due to indoor pollution. Poor air quality can negatively impact health in several ways. It can increase the risk of strokes, pneumonia, ischaemic heart disease, etc. Hence, the current importance of volatile organic compound (VOC sensors). The following guide will explore what they are and how you can use them to protect your health. Additionally, it will examine how you can build your one using sensor modules like the MQ4 gas sensor.
What are VOC Sensors?
Volatile Organic Compound Acronym Art
As the name suggests, VOC sensors detect surrounding volatile organic compounds. VOCs typically come from gases that emanate from solid or liquid compounds. This can be residual paint fumes or gases from solvents or fuels. Commonly, people can detect or identify if they’re near VOCs by smell.
VOCs tend to have distinct odors. However, the smell isn’t always a reliable way to sense VOCs, as some can be subtle or nearly odorless (especially in small amounts). Furthermore, exposure to VOCs can be harmful to your health.
Thus, we require more accurate and safer methods for VOC detection. This is the purpose of VOC sensors.
Working Principle of VOC Sensors
Gas and VOC protection Equipment
Source: Wikimedia Commons
There are different types of VOC sensors. However, the current most popular types of VOC sensors function through photoionization. This process uses ultra-violet (UV) light to convert molecules into ions. Thereafter, the VOC sensor measures the electron levels and flow of the ions to identify the VOC and its amount. Alternatively, the sensor can use flames or a heating element (flame ionization) to ionize the molecules.
On the other hand, Total Volatile Organic Compound (TVOC) sensors identify the total amount of ambient VOCs using oxidization. For instance, the metal oxide (semiconductor) sensor (or MOS) is one of the most widespread implementations of this technique. It works by heating a thin material containing metal-oxide particles.
The surface of the metal-oxide material will then absorb the surrounding oxygen particles causing a reaction with the surrounding gas. Consequently, this forces the metal-oxide material to release the oxygen molecules. This process results in a change in electrical resistance. The sensor measures this change in electrical resistance to determine how much of a certain VOC exists in an area.
Types of VOC Sensors and Detectors
To summarize, the most common types of VOC sensors/detectors are:
- Photoionization Detectors (PID)
- Flame Ionization Detectors (FID)
- Metal Oxide Semiconductor Sensor (MOS)
VOC Sensor Modules and Breakouts
Source: Wikimedia Commons
You can build an air quality detector using an Arduino circuit board or a single-board computer (such as a Raspberry Pi). All you need to do is interface it with a VOC sensor or detector module/breakout, such as
- ZP07 MP503 Module: It uses an XH2.54-4P terminal socket and can detect VOCs such as ammonia, hydrogen gas, carbon monoxide, cigarette smoke, and formaldehyde. It uses PID-based sensing.
- SGP30: A metal-oxide (MOX/MOS) VOC sensor. It uses a sensor chip package developed by Sensiron. Companies such as Asafruit and Grove provide breakout and module implementations of it. It can return a TVOC reading for gases such as Hydrogen, ammonia, methane, ethanol, etc. Additionally, it can perform and return equivalent carbon dioxide readings (eCO2).
- ZE40B-TVOC: Primarily produced and provided by Winson. It’s a high-resolution electrochemical alcohol-based miniaturized module. In addition to TVOC detection, it has a built-in temperature sensor for accuracy.
How to Create an Air Quality Sensor Using a VOC Module
Arduino components scattered around an LED screen
You can create an air quality sensor using a VOC and/or ECO2 Gas sensor. The following tutorial will show you how.
Components and Software
- SGP30 Multi-Gas Sensor Breakout/Module
- SSD1306 OLED Graphic Display
- Generic Breadboard or PCB
- Generic Jumper Wires (At least 8 wires)
- Arduino UNO (preferably Rev3)
- A PC
- Arduino IDE
You can connect the components directly to your Arduino microcontroller. However, we suggest you run them through your breadboard or circuit board.
Connect the SSD1306 OLED Graphic Display to the Arduino microcontroller
- Connect the GND pin from the SSD1306 to GND(Ground) pin on the Arduino microcontroller (preferably using a black jumper cable)
- Next, connect the Vin/VCC pin from the SSD1306 to the 5V pin on the Arduino microcontroller (preferably with a red cable)
- Connect the SCL pin from the SSD1306 to the A5 pin on the Arduino microcontroller (preferably with a white cable)
- Finally, connect the SDA pin from the SSD1306 to the A4 pin on the Arduino microcontroller (preferably with a yellow cable)
- Connect the SGP30 to the Arduino microcontroller
- Connect the SGP30’s SCL pin to the Arduino microcontroller’s SCL pin (preferably with a blue jumper)
- Next, connect the SGP30’s SDA pin to the Arduino SDA pin (preferably with an orange jumper)
- Connect the SGP30’s VIN pin to the Arduino 5V pin (preferably with a red jumper)
- Finally, connect the SGP30’s GND pin to the Arduino GND pin (preferably with a black jumper)
Install and configure Visuino
Visuino is a low-code integrated development environment that allows you to easily program your Arduino microcontrollers. We recommend that you work through the Visuino tutorial videos before you get started. Once you’re done installing Visuino:
- Connect your Arduino Microcontroller to your PC
- If you’re not using an Arduino Uno, change the main Arduino component by clicking on the tool icon next to the title.
Visuino Arduino Workspace Component
- Select your Arduino microcontroller type from the menu
Arduino BoardType Menu
- Use the component menu search bar to add the following components:
- OLED I2C (DisplayOLED1)
- Air Quality SGP30 (AirQuality1)
- Double-click on the DisplayOLED1 component in the main work area
- Expand the Text item on the right panel
- Double-click on Draw Text four times
- Double-click on Text Field four times
You should have four Draw Text elements and four Text Field elements
- Set Draw Text1’s text to “TVOC” using the properties panel
- Next, set Draw Text2’s text to “CO2” and Y to 15
- Set Draw Text3’s text to “HYDR” and Y to 30
- Next, set Draw Text4’s text to “ETH” and Y to 45
- Set Text Field1’s X property to 60
- Next, set Text Field2’s X property to 60 and Y to 15
- Set Text Field3’s X property to 60 and Y to 30
- Finally, set text Field4’s X property to 60 and Y to 45
- Close the elements Window
Visually Connect Components
In the main workspace/area, do the following:
- Connect the Out I2C pin from the AirQuality1 component to the Arduino board’s I2C In pin
- Next, connect the DisplayOLED1’s OutI2C pin to the Arduino board’s I2C In pin
- Connect AirQuality1’s TVOC pin to DisplayOLED1’s Text Field1 In the pin
- Next, connect Airqulity1’s CO2 pin to DisplayOLED1’s Text Field2 In pin
- Connect AirQuality1’s Hydrogen to DisplayOLED1’s Text Field3 In pin
- Finally, connect AirQuality1’s Ethanol to DisplayOLED1’s Text Field4 In pin
Build and Upload the Code
- Click on the Build tab near the bottom panel of the IDE’s main view
- Select the port that you connected the Arduino microcontroller to (typically COM9)
- Click on the Compile/Build and Upload button (to the right of the Verbose field)
- Finally, click on the Upload button (on the right of the Compile/Build and Upload button)
You can then test your air quality detector by placing a sample of gasoline or ethanol. The figures on the OLED screen should change if you’ve assembled and configured the project correctly.
The Best VOC Gas Detectors and Sensors
WatchGas NEO PID Sensor
Source: Wikimedia Commons
If you’re unwilling to build a custom air quality tester or VOC sensor, you can purchase one of the following VOC sensors:
- Airthings Wave Plus
- Forensics Detectors VOC Gas Detector
- Amazon Smart Air Quality Monitor
- Analog MEC VOC Detector
- Eve Room
- Honeywell RAE System VOC Detector
- Temtop AQD-P200
How Accurate are VOC Sensors?
VOC sensors are surprisingly accurate. Most sensor readings are only prone to up to 10% of inaccuracy. They may return readings only 3-5% off the actual figure.
People tend to underestimate how detrimental to health VOCs can be. It’s almost important to prevent ourselves from coming into contact with VOCs daily. However, we can limit our contact with them by using detection tools such as VOC sensors and detectors. The above guide explores what they are, how they function, and which ones are the best. As this guide highlights, you have a wide variety of options. You can either build your own using one of many sensors or purchase one.