Squeezing Months From an ESP32 Coin Cell
Field notes on the power-draw traps that quietly kill battery-powered ESP32 nodes.
Last tended
A datasheet promises microamps in deep sleep. The bench rarely agrees, because the chip is only part of the board.
Where the current actually goes
- Onboard regulators and USB-serial chips idle in the milliamp range. On a custom board, leave them off the BOM; on a dev board, you cannot win.
- GPIO with floating inputs leak. Pull everything to a defined state before
esp_deep_sleep_start(). - Wi-Fi association is the budget killer. Associating costs far more than the payload โ batch readings and send bursts.
// Hold critical pins through sleep so peripherals don't float and draw current.
gpio_hold_en(SENSOR_POWER_PIN);
gpio_deep_sleep_hold_en();
esp_deep_sleep_start();
A rule of thumb
Optimize the wake before the sleep. A 30ยตA sleep current is irrelevant if you wake for 4 seconds to negotiate Wi-Fi every minute.
Measure with a current shunt across a real cell, not a bench supply โ internal resistance changes everything once the battery is half-drained.