Arduino Forum

Products => Arduino Due => Topic started by: TjaartBester on Apr 04, 2013, 04:20 pm

Title: [Solved] HC SR04 interfacing with DUE?
Post by: TjaartBester on Apr 04, 2013, 04:20 pm
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.
Title: Re: HC SR04 interfacing with DUE?
Post by: cjdelphi on Apr 04, 2013, 04:30 pm
You could use a voltage divider ...

a 10k and 15k resistor (where they meet) should give a 3v signal as a high...
Title: Re: HC SR04 interfacing with DUE?
Post by: TjaartBester on Apr 04, 2013, 04:39 pm
Good idea, I'll test it today using a voltage divider and test using a pnp transistor an see whether is works.
Title: Re: [Solved] HC SR04 interfacing with DUE?
Post by: TjaartBester on Apr 08, 2013, 05:25 pm
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.
Title: Re: [Solved] HC SR04 interfacing with DUE?
Post by: Mitius on Jul 11, 2014, 11:07 pm
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!
Title: Re: [Solved] HC SR04 interfacing with DUE?
Post by: khiarul on Feb 14, 2016, 12:22 am
Can we just connect the 5V to IOREF pin as a voltage translator?
If I wrong, can u explain more about IOREF in Due?
Title: Re: [Solved] HC SR04 interfacing with DUE?
Post by: chank on Mar 23, 2017, 11:59 pm
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 (http://www.likecircuit.com/).
Title: Re: [Solved] HC SR04 interfacing with DUE?
Post by: HermannSW on Mar 28, 2017, 09:53 pm
Alternatively you could use a US-100 instead of HC SR04:
http://forum.arduino.cc/index.php?topic=458557.msg3191753#msg3191753 (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$ (https://www.aliexpress.com/item/US-100-Ultrasonic-Sensor-Ultrasonic-Ranging-Module-With-Temperature-Compensation-For-Arduino/2038168189.html) instead of 0.81$ for HC SR04 on aliexpress.com.

Hermann.

(http://stamm-wilbrandt.de/en/forum/IMG_20170325_130920.jpg) (http://stamm-wilbrandt.de/en/forum/IMG_20170325_130920.jpg)

I superglued 3 together for my Due (with motorshield v2):
(http://stamm-wilbrandt.de/en/forum/IMG_20170326_160950.jpg) (http://stamm-wilbrandt.de/en/forum/IMG_20170326_160950.jpg)

And they work well (http://forum.arduino.cc/index.php?topic=462107.msg3193700#msg3193700).