23281Views39Replies

Author Options:

Using Arduino and 8 servos!? What type of power source? Answered

Hey Arduino guys! I got a question.

I am using 8 servos with my Arduino. All the servos are hooked up parallel to the 5v and GND on the Arduino. All the control wires are hooked up on pins 2-9. I'm using 6 AA batteries as my pack. Is this OK for my Arduino? With all these servos moving at once, I want to make sure I'm not frying my board.

Oh, and, got another question.

The 6 AA batteries are too heavy for my robot spider, so I want to use two 9v batteries instead. But, this delivers 18v. Arduino and only go up to 12v. So, what can I use to bring my 18 volts from two 9v batteries down to 9v or 5v? What can I use? A voltage divider with resistors? A voltage regulator (whatever that is :P)?

Thanks guys!

39 Replies

user
frollardBest Answer (author)2013-01-31

9v batteries are garbage.

Get a lithium battery of the appropriate voltage - it's the only way to get the voltage, power density, and weight requirements you need.

Run the arduino direct from at least 7 volts on its dc input jack.

Run the servos on a shield designed to inject power into servos so they aren't drawing the 5v from the arduino power regulator. If you connect more than 1 servo to an arduino directly, it will damage the regulator.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)frollard2013-01-31

Well nice, it looks like I have a damage regulator then!

Select as Best AnswerUndo Best Answer

user
The Skinnerz (author)HavocRC2013-01-31

Not necessarily. Regulators can take a reasonable amount of abuse for short periods, and some have build in overcurrent protection. If you still measure the right voltage coming out of it, there shouldn't be a problem. However, continued use with too much load will make a failure very likely.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)The Skinnerz2013-01-31

How would I know how much current each motor draw, the total current draw from all the motors, and the amount of current my battery pack is giving?
Yes, that makes sense, connect the grounds. Ok, well thanks Skinnerz!

BTW, my username I use the most is Skinnerman :D

Select as Best AnswerUndo Best Answer

user
frollard (author)HavocRC2013-01-31

Skinnerz replied elsewhere, depending on the servo, on load, they can be upwards of 2 amps EACH.

8 of them is 16 amps worst case...and the arduino regulator is good for maybe 1...Don't do it, you will damage it.

Battery ground to arduino, and servo black wires
Battery positive to arduino input +, and servo red wires (note how servos don't connect to the arduino power out, but instead direct to the battery)
servo input data wire to each arduino pin - almost no current draw so no damage.
You may need a REALLY beefy regulator to supply the correct voltage to the servos if your battery is too high a voltage.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)frollard2013-01-31

So this is what you're saying. Connect the DC jack to Arduino. Connect an additional battery's ground to ground on Arduino, and the positive to the positives of the servos?

Select as Best AnswerUndo Best Answer

user
frollard (author)HavocRC2013-02-01

no, One battery.

All the negative connections are connected together, negative battery, Arduino ground (DC input jack), and servo negative wires.

Positive from battery goes directly to the servos, and directly to the arduino DC input jack.

Data lines from the arduino pins to the servo control pins.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)frollard2013-02-01

Wait, Frollard, just one more thing, my battery is 6 AA batteries. Thats 9vs. Servos use 4-6. What do I do?

Select as Best AnswerUndo Best Answer

user
frollard (author)HavocRC2013-02-01

This is where the regulator comes in and can be a bit troublesome - Because you are dealing with high current, you can't just drop a few resistors in there to drop the voltage - the resistors would have to disspiate as much power as the servos use...

A linear regulator would work, but again, if you draw 16 amps and drop half the voltage, half the voltage has to become heat - and thats a lot.

A better solution is to use a closer to ideal battery voltage, like 6-7.5 volts. 4x AA.

A best solution is to use a DC-DC converter that efficiently converts any input voltage to the needed output voltage. I found some that are good for 3-4 amps, not enough for full stall current, but then you shouldn't be stalling ALL your motors at the same time regularly with a walking bot. You could use a pair of them to power a pile servos each.
http://dx.com/p/dc-4-40v-to-dc-1-5-35v-voltage-step-down-transformer-126108
Two of those connected between your battery and your servo power wires would drop the voltage down without wasting much power - and they are really tiny so they don't add a lot of weight.
You might consider adding a large capacitor on the outputs to add some short term storage for when the motors get really bogged down and need a little extra current ready quickly.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)frollard2013-02-01

