Docs / When it doesn't work
Your ESP32 reboots the moment the motor starts
The board runs fine until something with a coil in it switches on — then it resets, over and over. This is almost never your code.
What you're seeing
Your sketch uploads and runs. The instant a motor, pump, relay or solenoid switches on, the board restarts. The serial monitor shows a burst of garbage, then the boot banner again:
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) Brownout detector was triggered
Sometimes it loops forever. Sometimes it only happens when the motor is under load.
Why it happens
A motor pulls a large current spike the moment it starts — often five to ten times what it draws while running. If it shares a supply with the ESP32, that spike drags the rail below the voltage the chip needs, and the brownout detector resets the board to protect it.
Fixing it
-
Give the motor its own supply
Power the motor from a separate adapter sized to its stall current, not its running current. Do not run it from the board's 5V pin.
-
Tie the grounds together
The motor supply's ground and the board's ground must connect. Without a shared reference the control signal has nothing to switch against — this is the step people skip.
-
Add a capacitor across the motor supply
A 470 µF or larger electrolytic across the motor's power rail absorbs the start-up spike before it reaches the regulator.
-
Switch the motor with a driver, never a pin
A GPIO can source about 20 mA. Use a MOSFET, a motor driver or a relay module between the pin and the load.
-
Re-flash and watch the serial monitor
If the brownout line is gone, it was the supply. If it persists, the driver or the ground link is still wrong.
Letting Soldr do it
Paste the serial output straight into Soldr. It reads the reset reason against the sketch you actually flashed, not a generic answer, and rebuilds the parts list with the supply corrected.
Or photograph the breadboard and ask what's wrong — it will read the picture.

A worked example
This is the build Soldr produces for "automatic plant watering with a 12V solenoid valve and an ESP32" — note that the power problem above is designed out from the start:
| Part | Why it's there | Price |
|---|---|---|
| ESP32-C3 Super Mini | the controller | ₹290 |
| 12V Solenoid Valve | the load, on its own rail | ₹240 |
| IRF540N MOSFET | switches 12V from a 3.3V pin | ₹60 |
| LM2596 Buck Converter | keeps the board at 5V, isolated from the spike | ₹95 |
| 12V 2A DC Adapter | sized to the valve, not the board | ₹300 |
| Core of the build | the rest is wiring | ₹985 |
If it still resets
- Measure the 3V3 pin with a multimeter while the motor starts — if it dips below ~2.8V the supply is still shared somewhere.
- Check the capacitor's polarity. Backwards electrolytics fail, sometimes loudly.
- A long, thin jumper is a resistor. Shorten the motor's power leads.
- Still stuck? Paste the full serial log into Soldr and it will work through it with you.