Robot Battery Selection: Li-ion and LiPo Sizing, C-Rating and Safety
A robot that resets every time it turns, slows down after five minutes, or dies in the middle of a competition run almost always has a battery problem. Lithium cells give the best energy for their weight, which is why nearly every hobby robot now uses 18650 Li-ion cells or LiPo packs. They are also the only part of your robot that can catch fire if mistreated.
This tutorial shows how to pick the cell chemistry, the number of cells in series, the capacity and the discharge rating for your robot. It then covers the safety rules for charging and storage, and ends with an Arduino sketch that measures pack voltage and stops the motors before the cells are over-discharged.
Cell Voltages and Chemistries
A single lithium-ion or lithium-polymer cell has a nominal voltage of about 3.6 V to 3.7 V. It is fully charged at 4.2 V for standard cells, and it should not be discharged much below about 3.0 V under load. Cells are connected in series to raise the voltage; the notation 2S means two cells in series, 3S means three.
| Pack | Nominal voltage | Full charge | Typical robot use |
|---|---|---|---|
| 1S Li-ion or LiPo | 3.7 V | 4.2 V | ESP32 boards, small sensors via a boost converter |
| 2S | 7.4 V | 8.4 V | Arduino robot cars with 6 V to 9 V motors |
| 3S | 11.1 V | 12.6 V | 12 V gear motors, larger chassis |
| 4 x AA NiMH | 4.8 V | About 5.6 V | Simple kits; heavier and lower current |
18650 Li-ion cells are cylindrical, robust and easy to find, but buy branded cells from a trustworthy seller, because fake cells with inflated capacity labels are common. LiPo packs are flat, light and can deliver very high current, which is why drones use them, but their soft pouch is easily punctured.
Sizing Capacity and C-Rating
Capacity in mAh tells you how long the pack lasts. The C-rating tells you how much current it can safely deliver. Maximum continuous current equals the C-rating multiplied by the capacity in amp-hours. Work out your robot's current first by adding the parts.
Example 2WD robot on a 2S pack: Two N20 or BO motors, running 2 x 0.25 A = 0.50 A (measure yours) Arduino Uno + sensors ~0.10 A Total average current 0.60 A Run time = capacity / current = 2.0 Ah / 0.60 A = 3.3 h (theoretical) Usable = about 80% of that -> about 2.5 h Peak check: both motors stalled at 1.0 A each = 2.0 A A 2000 mAh pack rated 1C gives 2.0 A -> marginal; choose 2C or higher
Measure real motor currents with a multimeter in series, both while running and with the wheels held still, rather than trusting listing values. The stall current is what flows at start-up and whenever the robot pushes against a wall, and the battery and driver must survive it.
Charging and Safety Rules
- Charge multi-cell LiPo packs only with a proper balance charger connected through the balance lead, so each cell stops at 4.2 V.
- For single 18650 cells, a TP4056 module with protection is a common charger; it charges to 4.2 V with a constant-current then constant-voltage profile.
- Use a battery management system (BMS) or protection board on Li-ion packs to cut off over-discharge, over-charge and short circuit.
- Never charge unattended, and charge on a non-flammable surface or inside a LiPo safety bag.
- Stop using any pack that is swollen, dented or hot, and do not puncture it.
- Fit a fuse and a power switch between the battery and the rest of the robot.
- For storage longer than a few weeks, leave LiPo cells partly charged, around 3.8 V per cell, rather than full or empty.
Arduino Low-Voltage Cutoff
The Arduino Uno's analog input accepts 0 to 5 V, so a 2S pack at 8.4 V needs a voltage divider. With R1 = 10 kilo-ohm from the battery to A0 and R2 = 10 kilo-ohm from A0 to ground, the pin sees half the battery voltage, at most 4.2 V. Measure your resistors and adjust DIVIDER_RATIO, and check the board's actual 5 V with a multimeter for better accuracy.
// 2S battery monitor with low-voltage cutoff for an Arduino Uno robot
const int BATT_PIN = A0;
const float VREF = 5.0; // measure your board's 5 V and enter it here
const float DIVIDER_RATIO = 2.0; // (R1 + R2) / R2 for 10k + 10k
const int CELLS = 2;
const float WARN_PER_CELL = 3.5; // warn early
const float CUTOFF_PER_CELL = 3.3; // stop motors well above the damage level
const int LED_PIN = 13;
bool cutoff = false;
float readPackVoltage() {
long sum = 0;
for (int i = 0; i < 16; i++) { // average 16 readings to reduce noise
sum += analogRead(BATT_PIN);
delay(2);
}
float adc = sum / 16.0;
return adc * VREF / 1023.0 * DIVIDER_RATIO;
}
void stopAllMotors() {
// Call your motor driver code here, for example setMotors(0, 0)
}
void setup() {
pinMode(LED_PIN, OUTPUT);
Serial.begin(9600);
}
void loop() {
float v = readPackVoltage();
float perCell = v / CELLS;
Serial.print("Pack: "); Serial.print(v, 2);
Serial.print(" V, per cell: "); Serial.println(perCell, 2);
if (perCell < CUTOFF_PER_CELL) cutoff = true; // latch: do not restart on recovery
if (cutoff) {
stopAllMotors();
digitalWrite(LED_PIN, (millis() / 200) % 2); // fast blink = charge now
} else if (perCell < WARN_PER_CELL) {
digitalWrite(LED_PIN, (millis() / 1000) % 2); // slow blink = warning
} else {
digitalWrite(LED_PIN, LOW);
}
delay(200);
}
The cutoff is latched because battery voltage sags under load and recovers when the motors stop. Without the latch the robot would stop, recover, restart and keep draining the pack. The 3.3 V per cell limit is deliberately conservative; your BMS remains the final protection.
Common Power Problems
- Controller resets when motors start: the pack or wiring cannot supply the peak current, so voltage dips. Use thicker wires, a higher C-rated pack and a bulk capacitor near the driver.
- Robot slows quickly: the cells are low capacity or fake. Measure the real capacity with a USB capacity tester or a charger with a discharge mode.
- Voltage reading jumps around: add a 100 nF capacitor from A0 to ground and average readings as in the code.
- BMS cuts off at start-up: the motor inrush current exceeds the protection board's current limit; choose a BMS rated for your peak current.
Summary
Pick the series cell count from your motor voltage, the capacity from the run time you need, and the C-rating from the measured peak current. Charge with the right charger, protect packs with a BMS and a fuse, and add a software cutoff so the robot never drains its cells. A well-planned power system removes a whole class of mysterious robot faults.