I am still trying to put together SR04 and ESP Easy. I have decided to open a new topic, because I have not received any response while posting on the other one, yet I have no idea what to try.
I have SR04 working fine with Arduino, but trying to put it to work with ESP (R39, R48, R52, R57) is a total failure.
I have created the setup involving the following connections: SR04 VCC and GND on a separate power of 5V, with GND connected to my ESP-12E (via level shifter). Trig is connected to GPIO 16, while Echo to GPIO 14. Both, and GND (both from +5 and from ESP) is connected via level shifter. VCC is not connected to level shifter of course. I have also tried alternative connection I have found, via 1K resistor (on Echo pin only) and tried a second SR04 I have purchased, to make sure, this is not a coincidence. No matter what I configure, I am getting Distance 0. I have tried to change GPIOs, no difference.
Levelshifter I am using: http://www.aliexpress.com/item/Logic-Le ... eb201560_4
On the side, I have a question regarding details: http://www.esp8266.nu/index.php/DistanceSensor - shall it be set to State as Mode (not Value) and is Threshold the max distance measured (it appears only after State is selected)?
Can you please help me troubleshoot and find the problem? What log level shall I put, to see the actual communication from the module (if any)?
UPDATE: I might be not connecting VCC to my level shifter, so this might be a reason why it is not working, but why it is not working when connected with resistor on Echo, just like here: https://github.com/loiphin/ESP8266?
SR-04 problem - Distance: 0
Moderators: grovkillen, Stuntteam, TD-er
SR-04 problem - Distance: 0
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.
Re: SR-04 problem - Distance: 0
Hi,
if the mode is set to "State" the SR-04 will only Show 0 or 1.
If the mode ist set to "Value" it will show Centimeters.
But if the "Sensor Delay" ist set to 60, it will update the Centimeters every 60 Seconds.
I´m using a 10k resistor connected on Echo, on my nodemcu Board 1.0
if the mode is set to "State" the SR-04 will only Show 0 or 1.
If the mode ist set to "Value" it will show Centimeters.
But if the "Sensor Delay" ist set to 60, it will update the Centimeters every 60 Seconds.
I´m using a 10k resistor connected on Echo, on my nodemcu Board 1.0
Re: SR-04 problem - Distance: 0
The problem is - in Value, I am getting absolutely nothing - 0, no matter how long I wait.
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.
Re: SR-04 problem - Distance: 0
hmm,
i connected VCC and GND from a 5V Power supply, Trig direct on D5 of my nodmcu and Echo with the 10k resitor on D8.
http://www.esp8266.nu/forum/download/fi ... iew&id=195
i connected VCC and GND from a 5V Power supply, Trig direct on D5 of my nodmcu and Echo with the 10k resitor on D8.
http://www.esp8266.nu/forum/download/fi ... iew&id=195
- Attachments
-
- test.JPG (32.89 KiB) Viewed 8083 times
Re: SR-04 problem - Distance: 0
Did you also enter an ID value in the settings?
[SOLVED] SR-04 problem - Distance: 0
That was it - for some reason, the values have not been updated, when IDX was set to 0. Even though, the Send Data was unchecked. Now it works as expected. Thank you.BertB wrote:Did you also enter an ID value in the settings?
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.
Re: SR-04 problem - Distance: 0
Hi,
now I get the next HC-SR04 Modules and think we had a buck in the software.
Some ESP-12E Modules show a PullUp Resistor on the second Port (echo Pin).
The HC-SR04 pin is low, I use Voltage Devider 4K7 - 10K to convert the level and get 0.62 Volt on the ESP Port.
If i disconnect my voltage devider then i get full 3.2 V.
Sometimes it´s running, but when it´s falling into these mode, no chance.
Problems are at big distances, the max i get are 40 cm, mostly only 10cm and on long time test.
Any ideas?
Bernd
now I get the next HC-SR04 Modules and think we had a buck in the software.
Some ESP-12E Modules show a PullUp Resistor on the second Port (echo Pin).
The HC-SR04 pin is low, I use Voltage Devider 4K7 - 10K to convert the level and get 0.62 Volt on the ESP Port.
If i disconnect my voltage devider then i get full 3.2 V.
Sometimes it´s running, but when it´s falling into these mode, no chance.
Problems are at big distances, the max i get are 40 cm, mostly only 10cm and on long time test.
Any ideas?
Bernd
Who is online
Users browsing this forum: No registered users and 30 guests