How to Build a Low-Cost Air Quality Monitor with an Arduino
Introduction
Monitoring the quality of the air we breathe every day is important for our health. High levels of pollutants like particulate matter, volatile organic compounds, and nitrogen oxides can aggravate asthma, increase respiratory illnesses, and even lead to reduced life expectancy. Commercial air quality monitors are effective but often expensive. As an alternative, we can build a simple air quality monitor at home using an Arduino microcontroller and sensor modules for a fraction of the cost.
In this guide, I will walk through the steps to assemble a basic Arduino-based air quality monitor that can measure levels of PM2.5 (fine particulate matter), TVOC (total volatile organic compounds), carbon dioxide, temperature, and humidity. With simple off-the-shelf electronic components, a little bit of coding, and some 3D printed or laser cut enclosures, you can have your own air quality monitor up and running in no time.
Parts and Tools Needed
To build the air quality monitor, you will need the following main components:
-
Arduino Uno - The brains of the monitor. An Arduino Nano or other model could also work.
-
SGP30 Air Quality Sensor - Measures TVOC and CO2 equivalents.
-
SDS011 Particle Sensor - Measures PM2.5 airborne particulate matter.
-
DHT11 Temperature and Humidity Sensor
-
Breadboard - For connecting the sensors and components.
-
Jumper wires - For wiring up the circuitry. Male to female wires are most convenient.
-
LCD screen - To display the sensor readings. A 16x2 LCD is recommended.
-
Resistors - Like a 220 ohm resistor for the LCD screen.
-
Enclosure - A box or laser cut case to house the monitor.
You will also need tools like a soldering iron, wire cutters, scissors, and screwdrivers. A 3D printer or laser cutter can be useful for creating enclosures as well. A computer and USB cable are needed to program the Arduino.
Assembling the Circuit
Here are the steps to assemble the air quality monitor circuit:
-
Insert the Arduino, breadboard, and all the components like the sensors and LCD into the enclosure case if using one.
-
Insert the DHT11 temperature and humidity sensor into the breadboard.
-
Connect the first pin on the DHT11 to Arduino pin 7, the second pin to 5V power, and the third pin to ground.
-
For the SDS011 particle sensor, connect pin 1 to Arduino pin 2, pin 2 to 5V power, pin 3 to ground, and pin 4 to Arduino pin 4.
-
For the SGP30 VOC/CO2 sensor, connect pin 1 to 3.3V power, pin 2 to ground, pin 3 to Arduino pin A4, and pin 4 to Arduino pin A5.
-
For the LCD screen, connect pin 1 to ground, pin 2 to 5V power, pin 3 to the 220 ohm resistor, pin 4 to Arduino pin 12, pin 5 to ground, pin 6 to Arduino pin 11.
-
Connect pin 15 on the LCD to 5V power and pin 16 to ground.
-
Upload the Arduino sketch to read from the sensors and display readings on the LCD.
-
Make sure all components are securely connected, then your circuit is ready! Double check the wiring matches the pin connections specified in the code.
Writing the Arduino Sketch
The Arduino needs to be programmed to interface with the various air quality sensors, take readings, and display the results on the LCD screen.
I recommend starting with example code and libraries available for each sensor, then modifying and combining them into a unified sketch. Here are some tips:
-
Use the DHT and LiquidCrystal libraries for the DHT11 and LCD.
-
The sensors like SDS011 have open-source libraries to make reading their outputs easy.
-
Display readings on the LCD with headings like "PM2.5", "TVOC", "Temp".
-
Take readings every few seconds in a loop and update the LCD continuously.
-
Print results to the Serial monitor for testing.
-
Add logic like LED indicators that light up when readings exceed threshold.
With the Arduino taking care of reading the sensors and control logic, the air monitor will show the latest readings and trends!
3D Printing an Enclosure
For a polished device, it is nice to house the air monitor in a custom 3D printed enclosure. Open source options are available on sites like Thingiverse. You can also design your own to fit the components using CAD software like Fusion360 or Tinkercad.
When 3D printing a case, consider:
-
Leaving room for the LCD screen and ports to plug in sensors.
-
Air vents so air can flow through and be measured by the particulate sensor.
-
Snap fits, hinges, or screws to secure the case.
-
Aesthetic touches like chamfers, ribs, or logos.
Print with an extruder diameter suited for detail like 0.4mm. Choose a higher infill like 40% for durability. Use supports and overhangs for bridge geometry. Experiment with different filament colors like black, white, or transparent.
With an organized interior layout and well-designed case, your air monitor will have that satisfying professional look.
Calibrating and Testing the Device
Once assembled, the air monitor needs to be calibrated and tested. Here are some tips:
-
Calibrate particle sensor baseline in filtered air.
-
Cross-check readings with commercial sensors.
-
Monitor air when cooking, cleaning, or other activities and check if readings change.
-
Breathe on the sensors and verify rapid change in CO2, humidity.
-
Ensure readings stabilize quickly after exposure events.
-
Confirm the LCD screen updates and all values display.
-
Check for artifacts like stuck buttons, grainy text, or pixels.
By testing thoroughly and calibrating against professional equipment, you can have confidence your air monitor is providing accurate, reliable measurements.
Applications and Next Steps
With a functional Arduino air monitor, there are many possibilities for upgrades and applications:
-
Add an SD card module to log data over time.
-
Interface with a PC and visualize trends with graphs.
-
Connect to WiFi to upload data to the cloud.
-
Track indoor air quality in different rooms.
-
Deploy monitors outside to check neighborhood air pollution.
-
Alert users when air quality declines via email, text, or push notification.
-
Use the monitor for STEM education.
-
Create a public dashboard to promote awareness of local air quality.
By building on this starter project, you can expand the monitor into a powerful platform for gathering air quality data!
Conclusion
Building your own air quality monitor with an Arduino is a fun electronics project that produces an inexpensive yet surprisingly capable home air monitoring system. With basic skills in circuit design, 3D printing, programming, and calibration, you can construct a monitor that provides valuable air quality feedback using just commodity hardware and sensors. As you use and enhance the monitor, it can grow into a platform for education, citizen science, personal environmental tracking, and more. With some DIY effort, you can keep tabs on the quality of the air around you!