nara256 / mhz19_uart

Other
17 stars 6 forks source link

Can I use this code for MH-Z19C sensor #2

Open vignesh8458 opened 3 years ago

vignesh8458 commented 3 years ago

I tried some other library, it's giving wrong value for temperature

Please help me on this.

johny-mnemonic commented 1 year ago

This library is used by ESPHome and I am successfully using it even with HH-Z14A sensor from the same manufacturer so it seems they are using same interface for all their CO2 sensors. Regarding the temperature sensor I have the same experience...it is way off. Even when I used this sensor with Tasmota and different HW it was way off. So either the available libraries are reading it the wrong way or the sensor itself is bad.

noobnarski commented 1 year ago

I think the reason the temperature is always too high is that the heat of the co2 sensor causes the temperature sensor to heat up. I had a BME 260 in the same case as the MH-Z19C and it was reading too high. The reading was correct after I moved it out of the case.