How to Calculate IoT Battery Life?

IoT Battery Life Calculator

When designing a remote sensor or a wearable device, one of the most critical challenges is estimating how long it will run on a single charge. Whether you are using an ESP32, STM32, or Arduino, battery life optimization depends on the balance between Active Mode and Deep Sleep Mode.

The Battery Life Formula

To estimate the operating time, we first need to calculate the Average Current Consumption (Iavg​) based on the device’s duty cycle.

The formula used in this calculator is:

Iavg​=Tactive​+Tsleep​(Iactive​⋅Tactive​)+(Isleep​⋅Tsleep​)​

Once we have the average current, the total battery life in hours (H) is:

H=Iavg​(mA)Capacitybattery​(mAh)​

Factors That Affect Battery Performance

  1. Self-Discharge: All batteries (Li-Po, Li-ion, Alkaline) lose charge over time even if not in use. For long-term projects (1+ years), always account for a 1-3% monthly loss.
  2. Voltage Regulators: Low-dropout regulators (LDOs) or Buck converters have quiescent currents. If your regulator consumes 50μA while the MCU is in sleep, it can significantly reduce battery life.
  3. Temperature: Extreme cold or heat reduces the effective capacity of Lithium batteries.
  4. Peukert’s Law: For high-drain applications, the actual capacity may be lower than the rated capacity on the label.

Tips for Optimizing IoT Power Consumption

  • Use Deep Sleep: Modern microcontrollers like the ESP32-C6 can consume as little as 7μA in deep sleep.
  • Optimize Sampling Rate: Instead of sending data every minute, send it every hour if the environment doesn’t change rapidly.
  • Reduce Wi-Fi/Bluetooth Time: The radio is the biggest power consumer. Keep the connection time as short as possible (use static IP to speed up Wi-Fi connection).

Scroll to Top