UedaTakeyuki / mh-z19

Read CO2 concentration from mh-z19 sensor on the Raspberry Pi & handle it. Detect Raspberry Pi model automatically and read the value from an appropriate serial device.
MIT License
185 stars 37 forks source link

Additional functionality: Calibration, automatic baseline correction and tempterature #1

Closed DFyson closed 5 years ago

DFyson commented 5 years ago

There are several other features available on the sensors as per the datasheets for MH-Z19, MH-Z19B.

I have an MH-Z19B and noticed it has automatic baseline correction which resets the reading to 400ppm. This has been brought up in other projects

Support for calibration (zero point and span)

Although not documented, apparently can read temperature [1][2]

UedaTakeyuki commented 5 years ago

Hi Dyson, Thank you for your request.

I didn't implement calibration feature at the released version due to lack of the appropriate apparatus for test the feature. But I can add these soon (without test).

Also, ABC feature for MH-Z19B seems to be cause of terrible erroneous measure because CO2 concentration tend to rise about 1500 ppm in the closing room in my experience. I'll soon add the feature for (on/off) of ABC. Thank you for tell me this.

About temperature, I think this can be for sensor internal using because the NDIR measurement is affected by ambient temperature.

UedaTakeyuki commented 5 years ago

Implemented as follows: