# What is the best way to power a large number (27) servos at 5 V?

I apologize if this question may sound a little vague. I am working on a robotics project that will contain 27 servos of various sizes and I am having trouble figuring it how they should be powered.

I was hoping to use several (3-6) 5 W 18650 battery boxes to power them, but the smallest motors would use 2.5 W each, so 1 battery box can only power two. The larger servos, obviously, use even more current, so this plan of using a small number of 18650's becomes infeasible.

There is not enough room on the robot for a 12 V car battery, and adding one would require recalculating the sizes of the servomotors that would be needed. Furthermore, I am not sure how to convert the 12 V it gives down to 5 V for the servomotors.

P.S. What about the stall current of the motors? Should the power supply be able to supply the stall current of all the motors it supplies (at the same time) or just the working current? Should I use a fuse to handle when (if?) the servomotors stall? Should I use a fuse or a circuit breaker? Do they make 5 V fuses? If so, where can I get one?

Something like a larger version of the 18650 box would be most preferable.

• Are all the motors going to run at the same time? If these are for the legs of a hexapod / octapod, are a certain number of legs not always stationary? Nov 15 '12 at 20:51
• Please retag this question with either servomotor or rcservo according to the new tag descriptions (See also this meta discussion). Thanks, May 20 '13 at 15:50

As Rocketmagnet mentioned, just because a motor is rated at 2.5 W doesn't mean it will be pulling 2.5 W all the time. Most robots have at most 1 or 2 servos that are running at full power at any one time; the rest have very low mechanical loads (and therefore pull much less electrical power) or are "off" and therefore pull practically zero electrical power.

This leads to 2 very different approaches to power supplies:

• Tethered robots and desktop computers use a power supply and heat-sinks that can handle the maximum possible worst-case power draw -- when everything pulls the maximum power at the same time. 27 servos * 2.5 W @ 5V requires a 5 VDC and at least 14 A power supply (or perhaps several 5 VDC supplies that add up to at least 14 A).

• Autonomous robots and modern laptops use a power supply and heat-sinks that can handle some thermal design power. Some human arbitrarily picks some the TDP, which is much smaller than the worst-case power, but somewhat above the power required in "typical situations". Then the power supply is designed so it can handle any load from 0 to slightly above the TDP. And the rest of the system is designed so it never exceeds the TDP -- except perhaps for a few milliseconds. The simplest approach is to have something that measures the total current draw -- then when the current exceeds the TDP, assume that things have already gone horribly wrong, and shut everything down for a few seconds. More sophisticated approaches measure the current of each motor individually: When some motor stalls, "limp mode" kills the power to that one motor, so the robot continues to use the other motors at full power. When lots of motors pull a total current that is too high, "tired mode" reduces the power to all the motors so the robot continues to use all the motors at a slower speed.

5 V fuses?

You could install one big 14 A fuse. Or you could install 27 individual 0.5 A fuses, one in the +5V power line of each motor. Or both. You'll probably find it easier to find "12 V" or "250 V" fuses, which will work just fine in your application.

There are many cheap polyfuses available (designed to protect 5V USB ports from excessive current). Alas, polyfuses take several seconds to "blow" -- too late to protect stuff from permanent damage, but quick enough to keep stuff from heating up, catching on fire, and burning down your house.

convert 12 V to 5 V

Most people using servo motors use an off-the-shelf DC-DC converter to convert whatever voltage the batteries supply to the 5V required by the servos.(c) I see that some 18650 battery box (a) include a little DC-DC converter to convert the battery power to 5 VDC "USB battery charger". (A few people use servomotors designed to be connected directly to 12 VDC. a)

Many DC-DC converters are set up so that they never pull more than some maximum current from the battery -- when the motor connected to their output stalls, the converter switches to a "constant-current" mode at some lower output voltage, pulling less power from the batteries. If you put such a DC-DC converter on each servo, it automatically goes into and comes out of "limp mode" appropriately.

batteries

"Selecting the proper battery for your robot" (a)

"Robot batteries" (b)

"Batteries I use in my Robotics" (c)

etc. a b c d e f

It's always difficult speccing the power supply for a robot, and you've hit the exact problem we all face. Do you spec it to cope with the typical load, or the absolute maximum load when all motors are stalled at max current?

There's no right answer to this, except that whatever happens it shouldn't damage anything. The good news is that the servos probably won't be consuming 2.5W all the time, so a good way to start is to connect your system up to a large power supply with an ammeter and measure the actual current draw under typical heavy use. Once you know the maximum current draw, you can spec the batteries for that.

The other thing you need to decide is how long you want the thing to run for. That will tell you how much battery capacity you need, and therefore the size of the battery. But, as you say, if that means you need a larger battery, then it might mean you need larger servos and more current, and therefore a larger battery! There might be no solution to this problem, except:

• Ease your requirements. Accept that the robot won't run as long as you'd hoped.
• If possible, add torsion springs to the servos to help them lift the battery weight. This will mean they consume slightly less power.

But what to do in the extreme case where all the motors are stalled?

You might consider something like a Hot Swap controller. This is a little chip which guards the power input to your system. It protects against the large inrush current caused by your system's capacitors. It also protects against over current in general, as well as over voltage.

This problem is a lot like rocket science. With a rocket, the heavier it is, the more fuel they need to lift off which makes it even heavier! You have your servos, but to power them you need a big battery making the robot heavier, this means stronger servos and an even bigger battery! If you can't work out how to power the robot with an onboard battery then prehaps you would have to settle for an off-board power supply.

Hope this helps.