← All guides

ESP32 brownout with Wi-Fi on a LED matrix (what happened on my board and how to fix it)

Your ESP32 drives a LED matrix perfectly on the bench. Then it connects to Wi-Fi and the serial monitor fills with Brownout detector was triggered, or the board reboots in a loop, or it keeps running for a while and then crashes somewhere that has nothing to do with your code.

I build Frame, a 64x64 LED frame that shows photos sent from a phone. It runs on an ESP32-S3 driving a HUB75 panel, on a board I designed myself, and its second version (v2) has exactly this problem. This guide is what I learned from it: why Wi-Fi and a LED panel are a bad mix on a weak supply, how I diagnosed my board, what I'll change on the next one, and the fixes I'd try first on any maker build.

It follows my guide on wiring a 64x64 HUB75 panel to an ESP32, which covers the pins and the basic power setup.

The short answer

What the brownout detector does

The ESP32 and the ESP32-S3 have a built-in brownout detector. In the ESP-IDF configuration reference it's CONFIG_ESP_BROWNOUT_DET ("Hardware brownout detect & reset", enabled by default), and the description says it resets the chip when the supply drops below a set level "in order to prevent unintended behaviour".

When it fires, ESP-IDF prints Brownout detector was triggered and restarts the chip, and after the restart esp_reset_reason() returns ESP_RST_BROWNOUT. That's the line people search for, and the reason it appears more often once Wi-Fi is involved is the current the radio draws while transmitting.

The trip level is configurable with CONFIG_ESP_BROWNOUT_DET_LVL_SEL (under Component config, Hardware Settings, Power Supplier, Brownout Detector in menuconfig). On the ESP32-S3 the options go from about 2.44 V to 3.30 V; on the classic ESP32 from about 2.43 V to 2.80 V. Espressif notes in the same reference that these voltages are estimates and vary from chip to chip.

The recommended supply for the ESP32-S3 is 3.0 to 3.6 V, according to its datasheet. So depending on the level, there can be a band where the chip is already below its recommended voltage but the detector hasn't fired yet. A short dip there won't reset anything, and the chip keeps running outside its specs.

Illustration of the ESP32 3.3 V rail during Wi-Fi transmit bursts: a small dip that stays above 3.0 V and is fine, a deeper dip between 3.0 V and the brownout threshold where the chip runs out of spec without a reset, and a dip below the threshold that causes a clean reset when the detector is on

This is an illustration, not a measurement from my board. Where the threshold line sits depends on the level you pick, and on the S3 some levels are above 3.0 V.

Why Wi-Fi plus a LED panel is the worst case

Two loads share the power, and both change fast:

Espressif's hardware design guidelines for the S3 say it plainly: when the chip transmits "there may be a sudden increase in the current draw, causing power rail collapse", and they recommend a 3.3 V supply that can deliver at least 500 mA if you power the chip from a single supply.

Put both on one 5 V adapter with thin jumper wires, and every Wi-Fi burst lands on a rail that the panel is already pulling down. The worst moments are usually at boot (Wi-Fi connecting while the panel lights up for the first time) and during big downloads (lots of transmitting while the panel shows a bright image).

What happened on Frame's v2 board

The v2 board of Frame powers the ESP32-S3 and the panel from the same supply, and that supply runs close to its limit. Close enough that the firmware disables the brownout detector on purpose, as the first line of setup():

#ifdef HW_V2
    WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); // Disable brownout (v2 PSU is marginal)
#endif

That line keeps the board from resetting on every dip. It also removes the only alarm that would tell you the supply is failing.

The symptom

On one v2 unit, with poor Wi-Fi and heavy animation downloads, the frame chained crashes of different kinds:

How I diagnosed it

Four different crashes in four different places is already a hint. A software bug tends to crash in the same place, or at least in your code. These didn't:

  1. I decoded the backtraces with addr2line against the firmware's .elf. None of them went through my own code; they were in the Wi-Fi stack and in system code.
  2. The same firmware ran for hours without a single crash on a good network. Same build, same board design, the only change was the Wi-Fi conditions.
  3. The brownout detector was off. So if the voltage dipped, nothing would reset the chip, and it would carry on with whatever the dip did to it.

Put together, it's the typical signature of memory corruption from voltage drops, not of a bug in my code. My guess about the link with poor Wi-Fi is that a weak signal means more retries and longer transmissions, which means more current spikes, but I haven't measured it.

I want to be honest about how sure I am: this is a strong suspicion, not a proven cause. The test that would close it is to power the same unit from a much stronger supply and repeat the heavy downloads. If the crashes stop, it's confirmed. I haven't done that test yet.

Telemetry, and a trap in it

Since then, I've added boot reporting to the firmware. On every boot it sends my server the reset reason, a boot counter, the firmware and hardware version, the free memory, and, if the previous boot ended in a panic, a summary of the core dump (task, program counter, exception cause and the backtrace as raw addresses). The core dump comes from a 64 KB partition that was already in my partition table, so frames in the field had been writing core dumps that nobody read.

