Power

Servo Power Requirements

Powering hobby servos is trickier than with most other electronic components (except maybe for electric motors), mostly because the high power required. An average hobby servo can easily draw more than 500mA of current at 5V – which is the limit that you can get with a USB connection. If you connect 16 such servos to your computer’s USB port, it will either shut down instantly or get fried, depending on how good the protection circuits are in your computer.

Warning

If you try to power hobby servos from your computer’s USB port, you risk permanently damaging your computer.

This also makes the common alkaline batteries unsuitable: not only their voltage will drop with such a high current draw, but they will also get discharged and very quick and possibly damaged.

You have several other options for powering your servos, but before you decide, you need to check how much current they draw. You can either refer to the data provided by the manufacturer (the maximum current draw is usually called “stall current”), or you can use a multimeter to measure the it. In either case, you have to add up all the power requirements of all your servos together, and look for a solution that can provide that much power.

Effects of Inadequate Power

As has been said already, in the extreme case, drawing too much current can damage whatever source of power you are using. In less extreme cases it can lead to it getting hot, and to voltage drops. Voltage drops will make your microcontroller board work unreliably and possibly restart. They can also make the servos behave pretty much randomly – buzzing, moving to random positions, or refusing to work at all.

If you are experiencing problems with your project that magically go away when you disconnect the servos, make sure your are powering everything properly.

Alkaline Batteries

This type of batteries is usually completely inadequate for powering hobby servos or other electric motors. With the high current draw necessary, their voltage will drop a lot and they will get discharged and/or damaged very quickly. Since they are not rechargeable, this is an expensive prospect.

You can get away with powering a small hobby servo (like the 9g ones made of transparent blue plastic) from alkaline batteries, but it’s not the best way.

Nickel Batteries

The NiCd, NiMH and NiMg batteries, commonly available as “rechargeable batteries” for things such as digital cameras, are good for powering a couple of servos. A single cell has the voltage of 1.2V, and servos typically accept from 4.8V to 6V, so using four such cells directly powering the servos is right. They are rechargeable, so even though the initial cost is higher, you will save in the long run.

Lithium Batteries

The LiPo batteries are commonly used in radio-controlled toys, and they can provide very high current. They are also quite light compared to their capacity, so they are perfect for anything that walks or flies. Unfortunately, a single cell has voltage between 3.6V and 4.2V, which may be not enough for powering the servos directly (though it may still work). The two-cell (also called 2S) batteries have twice that voltage: between 7.2V and 8.4V – which usually is too much for the hobby servos. The solution is to use a buck converter for the higher voltage, or a boost converter for the lower. See below.

Lithium batteries are a bit tricky in handling, and can be dangerous when mishandled (remember the exploding cellphones?). They require a special charger, and if you discharge them below 3.6V, you risk damaging them permanently. They are definitely an advanced device.

Voltage Converters

If the battery pack that you are using doesn’t have the correct voltage for your servos, you can use a voltage converter. Those come in two kinds: buck converters take higher voltage and drop it to the required output, and boost converters take lower voltage and “boost” it to the set value. There are also converters that have both a buck and a boost converter inside, and they can deal with any input voltage (within their range, of course). They are commonly called “BEC” or “UBEC” in the radio control hobby communities.

Using a voltage converter is a good way to get exactly the voltage you need, and to get the most out of the batteries – it will give you the same voltage no matter how discharged the battery is. Some even come with a battery protection circuit, that shuts off the battery when it gets discharged too much – which is very handy for LiPo batteries.

However, voltage converters also have their limits for the current they can handle. When choosing a converter for your project, make sure that it can handle the current that your servos are going to draw. (Of course, the battery also has to be able to handle that.)

Power Banks

The portable battery packs commonly used to recharge USB devices such as smartphones usually contain inside a LiPo battery, a boost converter and a recharging circuit. They can often provide as much as 2A of current, which should be enough for powering a couple of servos moving at once. They are also relatively easy to handle, and the built-in protection makes them safer than raw LiPo batteries.

Phone and Laptop Chargers

If your project is not mobile, it is convenient to simply power it from a wall socket. You will need a power unit for that.

The phone chargers are very easy to obtain, but you have to be careful to check how much current they can provide. The cheap chargers often don’t have any kind of protection, and will simply melt or burn if you try to draw too much. The better ones have a protection circuit that will shut them off.

If you need more power, a laptop power unit, or a power unit from any other appliance may be suitable, provided that they give the right voltage (between 4.8V and 6V) and enough current. Connecting a unit with higher voltage than your servo (and microcontroller board) accepts will result in damaging them. Even if the effect is not instant, powering them with too high voltage can damage them over time, so make sure you get the right model.

Tips and Tricks

If you can, try not to move all the servos at once in your program, but instead move a few at a time. This way you can lower the amount of current necessary for them and avoid current spikes and voltage drops. In particular, at startup, don’t just switch all the servos on and move them to their home positions, but instead switch them on one by one, with some delay between them.

If you have some current spikes, but otherwise your current needs are lower, it may help to add a large electrolytic capacitor across the servo power – in the range of 10-100µF. It will act as a buffer, providing extra current when there is a spike, and will help avoid voltage drops.