⚡Power & Energy
ESP32 Battery Life Calculator
Calculate the runtime of your battery-powered device.
Runtime Chart
Chart visualization coming soon.
Formula Explanation
The average current draw is calculated using the duty cycle of the device:
Iavg = (Iactive × tactive + Isleep × tsleep) / (tactive + tsleep)
The total runtime is then:
Runtime (hours) = Battery Capacity (mAh) / Iavg (mA)
This model assumes a periodic duty cycle where the device alternates between an active state and a low-power sleep state, which is typical for most battery-powered IoT devices.
FAQ
- What is a typical sleep current for ESP32?
- The ESP32 deep sleep current is around 5–10 μA. With an external RTC, it can go down to 2.5 μA. The values above use 15 μA as a conservative estimate.
- How does temperature affect battery life?
- Battery capacity decreases at extreme temperatures. Li-Ion batteries typically retain only 50–80% of capacity at 0°C and may fail below -20°C.
- Can I use this calculator for other microcontrollers?
- Yes. The formula applies to any battery-powered device with a periodic duty cycle. Just adjust the current and time values for your specific microcontroller.