Esp32

ESP32 Sleep Modes & Their Power Consumption

ESP32 is an IoT board which consumes very less power to function. ESP32 comes with different working modes which can save power to last ESP32 longer using a single battery cell. These modes help ESP32 to beat all other microcontrollers in terms of power when it comes to remote sensing projects.

Here in this guide, ESP32 power saving modes will be discussed along with the deep sleep mode.

ESP32 Power Modes

ESP32 has multiple types of working modes depending upon its application inside a project. To give a clearer picture these ESP32 works in a similar way like power saving modes of our PCs or laptops. Using these modes, we can save too much power before its shutdown.

During ESP32 sleep modes the power to any unnecessary peripherals is cut off while the only power which is given to is RAM which helps ESP32 to retain its data and last longer.

Following are the main peripherals to which either power is given or cutoff during different modes. All these peripherals are the main consumers of ESP32 power.

    • ESP32 dual core processor
    • WiFi
    • Bluetooth
    • RTC and peripherals
    • ULP Coprocessor

ESP32 comes with advanced power management using which we can configure different types of modes by controlling the power to above-mentioned peripherals. According to the power distribution we can classify ESP32 into 5 different modes each of these modes have unique features and power consumption:

    • Active Mode
    • Modem Sleep Mode
    • Light Sleep Mode
    • Deep Sleep Mode
    • Hibernation Mode

ESP32 in Active Mode

The first working mode of ESP32 is Active mode. It is in normal mode during which ESP32 takes maximum power and all the peripherals are in working mode. The main power consumption during this mode happens in WiFi and Bluetooth mode.

While running ESP32 during this mode the power consumption can go up to 240mA of current. And sometimes when both WiFi and Bluetooth are working together the power can go up to 800mA of current.


This is the most power conserving mode of ESP32 and maximum power goes without any use. To get ESP32 working we have to turn off some of its peripherals during this mode.

ESP32 in Modem Sleep Mode

Next mode on the list is modem sleep mode. In this mode, most of the ESP32 peripherals are in active mode; only the WiFi, Bluetooth and Radio module is OFF. During this mode the CPU is working and the internal clock is easily configurable.

During this mode power consumption goes from 3mA to 20mA. At slow speed the CPU consumes less power but as the CPU speed increases the power goes up to 20mA.


One of the interesting things about this is we can keep WiFi and Bluetooth connection alive at some predefined time intervals. During this mode ESP32 wireless connectivity was established only when a wakeup signal arrived. This predefined amount of time is known as Association Sleep Pattern.

During this mode ESP32 connects itself to the router in station mode. The Access point(router) broadcasts a signal for a certain time which announces the presence of its WiFi. During this time ESP32 synchronizes information with the Access point broadcast information after that it goes back to sleep.

ESP32 in Light Sleep Mode

Light sleep mode of ESP32 works in a similar way to the modem sleep mode. It also follows the predefined time intervals to wake up and exchange information. These predefined time intervals are called Association Sleep Patterns.

The major difference between light and modem sleep mode is that during light sleep mode Clock Gating technique is used. What clock gating does is it turns off the clock circuit for some parts of the circuitry, by doing this the flips- flops don’t have to switch their states regularly.

As switching states between high and low according to the clock pulse consumes power. Turning it OFF will save much power for other main peripherals of ESP32.


During this mode the CPU is not completely turned OFF rather it is paused by disabling clock pulses for its peripherals. While the RTC and ULP co-processor keeps alive which overall results in low power consumption around 0.8mA.

Before entering this mode all the data is stored inside the RAM so it can resume operation once its wakeup from sleep mode using external wakeup source.

ESP32 in Deep Sleep Mode

During sleep mode, ESP32 is the most used mode for power saving as it can maximize ESP32 working in the long run over a single charge battery. During this mode the 2 CPU of ESP32 turns OFF and the ULP (Ultra Low Processor) takes over the charge. The flash and RAM are disabled the RTC memory is powered only. Also, WiFi and Bluetooth are completely disabled. Power consumption goes from 0.15mA to 10μA.

Once this mode is active the CPU is shutdown, but the ULP coprocessor can read data coming from GPIO pins like sensor readings. Using the GPIO pin we can create an interrupt which wakes up the ESP32 CPU once it is required. This mode is useful in applications where we have to wake up ESP32 using external wake up or a timer.

For example, if we design a security system where the ESP32 CPU remains OFF for the whole time. It only wakes up once it receives a signal from a motion detector sensor. Once the input is received by the ULP processor it will wake up the ESP32 CPU and perform the predefined set of instructions such as sending an email.


Along CPU the main memory of ESP32 also shut down and erased. Anything stored inside it cannot be accessed later if we enter deep sleep mode. Because of this ESP32 stores the WiFi and Bluetooth data inside the RTC memory so it later can be accessed during deep sleep mode for establishing wireless connectivity.

Here are some wake up sources from deep sleep mode:

    • Timer wakeup
    • Touch wakeup
    • External wakeup (ext0, ext1)
    • UPL Co-processor

ESP32 in Hibernation Mode

During hibernation mode of ESP32 everything turns OFF the main CPU, internal 8MHz clock, the ULP co-processor and even the RTC memory which means no information can be recovered after entering ESP32 hibernation mode.

So, the question comes if everything is OFF then what’s the purpose of ESP32 now.

It’s not like that one RTC timer is still active on the LOW clock and some of the RTC GPIO. These are responsible for waking ESP32 once needed.


ESP32 hibernation mode is used where we need to activate ESP32 at some certain time. During this mode ESP32 consumes power as low as 2.5μA.

Here is a brief comparison of all the ESP32 modes.

Peripherals Active Sleep Modem Sleep Light Sleep Deep Sleep Hibernation
Bluetooth Active Inactive Inactive Inactive Inactive
WiFi Active Inactive Inactive Inactive Inactive
Radio Active Inactive Inactive Inactive Inactive
ESP32 Core Active Active Paused Inactive Inactive
RTC Memory Active Active Active Active Active
ULP Coprocessor Active Active Active Active Inactive

Conclusion

There are multiple ESP32 power modes available which increase its functionality and make it the perfect choice for projects. During all above modes RTC memory is in working while all other peripherals shut down depending upon the mode. During these modes ESP32 can be wakeup using an external interrupt or timer.

About the author

Kashif

I am an Electrical Engineer. I love to write about electronics. I am passionate about writing and sharing new ideas related to emerging technologies in the field of electronics.