Low power ESP32: Software tweaking (less hardware)

The ESP8266 had some limitations regarding deep sleep to appoint at least two:

  • the deep sleep period with a maximum time of a bit more then one hour
  • deep sleep wake up was implemented as a reset, so all variables lost their values and got back to default, due to the reset all initialization code in setup() must be executed after a wake up

Seems that the successor, the ESP32 has not this limitation any more:

Some Links

Ultra-Low-Power-Management des ESP32 für WiFi-IoT-Module nutzen

Another example

This sketch reads a BME280 sensor.

1 Like

4 posts were merged into an existing topic: Low-power ESP32 boards

The numbers of the DFRobot Firebeetle and the WEMOS LOLIN D32 aren’t that bad either, but I still like the xPy boards most.

Further, I like what is mentioned in Ultra low power design with ESP32 - 10 ways to do it right, especially 1. Calm those cores down! and 2. Manage with one core. @RalfL is also aiming for the same:

Also for the record: Some words about the Ultra Low Power coprocessor (ULP).

Tweaking the core is working for peanuts in case the board burns power endless! So it should be the last step (I think we do not need).

The 128 uA of the Wemos Lolin32 board is a “no go” for us! Compared with the 20 uA of the WiPy and 50 uA of the DFRobot Firebeetle and assuming that the numers are the same on our multimeter in the end!

Ein schöner Artikel, der die power modes, wake up sources und deren Anwendung ausführlich erklärt: ESP32 Deep Sleep with Arduino IDE and Wake Up Sources | Random Nerd Tutorials. Anbei in Auszügen.

ESP32 power modes and wake up sources explained

Power modes

The ESP32 can switch between different power modes:

  • Active mode
  • Modem Sleep mode
  • Light Sleep mode
  • Deep Sleep mode
  • Hibernation mode

You can compare the five different modes on the following table from the ESP32 Espressif datasheet.

The ESP32 Espressif datasheet also provides a table comparing the power consumption of the different power modes.

And here’s also Table 10 to compare the power consumption in active mode:

Wake up sources

  1. You can use the timer, waking up your ESP32 using predefined periods of time.
  2. You can use the touch pins.
  3. You can use two possibilities of external wake up: you can use either one external wake up, or several different external wake ups.
  4. You can use the ULP co-processor to wake up – this won’t be covered in this guide.

Invoking deep sleep mode

To write a sketch to put your ESP32 into deep sleep mode, and then wake it up, you need to keep in mind that:

  1. First, you need to configure the wake up sources. This means configure what will wake up the ESP32. You can use one or combine more than one wake up source.
  2. You can decide what peripherals to shut down or keep on during deep sleep. However, by default, the ESP32 automatically powers down the peripherals that are not needed with the wake up source you define.
  3. Finally, you use the esp_deep_sleep_start() function to put your ESP32 into deep sleep mode.
1 Like

The more detailed details from the data sheet.

@ 2.3 Power Scheme, p. 9

The internal LDO can be configured as having 1.8 V, or the same voltage as VDD3P3_RTC. It can be powered off via software to minimize the current of flash/SRAM during the Deep-sleep mode.

@ 3.7 RTC and Low-Power Management, p. 21

With the use of advanced power-management technologies, ESP32 can switch between different power modes.

Power modes

  • Active mode: The chip radio is powered on. The chip can receive, transmit, or listen.
  • Modem-sleep mode: The CPU is operational and the clock is configurable. The Wi-Fi/Bluetooth base-band and radio are disabled.
  • Light-sleep mode: The CPU is paused. The RTC memory and RTC peripherals, as well as the ULPco-processor are running. Any wake-up events (MAC, host, RTC timer, or external interrupts) will wakeup the chip.
  • Deep-sleep mode: Only the RTC memory and RTC peripherals are powered on. Wi-Fi and Bluetooth connection data are stored in the RTC memory. The ULP co-processor is functional.
  • Hibernation mode: The internal 8-MHz oscillator and ULP co-processor are disabled. The RTC recovery memory is powered down. Only one RTC timer on the slow clock and certain RTC GPIOs are active.The RTC timer or the RTC GPIOs can wake up the chip from the Hibernation mode.


  • During Deep-sleep, when the ULP co-processor is powered on, peripherals such as GPIO and I²C are able to operate.
  • When the system works in the ULP sensor-monitored pattern, the ULP co-processor works with the ULP sensor periodically and the ADC works with a duty cycle of 1%, so the power consumption is 100 uA.
1 Like

Selbst an die Werte des light sleep kommen wir gerade nicht ran. Ich habe irgendwie noch nichts belastbares für den FiPy gefunden, sondern bisher nur für den WiPy, allgemein gilt er aber als “low power” etwa im Gegensatz zu den alten LoPys.

Dort drüben ist etwas neues hinzugekommen, das u.U. auch hierzu passt.