Hmmm, a capacitor? Like how, if capacitors have a cathode and anode, how could I hook that all up to on wire? Would I need a resistor for it [to control the discharge, (i think?)]?

Select as Best AnswerUndo Best Answer

user
The Skinnerz (author)HavocRC2013-02-01

You shouldn't need a resistor on the capacitors. Unless you have a really huge capacitor, you can just connect it across the output of the regulator. The capacitor is there to supply short bursts of extra current when the regulated supply on its own isn't enough, so adding a resistor would limit its ability to do this.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)The Skinnerz2013-02-01

Yeah but how would I do that in my case, without a regulator? You said connect it across the out put of the regulator. Sorry, I'm not good at this, can you just explain a little easier?

Select as Best AnswerUndo Best Answer

user
The Skinnerz (author)HavocRC2013-02-01

If the servos are connected directly to the battery pack, just attach the capacitor across the terminals of the battery.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)The Skinnerz2013-02-01

Hmm. Looking at my schematic, could I still hook up the capacitor between the terminals considering it's hooking up to Arduino also? Though I don't know what the capacitor will do, or how, I guess I can do that :D

Select as Best AnswerUndo Best Answer

user
The Skinnerz (author)HavocRC2013-02-01

On that circuit, the capacitor should go across the 4V battery pack.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)The Skinnerz2013-02-01

Okaydokey, makes total sense. Thanks skinnerz for all your help!

Select as Best AnswerUndo Best Answer

user
frollard (author)HavocRC2013-02-01

Exactly like your picture if you absolutely have to use separate battery packs. You won't need a capacitor if coming directly off AA batteries - just off a regulator.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)frollard2013-02-01

Alrighty. I'll do that. Thanks Frollard for all you time,

~electricloser

Select as Best AnswerUndo Best Answer

user
HavocRC (author)frollard2013-01-31

When you say each servo takes 2 amps, are talking in milliamps? Can you give me the number in decimal form please? I don't see how 9 AA batteries could deliver 16 AMPS. Then again, 16 milliamps seems too low. Please explain.

Select as Best AnswerUndo Best Answer

user
frollard (author)HavocRC2013-02-01

Think metric
milli = 1/1000.
micro = 1/1,000,000

1 Ampere (amp) = 1000 mA = 1,000,000uA

16 Amps is 16,000mA

Select as Best AnswerUndo Best Answer

user
HavocRC (author)frollard2013-01-31

Ok. That sounds great. I didn't think I should hook all of them up to my Arduino. After googling, I saw that its not the best practice to hook up multiple servos to Arduino. Thanks Frollard.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)frollard2013-01-31

I don't know what I'd do without them. . .
But yeah, they work horribly with my Arduino.

Select as Best AnswerUndo Best Answer

user
samitha rajakaruna (author)2017-02-26

i'm using six mg995 metal server motor..i have lipo 1300mah bettary.bt it gives high amperes.how to give perfect current for motors.

Select as Best AnswerUndo Best Answer

user
BishalK4 (author)2016-09-02

hey If i use lithium polymer baterry's 7 volt pin and connect all 8 servos parallelly ,will it work?

Select as Best AnswerUndo Best Answer

user
BishalK4 (author)2016-09-01

Skinnerz I am using 2 metal servo and 6 micro servo.But i could not solve the power problem. How much voltage source need to run all servo properly? PlZ help

Select as Best AnswerUndo Best Answer

user
zxen (author)2016-06-24

I'm wiring a bunch of servos (36 Hitec 930TH servos) to a microcontroller. The microcontroller melts with the current draw, even at rest. MAXIMUM current draw is 36 x 2.1A = 75.6A. I am using a 7.5V46A power supply. I have cut the connectors off the ends of the servos and plugged the white data wires into the microcontroller. The microcontroller is plugged into the power supply. It only requires about 1A or less I think. As for the power for the 36 servos, I have twisted all the red wires together and plugged them into the power supply, same with the black. So this avoids the microcontroller melting. But there is another problem, even with only two servos:

