ESP32/Power/74. Power and the 3V3 rail
Your chip
Your language
Power · 74 of 81

Power and the 3V3 rail

Forty milliamps per pin, a few hundred through the regulator, and a Wi-Fi transmit burst that takes a quarter of an amp on its own. Add them up before wiring, not after the board starts rebooting.

/esp32/power-and-the-3v3-rail · arduino · S3

Budget the peak, not the average

The 3V3 rail, as a budget
285 mA of 500 mA
Switch loads on
Total
285 mA
Headroom
215 mA
Through one GPIO
none
215 mA spare. Budget for the peak, not the average: the Wi-Fi burst is a fifth of a second and it is what decides whether the board survives.

The averages are comfortable and the peaks are not. An ESP32 idles at about 45 mA and transmits at around 240, in bursts of a couple of hundred milliseconds. A regulator that supplies the average happily will sag on the burst, the brown-out detector fires at 2.43 V, and the board resets — reliably, at the exact moment the radio comes up, which is why it reads as a Wi-Fi bug.

Three limits, not one

Per pin: 40 mA absolute maximum, and comfortable well below that. One LED at 10 mA is fine, a relay coil is not, a motor is absurd.

Per rail: whatever the regulator on your board can do, thermally, which is usually a few hundred milliamps rather than the amp printed on the part. The 3V3 pin on a dev board is a convenience for sensors, not a power supply for actuators.

Per supply: whatever is upstream. USB gives you 500 mA and a stiff rail. A CR2032 gives you about 3 mA before its voltage collapses, which is why a coin cell cannot run Wi-Fi at all without a large capacitor beside it.

The two cheap fixes

A 100 µF electrolytic across 3V3 and GND, close to the board, supplies the transmit burst locally so the regulator does not have to. A small ceramic alongside it handles the fast edges. This is the fix that turns a board that resets every few minutes into one that does not.

Turning the transmit power down. The default is around 19.5 dBm and 11 dBm is plenty for a house. It roughly halves the burst current and costs range you were not using.

Anything with a motor gets its own supply

Servos, pumps, steppers, solenoids and long LED strips all draw currents that have no business anywhere near a microcontroller's regulator. Separate supply, grounds tied together, and a transistor or driver between the pin and the load. That is not caution — it is the arrangement that works.

On your S3
ChipXtensa LX7 · 2 × 240 MHz
Board settingESP32S3 Dev Module
Default I2CSDA 8 · SCL 9
Watch out forThe port vanishes after upload

The code

The chip records why it reset. If it says brown-out, the problem is the supply and no amount of debugging the sketch will help.

brownout.ino
#include <esp_system.h>
#include <WiFi.h>

void setup() {
  Serial.begin(115200);
  delay(200);

  if (esp_reset_reason() == ESP_RST_BROWNOUT)
    Serial.println("BROWN-OUT: the 3V3 rail sagged. This is a supply fault.");

  // Cutting transmit power is the cheapest fix for a marginal supply.
  WiFi.mode(WIFI_STA);
  WiFi.setTxPower(WIFI_POWER_11dBm);       // default is 19.5 dBm
  WiFi.begin("your-ssid", "your-password");
}

void loop() {}

Disabling the brown-out detector makes the symptom go away and the cause worse — the chip carries on running at a voltage where flash writes corrupt. Fix the rail instead.

When it does not work

The board resets the moment Wi-Fi connects

A transmit burst is around 240 mA on top of everything else, for a fraction of a second. A supply that copes with idle current will not necessarily cope with that. Add a 100 µF capacitor near the board and turn the transmit power down.

It works on USB and fails on battery

USB supplies half an amp with a stiff rail and a battery through a small regulator does not. Test on the supply the project will actually ship with, and do it before designing anything else around the current.

A servo makes the board reboot every time it moves

A stalling servo draws close to an amp. It should never be on the board's 3V3 or 5V pin. Give it its own supply and connect the grounds together — this is the single most common power mistake in hobby projects.

One GPIO stopped working after driving a relay

A pin is a signal, not a supply. Past about 20 mA it is out of comfortable range and 40 mA is the absolute maximum. A relay coil needs a transistor and a flyback diode between it and the pin.

Where this goes next

The same arithmetic over a longer period. How much a cell holds, what the duty cycle spends, and what number to design to.

Battery and power budget

Edit this page — content/esp32/power-and-the-3v3-rail.mdx

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse ESP32 on the forum