
With built-in Wi-Fi and Bluetooth, the ESP32 is a popular choice for IoT products. According to the datasheet, the chip can draw around 10 µA in deep sleep. Yet many people measure several milliamps on a development board and find their batteries last only a few weeks. Here is what we have learned designing battery-powered products.
1. A development board is not a product
The USB-to-UART bridge, power LED and general-purpose LDO on typical development boards all draw current continuously. For a product you should:
- Choose an LDO or DC-DC converter with low quiescent current (Iq), ideally a few µA.
- Remove the power LED and USB bridge, or make them switchable.
- Switch off sensors, external memory and other peripherals with a MOSFET or load switch during sleep.
- Check pull-up / pull-down resistors and voltage dividers for constant leakage paths.
2. Choose the right wake-up source
The ESP32 can wake from deep sleep in several ways:
- RTC timer: wake periodically to measure and report — the most common.
- External GPIO (ext0 / ext1): buttons, door contacts, sensor interrupts.
- Touch pins: a user interface without mechanical buttons.
- ULP coprocessor: takes simple measurements while the main cores sleep and wakes them only when a threshold is reached.
Variables you need to keep can live in RTC memory (e.g. RTC_DATA_ATTR), so you don't have to re-initialize everything after waking.
3. Wi-Fi is the biggest consumer
Connecting and transmitting over Wi-Fi causes current peaks of several hundred mA. Shortening the time the device is awake makes a bigger difference than lowering sleep current:
- Use a static IP and remember the AP channel and BSSID to connect faster.
- Batch several readings into one transmission.
- Add enough bulk capacitance so current peaks do not cause brown-outs and resets.
- For long range and small data, consider a lower-power radio such as LoRa.
4. Estimating battery life
Start with the average current:
Average current = (active current × active time + sleep current × sleep time) ÷ period
For example, waking every 10 minutes, 3 s active at an average of 80 mA, and 20 µA in sleep:
(80 mA × 3 s + 0.02 mA × 597 s) ÷ 600 s ≈ 0.42 mA
2000 mAh ÷ 0.42 mA ≈ 4,760 h ≈ 6.5 months (excluding self-discharge and temperature effects)
The active time dominates the average. Cutting it from 3 s to 1 s nearly triples battery life.
Written by the Balin R&D team as general technical guidance. Always check your specific product requirements and the latest regulations. Related service: Embedded Systems


