Calculate the true lifespan of your deep-sleeping microcontrollers.
Microcontrollers with radio modules (like the ESP8266 or ESP32 with Wi-Fi) consume a massive amount of power when transmitting data—often between 80mA and 250mA. If left running continuously on a standard 18650 lithium battery, they will die in a matter of days. To run a device for months or years on battery power, you must utilize "Deep Sleep."
In Deep Sleep, the microcontroller turns off its CPU, RAM, and Wi-Fi/Bluetooth radios. The only thing left running is a tiny, ultra-low-power timer (the RTC - Real Time Clock) waiting to wake the system back up. During this state, power consumption drops from hundreds of milliamps down to mere microamps (µA).
Many makers buy expensive, ultra-low-power boards, only to find their battery still dies quickly. The Donut Chart above illustrates why: Your active time dominates your energy usage. If your board takes 10 seconds to connect to Wi-Fi and send a sensor reading, it doesn't matter if your sleep current is 10µA or 100µA—almost 95% of the battery is being burned during those 10 seconds of active Wi-Fi transmission. To improve battery life, focus on optimizing your code to connect and transmit faster!