Air Quality Sensor
-
Now changed my sensor according to this (disconnected the OP related to DOUT) :
Please confirm that this is how it is preferred to be connected.
@korttoma I have found a sketch that may interrest you about the gas sensors boards:
http://www.parallax.com/sites/default/files/downloads/27983-Gas-Sensor-Board-A-Schematic.pdf
Their document speaks also about calibrating some gases:
http://www.parallax.com/sites/default/files/downloads/27983-Gas-Sensor-Board-Guide-v1.0.pdf -
@Yveaux you mean something like this ?
return ( (((float)RL_VALUE*(1023.0 - (float) raw_adc)) / (float) raw_adc));I somehow forked the discussion on arduino.cc and sent an email in parallel do Davide Gironi for I would like to understand his formula as opposed to the curve approach.
@Yveaux I have doubts about calculing the resistance, for it is depending on the steps, either 1024 or 4096, and/or the voltage either 5V or 3.3V.
I started with this formulae:
return ( ((float)RL_VALUE*(1023-raw_adc)/raw_adc));But saw Davide Gironi using this one:
return (long)((long)(1024*(long)RL_VALUE)/raw_adc-(long)RL_VALUE);RL_VALUE=22000
-
@Yveaux @korttoma
Bummer... this is the same formula when doing the reduction.... one is 1023 the other 1024 the only change.The RL_VALUE for Davide was 22k, when I mesure the resistance with Analog out with ground, I get 0,996 or 0,999 ohms depending on the sensor. I guess this is the RL_VALUE of the board which is way below the sensor maker recommendation (between 10K and 47K for a MQ135).
Also, I saw that the pot on the board does not change the analog to ground resistance, meaning it is used only for comparison of the digital output....
Am I correct in mesuring this ?
-
@Yveaux @korttoma
Bummer... this is the same formula when doing the reduction.... one is 1023 the other 1024 the only change.The RL_VALUE for Davide was 22k, when I mesure the resistance with Analog out with ground, I get 0,996 or 0,999 ohms depending on the sensor. I guess this is the RL_VALUE of the board which is way below the sensor maker recommendation (between 10K and 47K for a MQ135).
Also, I saw that the pot on the board does not change the analog to ground resistance, meaning it is used only for comparison of the digital output....
Am I correct in mesuring this ?
-
@Yveaux Doing so, I have used a RL_VALUE for each board I mesured, one went to 5MOhms...
MQ2:-8.85 MQ6:0.00 MQ131:0.00 TGS2600:0.00 MQ135:0.00 2SH12:-155004.00 TGZS2602:0.00Something to be noted: same boards have the same resistance, whatever the sensor maker recommendation, this is a pity...
The output I have:
MQ2 :LPG :7ppm CO :0ppm SMOKE :10ppm MQ6 :LPG :0ppm CH4 :0ppm MQ131 :CL2 :0ppm O3 :0ppm TGS2600:H2 :0ppm C2H5OH:0ppm C4H10 :0ppm MQ135 :CO2 :0ppm CO :0ppm CH3 :0ppm NH4 :0ppm 2SH12 :SO2 :-154588.20 raw TGS2602:C7H8 :0ppm Dust :raw : 0 Voltage: 0.00 - Dust Density: -0.10something to remember: MQ135 was calibrated for 1ppm of CO, not 399ppm of CO2, so the calculated value is very low, a per gas Ro must be calculated (clean air calibration) if several gas on one sensor is required to be displayed.
-
Some interresting points from another discussion on the MQ138 that is given for HCHO.
Historically a datasheet said so, but it is impossible to read the datasheet curves:
http://china-total.com/Product/meter/gas-sensor/MQ138.pdfThe latest ones do not speak of HCHO any more.
An available alternative: grove is a wsp2110 and datasheet can be found.
http://www.seeedstudio.com/wiki/Grove_-_HCHO_Sensor -
Hello all,
I'm new here, thanks to this topic very interesting for my personal project: a mobile air quality sensor.
(sorry for my english, i'm french)Fistly, congrat's @epierre and the other, for having shared all this informations!
(it's a litte funny because we had the same idea in the almost same time)
So after having read the entire subject, here my questions (the number in front is the number post):_
17 - @epierre, I haven't well understand How you can distinguish individual gas from a sensor who react with several gas.45 - The "Wunder Weather" list that you talked about, it's a website?
55 - What David did you answer to you about "if he speaks of the organic sensor or the ceramic ones"?
Moreover, what are the organic sensors? Have you example?72- On winsensor.com, an chinese gas sensor producer, the MQ-7 is more powerfull... I don't know who trust, maybe it's not the same?? See the PDF datasheet here.
81 - Where did you read that the lastest one don't speak of HCHO anymore?
After some research, I founded two, one who speak about HCHO here in english , and the other who don't....but I'm not sure (beacause in chinese) here.Otherwise, for the WSP2110 datasheet, it is here! But chinese too =/
Regards,
Alex. -
Hello,
This is a short post, half has been lost in a forum crash, I hope the best remains ;-)
17 - @epierre, I haven't well understand How you can distinguish individual gas from a sensor who react with several gas.You cannot as I showed below with the broken perfume bottle, you can guess there is one, but not which one.
45 - The "Wunder Weather" list that you talked about, it's a website?This is wunderground.com
55 - What David did you answer to you about "if he speaks of the organic sensor or the ceramic ones"? Moreover, what are the organic sensors? Have you example?The organic are the one that have a lifetime of 2 years, calibrated but wery expensive (aroung $150+ apiece), the winseng one for example, big and round.
72- On winsensor.com, an chinese gas sensor producer, the MQ-7 is more powerfull... I don't know who trust, maybe it's not the same?? See the PDF datasheet here.this is hard to say... the MQ-7 is quite special with a sequence to power it up, and readings every period.
81 - Where did you read that the lastest one don't speak of HCHO anymore? After some research, I found two, one who speak about HCHO here in english , and the other who don't....but I'm not sure (beacause in chinese) here.I don't see mention of HCHO (formaldehyde) in the english one (n-Hexane, Benzene, NH3, alcohol, ,smoke, CO. I found one in chinese with the link above but the curve couldn't be exploited. Please remark that Alcohool has not a single formula, but here they show only one curve, not very precise.
Otherwise, for the WSP2110 datasheet, it is here! But chinese too =/Yes for this one something can be done, but there is no for WSP1110 there is no...
-
Hello
@epierre : after received the PPD42NS, compared to the DSM501A, which one is the best do you think?
Other things, I planned to purchase soon the sensors that I need for my air station.
You made a list on the #1 post, and it's very useful thanks, but now I have to choose between them for each gas targeted (maybe some sensors are still missing on the list below)Which one appears for you, the better for each gas, with a reasonable price?
O3 MQ131 MICS-2610 Mics-2614 NO2 MiCS-2710 MiCS-2714 NO ? PM10 PM2.5 PPD42NS SamYoung DSM501 Benzene MQ135 CO MQ307A MQ309A AQ-7 MiCS-5525 TGS2442 So2 MQ136 COV MQ135 TGS2602 CO2 MQ135 -
Hello
@epierre : after received the PPD42NS, compared to the DSM501A, which one is the best do you think?
Other things, I planned to purchase soon the sensors that I need for my air station.
You made a list on the #1 post, and it's very useful thanks, but now I have to choose between them for each gas targeted (maybe some sensors are still missing on the list below)Which one appears for you, the better for each gas, with a reasonable price?
O3 MQ131 MICS-2610 Mics-2614 NO2 MiCS-2710 MiCS-2714 NO ? PM10 PM2.5 PPD42NS SamYoung DSM501 Benzene MQ135 CO MQ307A MQ309A AQ-7 MiCS-5525 TGS2442 So2 MQ136 COV MQ135 TGS2602 CO2 MQ135@alex said:
@epierre : after received the PPD42NS, compared to the DSM501A, which one is the best do you think?
I currently have only the DSL501A working, many issues with the dead Shinyei (still in dispute escalade) and getting one from another seller takes so much time...
Which one appears for you, the better for each gas, with a reasonable price?
O3 MQ131 MICS-2610 Mics-2614
NO2 MiCS-2710 MiCS-2714
NO ?
PM10 PM2.5 PPD42NS SamYoung DSM501
Benzene MQ135
CO MQ307A MQ309A AQ-7 MiCS-5525 TGS2442
So2 MQ136
COV MQ135 TGS2602
CO2 MQ135The price is low, but so is the result. Only the CO-MH-Z14 is calibrated. For all the others, there is the calibration issue.
See the sketch for a lit of known/tested sensors (some I don't have but a frien asked me for the curves so I added it to the Mega sketch)
https://github.com/empierre/arduino/blob/master/AirQuality-Multiple_Gas_Sensor1_4.ino- The MiCS are problematic to find in Europe (!) so I have only one that I have not yet tested.
- The Figaro have been tested, but it is hard to know how to really test them on some gases...
- The MQxx:
- MQ2: good result on smoke
- MQ135 good result on CO2
The others I'm not yet able to give any opinion.
-
Great project!
I hooked up an MQ135 (sensor on a little pcb with (i think) smd resistor 102 (=1K ohm) between gnd and B )
The readings are however all over the place (135ppm to 1332ppm), so i think i need to calibrate. The raw reading is alwas in the range 71-80 (inside).I know i have to get it outside and the reading should be 392 or 399 ppm but i am unsure what var i should change?
The sketch says mq135_ro (this has to be tuned 10K Ohm) but that does not seem to be used in the calculations?I tried the sensor outside, but I am getting some different readings: the measured value changes from 59 to 82. The mq135_ro (i suppose that's the suggested ro) from 3081.00 to 81416 (does not go linear with the measured value?
The sensor was heated for more than 24h and then moved outside (started measuring after 5min, in windy conditions) -
I take it that you are talking about the Air_Quality sketch right? The problem is that you do not have the device files for this kind of sensor in your Vera MySensor plugin. There is another thread that contains the files, I'll see if I can find it.
Edit: Found the thread -> http://forum.mysensors.org/topic/661/assistance-needed-completing-gas-air-quality-sensor
-
I take it that you are talking about the Air_Quality sketch right? The problem is that you do not have the device files for this kind of sensor in your Vera MySensor plugin. There is another thread that contains the files, I'll see if I can find it.
Edit: Found the thread -> http://forum.mysensors.org/topic/661/assistance-needed-completing-gas-air-quality-sensor
-
Air Quality Index is a combination of several sensors values:
- sulfur dioxide (SO2) MQ136 / (avoid:2SH12 no datasheet)
- nitrogen dioxide (NO2) MiCS-2710 MiCS-2714 MICS-6814
- carbon monoxide (CO) MQ-7 MiCS-5525 TGS2442 MICS-6814
- ozone (O3) MQ131 MICS-2610 MICS-2614
- Particles concentration: PM2.5 and PM10 (SamYoung DSM501, Shinyei_PPD42NS, avoid: Sharp_GP2Y1010AU)
Additional gases can be interesting to track:
Current work being done:
- manage default Ro once
- take into account humidity
- manage to get proper values from TGS2600
- possibility to have a push if a value goes up too quick (for deadly gases even without calibration)
What is done:
- remove powerdown to keep heaters on
- add a five minute pre-heat on each startup
- removed the powerdown
- 2SH12 datasheet doesn't exist
WARNING: all sensors differs even within the same reference, a calibration has to be done each time. Do not rely upon a sketch result with deadly gases.
Working sketch in 1.4/1.5:
- https://github.com/empierre/arduino/blob/master/MQv01dgi_1_4.ino (for a Mega, MQ2, MQ6, MQ131, MQ136, MQ138, TGS2600, TGS2602, HCHO, Barometer BMP085, DHT11)
- https://github.com/empierre/arduino/blob/master/AirQuality-CO-NO2-NH3.ino for MICS-6814
- https://github.com/empierre/arduino/blob/master/CO2-MH-Z14.ino
- https://github.com/empierre/arduino/blob/master/DustSensor_SamYoung_DSM501.ino
- https://github.com/empierre/arduino/blob/master/DustSensor_Shinyei_PPD42NS.ino
@epierre thank you for sharing this code - your work is stellar. I'm working with a team of three other people to build a payload for a near space weather balloon launch in a couple of weeks.
We're using the MQ131 Ozone Gas Sensor and your code has been quite useful to us. One question though, when our data logger reads the sensor we're getting a single number value. We're not exactly sure what that number means. Could you help explain what we're seeing? Are we getting a ppb number? ppm? Or something else altogether?
-
@jroseastro hello, first of all the MQ series are not so precise as that, use it for a test run, but for serious purpose please consider something better and with calibration.
Ozone is quite chalenging, if you go very high, since the MQ nead heating to work, it will drain fast your batteries.
For any sensor always refer to the datasheet.
MQ131 is given from 5 to 100 ppb (reason you get only a single value) if you use the provided calibration sheet. So the result is the one from the curve. We've had a discussion not yet settled with @hek about units and this is why I've not put it, but maybe I should uniformize everything in ppm since this is the most prevalent value used.
Also the datasheet says you need 6V to heat it, so you cannot heat it from the arduino except with a step up (not that good) or an external power source (best) with a voltage regulator.
-
I'm now testing the MICS-6814 (3 sensors in one) given for :
Carbon monoxide CO 1 -1000ppm
**Nitrogen dioxide NO2 0.05 –10ppm **
Ethanol C2H5OH 10 –500ppm
Hydrogen H2 1 –1000ppm
Ammonia NH3 1 –500ppm
Methane CH4 >1000ppm
Propane C3H8 >1000ppm
Iso-butane C4H10 >1000ppmDatasheet maionly speaks on CO, NO2 and NH3:
http://www.seeedstudio.com/wiki/images/1/10/MiCS-6814_Datasheet.pdfHere is are scripts:
http://www.seeedstudio.com/wiki/Grove_-_Multichannel_Gas_Sensorhttp://www.seeedstudio.com/wiki/images/1/10/MiCS-6814_Datasheet.pdf
Some readings:
The concentration of NH3 is 0.99 ppm The concentration of CO is 1.20 ppm The concentration of NO2 is 0.15 ppm The concentration of C3H8 is 1000.04 ppm The concentration of C4H10 is 999.98 ppm The concentration of CH4 is 2991.14 ppm The concentration of H2 is 1.09 ppm The concentration of C2H5OH is 1.40 ppmI guess I'll make a script soon...
