Fix "Brownout detector was triggered" on ESP32
Brownout detector was triggered
- rst:0xf (RTCWDT_BROWN_OUT_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
- Brownout detector was triggered ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
- Reset reason: ESP_RST_BROWNOUT
The ESP32 supply voltage dropped below the safety threshold, so the chip resets to protect itself. The cause is almost always electrical: weak USB port or cable, undersized regulator, current spike when Wi-Fi starts. Fix the power supply and add a capacitor rather than disabling the detector.
What this error means
The brownout detector constantly monitors the chip's supply voltage. When it falls below a threshold (about 2.4 to 2.8 V depending on the setting), it triggers a reset: below that, the CPU and especially flash writes are no longer reliable. The message often appears right after WiFi.begin() or a camera init, because the radio draws spikes of several hundred milliamps that the cable, USB port or regulator cannot deliver. The typical result is a reboot loop.
Common causes
- Weak USB port or cable: unpowered hub, front-panel port, long or thin cable whose resistance drops the voltage under load.
- Current spike when Wi-Fi or Bluetooth starts: the radio suddenly draws much more. Espressif recommends a supply able to deliver at least 500 mA.
- Peripherals powered by the board: servos, motors, relays, LED strips or displays connected to the ESP32's 3V3 or 5V pin.
- Unsuitable regulator on battery: an AMS1117 fed by a 3.7 V LiPo drops about 1 V and cannot provide a stable 3.3 V.
- No decoupling capacitor: without an energy reserve near the module, every spike makes the voltage dip (the classic ESP32-CAM case).
Step-by-step fix
-
Change the cable and source
Plug the board directly into a PC USB port or a powered hub, with a short, thick cable. To test, use a good 5 V / 2 A charger. If the message goes away, the supply was the problem.
-
Measure the voltage
With a multimeter, measure between 3V3 and GND while Wi-Fi starts. It should stay close to 3.3 V. If it drops below 3 V, the supply or regulator is not good enough.
-
Add capacitors
Solder a 100 to 470 µF electrolytic capacitor between 3V3 (or 5V) and GND, as close to the module as possible, respecting polarity, plus a 100 nF ceramic capacitor in parallel. They absorb the radio's current spikes.
-
Power peripherals separately
Power motors, servos, relays and LED strips from their own supply, and only connect the grounds (GND) together. The ESP32 should only provide control signals.
-
Soften the Wi-Fi start
Let the supply settle before enabling the radio and reduce transmit power if range allows. This limits the current spike when connecting.
#include <WiFi.h> void setup() { Serial.begin(115200); delay(500); // let the supply settle WiFi.mode(WIFI_STA); WiFi.begin("MY_SSID", "MY_PASSWORD"); WiFi.setTxPower(WIFI_POWER_8_5dBm); // lower TX peak current } void loop() {} -
Pick the right regulator on battery
On LiPo, replace the AMS1117 with a low-dropout regulator (LDO) rated for at least 500 mA, or use a 3.3 V buck-boost converter. A board designed for batteries often solves it out of the box.
-
Last resort only: disable the detector
Disabling the detector fixes nothing: it hides a failing power supply. You risk random crashes, unstable Wi-Fi and above all corrupted flash or NVS data if the voltage drops during a write. Only do it for diagnosis, on a classic ESP32, and never in production. With ESP-IDF, the equivalent option is
CONFIG_ESP_BROWNOUT_DETin menuconfig.#include "soc/soc.h" #include "soc/rtc_cntl_reg.h" void setup() { // Diagnostic only: hides power problems, can corrupt flash writes WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); } void loop() {}
Did this fix work for you?
Confirm it in one click: it will rise for the next developers stuck on the same error.
Keep it from coming back
- Size the supply for peaks, not average consumption: at least 500 mA for a bare ESP32, 2 A for an ESP32-CAM.
- Always add a bulk capacitor and a 100 nF capacitor near the module on your circuits.
- Never draw current for a motor, servo or LED strip from the board's power pins.
Frequently asked questions
Is it dangerous to disable the brownout detector?
Yes for reliability: the chip keeps running at a voltage where it may execute code incorrectly or corrupt flash during a write. Fix the power supply first; only disable the detector for a quick test.
Why does the error only happen when Wi-Fi starts?
Radio transmission creates current spikes of several hundred mA. A supply that is barely enough at idle collapses at that moment.
Is my ESP32 faulty?
Almost never. Test the same board with another cable and a 5 V / 2 A charger: if the message disappears, the board is fine.
Useful tools for this error
More Electronics & Arduino errors
- Fix "avrdude: stk500_getsync(): not in sync" on Arduino
- Fix "Failed to connect to ESP32" (Wrong boot mode, No serial data received)
- Fix "can't open device /dev/ttyUSB0: Permission denied" (Arduino, ESP32)
- Fix "Guru Meditation Error: Core 1 panic'ed (LoadProhibited)" on ESP32
- Fix "error: 'x' was not declared in this scope" (Arduino, C++)
- Fix "Sketch too big" on Arduino and ESP32 (flash memory full)
- Fix "OSError: [Errno 121] Remote I/O error" with I2C on Raspberry Pi