Powering Servo's

I am trying t efficiently power 20 servo's and an arduino mega.

The plan is to use 5 of these 18650 NiMH 4300mAh 1.2v Rechargeable battery with solder tags as a 'pack' to give 6v to my servo's.

My question is, would i be better off, ignoring battery life, grouping servos to separate battery packs or would i be ok with just the one set.

Currently, im using 4 rechargable AA's to power the servo's and the servos are very shaky. They wobble about quite madly. I hooked them up to one of these Union 4R25 6 Volt Heavy Duty Battery PJ996 - Ray Grahams DIY Store but they still acted very shaky.

One servo also keeps unlocking, swinging freely and only now and then sets its position.

Also, the servos i am using are these http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=32473

They arent really strong enough and i assume thats why its shaking about so much. I dont really have any more money so i would like other peoples opinions before i try and get a load of stronger servo's

Nobody can say if they're strong enough: you'll need to do some calculations. You'll need to measure or calculate the load on the servo then decide how much torque each will need to provide.

As well as that, you should measure the current drawn by the servos you have already, and see if the power source is able to provide that.

thanks. Can you advise on how i can measure the current draw? I have a multimeter, can they do it? If so do you know how?

Not all multimeters have a current facility: you'll need to look at the dial and see if there's on marked "A" or "Amps" or whatever.

If it has, some have two sets of holes for current, often a A hole and a mA hole, choose the higher setting since we don't know what to expect.

Then, to measure current, you need to put the meter probes in series with the load- not like when you measure volts which is across. So pull one of the servo power wires off the battery (or other power source), touch one probe to the battery and the other to the power wire: so then the current goes through the meter. Make doubly sure probes are in correct meter holes and dial is on the right setting.

It's muuuuch easier if your probes have clips, since you need lots of hands, if not, phone a friend.

Now start the sketch- if the servos are loaded, or you have a spare hand to try to move the horn when the Arduino is commanding it to a position, you'll be able to measure the current under load, which is what you need to know. It might be about an Amp.....

If it reads -ve, just means you have the probes back asswards, no biggy.

thanks. Can you advise on how i can measure the current draw? I have a multimeter, can they do it? If so do you know how?

Just check the specs for the servos. :wink:

To measure current, you have to break the circuit and put the meter in series with the load. Usually, there is a separate connection on the meter for measuring current... This is to help prevent "accidents"... If you have the meter set-up to measure current and you put the meter in parallel (the way you'd measure voltage or current) the meter will short-out the circuit, you'll get the maximum current the circuit can supply, and you'll blow a fuse in the meter (or worse).

If you want to practice measuring current, start out with something low-current like an LED. Make sure you have an extra fuse (or two) and find-out how to change the fuse before you start. If you do blow the meter's fuse, this will normally only affect the current-measurement function, so the meter will still measure voltage & resistance.

Currently, im using 4 rechargable AA's to power the servo's and the servos are very shaky.

The problem could be something else... Does it happen with no load on the servos? Long wires to the servos could pick-up noise... Maybe there's something wrong with your sketch...

Does it happen with only one servo connected? If you are running all 20 servos, maybe that's an issue. I don't think it's a problem running several servos at once, but I'm not sure.... Maybe someone else can chime-in with an answer.

The problem could be something else... Does it happen with no load on the servos? Long wires to the servos could pick-up noise... Maybe there's something wrong with your sketch...

Theres nothing wrong with the sketch. Its rather long but it worked fine before i added more servos and the overall weight increased.

When theres no load it seems better, although the same servo does keep releasing. Im setting the servo position on every loop, even if its the same value. the servos are stored in an array too.

There are long, thin wires. But there are longer wires on the servos that are fine.

Just check the specs for the servos

They don't always give a number though....

JimboZA:
If it has, some have two sets of holes for current, often a A hole and a mA hole, choose the higher setting since we don't know what to expect.

Be very very conscientious about removing the probe from the Amps connector when you are finished measuring current. You DO NOT WANT to try measuring a voltage with the probe in the AMPs connector.

... The voice of experience

...R

Currently, im using 4 rechargable AA's to power the servo's and the servos are very shaky

Are the servos "separately" powered from the batteries (not being powered thru the arduino by the batteries arduino)? Also with external power for the servos, the arduino ground needs to be connected to the battery ground.

Yes, the servos are directly to the batteries. The ground of those servos return to the batteries.

The arduino is powered by the same batteries but there is a 6v regulator in place to give it 6v as it wasnt working well with 4.8v. Now the arduino works at a very good rate

Jaychad:
The arduino is powered by the same batteries but there is a 6v regulator in place to give it 6v as it wasnt working well with 4.8v. Now the arduino works at a very good rate

The Arduino needs either regulated 5V at the USB or prefers 7+ for it to have a decent 5V internally.

mega power.PNG

I can regulate it to 7v no problem. But its the servos im having trouble with

Just a thought, but could i be suffering a PWM issue? Im using a mega and using the 20 + pins for the servo

Jaychad:
Just a thought, but could i be suffering a PWM issue?

You mean maybe the pulses are badly formed and or timed?

Only way to tell would be with a 'scope. Should look like the attached, which is just after a servo.attach() when it sends 1500us pulses by default.

servo attached.bmp (219 KB)

I had been reading this you see Arduino Playground - MegaServo

It would be interesting to see what the current in the servo control line is.....

I see my 'scope shows just under 5V in the control line- that was with no physical servo on line, so maybe with so many servos that's dropping and losing control?

By control line do you mean the signal or power?

The signal

ill try and find a way to check. i dont think my multimeter has an option for that