JITTER

The current from all the connected servo wires affects every single servo when I place my hand on a servo and gently slow its rotation. They all jitter erratically, probably due to the pulses of required extra current. Remember, this happens when there are only 2 servos connected, let alone 36. I've heard about Electrolytic Capacitors but don't understand if this would solve the jitter or not. Would I simply place each end of a capacitor at the power supply terminals with all those servo wires? Is there a better way? My power supply has 3 outputs, input 240V, output 7.5V46A.

Select as Best AnswerUndo Best Answer

user
Parmustargaryn (author)2016-03-11

I have a similar issue - using a pwm adafruit 16 servo board - struggling to power 16 servos. Hopefully trying a 7.2v 2500mah battery - fingers crossed. using micro servo tower 9g (4.8v or 6v) . Not sure that is going to be enough amps though. Idea's welcome. I wonder what people with hexpods similar use to power their servo's?

Select as Best AnswerUndo Best Answer

user
D4MR (author)2015-12-28

Sorry for bringing a post back from the dead... but how are are you planning to do PWM on non PWM pins?

Select as Best AnswerUndo Best Answer

user
HavocRC (author)D4MR2015-12-28

Don't need PWM pin for a servo.

Select as Best AnswerUndo Best Answer

user
The Skinnerz (author)2013-01-31

On full load servos can require 2A each, and will still require a reasonable current with no load. Servos need about 5-6V to work so will require either a battery pack at that voltage or a regulator. I would recommend you run the logic off of the onboard regulator, and drive the servos directly from a 4.8/6V battery pack.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)The Skinnerz2013-01-31

Hey, do I have to hook up the servos to the connections or can I use an external power source? Have the control wire hooked up to Arduino, and + and - hooked up to another battery?

Select as Best AnswerUndo Best Answer

user
The Skinnerz (author)HavocRC2013-01-31

I mean run the arduino and any sensors or other circuits off of the regulator built into the arduino board so that they get the correct regulated 5V.

You should be able to run the servos and the arduino off of the same battery pack as long as it can provide sufficient current. If you do use a separate power supply for the servos, you will need to make sure that the negative terminals of both supplies are joined so that the servos have a 0V reference so that they can tell if the signal from the arduino is high or low.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)The Skinnerz2013-01-31

OK. Frollard told me that it would damage my regulator on my Arduino.
How would I know how much current each motor draw, the total current draw from all the motors, and the amount of current my battery pack is giving?
Yes, that makes sense, connect the grounds. Ok, well thanks Skinnerz!

BTW, my username I use the most is Skinnerman :D

Select as Best AnswerUndo Best Answer

user
The Skinnerz (author)HavocRC2013-01-31

The current each servo draws depends on how much force it has to apply in order to move. If it can only just move, or is stuck in place, a servo may draw around 2A, but if it can move freely, it may only draw a few hundred mA. You can either use the worst case estimate for all servos under full load, or measure the current that one servo draws lifting 1/8 of the load and use that. Up to a point, the current supplied by the batteries will be whatever the servos need at the time.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)The Skinnerz2013-01-31

Okaydoke. Souds great. Thank- you Skinnerz, oh, and this project I'm doing might be a future instructable :P

Just needed some help to make sure I was on the right track!

Select as Best AnswerUndo Best Answer

user
HavocRC (author)The Skinnerz2013-01-31

What do you mean run the logic of the onboard regulator?

Select as Best AnswerUndo Best Answer

user
mpilchfamily (author)2013-01-31

9v batteries won't last you very long but if you wire them in Parallel you'll have 9V and double the run time of a single 9V.

Select as Best AnswerUndo Best Answer

user
HavocRC (author)mpilchfamily2013-01-31

Hey, thats a better idea the wiring them in series! Thanks!

Select as Best AnswerUndo Best Answer