Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Air Quality Sensor

Air Quality Sensor

Scheduled Pinned Locked Moved Hardware
calibrationaqigas sensorhchoair quality
270 Posts 46 Posters 308.8k Views 35 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • korttomaK Offline
    korttomaK Offline
    korttoma
    Hero Member
    wrote on last edited by korttoma
    #90

    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

    • Tomas
    jeylitesJ 1 Reply Last reply
    0
    • korttomaK korttoma

      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

      jeylitesJ Offline
      jeylitesJ Offline
      jeylites
      wrote on last edited by jeylites
      #91

      @korttoma

      I'm going to try experiment tomorrow... Thank you!

      1 Reply Last reply
      0
      • epierreE epierre

        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:

        • CO2 MH-Z14

        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
        J Offline
        J Offline
        jroseastro
        wrote on last edited by
        #92

        @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?

        1 Reply Last reply
        0
        • epierreE Offline
          epierreE Offline
          epierre
          Hero Member
          wrote on last edited by
          #93

          @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.

          z-wave - Vera -> Domoticz
          rfx - Domoticz <- MyDomoAtHome <- Imperihome
          mysensors -> mysensors-gw -> Domoticz

          1 Reply Last reply
          0
          • epierreE Offline
            epierreE Offline
            epierre
            Hero Member
            wrote on last edited by epierre
            #94

            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 >1000ppm

            Datasheet maionly speaks on CO, NO2 and NH3:
            http://www.seeedstudio.com/wiki/images/1/10/MiCS-6814_Datasheet.pdf

            Here is are scripts:
            http://www.seeedstudio.com/wiki/Grove_-_Multichannel_Gas_Sensor

            http://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 ppm
            

            I guess I'll make a script soon...

            z-wave - Vera -> Domoticz
            rfx - Domoticz <- MyDomoAtHome <- Imperihome
            mysensors -> mysensors-gw -> Domoticz

            VirV 1 Reply Last reply
            1
            • B Offline
              B Offline
              bhavika
              wrote on last edited by bhavika
              #95

              I think MQ131 need 24 hours preheating time.Because of preheating time it will be costly. and for MiCS 6814 how do you calculate or measured other values of gases?? Because sensor's data sheet it hard to understand

              epierreE 1 Reply Last reply
              0
              • B bhavika

                I think MQ131 need 24 hours preheating time.Because of preheating time it will be costly. and for MiCS 6814 how do you calculate or measured other values of gases?? Because sensor's data sheet it hard to understand

                epierreE Offline
                epierreE Offline
                epierre
                Hero Member
                wrote on last edited by
                #96

                @bhavika said:

                I think MQ131 need 24 hours preheating time.Because of preheating time it will be costly.

                no MQ is expected to run on battery for they always need pre-heating before getting a value.

                and for MiCS 6814 how do you calculate or measured other values of gases?? Because sensor's data sheet it hard to understand

                So fat I only use the provided library. Sensors are said to be factory calibrated, maybe a reason they are so costly. I'm not running it constantly at this time, but I saw no change in the few time I ran it so I'm still expecting to see something.

                z-wave - Vera -> Domoticz
                rfx - Domoticz <- MyDomoAtHome <- Imperihome
                mysensors -> mysensors-gw -> Domoticz

                H 1 Reply Last reply
                0
                • epierreE epierre

                  @bhavika said:

                  I think MQ131 need 24 hours preheating time.Because of preheating time it will be costly.

                  no MQ is expected to run on battery for they always need pre-heating before getting a value.

                  and for MiCS 6814 how do you calculate or measured other values of gases?? Because sensor's data sheet it hard to understand

                  So fat I only use the provided library. Sensors are said to be factory calibrated, maybe a reason they are so costly. I'm not running it constantly at this time, but I saw no change in the few time I ran it so I'm still expecting to see something.

                  H Offline
                  H Offline
                  haro
                  wrote on last edited by
                  #97

                  @epierre Hi...it is ameasing your work :D

                  I am wondering about Mq-135. We have troubles with reading differents gases.
                  From the datasheet we read the slopes
                  Gas X" X0" "Rs/R0 "Rs/R0 pendiente (log y- log y0)/(log x-log x0)"
                  Air 200 10 3.6 3.6 0.00000
                  co 200 10 1.3 2.9 -0.26783
                  nh4 200 10 0.79 2.7 -0.41024
                  c02 200 10 0.8 2.4 -0.36673
                  3/4/ 200 10 0.72 1.9 -0.32391
                  1/4/ 200 10 0.64 1.5 -0.28432
                  +- 200 10 0.59 1.4 -0.28845

                  the data are in the next worksheet https://docs.google.com/spreadsheets/d/18Z6XyxwXVsWdMIk9vbUuCucaLJDdmR0QUFSTYG79ftw/edit?usp=sharing

                  ¿may you share with us your code for this sensor in order to see your slopes and Rs/R0 values ?
                  ¿do you know the meaning of the name of gases with 3/4 or 1/4 or +-

                  thank you in advance

                  1 Reply Last reply
                  0
                  • epierreE Offline
                    epierreE Offline
                    epierre
                    Hero Member
                    wrote on last edited by epierre
                    #98

                    @haro

                    based on a datasheet, this one:
                    https://drive.google.com/file/d/0B8OvrwVDp8fCcWpHSjZNVzB1TjQ/view

                    I apply a power regression (tool: http://www.xuru.org/rt/PowR.as ) on the following points (I've not marked down values but theses are close match):

                    0.8 200 
                    1 100
                    2.3 10
                    

                    Result: y = 103.6748512 x-2.81699418
                    Residual Sum of Squares: rss = 45.01031346

                     ¿do you know the meaning of the name of gases with 3/4 or 1/4 or +-
                    

                    looks like you had a chinese datasheet ;-) just remember those are correlated gases based on particle size for those captors, so it is not very accurate...

                    You can find many more sensors hare : https://github.com/empierre/arduino/blob/master/AirQuality-Multiple_Gas_Sensor1_4.ino or simply in https://github.com/empierre/arduino/blob/master/

                    z-wave - Vera -> Domoticz
                    rfx - Domoticz <- MyDomoAtHome <- Imperihome
                    mysensors -> mysensors-gw -> Domoticz

                    H 1 Reply Last reply
                    0
                    • epierreE epierre

                      @haro

                      based on a datasheet, this one:
                      https://drive.google.com/file/d/0B8OvrwVDp8fCcWpHSjZNVzB1TjQ/view

                      I apply a power regression (tool: http://www.xuru.org/rt/PowR.as ) on the following points (I've not marked down values but theses are close match):

                      0.8 200 
                      1 100
                      2.3 10
                      

                      Result: y = 103.6748512 x-2.81699418
                      Residual Sum of Squares: rss = 45.01031346

                       ¿do you know the meaning of the name of gases with 3/4 or 1/4 or +-
                      

                      looks like you had a chinese datasheet ;-) just remember those are correlated gases based on particle size for those captors, so it is not very accurate...

                      You can find many more sensors hare : https://github.com/empierre/arduino/blob/master/AirQuality-Multiple_Gas_Sensor1_4.ino or simply in https://github.com/empierre/arduino/blob/master/

                      H Offline
                      H Offline
                      haro
                      wrote on last edited by
                      #99

                      @epierre
                      Hi, May be I do not explain my point correctly (or maybe I misundertood ), let me try again.
                      We adopt a code, which is the next. The blue lines are the points (for each gas we need two points) that we need.
                      https://docs.google.com/document/d/1CevnhBLL9uoyZ31kkrMn-SXeOF_4e9YFGmchj46pGPY/edit?usp=sharing

                      Specifically we read from the datasheet the pairs of points for CO
                      point1 (lg200 , lg1.3)
                      Point2 (lg10, lg2.9)
                      then, we construct the data format:{ x, y, slope};
                      COCurve[3] = {1.0,0.462,-0.268};

                      We are wondering about the pair of points for the others gases or the { x, y, slope} data for them, could you share them?.

                      and the other hand, the name of gases with 3/4 or 1/4 or +- appears as well in your datasheet (figure 3)... do you know why?

                      thank you so much

                      1 Reply Last reply
                      0
                      • epierreE Offline
                        epierreE Offline
                        epierre
                        Hero Member
                        wrote on last edited by
                        #100

                        I prefer the power regression than the curves.

                        From your datapoints :
                        1.3 200
                        2.9 10

                        I find:
                        y = 532.6744764 x-3.73371402
                        rss=0

                        I don't remember where I found the datasheet with the chinese names that I translated through google.

                        z-wave - Vera -> Domoticz
                        rfx - Domoticz <- MyDomoAtHome <- Imperihome
                        mysensors -> mysensors-gw -> Domoticz

                        H 1 Reply Last reply
                        0
                        • epierreE epierre

                          I prefer the power regression than the curves.

                          From your datapoints :
                          1.3 200
                          2.9 10

                          I find:
                          y = 532.6744764 x-3.73371402
                          rss=0

                          I don't remember where I found the datasheet with the chinese names that I translated through google.

                          H Offline
                          H Offline
                          haro
                          wrote on last edited by
                          #101

                          @epierre Now I see your point of view and of course it is better way to reduce the error.

                          in the other hand, I found the datasheet in chinese an then a friend translate it.
                          the meaning of the name of gases is for 3/4 (Alcohol), 1/4 (Tolueno) or +- (acetona)

                          Thank you so much.

                          1 Reply Last reply
                          0
                          • Y Offline
                            Y Offline
                            Yuki M
                            wrote on last edited by Yuki M
                            #102

                            Hi,

                            I've started working with an MQ135 sensor, attached to a board like the disucssion you had from a year ago. I measured some of the resistances between the Aouts and the sensor pins and seems similar with the 1kohm resistance between AO and Gnd, and the pot not changing the output.

                            I was wondering if anyone managed to calibrate their board using the AO of this board, and if so how? I can't seem to get a good resolution, as it has noise of at least in the 10's of ppm.

                            I'm considering whether its simpler to by pass the board and its amplifier, and directly hook set up onto the sensor itself with the correct resistors.

                            epierreE 1 Reply Last reply
                            0
                            • Y Yuki M

                              Hi,

                              I've started working with an MQ135 sensor, attached to a board like the disucssion you had from a year ago. I measured some of the resistances between the Aouts and the sensor pins and seems similar with the 1kohm resistance between AO and Gnd, and the pot not changing the output.

                              I was wondering if anyone managed to calibrate their board using the AO of this board, and if so how? I can't seem to get a good resolution, as it has noise of at least in the 10's of ppm.

                              I'm considering whether its simpler to by pass the board and its amplifier, and directly hook set up onto the sensor itself with the correct resistors.

                              epierreE Offline
                              epierreE Offline
                              epierre
                              Hero Member
                              wrote on last edited by
                              #103

                              @Yuki-M said:

                              Hi,

                              I've started working with an MQ135 sensor, attached to a board like the disucssion you had from a year ago. I measured some of the resistances between the Aouts and the sensor pins and seems similar with the 1kohm resistance between AO and Gnd, and the pot not changing the output.

                              I was wondering if anyone managed to calibrate their board using the AO of this board, and if so how? I can't seem to get a good resolution, as it has noise of at least in the 10's of ppm.

                              I'm considering whether its simpler to by pass the board and its amplifier, and directly hook set up onto the sensor itself with the correct resistors.

                              Calibration is not possible as it varies between the same sensors of this construction class. Check datasheet on minimal sensibility also on low and max values.

                              Also without a gas concentration it is not possible to calibrate it. The best guess is that co2now.org gives you that outside (aka clean air) it is 399 for CO2, but that would be only for CO2 and not the other gases !

                              z-wave - Vera -> Domoticz
                              rfx - Domoticz <- MyDomoAtHome <- Imperihome
                              mysensors -> mysensors-gw -> Domoticz

                              1 Reply Last reply
                              0
                              • Y Offline
                                Y Offline
                                Yuki M
                                wrote on last edited by
                                #104

                                @epierre Thanks for a rapid response!
                                Yes I've been trying to calibrate it assuming out door air is at 399ppm. I understand each one has variances but would like to know how you guys worked it out.
                                I'm using
                                ppm = 116.6020682 (Rs/Ro)^-2.769034857
                                from davide's blog http://davidegironi.blogspot.ch/2014/01/cheap-co2-meter-using-mq135-sensor-with.html#.VinvWX4rIuU

                                Since the board show RL, I took that to calculate Rs. This lets me calculate Ro, thus calibrate it.

                                Not quite sure where I'm going wrong. I had it working 8 months ago, and came back to it and couldn't figure out how i had it working so well.. I was able to get pretty nice graphs and now its very unstable.

                                I'm having a play around with it, you can see my current points here https://thingspeak.com/channels/31162

                                epierreE 1 Reply Last reply
                                0
                                • Y Yuki M

                                  @epierre Thanks for a rapid response!
                                  Yes I've been trying to calibrate it assuming out door air is at 399ppm. I understand each one has variances but would like to know how you guys worked it out.
                                  I'm using
                                  ppm = 116.6020682 (Rs/Ro)^-2.769034857
                                  from davide's blog http://davidegironi.blogspot.ch/2014/01/cheap-co2-meter-using-mq135-sensor-with.html#.VinvWX4rIuU

                                  Since the board show RL, I took that to calculate Rs. This lets me calculate Ro, thus calibrate it.

                                  Not quite sure where I'm going wrong. I had it working 8 months ago, and came back to it and couldn't figure out how i had it working so well.. I was able to get pretty nice graphs and now its very unstable.

                                  I'm having a play around with it, you can see my current points here https://thingspeak.com/channels/31162

                                  epierreE Offline
                                  epierreE Offline
                                  epierre
                                  Hero Member
                                  wrote on last edited by
                                  #105

                                  @Yuki-M said:

                                  @epierre Thanks for a rapid response!
                                  Yes I've been trying to calibrate it assuming out door air is at 399ppm. I understand each one has variances but would like to know how you guys worked it out.
                                  I'm using
                                  ppm = 116.6020682 (Rs/Ro)^-2.769034857
                                  from davide's blog http://davidegironi.blogspot.ch/2014/01/cheap-co2-meter-using-mq135-sensor-with.html#.VinvWX4rIuU

                                  Since the board show RL, I took that to calculate Rs. This lets me calculate Ro, thus calibrate it.

                                  Not quite sure where I'm going wrong. I had it working 8 months ago, and came back to it and couldn't figure out how i had it working so well.. I was able to get pretty nice graphs and now its very unstable.

                                  would say: let it burn for 24/48 hours to leave it clean itself ;-)

                                  z-wave - Vera -> Domoticz
                                  rfx - Domoticz <- MyDomoAtHome <- Imperihome
                                  mysensors -> mysensors-gw -> Domoticz

                                  1 Reply Last reply
                                  0
                                  • B Offline
                                    B Offline
                                    bhavika
                                    wrote on last edited by
                                    #106

                                    IN MiCS 2614 , sensitivity factor is defined by "Rs at 100 ppb of O3 divided by Rs at 50 ppb of O3". From where you measured Rs at 100 ppb or 50 ppb.???

                                    epierreE 1 Reply Last reply
                                    0
                                    • HeinzH Offline
                                      HeinzH Offline
                                      Heinz
                                      Hero Member
                                      wrote on last edited by Heinz
                                      #107

                                      Adjusting my mq-135 sensor took several atempts as the CO2 value of the atmosphere is not a constant value of 399ppm.
                                      This value is measured in Hawaii ( see http://co2now.org/ ) and is probably significantly lower than at your home. In germany for example you should calibrate your sensor when the wind comes from west over the atlantic which brings fresh air along. See http://www.donnerwetter.de/deutschland/co2.htm

                                      Everytime my sensor passed values below 400 I adjusted the R0 value. In the end I modified the sketch to be able to send this R0 value from FHEM to the sensor to avoid recompiling the sketch everytime.
                                      See
                                      https://github.com/windkh/mysensors/tree/master/CO2Sensor/CO2sensor.ino Line 440ff

                                      image.png

                                      1 Reply Last reply
                                      1
                                      • HeinzH Offline
                                        HeinzH Offline
                                        Heinz
                                        Hero Member
                                        wrote on last edited by Heinz
                                        #108

                                        The sensor is in my kitchen. The value in the screenshot is very high as I made some french fries 2 hours ago.
                                        image.png

                                        1 Reply Last reply
                                        1
                                        • epierreE Offline
                                          epierreE Offline
                                          epierre
                                          Hero Member
                                          wrote on last edited by epierre
                                          #109

                                          @Heinz so bad I don't have a MQ135 running anymore to compare, here are the MH-Z14 curves I have near my desk.

                                          chart(6).png

                                          z-wave - Vera -> Domoticz
                                          rfx - Domoticz <- MyDomoAtHome <- Imperihome
                                          mysensors -> mysensors-gw -> Domoticz

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          17

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular