Robot battery runtime calculator
A robot's runtime is the usable capacity divided by its average current, where the motors count only while it drives: average mA = (motors + electronics) × driving share + electronics × (1 − share), and hours = mAh × usable share ÷ average mA.
avg = (Imotors + Ielec) × share + Ielec × (1 − share)hours = mAh × usable ÷ avgV near empty = cells × cut-off per cell| Runtime | 3.2 hours |
|---|---|
| Average current | 500 mA |
| Current while driving | 900 mA (0.45C) |
| Pack voltage: nominal, and near empty | 7.2 V, 5 V |
| Energy in the pack | 14.4 Wh |
Worked example
A 2S Li-ion pack of 2,000 mAh cells (7.2 V) runs motors drawing 800 mA and electronics drawing 100 mA, driving half the time. The average is 900 × 0.5 + 100 × 0.5 = 500 mA, so the pack lasts 2,000 × 0.8 ÷ 500 = 3.2 hours. Near empty it is down to 2 × 2.5 = 5 V, so a motor driver that needs 7 V slows the robot well before then.
Questions
Why does my robot slow down long before the battery is flat?
Battery voltage falls as it discharges, and it sags further whenever the motors draw current. Motors run slower at lower voltage, and a driver that loses a few volts (such as an L298) leaves them too little well before the cells are empty.
Which chemistry suits a robot?
Rechargeable NiMH or Li-ion cells hold their voltage better under motor current than alkaline cells, whose capacity falls sharply at high drain: an AA gives about 2,500 mAh at 100 mA but about 1,300 mAh at 500 mA.
How do I measure the currents?
Put a multimeter in series with the battery: once with the robot idle (the electronics) and once while driving on the floor (motors plus electronics). Subtract the first from the second for the motors.
What is the C rate?
The current as a multiple of the capacity: 1,000 mA from a 2,000 mAh pack is 0.5C. Check it against the battery's maximum discharge rating; small cells and coin cells are rated far lower than packs made for motors.
Sources: Energizer E91 (AA alkaline) datasheet; Panasonic eneloop BK-3MCC (NiMH) datasheet; Panasonic NCR18650B (Li-ion) datasheet.
Related calculators
- Battery life calculator: hours = mAh × usable ÷ mA
- Motor power supply calculator: Vsupply ≥ Vmotor + Vdrop(Istall)
- Servo power supply calculator: moving = ⌈servos × share⌉
More calculators
- Resistor color code calculator
- LED resistor calculator
- Voltage divider calculator
- RC time constant calculator
- Ohm's law calculator
- Series and parallel resistor calculator
- Transistor base resistor calculator
- 555 timer calculator (astable)
- PCB trace width calculator
- RC filter calculator (low-pass)
- Capacitor code calculator
- Motor driver calculator
Want a whole circuit rather than one value? Describe it and the AI designs and simulates it.