MH-Z19 calibration issues

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
schreda
New user
Posts: 4
Joined: 13 Mar 2019, 12:31

MH-Z19 calibration issues

#1 Post by schreda » 13 Mar 2019, 12:49

Hi.

I am already really frustrated with this and can't get it work properly, so i would thankful if someone could help me out here!

That you can understand the issue i have with my MH-Z19, i'll describe the steps i did so far:
  1. I disabled ABC on my ESPEasy instance (version mega-20190305)
  2. I put the sensor outside for half an hour and powered on the board (incl. sensor)
  3. To calibrate the sensor, I connected the HD Pin (Pin7) to GND for >7 secs. Then i removed the calibration wire and waited for another 30 mins.
  4. I rebooted the board -> ESPEasy reports ppm values around 400ppm (good so far!)
  5. After putting the sensor inside, it shows values like 1500 or 2000 ppm (Ok could be fine..)
  6. I was curious, so i put the sensor outside again -> ESPEasy shows ppm values around 1000ppm (What?)
  7. So i did a recalibration as I described from point 3 and everything is working again (values like 400ppm are reported outside)
I am really out of ideas and i cannot trust the sensor anymore. Maybe it has something to do with ABL? Is it possible, that the sensor loses calibration data on power loss?
It seems that the calibration changes somehow, but i can't figure out what it is.
Please give me some advices, i really appreciate any help!

Edit:
I saw in the log, that sometimes i get those messages:

Code: Select all

10714900: MHZ19: Unknown response: ff fd f7 ff ff ff 78 69 e4
10714903: MHZ19: Init OK
And if i try to run the calibrate command, i get this:

Code: Select all

10857958: MHZ19: Calibrated zero point!
10858151: Command: l
10858151: Command unknown: 'l'
Thanks!

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MH-Z19 calibration issues

#2 Post by TD-er » 15 Mar 2019, 13:24

The unknown response issue was fixed yesterday and is included in last nightly build.

And please do not try to perform calibration on these sensors yourself. It is very likely you will ruin the sensor.

Enabling/disabling the ABC is fine, but do not perform the baseline calibration, since you will probably perform it in the wrong conditions.

I will add something about this in the documentation, since I keep repeating myself over and over again.
The last discussion about this was yesterday: https://github.com/enesbcs/rpieasy/issu ... -473019800

schreda
New user
Posts: 4
Joined: 13 Mar 2019, 12:31

Re: MH-Z19 calibration issues

#3 Post by schreda » 16 Mar 2019, 13:28

Ok.. Thanks for your answer

In the datasheet of the sensor, there is an explicit explanation under which conditions the sensor has to be calibrated. So i put it into an environment with 400ppm (~air outside) for 20 minutes after (and to be sure also before) i sent the calibration command.
So basically i din't do anything wrong in calibrating the sensor. But it looks like that on power loss, somehow the calibration gets lost. Maybe the sensor is already broken?
The thing is that i can't do a 2 point calibration only zero point and maybe i messed up the 2 point calibration data.

batal131
Normal user
Posts: 21
Joined: 20 Dec 2017, 08:23

Re: MH-Z19 calibration issues

#4 Post by batal131 » 19 Mar 2019, 15:35

Another option - is to put sensor outside for 25 hours with ABC on. Anfter 25+ hours turn off and use without ABC :) That what I did with my MH-Z19Bs (2 pcs). now they show almost the same values ans SenseAir S8.

schreda
New user
Posts: 4
Joined: 13 Mar 2019, 12:31

Re: MH-Z19 calibration issues

#5 Post by schreda » 22 Mar 2019, 11:24

Thanks, i will try this one!

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MH-Z19 calibration issues

#6 Post by TD-er » 25 Mar 2019, 16:38

Yes, the datasheet does refer to "outside" as being 400 ppm, but there are more factors to take into account:
- Temperature and humidity affect CO2 readings
- After sunset and before sunrise the CO2 levels are not 400 ppm if you are near plants. The CO2 levels can be as high as 700 ppm as I've seen on my driveway while there was no wind. (I live in a small town with lots of farm land around me)
- Direct sunlight or other IR radiation does have an effect on CO2 readings.

schreda
New user
Posts: 4
Joined: 13 Mar 2019, 12:31

Re: MH-Z19 calibration issues

#7 Post by schreda » 26 Mar 2019, 17:51

Got my new MH-Z19B today and replaced it.
Now i got the problem, that the ppm value stucks at 5000. Initially it shows 410ppm and (i guess after the boot process) it switches to 5000..
Any thoughts?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MH-Z19 calibration issues

#8 Post by grovkillen » 26 Mar 2019, 18:20

Buy one S8 from me and I'll hook you up with two more (refurbished) units. Problem solved. :D
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

