8
\$\begingroup\$

I just wonder if there is a way to share my 5v pin between two or more components?

I am practicing my Arduino skills and I have a button which when pushed I want to activate my ultrasonic sensor - then I realized each one requires the 5v pin of which I have exactly one.

\$\endgroup\$
  • 1
    \$\begingroup\$ You can connect multiple load in parallel, yes. As long as the total load current doesn't, exceed what Arduino can source. \$\endgroup\$ – Nick Alexeev Aug 1 '12 at 1:03
5
\$\begingroup\$

You certainly can. Do keep in mind that just from the pins, the Arduino does not provide more than a few mA (something like 20-30 mA). So your ultrasonic sensors should be fine drawing power from the Arduino, but not something like a motor which draws a lot of current.

I'm assuming you are talking about the HC-SR04 which draws 15mA nominally since it's common to microcontrollers.

It would help if you could tell us what components you are interested in hooking up as well.

\$\endgroup\$
  • \$\begingroup\$ Thanks for responding. Yes, my ultrasonic is a HC-SR04 and what I'm trying to accomplish is firing my ultrasonic sensor at the push of a button. Being so new to Arduino I didn't think about power until the last second \$\endgroup\$ – sisko Aug 1 '12 at 17:03
  • \$\begingroup\$ Good thing you did think about it too. I think your project is simple enough to achieve. If you need help on the HC-SR04 with Arduino, let me know. I wrote up a tutorial with video on my website which you can refer to. Not trying to advertise here, it's just very relevant IMO. \$\endgroup\$ – capcom Aug 1 '12 at 22:07
  • \$\begingroup\$ what's the link to your tutorial? \$\endgroup\$ – sisko Aug 14 '12 at 18:29
  • \$\begingroup\$ @sisko bit.ly/OgRSF7 Hope it helps you out. \$\endgroup\$ – capcom Aug 14 '12 at 20:05
15
\$\begingroup\$

If you are talking about the dedicated 5V connection available on the Arduino (i.e. from the regulator, not the micro) then as long as you don't exceed the maximum current available you can power as many things as you like from it.

To be clear, I'm assuming you are talking about the header pin the red arrow is pointing to.

Arduino 5V

How much current can this pin supply?

Well, looking at the schematics for a few Arduinos, they all seem to use the NCP1117 5V regulator in SOT-223 format. The regulator can supply up to 1A if heatsinked adequately, but since there is no heatsink present on the Arduino the capability will be much less than this.
If you use the USB supply, then it bypasses the regulator and you are then limited to the maximum USB current (500mA for USB 2.0)

For the NCP1117, if we look at the graph for surrounding copper length, we can see that the maximum power can be between ~0.6W and 1.5W, depending on how much copper is used. At 5V, this equates to 0.6W / 5V = 120mA, and 1.5W / 5V = 300mA.

NCP1117 graph

Note this graph is for an ambient temperature of 50 degrees, so under normal conditions (~25 degrees) the maximum power will be a bit higher.

Some of this goes to powering the ATmega, if we assume it will be less than ~100mA then that may not leave too much to power anything else if it's running at high speed, driving a few LEDs, etc. If you are not doing much, it will probably be around 10-20mA (see ATmega328 datasheet for exact figures)
Hopefully there is plenty of copper used though, so you will have a couple of hundred mA spare (more/less depending on what the ATmega is doing)
The NCP1117 has a thermal shutdown protection, so the worst that happens if you draw too much current is it will get to a certain temperature (~175 degrees - be cautious about touching it!) then shutdown until the load is removed.

So, if your ultrasound units require less than, say 100mA combined you should probably be fine. Just give it a try and see how it goes - you can monitor the regulator temperature if you have a temperature sensor (if not you can estimate by touching briefly - if too hot to keep finger on it's >50 degrees. If you wet finger, touch and it sizzles then it's probably over 100 degrees)
Note that I have never personally used an Arduino, this is just from a quick look at the information available.

\$\endgroup\$
  • 1
    \$\begingroup\$ -"If you wet finger, touch and it sizzles" please be careful with this advice, if your finger is to wet it may drip on the board... aka risk of magic smoke ;) \$\endgroup\$ – Johan Aug 1 '12 at 6:21
  • \$\begingroup\$ @Johan - good point thanks, I should have said a little more there. By "wet finger" I mean just damp enough to sizzle if touched briefly against the chip. You can also use something like a damp cotton swab (aka Q-tip) \$\endgroup\$ – Oli Glaser Aug 1 '12 at 6:58
  • \$\begingroup\$ @Oli: wow! thanks for the very detailed answer. However, I am an absolute novice at all things Arduino and electronics. All of your details are beyond my understanding - for now. I'll have to study your response extra closely to see how much it helps. Very appreciated however. \$\endgroup\$ – sisko Aug 1 '12 at 17:07
3
\$\begingroup\$

Run a line from the 5V on the arduino to a small breadboard. Then run wires from the connected lines on the breadboard to your other components. If I understood you right, you're more worried that there's only the one %v out line on the arduino, and you need to connect more than one device. The other solution is to put a female wire on the ICSP pin 2 to the other device, as it also has 5V present.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.