30% off your first 3 months

Get the deal

Batteries for robots: voltage, capacity and safety

by DuckyHelperNov 12, 20265 min read
Robotics

TL;DR:

  • Voltage is the push, capacity (mAh or Ah) is how much charge is stored, and volts times amp hours gives energy in watt hours.

  • Runtime is roughly capacity divided by average current, and a pack's C rating caps how much current it can supply.

  • LiPo packs store a lot of energy and can burn: use a proper balance charger, never charge unattended, and retire damaged packs.

A robot is only as good as the battery under it. Choose a pack too small and it dies in five minutes. Choose one that cannot supply enough current and the robot browns out when the motors start. Choose one carelessly, or charge it carelessly, and you have a fire hazard. The label on a battery pack tells you everything you need, if you know how to read it.

What the numbers mean

  • Voltage (V). The electrical push. Motors spin faster and drivers deliver more power at a higher voltage. A single cell has a fixed nominal voltage that depends on its chemistry, and cells connected in series add up.

  • Capacity (mAh or Ah). How much charge the pack stores. A 2200 mAh pack can deliver 2200 milliamps for one hour in theory, which is 2.2 Ah. It is a measure of charge, not of power.

  • Energy (Wh). Voltage times capacity in amp hours. It is the fairest number for comparing packs of different voltage.

  • C rating. A multiple of the capacity that the pack can discharge at. A 2200 mAh pack rated 20C can supply up to 20 × 2.2 = 44 A. Manufacturers' C ratings are often optimistic, so leave plenty of margin.

Common chemistries have standard nominal voltages per cell: NiMH about 1.2 V, LiPo and Li-ion about 3.7 V (fully charged about 4.2 V), and LiFePO4 about 3.2 V. A pack named 3S has 3 cells in series, so a 3S LiPo is 3 × 3.7 = 11.1 V nominal and 3 × 4.2 = 12.6 V fully charged. A pack named 2P has two cells in parallel, which doubles the capacity at the same voltage.

Worked example: a 2200 mAh pack at 1.1 A lasts about 2 hours

A small robot's electronics and motors draw an average of 1.1 A. It runs on a 3S 2200 mAh LiPo.

  1. Convert units. 1.1 A = 1100 mA.

  2. Ideal runtime. 2200 mAh / 1100 mA = 2.0 hours.

  3. Energy in the pack. 11.1 V × 2.2 Ah = 24.4 Wh.

  4. Power check. 11.1 V × 1.1 A = 12.2 W, and 24.4 Wh / 12.2 W = 2.0 hours. Same answer by a second route.

  5. Current limit. At 20C the pack can deliver 20 × 2.2 = 44 A. The robot needs 1.1 A on average, plus maybe 6 A at peak, so the rating is far from being a limit here.

Now be honest about reality. You should not run a LiPo to empty, and the usable capacity falls with high current, cold temperatures and age. So treat the 2 hours as an upper bound and expect noticeably less. Also note that "average" hides the peaks. A motor starting or stalling draws several times the running current, and the pack must be able to supply those peaks without its voltage sagging.

Sizing a pack for a robot

  1. Estimate the average current from each part's datasheet or from a measurement with a meter in series.

  2. Decide the runtime you want and multiply by the average current to get the capacity, then add a margin.

  3. Check the peak current against the C rating times capacity.

  4. Match voltage to your motor driver and motors. Check the driver's allowed range with a fully charged pack, which is higher than nominal.

  5. Check weight. A heavier pack costs runtime in every moving robot, especially flying ones.

Where it goes wrong

  • Over-discharge. Running a lithium cell too low damages it permanently and can make it unsafe to recharge. Use a low-voltage cutoff or alarm and stop at the manufacturer's limit.

  • Voltage sag. Under heavy load the terminal voltage drops. A weak or old pack can sag low enough to reset your microcontroller mid-run.

  • Mismatched packs. Do not connect packs of different charge level or type in parallel.

  • Short circuits. A dropped wrench across the terminals can melt wires in seconds.

Safety with lithium packs

Safety: LiPo and Li-ion packs can catch fire if they are punctured, shorted, overcharged, over-discharged or charged wrongly. Only charge with a charger made for that chemistry and cell count, using the balance lead. Never charge unattended or overnight, and charge on a non-flammable surface, away from anything that burns, ideally in a LiPo-safe bag. Do not use or charge a pack that is swollen, dented, hot or smells odd: take it out of service. Never build chargers from mains power. Store packs partly charged, in a cool place, and take dead packs to a battery recycling point, never the bin.

Add a fuse or breaker near the battery. Insulate every exposed connector. Use connectors that cannot be plugged in backwards, and label polarity on both the pack and the robot. Keep a metal bucket of sand or a fire blanket near where you charge, and know your local rules on carrying lithium packs on planes or in luggage.

How real robots use their batteries

Small wheeled robots often use NiMH or Li-ion packs, drones and fast robots use high-C LiPo packs, and big robots add a battery management system that watches every cell. All of them use the same arithmetic: capacity over current gives runtime, and C rating caps the current. The better the data, the better your estimates. Logging real current through a run beats any datasheet guess. The driver side is covered in motor drivers and H-bridges.

Try it yourself

Measure your robot's current with a meter in series, once idle, once driving and once stalled briefly (with the wheels held off the ground, not by hand). Estimate an average for a typical run, compute the runtime for your pack and then time a real run to the cutoff. The gap between your estimate and the result tells you how big a margin you need next time.

Frequently asked questions

Is a bigger mAh number always better?

No. It means more runtime, but also more weight, and it says nothing about the current the pack can supply. Check both the capacity and the C rating.

Can I charge a LiPo with a phone charger?

No. LiPo packs need a charger that controls current and stops at the right cell voltage, with balancing for multi-cell packs. A plain supply can overcharge and start a fire.

Get started

DuckyHelper can
do more

It sees your screen and works in any app you use. Try it for 10 minutes, no card.

Get it for Mac, Windows or Linux

Share

Questions and jobs

Do anything

Ask it a question or hand it a job, in any app.

Doing jobs for you is in early access on Mac. Asking works on Mac, Windows and Linux.