Forum › Hardware & circuits

How long will an ESP32 last on a battery in deep sleep?

💬 0 · 👁 1
ESP32 Projects team Team

Let's work out the battery life of a sensor that wakes up, sends data and goes back to sleep. Example: the battery BME280 MQTT sensor.

The formula

Average current = (active current × active time + sleep current × sleep time) / period.

For an ESP32 DevKit waking every 10 minutes:

  • active phase with Wi-Fi: ~120 mA × 3 s;
  • sleep: ~10 µA for the chip itself — but 10–15 mA on a DevKit because of the USB-UART, the AMS1117 regulator and the power LED!
DevKit:      (120 mA × 3 s + 12 mA × 597 s) / 600 s ≈ 12.5 mA → 2000 mAh ≈ 7 days
Bare module: (120 mA × 3 s + 0.02 mA × 597 s) / 600 s ≈ 0.62 mA → 2000 mAh ≈ 4.5 months

What matters most

  1. The board, not the chip. Pick a board with a low-quiescent LDO (ME6211, HT7333) or power the module directly. Desolder the power LED.
  2. Wi-Fi connect time. A static IP plus a saved channel and BSSID cut the active phase from 3 s to ~0.5 s.
  3. Sensors sleep too. A BME280 in forced mode draws ~0.1 µA between readings; power a DHT22 from a GPIO or through a transistor.
  4. The battery voltage divider should use 1 MΩ resistors, not 10 kΩ, or it will drain the cell by itself.
esp_sleep_enable_timer_wakeup(10ULL * 60 * 1000000);  // 10 minutes
esp_deep_sleep_start();

Share your measurements: which board, which battery, how long it lasted.

Sign in with Google to start topics and reply. Sign in with Google

Be kind, stay on topic, no ads and no piracy.