MH-Z14 co2 sensor module questions

Hello fellow board members,
I ordered a MH-Z14 CO2 sensor and I read the whole datasheet (http://www.futurlec.com/Datasheet/Sensor/MH-Z14.pdf) but I have no ideea if the temperature compensation happens insede the module, or should I read the temp from the sensor and adjust it inside the code? And if I need to put it in the code, where do I find out the forumulas for the compensation, as it isn't in the datasheet? Found no info about it using Google.

And a second question would be which is the best communication protocol to use with this module? I was thinking to use the 0-2.5V analog output that gives out full range of the sensor, but I see that if I need to hadle temperature compensation too, I need to use the UART communication protocol to read the temperature data.

Given the fact the formulas are not in the datasheet makes me conclude that the compensation is done allready

(but I have not read the datasheet)

You could create an experiment in which a closed bottle is heated and the CO2 level should stay the sameā€¦

checked the datasheet (have seen better ones :wink:

  • note that the device is a 3.3Volt device
  • note that you can read the temperature (byte 4) but it is not described how to interpret C or F or?

seen - http://jurgen.gaeremyn.be/index.php/arduino/using-the-mh-z14-co2-sensor-with-an-arduino.html -?

Except for the case I need to do temperature calibration, I plan to read this sensor on the analog output:

3.1 Analog voltage output
DAC1 output voltage range ( 0?2.5V??corresponding gas concentration?0?full detection range?

If my thinking is good, 10.000 ppm divided by 512 Voltage reference points, I'll get 20 PPM resolution from the sensor.

Thank you for the bottle experiment suggestion, I was thinking I'll gonna have to do something like that once the sensor arrives if I can't find more info about it on google or this forum.

robtillaart:
seen - http://jurgen.gaeremyn.be/index.php/arduino/using-the-mh-z14-co2-sensor-with-an-arduino.html -?

Did not see it till now. Yet I observe that the guy uses PWM output, which for my sensor module only reads from 0 to 2000 ppm, and not the full scale of the sensor. But now that I watched his video I understand that the PWM output will probly be more exact than the analog output, so i'll consider reading PWM tilll 2K ppm, and analog for the rest of the scale.
Could any of you instruct me on what to buy to be able to read the 3.3V PWM output? More exactly I would like to learn how to do this:

Using an Op-Amp and 2 resistors (200 M? and 100M?) values are amplified with a factor 1.5 (but capped to the 5V of the Arduino that the OpAmp gets as supply).

Thank you both for your input! Very helpful!

If my thinking is good, 10.000 ppm divided by 512 Voltage reference points, I'll get 20 PPM resolution from the sensor.

The thinking is good but be aware that you have noise on the ADC , at least 1 bit , maybe 2.
You could use analogReference() and connect 2.5V to the AREF pin. (voltage divider 2x 10K )
That would give you 1024 points for 10000 ppm = 10 ppm per point.

Could any of you instruct me on what to buy to be able to read the 3.3V PWM output?

Check - https://www.sparkfun.com/products/12009 -

Thank you for the help, sir. Ordered one of those too. I'll use your ideea for getting better accuracy from my sensor, too.

Welcome,
let us hear when the sensor works as expected

I'll do that. But the sensor will be here in about 2 weeks, so there's enaugh time till then to work on other projects.

I got the sensor but it is crap. PWM output doesn't work (it is either continously high or low instead of the PWM signal it should output.) and analog outputs are very inaccurate, reading starts high, over 500 ppm, sometimes more, then slowly goes down to ~280 ppm, where it stays.
I am now negociating to get my money back.
I wonder if i could calibrate this one, but the outputs seem beyond logic so probably doesn't worth to do it.
Thank you all for the help.

would you help me please with the all circuit needed to read the PWM via the arduino(5V) because when i used an op-amp the signal stayed high so there is no low time there is something wrong with my circuit i am sure about that so if any one can help me with this???