The trap: a board with the brownout detector disabled will never report BROWNOUT. A dip on those boards shows up as POWERON or as a watchdog reset, so if you log reset reasons, remember which boards have the detector off before you read the numbers. Another small lesson: a backtrace is just addresses, and to turn them into function names you need the exact .elf of that build, so keep it for every release.

What I'll change on the next board

This is the list for the next revision of the PCB:

How to diagnose it on your own build

Before you change anything, find out whether it really is power:

  1. Read the reset reason. Print it at the start of setup():
#include <esp_system.h>

void setup() {
  Serial.begin(115200);
  esp_reset_reason_t reason = esp_reset_reason();
  Serial.printf("Reset reason: %d\n", reason);
  if (reason == ESP_RST_BROWNOUT) {
    Serial.println("Last reset was a brownout");
  }
  // ...
}
  1. Test with a dark image and a bright one. If the resets only happen with a bright image, or only when Wi-Fi connects while the panel is lit, it's power.
  2. Try a different supply and different wires. A stronger adapter and short, thick wires are the quickest experiment you can do.
  3. If the detector is off and you get random crashes, decode the backtraces with addr2line (or let the ESP exception decoder do it). If they land in different places that aren't your code, suspect the supply before you spend a week hunting a bug.

Fixes, from easiest to best

1. Separate the panel's power from the ESP32's

Power the panel from its own 5 V supply rated for its current, straight into the panel's power connector with short, thick wires, and join the grounds. Never power the panel from the 5 V pin of an ESP32 board that runs on USB. This is also the first rule of my wiring guide.

If everything has to run from one adapter, split the wires at the adapter (star layout), so the panel's current doesn't flow through the same thin wire that feeds the ESP32.

2. Give the ESP32 a regulator that can handle the spikes

Espressif recommends a 3.3 V supply that can deliver at least 500 mA when the chip runs from a single supply. Check the regulator on your dev board or your own design against that. Coming from 5 V, a linear regulator burns the difference as heat, and a buck converter doesn't, which is why I'm going for a buck dedicated to the ESP32 on my next board. Either one has to hold the voltage up during the Wi-Fi peaks, not only on average.

3. Put capacitors where they help

4. Keep the antenna away from the panel

Espressif recommends placing the module's PCB antenna outside the base board or right at its edge, with no copper under it, and leaving at least 15 mm of clearance in every direction inside the enclosure. Keep the HUB75 ribbon away from it too: the library README warns that its fast signals can interfere with Wi-Fi on some board designs. This isn't a power fix by itself, but if my guess about retries is right, a cleaner link also means less transmitting.

5. Lower the Wi-Fi transmit power

If you can't change the hardware, you can ask the radio to transmit with less power. In the datasheet, the peak current depends on the mode and the transmit power, so less power should mean smaller spikes, at the cost of range. I haven't measured how much it saves, and in Frame I haven't touched it.

In Arduino, after WiFi.begin():

WiFi.begin(ssid, password);
WiFi.setTxPower(WIFI_POWER_15dBm);  // see wifi_power_t in WiFiGeneric.h for the values

In ESP-IDF, esp_wifi_set_max_tx_power() takes the value in steps of 0.25 dBm, from 8 (2 dBm) to 84 (20 dBm), and only works after esp_wifi_start():

esp_wifi_start();
esp_wifi_set_max_tx_power(60);  // 60 x 0.25 dBm = 15 dBm

6. Don't hit the supply with everything at once at boot

Wi-Fi connecting and the panel lighting up at full brightness at the same moment is the worst case. In Frame's firmware, the panel's brightness goes up gradually at startup, one step every few milliseconds, precisely to avoid a current spike. Lighting the panel at a low brightness first, or connecting Wi-Fi before you show a bright image, follows the same idea.

7. Use the detector, don't switch it off

Disabling the brownout detector (with WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0) in Arduino, or by turning off CONFIG_ESP_BROWNOUT_DET in ESP-IDF) is the most common answer on forums, and it's what I did on v2. It makes the message go away, not the dip. The chip keeps running on a voltage it wasn't designed for, and you trade an obvious reset for random crashes that look like software bugs. If you disable it to get a prototype through a demo, write it down as a debt and turn it back on once the power is fixed.

If you don't want to fight with power supplies

I enjoy all of this, but I know most people who want a 64x64 panel at home don't want to debug a power rail. That's why I build Frame: a frame with a 64x64 LED panel where the people you love send photos from a free app (iPhone and Android, no subscription), and they show up on your Frame wherever they are. I'm building it on my own, and you can read the whole story here.

You can't buy Frame yet. It launches on Kickstarter on February 1, 2027. Reserving a Founders spot costs 1 € and gets it for 75 € ($85 in the US and Canada).

If you're building your own panel, you might also like my guides on wiring a 64x64 HUB75 panel to an ESP32 and why your HUB75 LED panel flickers on camera.

Summary

And if you'd like a 64x64 panel at home that lights up with photos from the people you love, without wiring anything, leave your email below. People on the list get the link on launch day, and whoever reserves gets it for 75 € ($85).

Best,
Álvaro M.

Kickstarter · February 2027
Waitlist