Hi,
I actually used a "d1 wemos mini" together with a hc-sr04 and ESPEasy and it worked (Im using a levelshifer like its described here: https://www.letscontrolit.com/wiki/index.php/HC-SR04)
Now I would like to replace the "d1 wemos mini" with a "ESP32 POE", because its based on an ehternet cable. So I flashed the ESP with "ESP_Easy_mega_20211224_normal_ESP32_4M316k_ETH" and the ESP32 works in general.
But I cant get the hc-sr04 working. The measurement is always 0.00
I used the 5V-Pin, the 3,3V Pin and "ground" of the ESP32 (like I did it with the d1 wemos) and gpio4 and gpio5 for the ECHO and Trigger... because its "free" in the gpiomap of the ESP32 POE. I also tried other GPIOs but I cant get it working.
Any ideas what Im doing wrong?
ESP32 POE and hc-sr04 (cant get it work)
Moderators: grovkillen, Stuntteam, TD-er
ESP32 POE and hc-sr04 (cant get it work)
- Attachments
-
- ESP32POE_GPIOMap.JPG (278.05 KiB) Viewed 7376 times
Re: ESP32 POE and hc-sr04 (cant get it work)
What pins have you set for I2C?
The default is 4&5 for I2C, which I may have to change as there is hardly any ESP32 board out there which does have those pins mapped to I2C.
Please check if the 5V pin of the board actually has 5V.
Maybe you also want to add some capacitors close to the sensor (e.g. 100 nF to filter out high frequency noise and 10 uF to keep voltage stable)
Also see: https://espeasy.readthedocs.io/en/lates ... e-on-esp32
GPIO 4 is pulled down, so maybe you want to use a different pin.
The default is 4&5 for I2C, which I may have to change as there is hardly any ESP32 board out there which does have those pins mapped to I2C.
Please check if the 5V pin of the board actually has 5V.
Maybe you also want to add some capacitors close to the sensor (e.g. 100 nF to filter out high frequency noise and 10 uF to keep voltage stable)
Also see: https://espeasy.readthedocs.io/en/lates ... e-on-esp32
GPIO 4 is pulled down, so maybe you want to use a different pin.
Re: ESP32 POE and hc-sr04 (cant get it work)
Hi,
IC2 is obviously set for 13 and 16 (see attachment).
Should I change it to 4 and 5 ?
Thanks
IC2 is obviously set for 13 and 16 (see attachment).
Should I change it to 4 and 5 ?
Thanks
- Attachments
-
- Unbenannt.JPG (30.14 KiB) Viewed 7339 times
Re: ESP32 POE and hc-sr04 (cant get it work)
Nope, 4 & 5 is a bad default for ESP32 for I2C. (GPIO-5 can work for SDA by the way)
Pin 4 is pulled down, so not practical for I2C and maybe this pull-down is also affecting your ultrasonic sensor.
Pin 4 is pulled down, so not practical for I2C and maybe this pull-down is also affecting your ultrasonic sensor.
Re: ESP32 POE and hc-sr04 (cant get it work)
Thanks again for the reply.
I used pin 32 and 33 for trigger and echo and now its working !
Best regards
I used pin 32 and 33 for trigger and echo and now its working !
Best regards
Who is online
Users browsing this forum: No registered users and 17 guests