CO2 sensor

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
BartSr
Normal user
Posts: 115
Joined: 27 Sep 2019, 17:45

CO2 sensor

#1 Post by BartSr » 26 Mar 2023, 12:42

Hi,
I got a chinese co2 sensor MH-Z19C
Hooked up to easpesy it reports being MH-Z19B
Is there any difference?
It appears that the measured values is not stable. All around 400PPM
After asking the supplier they advised to calibfrate the sensor with nect instructions.
Is that doable using the esp?
Thanks,
Bart

Code: Select all

Set a certain concentration calibration function:
For example: Current environmental concentration is 600ppm, send the following command via serial port;
FF 01 AD 02 58 00 00 00 F8 (this data is hexadecimal, i.e., 600ppm converted to hexadecimal is 02 58)
The sensor returns following command:
FF AD 01 00 00 00 00 00 52 means the sensor receives command correctly and then performs calibration. The sensor will be calibrated to the set concentration within a few minutes, usually there will be a +/-10ppm deviation;
The sensor returns following command:
FF AD 00 00 00 00 00 00 53 means the sensor has not received command correctly and cannot be calibrated.
When you send this command to the sensor, there must be 3 prerequisites:
1. The sensor has been powered on for more than 2 hours; 2. CO2 concentration of the sensor in current environment shoule be between 400 and 1000 ppm and cannot exceed this range, otherwise sending this command will be invalid.
3. CO2 concentration of the environment needs to stabilize for more than 10 minutes before sending this command, otherwise the calibration deviation will be relatively large.

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

Re: CO2 sensor

#2 Post by TD-er » 26 Mar 2023, 13:43

I still haven't tested the "C" version of this sensor myself, so I am not 100% sure the current plugin does properly work with this "C" version.

One of the things I would first check is to see if the voltage is correct.
The other versions of this sensor need quite a significant current, so flaky cabling to the sensor may cause a significant voltage drop to the sensor.

BartSr
Normal user
Posts: 115
Joined: 27 Sep 2019, 17:45

Re: CO2 sensor

#3 Post by BartSr » 26 Mar 2023, 16:09

Hi TDer Voltage has been measured and is within specs.

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

Re: CO2 sensor

#4 Post by TD-er » 26 Mar 2023, 22:18

BartSr wrote: 26 Mar 2023, 16:09 Hi TDer Voltage has been measured and is within specs.
Just a quick google shows me this: https://www.tinytronics.nl/shop/nl/sens ... -met-kabel
Apparently the sensor doesn't have a wide range of voltages.
The older ones, like the A version, did allow for a range starting at 3.6V if I remember correctly.

Right now I don't have the time to test with a real "C" revision sensor.
And I also won't implement support to set a specific CO2 concentration as you simply can't determine what concentration it actually is without a controlled environment and calibrated sensor.

Also lots and lots of people have already ruined their perfectly fine CO2 sensors by immediately forcing their sensor to calibration mode shorting some pins.
These sensors have a factory calibration stored in their rom, so there should be no need to force a new sensor into calibration mode as this will simply render it useless because you cannot guarantee the air to be of a specific concentration without proper knowledge.

Like I said, I've seen way too many CO2 sensors been broken by users forcing them into calibration mode.

It might very well be that the ESPEasy plugin is not working well with the "C" version, so we should check that first.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 29 guests