27507Views41Replies

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!

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
1
frollard
frollard

Best Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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

0
The Skinnerz
The Skinnerz

Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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

0
frollard
frollard

Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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?

0
frollard
frollard

Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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

0
frollard
frollard

Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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?)]?

0
The Skinnerz
The Skinnerz

Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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?

0
The Skinnerz
The Skinnerz

Answer 8 years ago

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

0
HavocRC
HavocRC

Answer 8 years ago

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

Untitled Sketch_bb.jpg
0
The Skinnerz
The Skinnerz

Answer 8 years ago

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

0
HavocRC
HavocRC

Answer 8 years ago

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

0
frollard
frollard

Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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

~electricloser

0
HavocRC
HavocRC

Answer 8 years ago

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.

0
frollard
frollard

Answer 8 years ago

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

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

16 Amps is 16,000mA

0
HavocRC
HavocRC

Answer 8 years ago

Ah, thanks!

0
HavocRC
HavocRC

Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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

0
hritik31
hritik31

7 months ago

Can I run a single micro TowerPro (servo,with no load current upto few milliamps) directly using 5V 5Amps power supply? or do I need some resistors to hooked up to limit the current?
Is this power supply is safe for another servo with the stall torque of 10 kgcm (at 4.8 volts ,TowerPro) under the 5kgcm torque condition?
please help.. THANKS!!

0
mpilchfamily
mpilchfamily

8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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

0
lilg4674
lilg4674

Answer 3 years ago

Hey Havoc, can you show schematic of how you did this? its an old post but need some help.

0
samitha rajakaruna
samitha rajakaruna

4 years ago

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.

0
BishalK4
BishalK4

4 years ago

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

0
BishalK4
BishalK4

4 years ago

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

0
zxen
zxen

4 years ago

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.

0
Parmustargaryn
Parmustargaryn

5 years ago

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?

0
D4MR
D4MR

5 years ago

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

0
HavocRC
HavocRC

Answer 5 years ago

Don't need PWM pin for a servo.

0
The Skinnerz
The Skinnerz

8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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?

0
The Skinnerz
The Skinnerz

Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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

0
The Skinnerz
The Skinnerz

Answer 8 years ago

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.

0
HavocRC
HavocRC

Answer 8 years ago

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!

0
HavocRC
HavocRC

Answer 8 years ago

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