ESP32 Deep-Sleep Battery Life
Project lifetime for an ESP32 (or any duty-cycled MCU) running on battery. Computes average current and lifetime from sleep current, wake current, wake duration, cycle period, and battery derating.
Will your battery-powered ESP32 sensor last a season or a weekend? Enter the battery capacity, deep-sleep current, wake current, how long it stays awake each cycle and how often it wakes, and this calculator returns the average current draw and the project lifetime in hours, days and years — the number that decides whether your design is viable.
curl -X POST https://toolsamurai.com/api/v1/iot-arduino/esp32-deep-sleep-battery \ -H "Authorization: Bearer sk_live_•••••••••••••••" \ -H "Content-Type: application/json" \ -d '{ "battery_capacity_mah": 2000, "sleep_current_ua": 10, "wake_current_ma": 80, "wake_duration_ms": 250, "cycle_period_s": 60, "battery_efficiency_pct": 80 }'
The method behind the numbers
A duty-cycled device spends most of its time asleep and briefly wakes to do work. The average current is the time-weighted blend of the two states: I_avg = (I_sleep × (T − t_wake) + I_wake × t_wake) / T, where T is the cycle period and t_wake the awake time per cycle. Lifetime is then the usable battery capacity divided by that average current.
Usable capacity is below the nameplate figure because of self-discharge, the voltage cut-off of your regulator, and conversion losses — the calculator exposes this as an efficiency percentage (around 80% is realistic for Li-ion plus a boost converter). The takeaway is almost always the same: sleep current and how often you wake dominate battery life far more than wake current does, because the device is asleep ~99% of the time.
See it in practice
2000 mAh cell, 10 µA sleep, 80 mA awake for 250 ms every 60 s.
- battery_capacity_mah
- 2000
- sleep_current_ua
- 10
- wake_current_ma
- 80
- wake_duration_ms
- 250
- cycle_period_s
- 60
- battery_efficiency_pct
- 80
Frequently asked questions
What's a realistic ESP32 deep-sleep current?
Around 10 µA with RTC memory retained is typical for a bare module; add the ULP coprocessor and it rises toward ~150 µA. Watch out for on-board regulators and USB-serial chips on dev boards — they can add hundreds of µA or more, dwarfing the chip itself.
Why does my real battery life fall short of the estimate?
Usually three reasons: leakage from regulators and peripherals you didn't account for in sleep current, optimistic usable-capacity assumptions, and Wi-Fi association taking longer (and drawing more) than the wake time you entered. Measure actual sleep current with a meter for the biggest accuracy win.
How do I extend battery life the most?
Wake less often and stay awake for less time — both shrink the duty cycle. Cutting deep-sleep current (remove board leakage, use a low-Iq regulator) helps enormously because sleep dominates the average. Lowering wake current matters least.
Does this work for other MCUs?
Yes. The duty-cycle model is generic — it works for any STM32, nRF52, RP2040 or AVR design where the device alternates between a low sleep current and a higher active current. Just plug in that part's numbers.
Embed ESP32 Deep-Sleep Battery Life on your site
Sign in to configure the live preview, theme, defaults, locked inputs, and analytics ID from the embed dashboard.