Arduino Projects

Air Quality monitor using Arduino for indoor and outdoor pollution monitor

Learn how to create air quality monitor for air pollution monitor you can monitor from indoors and outdoors to check the quality of air in real time interfacing Arduino, MQ 135 and particle sensor.

Do you know how the air quality has changed from past generations to till now? Its a lot due to the pollution with mix for harmful gases into atmosphere. So monitoring the air quality in high population areas and industrial ares has become vital. Mainly for homes who have kids and old age people need to monitor the air quality and use some air purifiers available in the market. So taking this as scenario we came up with a project where you can monitor the air quality indoors as well as outdoors with the help Arduino and few sensor to get the data.

In this Project we will discuss only about the air quality monitor which displays the data on a LED Screen. For online version of this project with ESP8266 please refer:

Lets see what are the requirements to build this project.

Requirements:

Hardware Requirements:

  • Arduino Uno R3
  • MQ-135 gas sensor
  • BME 280 temperature, humidity and Pressure sensor
  • PM2.5 Dust and Particulate Matter Sensor

Software Requirements:

  • Arduino IDE

Sensor Details:

MQ-135 gas sensor:

The MQ-135 is a sensor that is responsible for detecting gases such as ammonia, alcohol, benzene, smoke and carbon dioxide. It contains basic electronics to be able to interface with a microcontroller, it has 2 outputs, one analog and one digital.

MQ-135 gas sensor component

What is it for ? The MQ-135 is an air quality control sensor which allows the detection of gases such as ammonia, alcohol, benzene, smoke and carbon dioxide with a range of 10-1000 ppm (parts per million). It is used to prevent high levels of contamination. It is recommended for homes and in industries that handle chemical compounds which can be harmful to health.

How does it work? The MQ-135 sensor has low conductivity when the air is clean. When the sensor detects gases such as ammonia, alcohol, benzene, smoke and carbon dioxide, the conductivity of the sensors is higher along with the increase in gas concentration. An electro circuit is used that converts the change in conductivity to correspond to the output signal of the gas concentration.

Technical specifications:
  • Working voltage: 5VDC.
  • Dual output: Analog output and TTL level output.
  • High sensitivity to Ammonia (NH3), Nitrogen oxides (NOx), Alcohol, Sulfides, Benzene (C6H6), Carbon Monoxide (CO), smoke and other harmful gases.
  • Adjustable sensitivity with potentiometer.
  • Detection range: 10-1000ppm.
  • Operation current: 150mA
  • Consumption power: 800mW
  • Preheat time: 20 seconds
  • Operating humidity: <95% RH
  • Operation temperature: -20 ° C ~ 70 ° C

BME-280 Temperature, humidity and pressure sensor:

What is it? The atmospheric pressure sensor is a plate that is made up of elements such as smd resistors, smd capacitors and a “BME280” chip developed by the BOSCH company and has the technology to measure pressure, temperature and humidity.

BME 280 product image

In addition, everything is integrated in a single piezo-resistive chip that is really compact and low energy consumption. They are also used in some applications such as: warning about dryness or high temperatures, measurement of volume and air flow, calculation of altitude for auto-pilot systems, adafruit IO (Internet of Things), home automation control, control of heating, ventilation, air conditioning (HVAC) and weather forecast.

Technical Specifications:
  • Operating voltage: 1.8 Volts @ 3.3 Volts
  • Pressure: 300 to 1100 hPa
  • Temperature: -40 ° C to 85 ° C
  • Relative humidity: 0-100% RH

PM2.5 Dust and Particulate Matter Sensor

With the PMS5003 PM2.5 Air Quality Sensor you can reliably measure the concentration of PM2.5 particles (which refers to the concentration of particles 2.5 microns in diameter or less).

dust particulate sensor

The sensor uses the scattering of laser light to irradiate the suspended particles in the air, then captures the scattered laser light and gets a fairly accurate estimate of the amount of suspended particles per unit volume through a microprocessor.

Interfacing Arduino with required sensors:

Lets learn how to connect all the components with the help of a schematic diagram in the below image.

Circuit Diagram:

Air Quality monitor system using Arduino circuit diagram

In the above circuit we connected 3 sensor boards. Initially we connected MQ135 with 5v VCC power supply and GND from arduino and connected the AOUT to the analog A0 pin on Arduino.

Then connected BME 280 with 3.3V  and GND from Arduino to VIN and GND of BME 280 respectively. then SCL pin to A5 and SDA pin to A4 pin of Arduino .

PMS5003 is connected to Arduino as pin1 of sensor to 5V supply from Arduino and pin2(GND) to GND, Pin 4(RX) of sensor to Tx of Arduino and Pin5(TX) of sensor to RX of Arduino. You can see the above image to know color wire of PMS5003 is for which function.

Code to upload using Arduino IDE:

Before uploading the code you need to install few required libraries listed with download links below in Arduino IDE.

Required Libraries:

  • MQ135 Library,  Download Link: here
  • BME280 Library, Download Link: here
  • Adafruit Unified Sensor Library,  Download Link: here

Disconnect the  PMS5003 Dust and Particulate Matter Sensor before uploading code because its pins are connected to TX and RX of Arduino. You can connect it again after code has uploaded.

 

Working of Air Quality monitor system using Arduino:

After uploading the code open the serial monitor of the Arduino IDE to check the air quality and its metrices like the image shown below.

airquality on serial monitor of arduino ide

Here the Quality of air is indicated in Parts Per Million (PPM) Units where lower the number of PPM indicates the good quality of air and higher the number indicates the polluted air with toxic gases which can cause health issues.

CircuitSchools Staff

We at CircuitSchools publish on basics of electronics and electric components and everything related to evolution of electrical technology with complete analysis of development boards and modules along with latest projects with innovative ideas.
Back to top button