# How to feed 18 micro servos? [closed]

First of all, i am a software developer, and understand very little of electronics. I'm planning to build a hexapod robot with the micro tower pro sg90 servos, controlled by the arduino mega. In the end, 18 servos will be used (3 for each of the 6 legs). Knowing that every servo draws about 150mAh at peak, and they work at 5V, do i need a battery that provides 2,700 mAh? Or i can work with a battery that provides less than that?

What kind of battery should i use, since there's no 5V battery? I can use a LiPO which is 8.4 V, is there a way to convert this voltage to 5V?

## closed as too broad by Sparky256, Bence Kaulics, Daniel Grillo, laptop2d, Dmitry GrigoryevAug 10 '16 at 16:32

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• mAh is a measure of capacity. Current is measured in mA. – Ignacio Vazquez-Abrams Aug 5 '16 at 18:28
• So if a battery has 8400mAh, it doesn't mean the current is 8400mA? how can i know how much current a battery have? – Mateus Viccari Aug 5 '16 at 18:32
• @MateusViccari mAh = mA for 1 hour. If your battery has a capacity of 8400mAh, and you draw 8400mA, then the battery will be drained in 1 hour. If you draw 4200mA, then it will be drained in 2 hours. Of course this assumes that your battery can source enough power. – Ken Aug 5 '16 at 18:39
• The belief that these servos draw only 150ma peak is quite erroneous. Stall current can reportedly be half an amp or more. – Chris Stratton Aug 5 '16 at 18:43
• You should do some research on existing robot designs on the scale you are looking at and see what they've done to address your questions. They will likely be using LiPo, so you can see what they did there, as well. Since this looks like a DIY project, you do have a lot to learn about. Too much for a meaningful answer here, I fear. Doing that research will allow you to narrow your questions here. – jonk Aug 5 '16 at 18:44

mAh is a measure of capacity.

If you want to drive all 18 servos at peak current, you need a battery that will supply 2.7Amps.

LiPOs tend to rate their discharge capability in terms of C, which relates the capacity to the discharge rate. A 5C battery is rated to be able to deliver 5 times its rated capacity. If you used a 5C battery, you would need a capacity of only 540mAh, though more than this would be entirely acceptable, and preferable.

You have a choice of two cells and dropping the voltage with a buck converter, or a single cell and raising it with a boost converter. Both types of converter are readily available. The buck converter would use a lower input current, though that doesn't matter much at this power level.

Don't forget that going through a buck or boost converter will change the current drawn.

With a single cell design, you will not need a charge balancer. Do be aware that you will need a specialist charger for LiPOs, they are easy to damage through overcharging.

With a 2 cell battery, it will be possible to use a separate linear regulator as well, as an auxiliary low current output perhaps for your controller.

Many servos that I have seen have a wide enough input voltage tolerance to run from 6v, which would allow a 6v SLA for the servos and a LDO for 5v for the MCU, though not the sg90 I notice which specifies 4.8/5v. Perhaps these are anticipating a 4 pack of NimH (nominal 4.8v)?

Not sure what is available specifically for robotics but with RC/Drone hobbyists they typically use a 5V DC-DC converter, but often call it a BEC or UBEC (Battery Eliminator Circuit).

In an nutshell it is just a DC-DC converter that is connected directly to the LiPo battery pack (or other flavour of battery) and provides 5VDC output.

You should be able to get something like this or similar from where you are obtaining your servos there are various options of off the shelf parts.