MHZ19B Unknown response

Moderators: Voyager, BertB, rtenklooster, Stuntteam, grovkillen, TD-er

Post Reply
Message
Author
nldanny
Normal user
Posts: 4
Joined: 10 May 2019, 19:36

MHZ19B Unknown response

#1 Post by nldanny » 10 May 2019, 19:43

Hi,

I receive error below (ESPEASY log file).
I have tried several things on different forum, but nothing works. Does someone has an idea?

153789: MHZ19: Unknown response: 0 0 0 0 0 0 0 0 0
153790: MHZ19: Init OK

MHZ19b blinks now and then red.

Wire scheme:
Wemos D1 mini - MHZ19B
5V - Vin
G - GND
D7 - TX
D5 - RX

ESP Easy settings:
2019-05-10 19_40_41-Window.png
2019-05-10 19_40_41-Window.png (30.97 KiB) Viewed 98 times
2019-05-10 19_41_56-Window.png
2019-05-10 19_41_56-Window.png (18.63 KiB) Viewed 98 times
>> Tried also Output High
2019-05-10 19_42_45-Window.png
2019-05-10 19_42_45-Window.png (15.37 KiB) Viewed 97 times
Hope someone can help

User avatar
grovkillen
Normal user
Posts: 2990
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MHZ19B Unknown response

#2 Post by grovkillen » 10 May 2019, 20:03

Have you turned off the serial logging 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:

User avatar
grovkillen
Normal user
Posts: 2990
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MHZ19B Unknown response

#3 Post by grovkillen » 10 May 2019, 20:04

Sorry, you're using software serial. You should consider hardware serial.
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:

nldanny
Normal user
Posts: 4
Joined: 10 May 2019, 19:36

Re: MHZ19B Unknown response

#4 Post by nldanny » 10 May 2019, 20:05

Hi Grovkillen,

I am quiet new with this type of sensors.
This is my first try from ali to do something selfmade.

Can you explain something on how to do this with hardware serial?

User avatar
grovkillen
Normal user
Posts: 2990
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MHZ19B Unknown response

#5 Post by grovkillen » 10 May 2019, 20:10

You use the pins for those. And set it up to use hardware serial (in the task 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:

nldanny
Normal user
Posts: 4
Joined: 10 May 2019, 19:36

Re: MHZ19B Unknown response

#6 Post by nldanny » 11 May 2019, 07:38

Okay, but then i see different GPIO's.

Do i need to connect to D7 and D8 for example:
2019-05-11 07_37_34-Window.png
2019-05-11 07_37_34-Window.png (6.94 KiB) Viewed 72 times

User avatar
grovkillen
Normal user
Posts: 2990
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MHZ19B Unknown response

#7 Post by grovkillen » 11 May 2019, 09:40

Yes those are the hardware GPIO pins.
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:

TD-er
Normal user
Posts: 1201
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MHZ19B Unknown response

#8 Post by TD-er » 11 May 2019, 21:51

Software serial should work just fine for the MH-Z19 sensor.
Also double check to see if you have the Rx and Tx connected the right way.
So in your case, TX of the sensor to GPIO-13 (D7) and RX of the sensor to GPIO-14 (D5)

Also you do not have to set the Pin Mode in the GPIO boot states. Just leave them at default.
You have now set the pin mode for GPIO-14 as input, but in the sensor config you have it set to be connected to the RX of the sensor.
But you're sending from ESP to the RX, so the pin is output then.

nldanny
Normal user
Posts: 4
Joined: 10 May 2019, 19:36

Re: MHZ19B Unknown response

#9 Post by nldanny » 17 May 2019, 18:44

I have checked all connections, this didn't work, made also the changes as recommended, no result.
Hardware serial was also not the solution

I am afraid the sensor is broken.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests