How to power an Arduino and external board from the same power supply?

I have an Arduino Uno project that uses an external 8 bank of relays which requires a 5v input. The 5v output on the Arduino is too weak to power the board so I need an external power supply. I'd really like to avoid having to use both a 9v power supply and another 5v supply for the board.

I know the Arduino has a Vin which accepts 5v so it seems logical that all I would need to do is split power from a 5v power supply to both the Arduino "Vin" and the board.

However I see lots of cautionary notes about using the Vin. It is a raw input so the power must be very stable and clean, etc.

What is a recommended method for powering both the Arduino and external board from one power supply?

Power the Arduino through its USB port as usual.

“I know the Arduino has a Vin which accepts 5v”...

No!! The “Vin” pin is for 7-12V only (same as the barrel jack). It won’t accept 5V. You mean the “5V” pin.

If you trust your 5V source then land supply on the 5V pin.

Otherwise, you could land your supply on a barrier block terminal strip. Have one line from the terminal block supply your relays, and to power the Uno sacrifice a USB cable, where you strip one end to attach to the terminal block and the other plugs into the Uno USB. I’m doing a similar project and that’s my plan. You could also splice everything together and heatshrink instead of using barrier strip.

Just get a 5V power supply, they're cheap and readily available (search for "phone charger"). 5V goes to the 5V pin of the Arduino and to the relay block. Just ignore the Vin.

Is there an advantage (in terms of safety to the board from power spikes or similar) to powering the Arduino through the USB port vs tapping directly into the 5v pin?

Sadly I only have a rudimentary understanding of circuit theory or I'm sure I could answer this by looking at the Arduino schematics.

Powering thru USB puts the USB 500mA resettable polyfuse in line with the current.
Powering thru the 5ZV pin does not.

If you are using analogRead() and want to bring in up to 5V signals, then use 5V.
Otherwise, use USB and expect as slight drop in voltage across the polyfuse.

johnny45:
I have an Arduino Uno project that uses an external 8 bank of relays which requires a 5v input. The 5v output on the Arduino is too weak to power the board so I need an external power supply. I'd really like to avoid having to use both a 9v power supply and another 5v supply for the board.

I know the Arduino has a Vin which accepts 5v so it seems logical that all I would need to do is split power from a 5v power supply to both the Arduino "Vin" and the board.

However I see lots of cautionary notes about using the Vin. It is a raw input so the power must be very stable and clean, etc.

What is a recommended method for powering both the Arduino and external board from one power supply?

Vin is wired straight to the power jack where you can plug 7V to 12V since it goes through a regulator or DC buck converter (depends on the board) to regulate Vin down to 5V so NO, Vin power does not have to be stable and clean.

The Vin pin is one way to get that 7V to 12V -before- it is regulated down to 5V. It does not go through the chip, it goes around.

If you have regulated (clean & stable) 5V power then THAT can be fed directly to the 5V pin.

Since your relay board will draw a lot of current you need to make sure you have a power supply that can deliver a good bit more just to keep the 5V going to the Arduino from dropping below 4.5V which will cause a reset.

For led strings I bought small 60W OEM (original equipment manufacture -- parts that get used in products) adjustable switching power supplies (no heavy transformer and higher efficiency than heavy old-type supplies) that can give 5V to 12V depending on how you set the adjustment screw. 60W is overkill for what I want but a power supply that loafs along will do so far longer than one pressed near maximum. If you need 2 or 3 amps, 5A or more rated is desireable.

Thanks everyone (especially for correcting me on the Vin pin mixup).

I have a (Samsung) phone charger that delivers 5v 1A. I cut the USB cord and spliced it in so it powers both the Arduino Uno via the 5v pin and the relay board via the JD-VCC pin with the jumper removed.

The relay board box says it draws 480ma so that leaves about 500ma for the Arduino.

It seems to work great.

480 mA that'd be 60 mA per relay - a lot but can be. That current is of course only drawn when all relays are engaged at the same time.

500 mA is ample for an Arduino, even the power hungry Uno takes no more than 100 mA.

If you have any problems with resetting as you switch relays, consider adding a decoupling cap (100µF or more) to the power supply at the relay board. Likely not needed unless you switch multiple relays at the same time.

These are very small relays? I have cheap relays that can conduct 10A 240VAC or up to 30VDC. Sparkfun sells relays that can conduct 5A of the same voltages.

It might take 60mA to switch a small relay but I really doubt that includes the power the relay conducts when closed.

What relay board did you buy? A cheap BJT can switch 60mA without getting warm.