PieterS
Normal user
Posts: 65
Joined: 27 Mar 2018, 17:18
Location: NL

Re: MH-Z19 calibration issues

#9 Post by PieterS » 27 Mar 2019, 18:27

grovkillen wrote: 26 Mar 2019, 18:20 Buy one S8 from me and I'll hook you up with two more (refurbished) units. Problem solved. :D
Reply from a moderator.. :roll:

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MH-Z19 calibration issues

#10 Post by grovkillen » 27 Mar 2019, 19:38

Yeah, sorry. Bad support.... :|
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

chadalu
New user
Posts: 2
Joined: 21 Apr 2020, 22:47

Re: MH-Z19 calibration issues

#11 Post by chadalu » 21 Apr 2020, 22:49

Hi Guys,

There is any way to send command to reset (calibrate) mh-z19 over http intead of grounding the hd pin on gnd?

Can anyone help me?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MH-Z19 calibration issues

#12 Post by TD-er » 22 Apr 2020, 00:48

Don't try to calibrate the MH-Z19 sensors by setting the base calibration.
You simply cannot do it yourself without proper knowledge and tools.

You should also have a look at the voltage fed to the sensor.
The CO2 sensor does draw quite a bit of current, so its voltage may drop if you don't have a proper power supply (and wiring).
With bad power, the MH-Z19 does show unstable values and also the ABC algorithm may sometimes set wrong values.

My advise is to let the sensor run for a few days, without direct sunlight and preferably in a room that's ventilated well and not occupied by people (or pets).

FYI, even outdoors the CO2 value may rise to around 700 ppm, at night.
I do live in the country side, outside a small village in the open field.
Last week it was quite windy and still the CO2 sensor mounted outside recorded over 700 ppm at night. (lots of plants in the area I guess)

So it is important to leave the sensor work for a longer period (several days) to get a good run of the ABC algorithm.
And don't (really, don't do it) try to switch range of the sensor, or try to force the 0 ppm or 400 ppm value as you are very likely to do it wrong.

chadalu
New user
Posts: 2
Joined: 21 Apr 2020, 22:47

Re: MH-Z19 calibration issues

#13 Post by chadalu » 22 Apr 2020, 02:15

Hi thanks you for your reply,

I aways used my sensors on 3.3v of the nodemcu board, but sometimes i have to change them , cause they shows wrong value,even if i calibrated them,

So i Tried using a 5v external power to feed the sensor, the value never changes, i aways get a rock solid 400ppm

So i would like to try reseting by command, to see what is going on,

Can you help me?

Since i run my sensors indoor, i would like any help.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MH-Z19 calibration issues

#14 Post by TD-er » 22 Apr 2020, 20:26

I assume this is a new sensor, which you did not try to calibrate yourself.
If so, then I guess the sensor may either be broken, or the ABC (Automatic Base Calibration) is way off.

If the ABC is way off, you should follow the steps I mentioned before:
- Use indoor in a well ventilated room
- Avoid direct sun light on the sensor (is IR light too)
- Leave it running for several days (each 24h it will adjust its ABC based on the lowest value seen)
- Try to keep humidity levels as constant as possible, so don't place in or near a bathroom.


Things you should avoid:
- Power cycle the sensor frequently. It will mess up the ABC.
- Never try to switch range or perform calibrations yourself. For example forcing 400 ppm or 0 ppm levels will probably destroy the calibration table and you cannot get it right yourself

The sensor should also work on 3.3V, but I've seen it does take longer to perform a reading and I can't tell what it will do to the aging of the components inside. (or if components age differently, ruining the accuracy)

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: MH-Z19 calibration issues

#15 Post by timbiker » 01 Feb 2021, 10:26

Hello everybody,

I was using the MH-Z19 sensor since several months without any issue. I did not have any issue for its calibration until now but, for some reason, I decided to update the ESPEASY version of my Wemos D1 board.

I used the latest version on the github. Unfortunately since the update I am not able to calibrate the MH-Z19 anymore and the data I'm getting are between 350 and 365 PPM.

That is stange. I tried the following :

- Set the ABC on "Normal"
- Power off the sensor
- Put in a ventilated room with nobody during 25 hours
- Set the ABC to ABC disabled
- Power off
- Power on into my kitchen

I also tried :

- Set the ABC on "ABC disabled"
- Power off the sensor
- Put in a ventilated room with nobody during 25 hours
- Set the ABC to "Normal"
- Power off
- Power on into my kitchen

Nothing gave good results... Any idea ?

Thanks !!!

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MH-Z19 calibration issues

#16 Post by TD-er » 01 Feb 2021, 12:53

I am not sure if the ABC is stored in the MH-Z19 sensor.

If you leave the sensor in a ventilated room without people present for a few days, will the sensor give believable readings when you stay in that room for a while?
Does the temperature between those rooms differ?

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests