Hi,
I connected a HC-SR04 via a level shifter (like this). I have connected it via gpio4,5. Other devices I have is a DS18B20 and a light sensor, they both deliver good values. But the distance sensor show me values like 0.17 (when its meters, its ok from my desk to the ceiling) and often values like: Distance: 30488558.00, 22212420.00 or 16005333.00.
I am testing build 70 with this setup.
build 70: HC-SR04 random values
Moderators: grovkillen, Stuntteam, TD-er
Re: build 70: HC-SR04 random values
Using a levelshifter is way overkill for this purpose. The TRIGGER input on the HC-SR04 can be triggered with the 3.3V output from the ESP8266. For the ECHO signal, you can just use a voltage divider - for instance 680R + 1k. Remember that the HC-SR04 needs 5V.ambassadoro wrote:Hi,
I connected a HC-SR04 via a level shifter (like this). I have connected it via gpio4,5. Other devices I have is a DS18B20 and a light sensor, they both deliver good values. But the distance sensor show me values like 0.17 (when its meters, its ok from my desk to the ceiling) and often values like: Distance: 30488558.00, 22212420.00 or 16005333.00.
I am testing build 70 with this setup.
- Jan
Jan Chrillesen, Denmark
Re: build 70: HC-SR04 random values
Hi,
had the same problem using these part.
It´s right, the trigger could be connect direct.
I used also resistor network (4K7 and 10K) and that´s bullshit because we init a war between the Pull´s:
an Down in your RNetwork
an Up activted via Software (see the script to the HC04)
first dead: the digital communication.
Solution:
i used a pnp BC557
echo output --> 47K --> to it´s B
Emitter to 5V VCC from HC-SR04
Kollektor --> 47K --> npn, found a BC547 on B
Emitter to gnd
Collector direct to your input Port on ESP (no Resistor needed, we use the internal PullUp)
Runs fine.
I think your buyed solution is also shit (see only one transistor per channel) just the part that i had buyed.
best wishes
Bernd
PS: BTW, we should added these information to
http://www.esp8266.nu/index.php/DistanceSensor
had the same problem using these part.
It´s right, the trigger could be connect direct.
I used also resistor network (4K7 and 10K) and that´s bullshit because we init a war between the Pull´s:
an Down in your RNetwork
an Up activted via Software (see the script to the HC04)
first dead: the digital communication.
Solution:
i used a pnp BC557
echo output --> 47K --> to it´s B
Emitter to 5V VCC from HC-SR04
Kollektor --> 47K --> npn, found a BC547 on B
Emitter to gnd
Collector direct to your input Port on ESP (no Resistor needed, we use the internal PullUp)
Runs fine.
I think your buyed solution is also shit (see only one transistor per channel) just the part that i had buyed.
best wishes
Bernd
PS: BTW, we should added these information to
http://www.esp8266.nu/index.php/DistanceSensor
Re: build 70: HC-SR04 random values
I have been using a voltage divider with a 680 ohm and 1k ohm resistor for a month and it's been very reliable.BerndJ wrote:Hi,
had the same problem using these part.
It´s right, the trigger could be connect direct.
I used also resistor network (4K7 and 10K) and that´s bullshit because we init a war between the Pull´s:
an Down in your RNetwork
an Up activted via Software (see the script to the HC04)
- Jan
Jan Chrillesen, Denmark
Re: build 70: HC-SR04 random values
Hi,
yes, it´s runs. Youre resistors are low enought. The internal Pullup had round about 40KOhm.
But my schematics had the better energy bilance.
yes, it´s runs. Youre resistors are low enought. The internal Pullup had round about 40KOhm.
But my schematics had the better energy bilance.
Who is online
Users browsing this forum: No registered users and 23 guests