loading


In this Instructable, I will walk you through the steps to build an Precise Air Quality monitoring system.

It consists of an

  1. Arduino Uno
  2. 2 Grove ( MQ2 & MQ9 ) sensors
  3. MQ136 & MQ138
  4. LED display
  5. 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 :

  1. Temperature.
  2. Humidity.
  3. Methane.
  4. Butane.
  5. LPG.
  6. Smoke.
  7. Benzene.
  8. Toluene.
  9. Alcohol.
  10. Acetone.
  11. Propane.
  12. Formaldehyde gas.
  13. 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

Components:

Arduino Uno

Sharp GP2Y1010AU0F

MQ2 Grove Gas Sensor

MQ9 Grove Gas Sensor

MQ135

MQ138

DHT11

Fan (recommended 5V)

Jumpers

Breadboard

LCD display

Recommended :

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.

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

Burn-in
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).

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

Connections :

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:

  1. +5v
  2. Signal
  3. not used
  4. GND

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.

<p>what about the calibration? how do you know whether the values measured are correct?</p>
<p>Try burning something, like in the video. If value change, you have calibrated properly.</p>
<p>Hello , what about current of this sensors? whether there should be powered by external power supply? ( same MQ-2 requires 800mW )</p>
<p>Arduino will take care of that. Take a look at the connections above. Hope this helps.</p>
<p>How would you make this push data to the internet?</p>
<p>ESP 8266. I was busy with other work, sorry for late reply.</p>
<p>Thanks for your reply. I will look into it</p>
<p>U r project is cool..I am doing it.</p>
<p>That's great. Do let me know how it turns out :) </p>
<p>I am new to the gas sensors and did a simple text with MQ - 9 gas sensor.</p><p>the output is 151</p><p>151</p><p>152</p><p>they are ppm values ryt ???</p><p>I was bit confused. give me clarity.</p>
<p>I can help you better after taking a look at the code.<br>However, by looking at the values I guess they are just the analog output values given by the arduino. To get ppm values, you should take a look at the datasheet of the corresponding gas sensor (in this case MQ 9) or can also take help from the code I attached above.</p><p>Hope this helps :)</p>
With a little bit of work this could be used to graph long term air quality in an area
<p>Yes!! That's what I've been trying to do!! Trying to send the data, for now to my computer and storing it. Maybe, in sometime it'll be complete.<br>Thanks for your valuable suggestions :)</p>
That music in MQ sensor video, that's amusing.<br>Great instructable though !! Voted, Best of luck for the competition :)
<p>Hey, I noticed that now. That's sound of TV running in background. Thank you for bringing that into notice and also for your kind words !</p>
Hey, can you explain how actually gas sensors work??<br><br>Btw, great project !!
<p>Sensitive material of gas sensors is SnO2, with lower conductivity in clean air. When target pollution gas exists, the sensor&rsquo;s conductivity gets higher along with the gas concentration rising. </p><p>The graph I included in step 9 gives Rs/Ro vs ppm ratio explains this part.</p><p>Hope this helps.</p>
cool project<br>Great implementation !!<br>You have my vote, best of luck for the competition :)<br>
<p>Thank you ! I really appreciate it !</p>
<p>Thank you ! I really appreciate it !</p>
<p>Thank you ! I really appreciate it !</p>
nice project.only if you had made it on board and a little better chassis .
<p>Thank you for appreciation and your suggestions !!</p><p>It would look great fixed on to a board and in a 3D printed box, that's true. But, I believe in recycling everything so made a box at home and fixed on to a breadboard. </p><p>Glad, you liked it :)</p>
<p>This is awesome !! The best is thing is you interfaced 6 sensors !! I was trying hard to get ppm values from MQ sensors, but was unable to. The explanation helped a lot. You have my vote !! Best of luck for competition :)</p>
<p>Thanks, man !! I really appreciate it !!</p>
nice bro !
<p>Thanks for your kind words !! If you liked this please vote for it under Sensors' and First time Authors challenge. Thank you !!</p>
<p>Very nice work! This looks very well put together :)</p>
<p>Thank you very much for your appreciation!! I'm glad you liked it!! :)</p>

About This Instructable

10,109views

123favorites

License:

More by _Idee_:Precise Air Quality Monitoring System (Portable)  
Add instructable to: