Where does an ESP32 sensor's battery actually go?
Into the seconds it spends awake. In a worked example, an ESP32 sensor sleeps 895 seconds at 15 µA and sends for 5 seconds at 150 mA. Those 5 seconds use nearly all the charge. Sending once an hour instead of every 15 minutes drops the average from 0.85 mA to 0.22 mA, pushing past a year.
The full power math, the wake sources, the battery choices and a pre-sleep checklist are all worked through step by step.
Read the full guide: How to Achieve 2-Year Battery Life with ESP32
Watch on YouTube, or see every video on the Hubble Network Community channel.
Transcript
Your sensor wakes every fifteen minutes and sends for five seconds. The rest of the time it sleeps, so which part empties the battery?
Asleep, it draws fifteen microamps for eight hundred ninety-five seconds. Awake, it draws one hundred fifty milliamps. Nearly the whole cycle is sleep, so sleep current feels like the number to chase. But the battery goes into the five seconds awake. The long sleep is a thin sliver. Averaged out, that cycle draws zero point eight five milliamps. On three thousand milliamp-hours, that is one hundred forty-six days. Not two years. Change one thing: send once an hour instead of every fifteen minutes. What happens to the average?
It drops to zero point two two milliamps, pushing past a year. So how often does your device really need to wake?
For two years, the guide aims for fifty to one hundred microamps average. The math, the wake sources and the batteries are in the guide.