powering arduino uno and servos through 5v wall outlet

Hello all. I am new to arduino so I have some questions that may seem obvious to some. I am building a dispenser and will be using two servos. I understand powering the servos with the uno board isn't advised. My question is this, how can I power both the servos and the uno board with one 5v plug into the wall? I want this to be a stand alone unit once programmed and assembled and want to make it as simple as possible for the user, they are not very tech savvy.

Thank you in advance.

Are you sure that the output of the wall wart is, at most, 5.5VDC?

Connect the +5V output of the wall wart to the + power input of each servo and to the 5V pin of the Uno. Connect the ground (-) of the wall wart to the ground of each servo and to a ground pin on the Uno.

So not connect the 5V from the wall wart and the 5V from USB at the same time. Power with one or the other.

What are the specs of the wall wart? What is the current capability?

I was going to use a usb cable plugged into a 5v power adapter. Will this provide the same result as if I wired it directly into the wall wart?

Yes, in effect. The Uno schematic shows that the USB Vcc goes through a FET and then connects to the 5V. The FET is to switch between Vin and USB.

See this page for more info.

spideyboi84:
I was going to use a usb cable plugged into a 5v power adapter. Will this provide the same result as if I wired it directly into the wall wart?

Not quite sure what you are describing here!

A "phone charger" with a USB socket will provide regulated 5 V to that socket. You need one at least rated for an iPad - 2.1 Amps - for two servos. Now you cannot just plug that into the USB jack of an Arduino UNO or (more appropriately,) Nano and take 5 V for servos for whatever else from the "5V" pin because there are current limiting components between. So you have to use a cable with a USB plug to the adapter, to split out the ground and 5 V wires and connect to the "5V" pin and ground and in parallel, your servos.

Now if using a UNO (bad idea!), you need to disconnect the power and servos from the "5V" pin when you plug the UNO into the PC to program. For a Nano, there is no risk programming with the external 5 V power connected and indeed it must be powered unless you disconnect the servos, otherwise having them connected to the "5V" pin will shut down the USB.

Hope that all makes sense! :grinning:

I'm having a bit of a hard time understanding what you've explained here. This is what I've done so far; I've taken a USB cable and tapped into the ground and positive wires, soldered in two wires which I will connect with the servo (only ended up needing one). Then I will connect the data wire of the servo to the UNO, and of course the USB cable will be plugged into the UNO to provide its power. I haven't connected it to the UNO yet, wanted to check back here before doing so. Will this work or will there be problems with what I've done? One of the concerns I had was whether there needed to be another ground connection from the servo to the UNO, even though the ground from the USB is present and plugged into the UNO as well.

OK, I think that is reasonable as you are not passing the servo power through the UNO's 5 V connections. It also means you automatically disconnect it (the servo and external power supply) when you program the UNO.

As a matter of safety, you should disconnect the servo control wire (with the power off) before you disconnect the power supply from the UNO and only re-connect it after plugging that power supply back in to the UNO, and you should keep the control wire running as close as possible with the power wires.