How the calculation works
A battery-powered ESP32 spends most of its life in deep sleep and wakes up briefly to read a sensor, connect, send and go back to sleep. Battery life follows from the average current over one full cycle:
self-discharge ≈ capacity × rate per month / 730 h
battery life = capacity × usable % / (average + self-discharge)
The active current is the average while awake, not the peak. An ESP32 transmitting over Wi-Fi peaks at a few hundred milliamps, but averaged over boot, connection and sending it usually lands somewhere around 80 to 130 mA.
Typical ESP32 current figures
Use these as starting points only. Boards, firmware and Wi-Fi conditions vary a lot, so measure your own hardware before relying on a number.
| State | Typical figure | Notes |
|---|---|---|
| ESP32 deep sleep, RTC timer | about 10 µA | Chip only, from Espressif's datasheet |
| ESP32-C3 deep sleep | about 5 µA | Chip only |
| Wi-Fi connect and send, averaged | 80–130 mA | Peaks of 200–350 mA during transmit |
| Time awake per Wi-Fi report | 1–4 s | Static IP and saved channel can bring it under 1 s |
| BLE advertising burst, averaged | 30–50 mA | Much shorter awake time than Wi-Fi |
| Low-quiescent LDO | 1–5 µA | For example MCP1700 or similar parts |
| AMS1117 regulator | about 5 mA | Common on dev boards, unsuitable for battery use |
| Development board "deep sleep" | 1–10 mA | USB-serial chip, power LED and regulator stay on |
To measure sleep current, put a multimeter in series with the battery on its µA range, or use a power profiler such as the Nordic PPK2 to see the whole wake-up cycle.
How to make an ESP32 last longer on battery
- Wake less often. Doubling the interval roughly doubles battery life as long as active time dominates. Take several readings per wake-up and send them together.
- Shorten the time awake. Use a static IP, store the Wi-Fi channel and BSSID in RTC memory, and avoid long DNS lookups or TLS handshakes on every wake-up. ESP-NOW to a mains-powered gateway can replace the Wi-Fi connection entirely.
- Fix the sleep current. Use a bare module or a board designed for low power, a low-quiescent regulator, and no power LED. Above about 1 mA, sleep current usually dominates everything else.
- Switch off sensors. Power sensors from a GPIO or a MOSFET, and use high-value or switched resistor dividers for battery measurement.
- Pick the right battery. A LiPo or 18650 cell with a low-dropout regulator uses most of its capacity. Two AA cells fall below what the ESP32 handles reliably long before they are empty. A LiFePO4 cell at 3.2 V can power the ESP32 directly without a regulator.
When a calculator is not enough
A battery target such as "one year on two AA cells" decides the whole design: the module, regulator, sensors, radio and firmware structure. We build ESP32, STM32 and Raspberry Pi prototypes with a measured power budget from the first version. See ESP32 firmware development services for how a project is scoped, or try the greenhouse monitor demo to see the dashboard side of a sensor node.
FAQ
How long can an ESP32 run on a battery?
It depends mostly on how often it wakes and how much it draws while asleep. A bare ESP32 module that wakes every 10 minutes, connects to Wi-Fi for about 3 seconds and sleeps at around 25 µA in total can run for several months on a 2000 mAh LiPo. The same code on a typical development board may last only days, because the USB-serial chip, regulator and LED keep drawing milliamps.
What is the ESP32 deep sleep current?
Espressif's datasheet gives about 10 µA for the original ESP32 in deep sleep with the RTC timer running, and about 5 µA for the ESP32-C3. A complete board adds the regulator's quiescent current, sensors and any voltage dividers, so 15 to 50 µA is a realistic total for a well-designed battery board.
Why does my ESP32 dev board drain the battery in deep sleep?
Most development boards are built for USB power. The USB-to-serial chip, the power LED and a linear regulator such as the AMS1117 (about 5 mA quiescent) stay powered while the ESP32 itself sleeps. For battery projects, use a board designed for low power, or a bare module with a low-quiescent regulator.
Can an ESP32 run on a CR2032 coin cell?
Not reliably with Wi-Fi. Wi-Fi transmit peaks reach a few hundred milliamps, far more than a CR2032 can deliver, so the voltage collapses and the chip resets. BLE-only designs with large buffer capacitors sometimes work, but LiPo, Li-ion or AA cells are the safer choice.
How accurate is this calculator?
It is as accurate as the currents you enter. The formula is a weighted average of active and sleep current, plus always-on loads and battery self-discharge. Measure your own board with a power profiler or a multimeter in series, and treat results beyond a few years as theoretical.
Building a battery-powered device?
Tell us what it should measure, how often, and how long the battery must last. Free assessment, a fixed quote, and a first working prototype plan within days.
Tell us about your device →