Page 1 of 1

nodemcu v3 + sonic sensor HC-SR04 can't get to work

Posted: 13 Jan 2019, 22:54
by sedini
Hello
I Flashed nodemcu v3 with ESPEasy_R120_4096.bin after that I configure it to connect wifi and go to:
Devices tab >> add new device > chose hc-sr04

After that I connect:
trig pin to D7
echo pin to D6
I teake ground from raspberry pi 3 b+
and 5v from raspbery too
I still get distance 0 in devices what I'm doing wrong I need lvl shifter ? Can someone have idea ?

https://ibb.co/BBTtfBz
https://ibb.co/MsqKm6H

Re: nodemcu v3 + sonic sensor HC-SR04 can't get to work

Posted: 14 Jan 2019, 06:04
by grovkillen

Re: nodemcu v3 + sonic sensor HC-SR04 can't get to work

Posted: 14 Jan 2019, 07:48
by dynamicdave
Here's a link to a write-up I did on HC-SR05 devices for my IoT students.

http://resources-area.co.uk/node-red-fl ... sensor.pdf

The problem is the output from the Ultrasonic device is TTL(i.e. 5V and ground).
You need to level shift this DOWN to match the input levels for 3.3V logic (i.e. the ESP8266).

As explained on the very last page of my write-up, this can be achieved with a level shifter or a couple of resistors.

DO NOT CONNECT a 5V logic level to an input on the ESP8266 as you will damage or maybe destroy it.

You may find the output from the WeMos D1 Mini (ESP8266) that goes to the 'Trigger Input' on the SR04 or SR05 will work without an UP level shifter.
This is because the logic high output (from the Wemos) (probably around +3V or so) is above the logic high input threshold of the SR04/05 - and will be enough to trigger it.

Hope this helps.

Re: nodemcu v3 + sonic sensor HC-SR04 can't get to work

Posted: 14 Jan 2019, 18:29
by Shardan
Take a look at the old wiki, the connection possibilities are described in detail there.
Sadly it didn't make the way into the new readthedocs page.

https://letscontrolit.com/wiki/index.php?title=HC-SR04

Re: nodemcu v3 + sonic sensor HC-SR04 can't get to work

Posted: 14 Jan 2019, 18:41
by grovkillen
I will try to get that converted in the new page

Re: nodemcu v3 + sonic sensor HC-SR04 can't get to work

Posted: 14 Jan 2019, 20:11
by sedini
I solve it just use newest mega espeasy software and now its work on vin from node thank You for Your help