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. MH-Z14A CO2 sensor

MH-Z14A CO2 sensor

Scheduled Pinned Locked Moved Hardware
25 Posts 5 Posters 16.9k Views 6 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.
  • FotoFieberF FotoFieber

    @korttoma
    Where is the preheat logic in your sketch?

    Values in the preheat time could be wrong....

    korttomaK Offline
    korttomaK Offline
    korttoma
    Hero Member
    wrote on last edited by
    #15

    @FotoFieber Yeah, I don't have preheat logic but that would only account for values when I first plug it in. I get the strange values even if it has been running for weeks. I will try to get a graph of what I see this evening so you can see what I mean. I'm seriously considering to just exclude the value 562 from being sent to the controller.

    • Tomas
    alexsh1A 1 Reply Last reply
    0
    • korttomaK korttoma

      @FotoFieber Yeah, I don't have preheat logic but that would only account for values when I first plug it in. I get the strange values even if it has been running for weeks. I will try to get a graph of what I see this evening so you can see what I mean. I'm seriously considering to just exclude the value 562 from being sent to the controller.

      alexsh1A Offline
      alexsh1A Offline
      alexsh1
      wrote on last edited by
      #16

      @korttoma Sounds like you have a faulty sensor. Did you try analogue output? This is just to make sure the sensor is working.

      There are PWM or UART.
      Did you try both of them? I am using 5V Arduino Nano with no problem.

      The digital pins communicate via PWM or UART. Output (and input for UART) of these ports work on 3.3 Volts - this means you should change the ARef of your Arduino - or rescale your values
      
      
      1 Reply Last reply
      0
      • korttomaK Offline
        korttomaK Offline
        korttoma
        Hero Member
        wrote on last edited by
        #17

        0_1479910781525_InluftCO2.JPG

        • Tomas
        1 Reply Last reply
        0
        • alexsh1A Offline
          alexsh1A Offline
          alexsh1
          wrote on last edited by
          #18

          @korttoma try to put it outside for some time to recalibrate. If it does not help, you may need to calibrate it.

          Or you just got a bad one.

          korttomaK 1 Reply Last reply
          0
          • alexsh1A alexsh1

            @korttoma try to put it outside for some time to recalibrate. If it does not help, you may need to calibrate it.

            Or you just got a bad one.

            korttomaK Offline
            korttomaK Offline
            korttoma
            Hero Member
            wrote on last edited by korttoma
            #19

            @alexsh1 Will the sensor really recalibrate by itself if I put it outside?

            I could send a "zero calibration" command via serial but then I would need to "input Nitrogen gas for 5 minutes when make zero calibration. "

            Instead of exposing it to nitrogen gas could I just like you said put it outside and then send the "zero calibration" command?

            To do the " span calibration" I would need to know what kind of values to send to it and I have no idea.

            btw, here are some values I read now via serial at the office (I do not get the 562 value so far) but does these values seem reasonable for a well ventilated office?

            
            HiResp :3
            LoResp :-21
            Tem.channel :63
            c02ppm :747 
            
            HiResp :3
            LoResp :124
            Tem.channel :63
            c02ppm :892
            
            
            HiResp :3
            LoResp :21
            Tem.channel :63
            c02ppm :789
            
            HiResp :2
            LoResp :-57
            Tem.channel :63
            c02ppm :455
            
            HiResp :2
            LoResp :-110
            Tem.channel :63
            c02ppm :402
            
            HiResp :2
            LoResp :99
            Tem.channel :63
            c02ppm :611
            
            HiResp :2
            LoResp :51
            Tem.channel :63
            c02ppm :563
            
            HiResp :2
            LoResp :20
            Tem.channel :63
            c02ppm :532
            
            HiResp :1
            LoResp :-2
            Tem.channel :63
            c02ppm :254
            
            HiResp :1
            LoResp :-32
            Tem.channel :63
            c02ppm :224
            
            HiResp :1
            LoResp :-55
            Tem.channel :63
            c02ppm :201
            
            HiResp :1
            LoResp :-68
            Tem.channel :63
            c02ppm :188
            
            HiResp :1
            LoResp :-75
            Tem.channel :63
            c02ppm :181
            
            HiResp :1
            LoResp :-79
            Tem.channel :63
            c02ppm :177
            
            HiResp :1
            LoResp :-98
            Tem.channel :63
            c02ppm :158
            
            HiResp :1
            LoResp :-102
            Tem.channel :63
            c02ppm :154
            
            HiResp :1
            LoResp :-109
            Tem.channel :63
            c02ppm :147
            
            HiResp :1
            LoResp :-116
            Tem.channel :63
            c02ppm :140
            
            HiResp :1
            LoResp :-125
            Tem.channel :63
            c02ppm :131
            
            HiResp :1
            LoResp :-124
            Tem.channel :63
            c02ppm :132
            
            HiResp :1
            LoResp :111
            Tem.channel :63
            c02ppm :367
            
            HiResp :1
            LoResp :115
            Tem.channel :63
            c02ppm :371
            
            HiResp :1
            LoResp :121
            Tem.channel :63
            c02ppm :377
            
            HiResp :1
            LoResp :114
            Tem.channel :63
            c02ppm :370
            
            HiResp :1
            LoResp :-62
            Tem.channel :63
            c02ppm :194
            
            HiResp :1
            LoResp :-7
            Tem.channel :63
            c02ppm :249
            
            HiResp :1
            LoResp :-53
            Tem.channel :63
            c02ppm :203
            
            HiResp :1
            LoResp :-68
            Tem.channel :63
            c02ppm :188
            
            HiResp :1
            LoResp :-96
            Tem.channel :63
            c02ppm :160
            
            HiResp :1
            LoResp :-111
            Tem.channel :63
            c02ppm :145
            
            HiResp :1
            LoResp :-121
            Tem.channel :63
            c02ppm :135
            
            HiResp :1
            LoResp :-127
            Tem.channel :63
            c02ppm :129
            
            HiResp :1
            LoResp :-124
            Tem.channel :63
            c02ppm :132
            
            HiResp :1
            LoResp :-126
            Tem.channel :63
            c02ppm :130
            
            HiResp :1
            LoResp :-126
            Tem.channel :63
            c02ppm :130
            
            HiResp :1
            LoResp :-110
            Tem.channel :63
            c02ppm :146
            
            HiResp :1
            LoResp :-110
            Tem.channel :63
            c02ppm :146
            
            HiResp :1
            LoResp :-60
            Tem.channel :63
            c02ppm :196
            
            HiResp :1
            LoResp :-69
            Tem.channel :63
            c02ppm :187
            
            HiResp :1
            LoResp :-101
            Tem.channel :63
            c02ppm :155
            
            HiResp :1
            LoResp :-104
            Tem.channel :63
            c02ppm :152
            
            HiResp :1
            LoResp :-114
            Tem.channel :63
            c02ppm :142
            
            HiResp :1
            LoResp :-128
            Tem.channel :63
            c02ppm :128
            
            HiResp :1
            LoResp :-122
            Tem.channel :63
            c02ppm :134
            
            HiResp :1
            LoResp :122
            Tem.channel :63
            c02ppm :378
            
            HiResp :1
            LoResp :119
            Tem.channel :63
            c02ppm :375
            
            HiResp :1
            LoResp :-128
            Tem.channel :63
            c02ppm :128
            
            HiResp :1
            LoResp :-86
            Tem.channel :63
            c02ppm :170
            
            HiResp :1
            LoResp :-110
            Tem.channel :63
            c02ppm :146
            
            HiResp :1
            LoResp :-123
            Tem.channel :63
            c02ppm :133
            
            HiResp :1
            LoResp :-101
            Tem.channel :63
            c02ppm :155
            
            HiResp :1
            LoResp :-75
            Tem.channel :63
            c02ppm :181
            
            HiResp :1
            LoResp :-92
            Tem.channel :63
            c02ppm :164
            
            HiResp :1
            LoResp :-101
            Tem.channel :63
            c02ppm :155
            
            HiResp :1
            LoResp :-123
            Tem.channel :63
            c02ppm :133
            
            HiResp :1
            LoResp :-114
            Tem.channel :63
            c02ppm :142
            
            HiResp :1
            LoResp :-127
            Tem.channel :63
            c02ppm :129
            
            HiResp :1
            LoResp :-120
            Tem.channel :63
            c02ppm :136
            
            HiResp :1
            LoResp :126
            Tem.channel :63
            c02ppm :382
            
            HiResp :1
            LoResp :118
            Tem.channel :63
            c02ppm :374
            
            HiResp :1
            LoResp :-127
            Tem.channel :63
            c02ppm :129
            
            HiResp :1
            LoResp :118
            Tem.channel :63
            c02ppm :374
            
            HiResp :1
            LoResp :120
            Tem.channel :63
            c02ppm :376
            
            HiResp :1
            LoResp :118
            Tem.channel :63
            c02ppm :374
            
            HiResp :1
            LoResp :115
            Tem.channel :63
            c02ppm :371
            
            HiResp :1
            LoResp :124
            Tem.channel :63
            c02ppm :380
            
            HiResp :1
            LoResp :120
            Tem.channel :63
            c02ppm :376
            
            HiResp :1
            LoResp :-119
            Tem.channel :63
            c02ppm :137
            
            HiResp :1
            LoResp :-126
            Tem.channel :63
            c02ppm :130
            
            HiResp :1
            LoResp :-127
            Tem.channel :63
            c02ppm :129
            
            HiResp :1
            LoResp :-124
            Tem.channel :63
            c02ppm :132
            
            HiResp :1
            LoResp :121
            Tem.channel :63
            c02ppm :377
            
            HiResp :1
            LoResp :114
            Tem.channel :63
            c02ppm :370
            
            HiResp :1
            LoResp :108
            Tem.channel :63
            c02ppm :364
            
            HiResp :1
            LoResp :108
            Tem.channel :63
            c02ppm :364
            
            HiResp :1
            LoResp :119
            Tem.channel :63
            c02ppm :375
            
            HiResp :1
            LoResp :-110
            Tem.channel :63
            c02ppm :146
            
            HiResp :1
            LoResp :124
            Tem.channel :63
            c02ppm :380
            
            HiResp :1
            LoResp :127
            Tem.channel :63
            c02ppm :383
            
            HiResp :1
            LoResp :-43
            Tem.channel :63
            c02ppm :213
            
            HiResp :1
            LoResp :-72
            Tem.channel :63
            c02ppm :184
            
            HiResp :1
            LoResp :-77
            Tem.channel :63
            c02ppm :179
            
            HiResp :1
            LoResp :-63
            Tem.channel :63
            c02ppm :193
            
            HiResp :1
            LoResp :-92
            Tem.channel :63
            c02ppm :164
            
            HiResp :1
            LoResp :-105
            Tem.channel :63
            c02ppm :151
            
            HiResp :1
            LoResp :-116
            Tem.channel :63
            c02ppm :140
            
            HiResp :2
            LoResp :41
            Tem.channel :63
            c02ppm :553
            
            HiResp :2
            LoResp :47
            Tem.channel :63
            c02ppm :559
            
            HiResp :2
            LoResp :26
            Tem.channel :63
            c02ppm :538
            
            HiResp :2
            LoResp :-107
            Tem.channel :63
            c02ppm :405
            
            HiResp :2
            LoResp :-76
            Tem.channel :63
            c02ppm :436
            
            HiResp :2
            LoResp :-97
            Tem.channel :63
            c02ppm :415
            
            HiResp :2
            LoResp :-109
            Tem.channel :63
            c02ppm :403
            
            HiResp :2
            LoResp :106
            Tem.channel :63
            c02ppm :618
            
            HiResp :2
            LoResp :-96
            Tem.channel :63
            c02ppm :416
            
            HiResp :2
            LoResp :80
            Tem.channel :63
            c02ppm :592
            
            HiResp :2
            LoResp :69
            Tem.channel :63
            c02ppm :581
            
            HiResp :2
            LoResp :40
            Tem.channel :63
            c02ppm :552
            
            HiResp :2
            LoResp :84
            Tem.channel :63
            c02ppm :596
            
            HiResp :2
            LoResp :45
            Tem.channel :63
            c02ppm :557
            
            HiResp :2
            LoResp :3
            Tem.channel :63
            c02ppm :515
            
            HiResp :1
            LoResp :-30
            Tem.channel :63
            c02ppm :226
            
            HiResp :1
            LoResp :-62
            Tem.channel :63
            c02ppm :194
            
            HiResp :1
            LoResp :-73
            Tem.channel :63
            c02ppm :183
            
            HiResp :1
            LoResp :-75
            Tem.channel :63
            c02ppm :181
            
            HiResp :1
            LoResp :-96
            Tem.channel :63
            c02ppm :160
            
            HiResp :1
            LoResp :-89
            Tem.channel :63
            c02ppm :167
            
            HiResp :1
            LoResp :-101
            Tem.channel :63
            c02ppm :155
            
            HiResp :1
            LoResp :-112
            Tem.channel :63
            c02ppm :144
            
            HiResp :1
            LoResp :-107
            Tem.channel :63
            c02ppm :149
            
            HiResp :1
            LoResp :-112
            Tem.channel :63
            c02ppm :144
            
            HiResp :1
            LoResp :-110
            Tem.channel :63
            c02ppm :146
            
            HiResp :1
            LoResp :-124
            Tem.channel :63
            c02ppm :132
            
            HiResp :1
            LoResp :-120
            Tem.channel :63
            c02ppm :136
            
            HiResp :1
            LoResp :-75
            Tem.channel :63
            c02ppm :181
            

            Some of the values seem a bit low to me. Especially while the HiResp is 1 or the LoResp is negative.

            I will do this test again at home when I get the chance.

            • Tomas
            1 Reply Last reply
            0
            • FotoFieberF Offline
              FotoFieberF Offline
              FotoFieber
              Hardware Contributor
              wrote on last edited by
              #20

              @korttoma
              In the technical specification I only find the calibration with nitrogen. I don't think, that putting it outside, will help, as it is usually at around 400 ppm at the moment. (AFAIK netatmo sets the lowest measured value in the last one or two weeks to 400 for calibration).

              alexsh1A 1 Reply Last reply
              0
              • alexsh1A Offline
                alexsh1A Offline
                alexsh1
                wrote on last edited by alexsh1
                #21

                @korttoma values are completely off. Co2 cannot go down below 300 level. This is a value of co2 outside (300-400).

                You have to calibrate it regularly. Zero calibration (this is what you are talking about) is different.

                8.1 The sensor should be calibrated regularly. The cycle time is better to be no more than 6 months. 8.2 Do not use the sensor in the high dusty environment for long time.
                8.3 Please use the sensor with correct power supply.
                8.4 Forbidden to cut the sensor pin.
                

                Try to put it outside for 10mins and then short pins 8 and 12 (see the photo below). This worked for me when I had some weird readings

                0_1479978102464_image.jpeg

                korttomaK 1 Reply Last reply
                1
                • FotoFieberF FotoFieber

                  @korttoma
                  In the technical specification I only find the calibration with nitrogen. I don't think, that putting it outside, will help, as it is usually at around 400 ppm at the moment. (AFAIK netatmo sets the lowest measured value in the last one or two weeks to 400 for calibration).

                  alexsh1A Offline
                  alexsh1A Offline
                  alexsh1
                  wrote on last edited by
                  #22

                  @FotoFieber Netatmo is using index also cannot be compared with mh-z14a.

                  I think the idea putting the sensor outside is to stabilise it - the reading is in the range of 300-400

                  1 Reply Last reply
                  0
                  • alexsh1A alexsh1

                    @korttoma values are completely off. Co2 cannot go down below 300 level. This is a value of co2 outside (300-400).

                    You have to calibrate it regularly. Zero calibration (this is what you are talking about) is different.

                    8.1 The sensor should be calibrated regularly. The cycle time is better to be no more than 6 months. 8.2 Do not use the sensor in the high dusty environment for long time.
                    8.3 Please use the sensor with correct power supply.
                    8.4 Forbidden to cut the sensor pin.
                    

                    Try to put it outside for 10mins and then short pins 8 and 12 (see the photo below). This worked for me when I had some weird readings

                    0_1479978102464_image.jpeg

                    korttomaK Offline
                    korttomaK Offline
                    korttoma
                    Hero Member
                    wrote on last edited by
                    #23

                    @alexsh1 said:

                    Try to put it outside for 10mins and then short pins 8 and 12 (see the photo below). This worked for me

                    Where did you get this kind of information from? The MH-Z14.pdg I found online does not mention anything about this.

                    • Tomas
                    alexsh1A 1 Reply Last reply
                    0
                    • korttomaK korttoma

                      @alexsh1 said:

                      Try to put it outside for 10mins and then short pins 8 and 12 (see the photo below). This worked for me

                      Where did you get this kind of information from? The MH-Z14.pdg I found online does not mention anything about this.

                      alexsh1A Offline
                      alexsh1A Offline
                      alexsh1
                      wrote on last edited by
                      #24

                      @korttoma It was recommended by an Aliexpress seller who sold me the sensor.

                      Let's agree that Chinese documentation is not always comprehensive :)

                      1 Reply Last reply
                      1
                      • korttomaK Offline
                        korttomaK Offline
                        korttoma
                        Hero Member
                        wrote on last edited by
                        #25

                        I finally found some time to really look in to this 562 issue. I looked at the raw data in DataMine2 and I noticed that the 562 value appeared every 10 minutes on the minute.

                        0_1480571210429_DM_CO2.jpg

                        Then I knew that this value cannot possibly come from the sensor. I search around in my Vera device for a bit and I found some lua code that copied the "Variable1" value from the sensor to the "CurrentLevel" every 10 minutes. Then I remembered that in the previous version of this sensor the value was reported via V_VAR1 and I had to copy it to another variable in Vera to be able to draw any graph. The current version of the sensor reports the value directly to the "CurrentLevel" variable and the value 562 that was still in the old variable was copied over the "real" value every 10 minutes.

                        I also previously had some really low values from time to time from the sensor mostly when responseHigh = 1 and responseLow = negative value

                        so I forced the responseLow to always be a positive value like this:

                        int responseLow = abs((int) response[3]);

                        I will keep an eye on the behavior of the sensor now that I have finally removed the confusing 562 value.

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


                        22

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        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