← How-Tos
electronics 3 days ago ◑ 7 views ◯ 7 min read

Debugging ESP32 Brownout Resets: Power Supply Ripple, Capacitor Placement, and Brownout Detector Tuning

esp32brownoutpower supplydecoupling capacitorsbrownout detectortroubleshootingwifi transmit current

The symptom is almost always the same: an ESP32 project runs fine on a USB cable plugged into a computer, then reboots randomly — or reboots reliably every time it tries to do something specific, like turn on WiFi, key a relay, or drive a servo — the moment it's deployed on battery or a wall adapter out in the shop. The serial monitor, if you catch it in time, prints something like Brownout detector was triggered just before the reset. This is one of the most common "my code works but my project doesn't" failures in ESP32 projects, and it's almost never actually a firmware bug. It's a power delivery problem that the chip is specifically designed to detect and protect itself from, and understanding why it triggers makes it straightforward to fix.

What the Brownout Detector Actually Does

The ESP32 has a built-in analog brownout detector (BOD) that watches the chip's core supply voltage and forces an immediate reset if it drops below a threshold (around 2.43V by default, configurable in a narrow range via efuse/firmware settings). This exists because running digital logic below its minimum operating voltage doesn't fail gracefully — it produces corrupted register states, garbage memory reads, and unpredictable execution, which is a much worse outcome than a clean reset. The brownout detector trades an unpredictable crash for a predictable, logged reboot. Seeing the brownout message is good news in one specific sense: the chip is telling you exactly what happened instead of silently corrupting data or hanging in a way that's much harder to diagnose.

Why the Voltage Actually Dips

The ESP32's WiFi and Bluetooth radios draw current in sharp, brief spikes rather than a smooth continuous load. During a transmit burst — connecting to an access point, sending a packet, or even just periodic beacon/probe traffic — the radio can pull 300–500mA for a few hundred microseconds to a few milliseconds, on top of whatever the rest of the board is drawing. A supply that measures a rock-solid 3.3V or 5V on a multimeter (which averages over time and can't see fast transients) can still sag well below the brownout threshold during one of these spikes, because the multimeter is reporting an average while the brownout detector is watching an instant.

Three things typically combine to turn a normal radio current spike into an actual brownout:

Fixing It: Capacitor Placement

The fastest, cheapest fix for most brownout issues is better local bulk capacitance, placed as close to the ESP32 module's 3.3V and GND pins as physically possible — not just somewhere on the board, and not just at the regulator output.

CapacitorRolePlacement Notes
100–470µF electrolytic or tantalumBulk storage to ride through radio current spikesAcross 3.3V/GND directly at the module pins, not just at the regulator
10µF ceramicMid-frequency decoupling, faster response than bulk electrolyticWithin a centimeter of the module's power pins
0.1µF ceramicHigh-frequency noise suppressionAs close to the pin as the PCB layout allows

Many bare ESP32 modules and minimal breakout boards skip some or all of this on the assumption that the carrier board or power supply handles it — which is a reasonable assumption when powered from a well-designed USB port on a computer, and a bad one on a thin dupont-wire breadboard connection to a wall adapter. Adding a 470µF electrolytic directly across the 3.3V rail right at the ESP32 is the single highest-value change for a board that resets specifically when WiFi activity starts.

Fixing It: The Power Source Itself

If local capacitance doesn't fully resolve it, look upstream:

Firmware-Side Levers

A few software changes reduce how hard the radio hits the supply, which can help as a secondary mitigation even after the hardware is improved:

It's worth being honest about firmware fixes, though: they manage the symptom by asking the radio to draw less current, rather than fixing the underlying supply weakness. A project that needs full transmit power for range will eventually need the hardware fix regardless.

Tuning or Disabling the Brownout Detector (Use Caution)

It's possible to lower the brownout threshold or disable the detector entirely in firmware (via efuse settings or, on the Arduino/ESP-IDF toolchains, a menuconfig option). Resist the temptation to do this as a first response to a brownout message. The detector is reporting a real voltage problem; disabling it doesn't fix the underlying power delivery issue, it just removes the safety net and lets the chip run in a state that's prone to silent corruption and much stranger, harder-to-diagnose failures — a corrupted WiFi stack, garbage sensor readings, or a hang that looks nothing like a power problem. Treat a disabled or lowered brownout detector as a last-resort diagnostic tool to confirm the theory, not a permanent fix, and re-enable it once the real supply issue is addressed.

A Practical Checklist

  1. Confirm the reset is actually a brownout by watching serial output at full baud rate through the exact moment of failure — don't assume, since other faults (watchdog timeouts, stack overflows) can also cause unexpected resets.
  2. Add a 470µF+ bulk capacitor directly at the module's 3.3V/GND pins as the first fix to try.
  3. Swap the power source (different USB supply, shorter/heavier wiring, or a better regulator) as the next step if the capacitor alone doesn't resolve it.
  4. Reduce WiFi transmit power temporarily as a diagnostic to confirm the radio is the trigger, then decide whether to keep it reduced or fix the supply properly.
  5. Only after confirming a real, understood hardware fix should you consider the project power-stable; a board that "seems fine now" after removing the brownout detector almost always has a worse failure waiting in the field.

Brownout resets are one of the few ESP32 failure modes where the chip is actively trying to help by failing loudly and predictably instead of corrupting silently. Reading that message as useful diagnostic information, rather than an annoyance to suppress, is the difference between a project that's genuinely power-stable and one that merely stops telling you about a problem it still has.