Introduction: Precise Air Quality Monitoring System (Portable)
In this Instructable, I will walk you through the steps to build an Precise Air Quality monitoring system.
It consists of an
- Arduino Uno
- 2 Grove ( MQ2 & MQ9 ) sensors
- MQ136 & MQ138
- LED display
- Temperature & Humidity sensor DHT 11/22.
Arduino Uno takes data from the sensors and does the calculations so you can see real time values of the data.
As you can see the monitoring is quite compact, it is portable and can be used in many ways, example:
- Compact Weather Station (Use DHT11 only)
- Manhole gas Detection (MQ2 only)
- General Air Quality Monitoring (Entire Instructable)
The Grove gas Sensors sense :
- Formaldehyde gas.
- Hydrogen gas.
Arduino Uno R3 supports 8 analog data inputs, so the at least 8 gas sensors can be interfaced and with them almost every gas that is found in residential areas. With Arduino Mega you have 16 analog input pins,so more interfacing can be done. In this Instructable I will show you how to interface these sensors.
Why we need this : Pollution is ever-increasing.There is a need for a reliable, cost - efficient system to monitor the air around us, so we can take proper steps to minimize or stop these emissions
Note : If you like this instructable, do vote for me under the Sensor and First Time Author challenge.
Purpose : I wanted to monitor the air in my surrounding area with their concentration (ppm) values . But there was no article which could give ppm values of various gases. So, I made a full working model which displays values of various gases in ppm.
Note:The videos are trial run. They run smoothly and update the values with great ease.The videos may be shaky as I am alone shooting them :D
More videos to come.
Step 1: Specifications
Dimensions : 20*10*10
Weight : (~350 grams)
Total cost : 1600 Rs (If you remove dust sensor total cost drops to 600 Rs)
Cost of products available in market : 3500 Rs
Fan (recommended 5V)
A cardboard box ( Recycle things )
Step 2: Dust Sensor
GP2Y1010AU0F is a dust sensor by optical sensing system. An infrared emitting diode (IRED) and an phototransistor are diagonally arranged into this device. It detects the reflected light of dust in air. Especially, it is effective to detect very fine particle like the cigarette smoke. In addition it can distinguish smoke from house dust by pulse pattern of output voltage.
Sharp pin 1 (V-LED) => 5V (connected to 150ohm resister)
Sharp pin 2 (LED-GND) => Arduino GND pin
Sharp pin 3 (LED) => Arduino pin 2
Sharp pin 4 (S-GND) => Arduino GND pin
Sharp pin 5 (Vo) => Arduino A7 pin
Sharp pin 6 (Vcc) => 5V
Step 3: MQ Gas Sensors
Before using MQ sensors you need to apply Vcc for about 24 hours. Also, using extreme values of resistors can decrease your accuracy and efficiency of the system.
I have used 10 kohms resistors throughout.
Some datasheets use the term "preheat", but it is the time to burn-in the sensor. This is meant to make the sensor readings more consistent. A time of 24 hours is usually used for the burn-in time.
The Burn-in is achieved by applying normal power to the sensor (to the heater and with the 'A' and 'B' pins connected, and with a load-resistor).
The sensor needs a load-resistor at the output to ground. It's value could be from 2 kOhm to 47 kOhm. The lower the value, the less sensitive. The higher the value, the less accurate for higher concentrations of gas.
Choosing a good value for the load-resistor is only valid after the burn-in time.
Step 4: MQ Sensors Wiring
The preferred wiring is to connect both 'A' pins together and both 'B' pins together.
It is safer as well as gives more reliable output results.
In the picture 2, the heater is for +5V and is connected to both 'A' pins. This is only possible if the heater needs a fixed +5V voltage. The variable resistor in the picture is the load-resistor and it can be used to determine a good value. A fixed resistor for the load-resistor is used in most cases.
The Vout is connected to an analog input of the Arduino.
Connect analog input pins at A0,A1,A2,A3 pins of arduino.
Step 5: LCD
I put together an Arduino with :
16x2 LCD display HD44780
10k trimpot for LCD contrast
100 Ohm resistor for the LCD backlight
The LCD has 16 pins, 12 are used.
Pin1 to Ground
Pin 2 to +5V
Pin 3 to 10K trimpot center
Pin 4 (RS) to Arduino Digital Pin 3
Pin 5 (RW) to Ground
Pin 6 (E) to Arduino Digital Pin 4
Pin 7,8,9,10 - Not Used
Pin 11 (D4) to Arduino Digital Pin 5
Pin 12 (D5) to Arduino Digital Pin 6
Pin 13 (D6) to Arduino Digital Pin 7
Pin 14 (D7) to Arduino Digital Pin 8
Pin 15 (Back Light +) to 5v
Pin 16 (Back Light -) to ground via100 Ohm resistor) One side of the 10K trimpot goes to +5v the other side to ground
See the schematic diagram and pictures.
Step 6: DHT11 / DHT22
The DHT11 and DHT22 have 4 pins.You can use anyone of those.
Looking at it with the side with square cutouts in it the pins are from left to right:
- not used
It also requires a 10k pullup resistor between +5V and
Signal For this project the Signal lead goes to Digital Pin 2 on the Arduino
Step 7: Fan
Whichever fan you buy, Pay attention to specifications of the fan.
Specs would at least have :
Voltage at which it operates.
Current it pulls.
For eg: mine has 12 v, 0.14Amp
So make sure to give it 12V supply and look that only 0.14A current is passed through else, the fan may get damaged.
Step 8: Box It Up
Get any cardboard box.
Make a square hole through it at one end.
At other make small holes so that the gases are thrown out of the other end.
Step 9: Code
I would suggest you should code on your own.This would make your understanding better.
If you do not wish to code, here it is
Code is pretty much documented.
To find ppm:
I'll explain for one gas sensor, rest all are same
In figure above,
The values are plotted on a semilog paper, as you can see the values indicate 100......1000.....10000 ppm.
These values when plotted on a normal graph would represent a curve like an exponential one.
So you need to use those values as in your code.
Rs/Ro_limit = (ppm/a) ^ (1/b)
Hence, ppm = a*(Rs/Ro)^b
If any problem comes up, I am here to help.
Step 10: Some Problems You Might Face
My first attempt at interfacing all sensors didn't work properly, LCD screen would often fade out.
But it turned out that it was due to some loose connections.Look out for those if the LCD fades out, there is often some problem with connection of resistors.
In further versions you could send the data directly to PC and make a log out of it. If you wish to display the data on Serial Monitor of Arduino I will attach the second code here.
Step 11: Bundle in Together
There you go, now you have your own pollution monitoring system.
You can sense the your surroundings' air quality.
Have fun with it. Hope you like it.