💡 Electron Parade
← Back to Troubleshooting

import { Image } from ‘astro:assets’; import lm2596 from ’../../assets/images/troubleshooting/B0DBVYP91F.jpg’;

Ah, the ESP32. It’s a dual-core powerhouse, a Wi-Fi wizard, a Bluetooth behemoth. It’s basically a supercomputer that costs less than a fancy coffee. But there is one phrase that strikes fear into the heart of every maker who plugs one in, a phrase that will make you question your sanity, your wiring, and the very fabric of the universe:

Brownout detector was triggered

And then it reboots. Over and over. It’s the micro-controller equivalent of someone dramatically fainting every time they try to stand up.

You wrote perfect spaghetti code. You triple-checked your breadboard connections. So why is the ESP32 suddenly refusing to boot, spitting out this cryptic error, and mocking you in an endless reboot loop?

Grab your multimeter and a strong cup of coffee. We’re going to banish the brownout demon once and for all.


What Does “Brownout Detector Triggered” Actually Mean?

A “brownout” happens when the voltage supplied to the ESP32 drops below the absolute minimum it needs to function safely.

Think of the ESP32 like a high-performance sports car. When it’s just sitting there reading a sensor, it sips power. But the exact microsecond you tell it to turn on its Wi-Fi radio to connect to your network, it stomps on the gas pedal. The ESP32 can demand massive, sudden spikes of current—upwards of 500mA or more—just to connect to Wi-Fi.

If your power supply is weak, that sudden demand for current causes the voltage to drop (sag). The ESP32 has a built-in safety monitor (the Brownout Detector). If it sees the voltage drop below ~2.4V, it assumes the power is failing and immediately hits the emergency stop button (reboots) to prevent data corruption or erratic behavior.

How to Fix It (The Real Ways)

1. Upgrade Your Power Supply

The most common culprit is a weak USB port or a terrible USB cable. Your computer’s USB port might only be able to supply 500mA total, which isn’t enough when the ESP32 spikes.

2. Add a Bypass Capacitor

If you are powering the ESP32 via the 5V or 3.3V pins on a breadboard, you might be experiencing voltage sag due to the thin wires and breadboard resistance.

3. Use a Dedicated Buck Converter

If you have a lot of peripherals (sensors, a display, some relays) all drawing power from the ESP32’s onboard 3.3V voltage regulator, you are probably cooking the regulator. It can’t handle the heat or the current.

LM2596 Buck Converter

How to Fix It (The “Dirty Hacker” Way)

If you absolutely know your power supply is fine and you just need the error to go away so you can test some code, you can actually turn the Brownout Detector off in software.

Warning: This is like ripping the smoke detector out of your ceiling because your toast is burning. Use this as a temporary diagnostic step, not a permanent fix.

#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"

void setup() {
  // Disable brownout detector
  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);
  
  Serial.begin(115200);
  Serial.println("Brownout detector disabled!");
  
  // Your Wi-Fi connection code here
}

void loop() {
  // Do stuff
}

If you add that code and the ESP32 boots successfully and connects to Wi-Fi, you have 100% confirmed that your hardware power supply is the root cause of the issue. Now go back up to step 1 and fix your hardware properly!