Robot board resets when the motors start: separate or isolate the logic supply

Give the logic its own clean supply, and add a capacitor near the motor driver.

What the message means

Motors pull a large current when they start. The battery voltage dips and the board browns out.

Fix it in this order

  1. Add a large capacitor across the motor driver supply pins.
  2. Use a separate regulator or buck converter for the board.
  3. Use thick, short wires for the motor power.
  4. Add small capacitors across the motor terminals.
  5. Ramp the motor speed on start.
  6. Use a battery that can supply the peak current.

Why it happens

When the motors start they draw a large current, the shared supply voltage dips, and the microcontroller restarts. The fix is to keep the logic and the motors from fighting over one supply.

Give the motors their own battery or regulator and join only the grounds, add a bulk capacitor of a few hundred microfarads near the driver, and add a short ramp so the motors do not start at full power.

If you see this, do this

You seeDo this
Resets only at startVoltage dip.
Resets when stalledStall current too high.

brownout reset, motor stall current.

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.

Why this happens

A battery is not an ideal voltage source; it has internal resistance, and the wires and connectors add more. When a motor starts, it draws several times its running current for a moment, and the voltage drop is current times resistance. With 0.3 ohm in total and a 3 A start surge, the supply loses 0.9 V (3 x 0.3). A 6.0 V pack then reads about 5.1 V at the board, and a linear regulator that needs headroom drops out of regulation.

The microcontroller has a brown-out detector that restarts it when its own supply falls too low. The reset therefore happens right at motor start and stops when the motor runs smoothly. A stalled motor is the same problem on a larger scale, because stall current is the highest the motor can draw.

How to confirm the cause

  • Power the logic board from USB or a separate pack while the motors stay on the battery. If the resets stop, the shared supply is the cause.
  • Print a boot message with millis() on start. If the board restarts at the same moment the motor command is sent, you have a dip, not a software crash.
  • With a multimeter that has a min-hold feature, measure the board supply while the motors start. A lower minimum than the board’s operating voltage confirms it. An oscilloscope shows the dip directly.
  • On an ESP32, read the reset reason at start; a brown-out message in the boot log is a clear sign.

Worked example

Arithmetic from the explanation (illustrative values): 3 A x 0.3 ohm = 0.9 V, so 6.0 V falls to about 5.1 V. The ramp below softens the surge.

// soft start: ramp PWM instead of jumping to full speed
const int ENA = 9;          // PWM pin to the driver enable input

void rampUp(int target) {
  for (int s = 0; s <= target; s += 5) {
    analogWrite(ENA, s);
    delay(20);
  }
}

void setup() { pinMode(ENA, OUTPUT); rampUp(200); }
void loop() {}

Common mistakes

  • Putting the bulk capacitor far away from the driver; place it across the driver’s power pins with short leads.
  • Fitting an electrolytic capacitor the wrong way round.
  • Joining the motor supply to the board but leaving out the common ground when using two supplies; the signals need a shared ground.
  • Using thin jumper wires for motor current. Use thicker wire and keep it short.

If this did not fix it

  • Check that the regulator for the board can supply its current and is not overheating.
  • Check the battery for sag: an old or small pack cannot give the surge.
  • Check solder joints and connectors in the battery path, which add resistance.
  • Check the driver current limit; a stalled wheel or jammed gear makes the same dip.