Go Down

Topic: Ultrasonic sensor SRF04 - Arduino uno (Read 4049 times) previous topic - next topic


Hello everyone,

Here I expose my own concerns: I find myself having to interface an ultrasonic sensor, SRF04 Daventech model with Arduino One.

From the technical manual that I downloaded from http://www.robot-electronics.co.uk/htm/srf04tech.htm seems that this sensor has an average current consumption that is around 30mA. I know that Arduino can provide a maximum current equal to 20mA.

My fear is that, by linking the two systems, they can be damaged.

Am I worrying for nothing? if not, how can I do to connect the two systems without risk of damage?

Thank you in advance



Which arduino would that be?

I used the Mega2560 only on the USB cable -- the sensor SRF02 ran fine. Since then I added a 9V "wall Wart" power supply and run six sensors ... MMA7361, DS1307, BMA180, BMP085, DS18b20, a Level Changer and the SRF02 occasionally ... no smoke yet...

But If I am testing for noisy power I remove the 9V 1Amp wall wart...

But I do have a 50MFD capacitor on the rail of the breadboard...

It's the 3.3 v Takeoff I am worried about as most of my new sensors are 3.3V -- but I can add a regulator. The mega only supplies 3.3V at 50mA -- most sensors take less than 1mA though...
Just another Hacker


thaks for your reply georgina,

My Arduino is an Arduino Uno.
I'm totally new about Arduino and electronics so, i prey you to e patient with me.

Let me tray to explain: on the datasheet of the Ultrasonic sensor (the Daventech SRF04) they say that the avarage consumption is reasonable at less than 50mA and typically about 30mA. I know (is it real?) that Arduino can give a maximum of 20mA current from it's output pins.

Because of my complete "ignorance" in the field of electronics, I do not know how to behave. I do not know how to physically connect the two devices together.

The fact that the consumption of current by the sensor differs from the current maximum capacity supplied by Arduino is a problem? how to fix it? what is the wiring diagram of the configuration?

Probably i'll connect the ground of the sensor with the ground of the microcontroller, the "Echo Pulse Output" pin of the sensor to any Arduino input, but then? I'm in doubt on these other links:
connect a digital output of the Arduino to the "trigger pulse input" of the sensor and then connect the 5V Arduino pin directly to the sensor. The latter two must be operated in a direct way? resistance needed to be placed? need to study a different circuit configuration?

thank you so much



But you're not actually powering the sonar from an output pin, are you?
You're just controlling the ping.
Per Arduino ad Astra


Hey, are you going for the record of "how many times can I cross-post the same question"?

Cross-posting wastes time - DON'T DO IT.
Per Arduino ad Astra


Thaks Groove,
sorry for the croos posting, i will not do it again.

I am probably confusing arduino digital output pin current limits with the power supply current required for this sensor.
30mA ca is the physical limit of the Arduino digital output pin. The power supply of Arduino, on the contrary, has no limit, so i will have no problem if i connect things like that:
so I should just connect the things as follows:
1) sensor grount ---> Arduino ground;
2) Trigger Pulse Input <---- Arduino digital output;
3) Echo Pulse Output ------> Arduino input;
4) sensor supply 5V <----- Arduino 5v pin.

is it correct?



The power supply of Arduino, on the contrary, has no limit,

Yes, it does.
About 500mA.
Per Arduino ad Astra


OK Version 22 of the compiler has a sketch called PING... Have you looked at that?

Have you done any searches for the material you need... ???? The button is in the upper right.

Many times using the search will reveal a complete library.

Here is some advice. If you have not downloaded version 222 -- do so. Install it. Then, try every sketch which is possible to run on your system... You will find that answers most questions before you think to even ask them. Analyze them and think about them.

...and no I am not being rude. I am being helpful.

Just another Hacker


The power supply of Arduino, on the contrary, has no limit, so i will have no problem

Very funny, I thought there is a resettable fuse to protect arduino from excessive current but after looking at the design file, I couldn't find it in uno?!

I suggest you use a 1uF capacitor between 5V and gnd near your sonic ranger. This will help reduce noise. I've personally been there and done that :D

Here is some articles I posted on my blog, might help with your project.




Very funny, I thought there is a resettable fuse to protect arduino from excessive current but after looking at the design file, I couldn't find it in uno?!

Yes it has a 500ma polyfuse labled F1 coming off the USB connector. Keep in mind this only applies when powered from the USB port, if powered from the on-board +5vdc voltage regulator then the limit is 800ma until the regulator goes into protection shutdown mode if over that current or it gets too hot.



Thanks for pointing this out Lefty. Right, I found the double-footprinted regulator. That was not hard but I'll look for F1  :smiley-red:

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131