Go Down

Topic: [Solved] HC SR04 interfacing with DUE? (Read 5628 times) previous topic - next topic

TjaartBester

Apr 04, 2013, 04:20 pm Last Edit: Apr 08, 2013, 05:23 pm by TjaartBester Reason: 1
Hello

I was wondering if the HC SR04 ultrasonic distance sensor is compatible with the DUE because the output signal of the HC SR04  is a 100us 5v pulse, will the DUE refuse the input? I am a bit hesitant to test it and was wondering if someone has done this.

Thanks.

cjdelphi

You could use a voltage divider ...

a 10k and 15k resistor (where they meet) should give a 3v signal as a high...

TjaartBester

Good idea, I'll test it today using a voltage divider and test using a pnp transistor an see whether is works.

TjaartBester

Hello everyone

I have verified that the the HC SR04 ultrasonic distance sensor is compatible with the DUE. As cjdelphi suggested a voltage divider of 5.6K and 10K solved the 5V interfacing issue.

Mitius

hello. I have the same problem that you've had. I have to interface the sensor HC-SR04 with arduino DUE and I thought well I use transistor and a voltage divider. I used a transistor bc558c only that it is giving vcc gnd that the base always gives me 5v output. transistor that you've used? so what do you recommend I purchase on the safe without spending money to try several. Thank you!

khiarul

Can we just connect the 5V to IOREF pin as a voltage translator?
If I wrong, can u explain more about IOREF in Due?

chank

Hello

I was wondering if the HC SR04 ultrasonic distance sensor is compatible with the DUE because the output signal of the HC SR04  is a 100us 5v pulse, will the DUE refuse the input? I am a bit hesitant to test it and was wondering if someone has done this.

Thanks.
To solve it, you can use a voltage divider circuit, you can use a 1 K Ohm and 1.5 KOhmn resistors, or use the 10k and 15k resistor. where they met to issue a maximum voltage of 3v. or for more detail, you can see in these pages like circuit.

HermannSW

#7
Mar 28, 2017, 09:53 pm Last Edit: Mar 28, 2017, 09:59 pm by HermannSW
Alternatively you could use a US-100 instead of HC SR04:
http://forum.arduino.cc/index.php?topic=458557.msg3191753#msg3191753

It can operate with 5V as well as with 3.3V logic from Due.
You have to spend 2.37$ instead of 0.81$ for HC SR04 on aliexpress.com.

Hermann.



I superglued 3 together for my Due (with motorshield v2):


And they work well.

Go Up