MH-z19B giving wrong values

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
nickbt
Normal user
Posts: 4
Joined: 08 Jan 2019, 10:57

MH-z19B giving wrong values

#1 Post by nickbt » 14 Jan 2019, 09:56

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
Attachments
jason output.png
jason output.png (30.42 KiB) Viewed 619 times

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

Re: MH-z19B giving wrong values

#2 Post by grovkillen » 14 Jan 2019, 11:26

You could try the hardware serial (but reminder to turn the serial communication off in the advanced settings).
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:

nickbt
Normal user
Posts: 4
Joined: 08 Jan 2019, 10:57

Re: MH-z19B giving wrong values

#3 Post by nickbt » 14 Jan 2019, 11:54

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.

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

Re: MH-z19B giving wrong values

#4 Post by grovkillen » 14 Jan 2019, 11:57

Hm... and the values are fine if you hook it up to some other unit (rpi etc.)...?
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:

nickbt
Normal user
Posts: 4
Joined: 08 Jan 2019, 10:57

Re: MH-z19B giving wrong values

#5 Post by nickbt » 14 Jan 2019, 12:11

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.

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

Re: MH-z19B giving wrong values

#6 Post by grovkillen » 14 Jan 2019, 13:45

No it's only showing if GPIO or PWM commands has been used.
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:

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests