Estimate runtime for battery-powered embedded and IoT devices with active, idle, and sleep modes
Battery life for embedded devices is determined by the average current draw over a full duty cycle. A duty cycle consists of one or more power states (e.g., active TX, idle, deep sleep), each with a defined current and duration.
The formula used is: Average Current = Σ(In × tn) / Σ(tn). Battery life is then: Lifetime = (Battery Capacity × Efficiency) / Average Current.