How to power 3 servos with one arduino?

it really depends on the amount of work the servos will perform I have powered 3 servos with 4 AA batteries 900mah and that seems to work pretty well for light to medium work. such as moving an ultrasonic sensor.

Could you explain why an external is better? and also, regardless if it is better or not, would using the 5V supply still be possible?

The arduino internal power supply is not designed to power motors, which could draw several amps, and possibly damage the arduino voltage regulator. Also, servos operate better at 6v than 5v.

Find out how many amps you need for one servo (use your multimeter if you can't find a spec), then multiply by three, for the worst case.

The servos would all be in parallel with the supply. So the voltage would not be divided.

Even one servo running off the Arduino supply could cause problems. It may run fine most of the time, but eventually you will have problems. And you will most likely have a lot of problems if you try to operate all three at once. For one, the current required could be high enough to overheat the regulator on the Arduino. It could also cause the voltage on the regulator to dip to the point that it resets the Arduino. If you are powering the Arduino itself from an external supply of 800mA or more, you might be ok with a servo or two. Over USB, you have only got 100mA possible.

Obviously the final application will be installed in the kitchen so you are likely going to be using a battery or a wall wart. Your servos can run off 7V just fine and the arduino can run off 7V just fine. So use the same supply to power both, but that means powering the servos directly from the supply, not from the Arduino 5V pin. If you use two separate supplies, make sure the grounds are connected together. Your supply should be rated for 800mA plus whatever the current of all three servos is. In reality, though, your arduino is unlikely to actually draw 800mA. So I think anything at least 1A would be fine.

A single servo can draw 800mA when acting.

pito:
A single servo can draw 800mA when acting.

I was just reading that some can draw even as much as 2A! :astonished:

Thanks for the help gentlemen i really appreciate it. Just one more question. If the servo I am buying does not have a spec on current draw, could i just measure the resistance of the servo, and use Ohm's law? Is it applicable here or is the resistance constantly changing?

could i just measure the resistance of the servo, and use Ohm's law?

No, you can't. The actual current servo needs to actuate is difficult to calculate. There is a peak when servo starts, and it depends on the mechanical forces as well.. You must measure the current under actual load. Or make a qualified judgment :slight_smile:

Arduino --- from any I/O pin try to keep 20mA or less. Total draw = 200mA. See why less? Less adds less to the total.

So you connect resistors and transistors to pins, or you connect drivers or opto-isolators and run the main power through that.

But I look at what you got and if there's a house current version of your valves then look into 5V control power relays that switch 120/240VAC direct. They might handle a good deal of DC too. Then you won't have to write motor control, the relay does it.

remedemic:
Thanks for the help gentlemen i really appreciate it. Just one more question. If the servo I am buying does not have a spec on current draw, could i just measure the resistance of the servo, and use Ohm's law? Is it applicable here or is the resistance constantly changing?

That will tell you the stall current of the motor so that is the absolute maximum it will take. In normal operation it will take much less, maybe 8 or 10 times less.

or is the resistance constantly changing?

The resistance is constant but the current through the inductor depends on the energy coupling between the magnetic field and the load you put it under.

So all in all, how should I determine how much current a servo will draw if I cannot find a spec? Will it not matter since it will most likely be in the range of a battery's current output capability?

EE is about measurements. So the best way to determine the current is to measure it under typical load..

Make sure you know the startup surge. Power Supply should rate a good bit higher for long life.

retrolefty says in a number of posts that he allows 1A per servo... The datasheets are very quiet on the matter.

It's not a good idea to just supply a bit more power than you need. Overestimate then double that and your PS will live longer. Same with a PC, always get extra power supply.

GoForSmoke:
It's not a good idea to just supply a bit more power than you need. Overestimate then double that and your PS will live longer. Same with a PC, always get extra power supply.

Good advice.

I once measured the stall current of this very popular 9g servo.

It was 700 mA

GoForSmoke:
It's not a good idea to just supply a bit more power than you need. Overestimate then double that and your PS will live longer. Same with a PC, always get extra power supply.

But then on the flip side of that, when something goes disasterously wrong having a huge supply of current available, your circuit will turn to bacon long before the power supply trips whatever protection it has or blows open itself. I guess it depends on whether you want to replace the supply or replace your entire circuit. GoForSmoke indeed! :wink:

(Just teasing... it is a very good rule of thumb -- but consideration above is real.)

Design the circuit right and the expensive parts won't fry. Of course design it right and it will take physical damage to cause anything to fry.

On PC's, power supplies dieing has been the cause of many other parts getting replaced as the spikes kill them even before the PS karks it.

But then I had one buddy who didn't believe that grounding really matters. He would go whole months between PC's quitting on him.