MHZ19B Unknown response
Moderators: grovkillen, Stuntteam, TD-er
MHZ19B Unknown response
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: >> Tried also Output High
Hope someone can help
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: >> Tried also Output High
Hope someone can help
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: MHZ19B Unknown response
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: MHZ19B Unknown response
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: MHZ19B Unknown response
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?
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?
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: MHZ19B Unknown response
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: MHZ19B Unknown response
Okay, but then i see different GPIO's.
Do i need to connect to D7 and D8 for example:
Do i need to connect to D7 and D8 for example:
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: MHZ19B Unknown response
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: MHZ19B Unknown response
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.
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.
Re: MHZ19B Unknown response
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.
Hardware serial was also not the solution
I am afraid the sensor is broken.
-
- New user
- Posts: 5
- Joined: 01 Oct 2019, 09:09
Re: MHZ19B Unknown response
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
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
Re: MHZ19B Unknown response
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?
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?
-
- New user
- Posts: 5
- Joined: 01 Oct 2019, 09:09
Re: MHZ19B Unknown response
i have swapped tx and rx but i doesnt matter. output is still the same.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 can see the red led light. sensor is connected to VU of nodemcu. nodemcu is powered with usb.
any other ideas?
Re: MHZ19B Unknown response
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.
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.
-
- New user
- Posts: 5
- Joined: 01 Oct 2019, 09:09
Re: MHZ19B Unknown response
the sensor is brand new and i want to get it working first time.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.
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.
Re: MHZ19B Unknown response
Yep, so it seems.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.
-
- New user
- Posts: 5
- Joined: 01 Oct 2019, 09:09
Re: MHZ19B Unknown response
Thanks for the update.
Who is online
Users browsing this forum: Ahrefs [Bot] and 138 guests