MHZ19B Unknown response

Moderators: grovkillen, Stuntteam, 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 714 times
2019-05-10 19_41_56-Window.png
2019-05-10 19_41_56-Window.png (18.63 KiB) Viewed 714 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 713 times
Hope someone can help

User avatar
grovkillen
Core team member
Posts: 3284
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
Core team member
Posts: 3284
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
Core team member
Posts: 3284
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 688 times

User avatar
grovkillen
Core team member
Posts: 3284
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
Core team member
Posts: 1656
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.

danielhainich
Normal user
Posts: 5
Joined: 01 Oct 2019, 09:09

Re: MHZ19B Unknown response

#10 Post by danielhainich » 01 Oct 2019, 19:55

hi, i have the same problem.
i tried all settings found here (hard and softserial, different pins...) and i only got the following message in log:


MHZ19: Unknown response: 0 0 0 0 0 0 0 0 0
MHZ19: Init OK

does anyone has an idea whats wrong, or is the mhz19b DOA?

thanks
daniel

TD-er
Core team member
Posts: 1656
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MHZ19B Unknown response

#11 Post by TD-er » 01 Oct 2019, 21:16

Has the sensor ever worked?
The bug that was the initial cause of this topic has been resolved a long time ago.

Also make sure you have not swapped RX and TX.
You may also test to swap them in the configuration.

Do you see the red light in the sensor glow every X seconds?
Make sure your power supply is strong enough, although I think you will see reboots if it isn't.
Is the sensor connected to 5V?

danielhainich
Normal user
Posts: 5
Joined: 01 Oct 2019, 09:09

Re: MHZ19B Unknown response

#12 Post by danielhainich » 02 Oct 2019, 07:49

TD-er wrote:
01 Oct 2019, 21:16
Has the sensor ever worked?
The bug that was the initial cause of this topic has been resolved a long time ago.

Also make sure you have not swapped RX and TX.
You may also test to swap them in the configuration.

Do you see the red light in the sensor glow every X seconds?
Make sure your power supply is strong enough, although I think you will see reboots if it isn't.
Is the sensor connected to 5V?
i have swapped tx and rx but i doesnt matter. output is still the same.
i can see the red led light. sensor is connected to VU of nodemcu. nodemcu is powered with usb.

any other ideas?

TD-er
Core team member
Posts: 1656
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MHZ19B Unknown response

#13 Post by TD-er » 02 Oct 2019, 22:43

Has the sensor ever worked?
You could test with an old version of ESPEasy, like one of end 2017 or first weeks of 2018.
Just to be sure it isn't something related to a recent change or something related to software serial.
The builds from around that time were even using an older version of software serial.

danielhainich
Normal user
Posts: 5
Joined: 01 Oct 2019, 09:09

Re: MHZ19B Unknown response

#14 Post by danielhainich » 03 Oct 2019, 09:48

TD-er wrote:
02 Oct 2019, 22:43
Has the sensor ever worked?
You could test with an old version of ESPEasy, like one of end 2017 or first weeks of 2018.
Just to be sure it isn't something related to a recent change or something related to software serial.
The builds from around that time were even using an older version of software serial.
the sensor is brand new and i want to get it working first time.
i flashed nodemcu to first release of 2018 (02012018) and its the same.

356460 : MHZ19: Error, timeout while trying to read
356460 : MHZ19: Unknown response: 0 0 0 0 0 0 0 0 0

red light is flashing, but no data. i tried several pins, changed tx and rx. it seems sensor is death.

TD-er
Core team member
Posts: 1656
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MHZ19B Unknown response

#15 Post by TD-er » 03 Oct 2019, 10:27

danielhainich wrote:
03 Oct 2019, 09:48
[...]

red light is flashing, but no data. i tried several pins, changed tx and rx. it seems sensor is death.
Yep, so it seems.

danielhainich
Normal user
Posts: 5
Joined: 01 Oct 2019, 09:09

Re: MHZ19B Unknown response

#16 Post by danielhainich » 12 Oct 2019, 19:07

i got new sensor. this is working without problem. so first sensor is broken.
TD-er wrote:
03 Oct 2019, 10:27
Yep, so it seems.

TD-er
Core team member
Posts: 1656
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MHZ19B Unknown response

#17 Post by TD-er » 13 Oct 2019, 20:33

Thanks for the update.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests