Device: Outdoor temperature/humidity sensor (weather station) Target: 2-year battery life on 2× AA batteries (3,000 mAh total at 3.0V nominal)
Component Power Consumption (from datasheets): - MCU active (STM32L0): 8 mA @ 3.0V - MCU sleep (STM32L0): 1.8 µA @ 3.0V - Sensor (BME280): 340 µA during measurement, 0.1 µA sleep - LoRa TX @ +14 dBm: 28 mA for 100ms transmission - LoRa sleep: 1 µA
Operational Profile (measure every 10 minutes, transmit every hour): - Wake from sleep - MCU active: 500ms (sensor stabilization + reading) - Sensor measurement: 100ms - MCU processes data: 200ms - LoRa TX (every 6th wake): 100ms - Return to deep sleep
Calculation:
Per-hour cycle (6 wake events: 5 measure-only, 1 measure+transmit):
Measure-only wake (5× per hour): - MCU active: 0.7s × 8 mA / 3600s/h = 0.00156 mAh - Sensor: 0.1s × 0.34 mA / 3600s/h = 0.0000094 mAh - LoRa sleep: 3600s × 0.001 mA / 3600s/h = 0.001 mAh - Subtotal per wake: 0.00257 mAh × 5 = 0.01285 mAh
Measure+transmit wake (1× per hour): - MCU active: 0.7s × 8 mA / 3600s/h = 0.00156 mAh - Sensor: 0.1s × 0.34 mA / 3600s/h = 0.0000094 mAh - LoRa TX: 0.1s × 28 mA / 3600s/h = 0.000778 mAh - Subtotal: 0.00235 mAh
Sleep (majority of time): - MCU sleep: 3594s × 0.0018 mA / 3600s/h = 0.00179 mAh - Sensor sleep: 3594s × 0.0001 mA / 3600s/h = 0.0001 mAh - LoRa sleep (already counted above)
Total per hour:
- Active wakes: 0.01285 + 0.00235 = 0.01520 mAh
- Sleep: 0.00179 + 0.0001 = 0.00189 mAh
- Total: 0.01709 mAh/hour
Battery Life:
- Battery capacity: 3,000 mAh
- Average consumption: 0.01709 mAh/hour
- Life: 3,000 / 0.01709 = 175,541 hours = 20 years
Wait - that cannot be right. What did we miss?
Self-discharge:
- Alkaline AA: 2-5% per year @ 25°C
- At 3% per year: 3,000 mAh × 0.03 = 90 mAh lost per year
Temperature correction:
- Cold weather capacity reduction: 30% at 0°C
- Effective capacity in winter: 3,000 × 0.7 = 2,100 mAh
Revised Calculation:
- Usable capacity: 2,100 mAh (winter derated)
- Self-discharge: 90 mAh/year = 0.0103 mAh/hour
- Active consumption: 0.01709 mAh/hour
- Total: 0.0274 mAh/hour
Realistic Battery Life:
- 2,100 mAh / 0.0274 mAh/hour = 76,642 hours = 8.75 years
But wait - we want 2 years (17,520 hours). We have 4× margin!
Optimization - Transmit more frequently (better user experience): - New plan: Transmit every 15 minutes (4× data rate) - LoRa TX: 4× per hour instead of 1× = +0.00233 mAh/hour - Total: 0.0274 + 0.00233 = 0.02973 mAh/hour - Life: 2,100 / 0.02973 = 70,635 hours = 8.1 years (still >2-year target)
Lesson: Power calculation revealed 20-year theoretical life → after self-discharge and temperature derating → 8.75-year realistic life → enabled 4× transmission frequency while exceeding 2-year target.