Page 1 of 1

MH-z19B giving wrong values

Posted: 14 Jan 2019, 09:56
by nickbt
Hi,
I am using the MH-Z19B sensor to retrieve CO2 ppm values. The sensor is giving values over 5000ppm. It usually starts at 410ppm and after a minute, jumps to 5700.
The sensor itself works fine as I can get correct values when plugged in Raspberry Pi. Usually between 500 and 700ppm.
I am currently using built ESP_Easy_mega-20190110_normal_ESP8266_4096.bin, but also tried few previous built with same results.
sensor is connected to D5 and D6 for Tx and Rx.
I have attached the output from tools\show JSON if that helps.
If anyone has come across the same issue and found a solution, I would be grateful for info. Or it could be I am doing something wrong.
I am open to suggestions
Thanks

Re: MH-z19B giving wrong values

Posted: 14 Jan 2019, 11:26
by grovkillen
You could try the hardware serial (but reminder to turn the serial communication off in the advanced settings).

Re: MH-z19B giving wrong values

Posted: 14 Jan 2019, 11:54
by nickbt
Thanks for the quick reply.
I tried just tried both:
HW Serial0 swap : GPIO-13 (D7) -- TX/GPIO-15(D8)--Rx

HW Serial0 : GPIO-3 (D9) -- TX/GPIO-1(D10)--Rx

And get same results around 5700.

Re: MH-z19B giving wrong values

Posted: 14 Jan 2019, 11:57
by grovkillen
Hm... and the values are fine if you hook it up to some other unit (rpi etc.)...?

Re: MH-z19B giving wrong values

Posted: 14 Jan 2019, 12:11
by nickbt
Yes, connected to Raspberry Pi using this Python in a loop (https://github.com/UedaTakeyuki/mh-z19), it gives me values around 550, if I blow on it, it goes to 750, so it looks fine on Pi.
One thing I noticed is that the "pin state buffer" page in tools is empty. Shouldn't it show the plugin being used? not sure if this is related.

Re: MH-z19B giving wrong values

Posted: 14 Jan 2019, 13:45
by grovkillen
No it's only showing if GPIO or PWM commands has been used.