Hello folks,
My first project with ESP Easy is to build a garage stop light. Using an old full size stop light powered by two relays, ESP8266-12, and HC-SR04. Here's the draft sketch.
Is this the correct level shifter? h**p://www.ebay.com/itm/381273402938
Any feedback is encouraged and appreciated.
HC-SR04 implimentation with OpenHAB (looking for recomendations)
Moderators: grovkillen, Stuntteam, TD-er
Re: HC-SR04 implimentation with OpenHAB (looking for recomendations)
It should work fine without a level shifter. The trigger input on the HC-SR04 can be triggered with 3.3V and the echo output can be connected to a voltage divider, using two resistors at 470R and 1k. I plan to do something similar to what you're doing, but I still need to test the hardwareespfrm883 wrote:My first project with ESP Easy is to build a garage stop light. Using an old full size stop light powered by two relays, ESP8266-12, and HC-SR04. Here's the draft sketch.
- Jan
Jan Chrillesen, Denmark
Re: HC-SR04 implimentation with OpenHAB (looking for recomendations)
Could I use a 4.7K and 10k instead? The math seems to draw 5v down to 3.4v as well.
Thank you for the reply Jan. How does the diagram look now.
Thank you for the reply Jan. How does the diagram look now.
Re: HC-SR04 implimentation with OpenHAB (looking for recomendations)
Hi. I managed to get a HC-SR04 working on R38 as per the diagram above. However I think there is a bug in the software
If i set the mode to 'state' rather than 'value' and submit, when I then press edit the device the esp reboots
Is there anyway to remove the devices. Or restore to default ? As I now can't remove the device. Many Thanks
If i set the mode to 'state' rather than 'value' and submit, when I then press edit the device the esp reboots
Is there anyway to remove the devices. Or restore to default ? As I now can't remove the device. Many Thanks
Re: HC-SR04 implimentation with OpenHAB (looking for recomendations)
Voltage devider looks OK.
As long as the devider range stays the same and inside 100K ohm range it is OK.
So 10K and 47K is also an option or 22K and 33K and so on as long you get around 3.3 volt.
Dont go to lower as 1K combined as this will draw more current from the device then needed.
Paco
As long as the devider range stays the same and inside 100K ohm range it is OK.
So 10K and 47K is also an option or 22K and 33K and so on as long you get around 3.3 volt.
Dont go to lower as 1K combined as this will draw more current from the device then needed.
Paco
Re: HC-SR04 implimentation with OpenHAB (looking for recomendations)
You can also use a small signal diode (like 1n4448 or 1n914) or schottky diode, with the anode connected to the ESP input and the cathode to the HC-SR04 output. The internal pull-up resistor pulls the input to 3.3 v level at a logic 1 and the HC-SR04 pulls the ESP input down to a logic 0 level.
It works fine for me.
It works fine for me.
Re: HC-SR04 implimentation with OpenHAB (looking for recomendations)
I am having issues with connecting my SR04 to ESP. Again, it works fine with Arduino, but when connected via level shifter or via voltage divider, I am seeing just 0. I have even tried one idea found on the internet, to connect Echo just via 1K ohm resistor, but that does not change anything.
What is quite interesting, if I connect the SR04 in voltage divider scenario and reboot ESP, it does not start - the blue led lights bright and that's it. I am using GPIO14 and GPIO2, so it should not matter.
all other items connected - Temperature sensor, Relays and LCD wor fine, issue is just with SR04 (so far).
What is quite interesting, if I connect the SR04 in voltage divider scenario and reboot ESP, it does not start - the blue led lights bright and that's it. I am using GPIO14 and GPIO2, so it should not matter.
all other items connected - Temperature sensor, Relays and LCD wor fine, issue is just with SR04 (so far).
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.
Who is online
Users browsing this forum: Google [Bot] and 26 guests