Blog · 2026-07-05 · Discharge
The robot sits on the bench working perfectly. Motors on — and the controller reboots, the servo twitches, the LEDs blink like it's thinking about its life choices. This is the most common failure in hobby robotics, and it has one physical cause.
Here is the scene every builder eventually plays out. Code uploaded, everything tested with the wheels off the ground, robot placed on the floor, throttle applied — and the robot lurches, freezes, and reboots. USB back in: works fine. Floor again: reset. The temptation is to blame the code, the board, cosmic rays. The actual culprit, in the overwhelming majority of cases, is that the supply voltage momentarily dipped below what the electronics need to stay alive. That dip is voltage sag, the collapse it causes is a brownout, and understanding the mechanism turns a maddening mystery into a ten-minute fix.
An ideal battery would hold its voltage no matter the current. Real cells have internal resistance — the electrodes, electrolyte and connections all resist current flow — and it behaves exactly as if a small resistor sat in series inside the pack. Ohm's law then writes the whole story:
V_terminal = V_open_circuit − I × R_internal
Numbers make it concrete. A healthy 3S LiPo might have 30 mΩ of total internal resistance. At the 1 A of idle electronics: 0.03 V of sag, invisible. When two drive motors hit the floor and briefly demand 25 A of inrush: 25 × 0.03 = 0.75 V of sag — noticeable but survivable. Now the same scenario with a tired budget pack at 150 mΩ: 25 × 0.15 = 3.75 V of sag. Your "11.1 V" pack presents 7 V for a tenth of a second. If a linear 5 V regulator needing 7 V of input headroom sits downstream, the 5 V rail collapses, the microcontroller's brownout detector fires, and the board resets — which stops the motors, which ends the sag, which lets everything boot cleanly and look innocent. The intermittent, self-healing nature of the fault is exactly why it's so hard to catch by staring at it.
A DC motor's current draw depends on how fast it's spinning relative to the voltage applied — a stationary motor generates no back-EMF and draws its full stall current, often 5–10× the running current. Every launch from standstill, every direction reversal, every wheel-against-the-wall moment is therefore a brief stall event. Servos add their own version: a servo commanded to a new position slews at maximum effort, drawing an amp or more for the duration. Multiply by several motors starting simultaneously and the peak demand on the pack can be triple the number you measured "while driving." Sag is a peak phenomenon; averages don't reset controllers, spikes do.
The failure propagates in a specific order worth knowing, because each link is a place to intervene:
1. Pack voltage dips (internal resistance × current spike). 2. Regulator input falls below its minimum. Linear regulators need 1.5–2.5 V of headroom above their output; a 7805 making 5 V starts failing below ~7 V input. Switching regulators tolerate much lower input, which is one of several reasons they're the right choice. 3. The 5 V / 3.3 V rail dips. 4. The microcontroller's brownout detector triggers — typically around 2.7–4.3 V depending on the chip and settings — and forces a reset to prevent corrupted execution. Some boards skip step 4 and simply misbehave: I²C sensors lock up, SD cards corrupt, servos twitch. A robot that "acts haunted" under load and reboots under heavier load is describing the same sag at two severities.
Confirming sag takes minutes. Multimeter method: min/max mode across the battery terminals, then command the stressful move; the recorded minimum tells the story (a meter without min/max will still visibly dip). The LED canary: a plain LED with resistor across the 5 V rail — any flicker during motor starts is a rail dip made visible. The inline watt meter: the best ten dollars in the toolbox; it shows live volts and amps and records the minimum voltage and peak current of a run, giving you both sides of the Ohm's-law equation. Software logging: a voltage divider on an ADC pin (the Voltage Divider Calculator designs it in one step) sampled fast around motor events, printed after the fact.
While diagnosing, feed your measured numbers into the Battery C-Rating Checker — if your peak draw approaches the pack's realistic limit, sag isn't a malfunction, it's arithmetic.
1. Separate the rails. The single highest-value change: motors and electronics should not share a regulator. Power motors straight from the pack through their driver; power logic through its own switching regulator (UBEC). Join the grounds, separate the supplies. Better still for small robots: many drivers and BECs tolerate sag far better than a linear regulator ever will.
2. Fix the pack. Higher C-rating, larger capacity (more parallel material = lower resistance), or simply a younger pack — internal resistance climbs with age and abuse, so last year's battery browning out this year's robot is the natural life cycle. Series vs parallel choices change the math too, covered in Series vs Parallel Battery Packs.
3. Fix the wiring. Resistance outside the pack sags identically to resistance inside it. Thin wires, long runs, cheap connectors, dry solder joints and those little screw terminals all add tens of milliohms each. Battery leads should be short and thick (see the Power Budget Calculator for gauge), and a warm connector after a run is a resistor confessing.
4. Add capacitance. A 470–1000 µF electrolytic across the regulator input, plus 100 µF across the electronics supply, rides through millisecond spikes — capacitors are tiny local batteries with near-zero internal resistance. This is a patch, not a cure: capacitors buy milliseconds, not seconds, but motor inrush is a milliseconds problem, so they're remarkably effective for their cost.
5. Soften the demand. Acceleration ramps in code (slew the PWM instead of stepping it), staggered servo moves, current limiting in the motor driver. Every amp you don't spike is sag you don't suffer.
Zero sag doesn't exist; the question is how much is healthy. Rough field calibration for LiPo packs under their normal working load: up to ~0.1 V per cell of sag is excellent, 0.2 V per cell is acceptable in bursts, and 0.3+ V per cell sustained means the pack is undersized, aged or the wiring is resistive — investigate before it becomes a brownout. Sag also grows as the pack empties (internal resistance rises at low state of charge) and in the cold, which is why a robot that's fine at 80% charge can brown out at 30%, and why winter demo days claim so many victims.
You can (many chips allow it), and you shouldn't. The detector exists because a processor at below-spec voltage executes garbage — corrupting flash, EEPROM and SD cards. A reset is the polite version of that failure.
Reversal is the worst case: the motor is briefly fighting its own momentum, drawing near-stall current while also regenerating. It's the biggest current spike normal driving produces — the perfect sag trigger, and the perfect test move while diagnosing.
Heavy sag means heavy current relative to what the pack can deliver, which means heat, and heat is the main thing that ages lithium cells. A pack that sags hard on every run is being aged on every run; the fix that saves your controller also saves the pack.
Turn the theory into a checklist you can run this evening. Charge the pack fully and note its resting voltage. Put the meter (or watt meter) inline and record: idle current, driving current, and the peak during your robot's harshest move — a full-speed reversal is the standard torture test. Compute the implied resistance: sag ÷ peak current gives you the whole system's series resistance, pack plus wiring plus connectors, in one number. A small robot should land under ~100 mΩ total; if you're above 200 mΩ, go hunting — feel each connector after a hard run, inspect the thinnest wire in the current path, and re-measure with the suspect bypassed. Repeat the audit at half charge, because that's where marginal systems fail first. Log the numbers in your build notes: next month, when behaviour changes, a re-run of the same audit tells you in minutes whether the pack aged, a joint corroded, or the new mechanism simply draws more than the old budget allowed.
Sag is Ohm's law wearing a trench coat — one resistance, one current spike, one dip. Measure the resistance side with a tester, size the current side with the Battery C-Rating Checker and the Power Budget Calculator, and the mystery resets end for good.