What it means: a battery is a fuel tank for charge. Its capacity (mAh) says how much charge it holds; its voltage says how hard that charge is pushed. Multiply the two and you get energy (Wh) — the currency that actually buys you metres of driving. A "2000 mAh" pack at 7.4 V holds twice the energy of the same pack at 3.7 V.
Why it matters: robot designers must answer one question before anything else: will the battery last the mission? Divide stored charge by the current your motors drink and you get the runtime — but only if you leave a safety reserve, because running a LiPo flat destroys it, and because real packs sag under load.
How it works: ① the motors draw current I, so the state of charge (SoC) drains steadily — at 60× time acceleration you can watch an hour of driving in a minute; ② the cell voltage falls as the SoC empties (an educational straight line — real LiPos also dive steeply at the ends); ③ the current through the pack's internal resistance Rint burns I·Rint volts inside the battery, so the robot sees a sagging terminal voltage Vt = Voc − I·Rint; ④ the robot's speed is proportional to its voltage, so it visibly slows as the pack empties; ⑤ the energy meter integrates power over time: E = ∫Vt·I dt.
Drone flight-time calculations, EV range estimates ("kWh per 100 km"), phone battery percentages, and RC-car run timers are all this same bookkeeping. Racing drone pilots size packs by "C-rate" — how many times the capacity can be safely pulled as current.
Assumptions & limitations: the open-circuit voltage is a straight line from 3.0 V to 4.2 V per cell — real LiPo curves are much flatter in the middle and dive steeply near 20% and 100%; no temperature effects; no Peukert effect (capacity does not shrink at high current); no ageing or capacity fade; Rint constant; motor speed simply proportional to terminal voltage (no load-torque model). The sim runs at 60× real time (1 real second = 1 sim minute). This simulation is an educational approximation of a real LiPo pack under load — real packs need a low-voltage cutoff around 3.3 V/cell, which is why engineers plan a reserve.
➡ Engineering takeaway: size the pack for the mission plus its reserve, then check the sag — because the performance your robot actually delivers is Vt, not the label on the pack.