ESP32 power consumption can be reduced with sleep modes

By Jeremy Cook

The ESP32 is an incredible device: it's able to process information at hundreds of megahertz, communicate via WiFi and Bluetooth and accomplish a wide variety of tasks using its GPIO pins. However, one might say that with great power comes great…power consumption.

To be fair, ESP32 power consumption is actually quite low compared to similar devices from a decade ago. For modern IoT applications, however—especially where a battery is involved—it can be a relative power hog, consuming hundreds of milliamps of current when fully powered.

The good news is that the ESP32 also features a system of sleep and hibernation modes. When carefully used, these modes allow the ESP’s power appetite to be tamed—or at least confined to short bursts of activity.

Sleep Modes

ESP32 deep sleep and other power modes are outlined in the chart below, taken from its datasheet:

Body Image 1 ESP32 Power Consumption Can Be Reduced With Sleep Modes

Screencap from data sheet

The ESP32 has five low power modes: ESP32 modem-sleep, light-sleep, deep-sleep, hibernation, and power off. Modem-sleep and deep-sleep have several sub-modes, with different power consumption rates based on active processing capabilities. Hibernation stops nearly all functionality of the chip, except for an RTC to wake it after a set amount of time. Power off mode is activated in response to the CHIP_PU pin being set as low and requires external interaction to start processing again.

The upshot to all of this is that the low power modes of the ESP32 can consume between 68mA and 5µA, or .068A and .000005A respectively, disregarding power off. The downside is that each mode limits the ESP32’s usefulness, as noted below:

  • Modem-sleep: Wireless communication is cut off.
  • Light-sleep: Pauses the CPU but retains memory states.
  • Deep-sleep: Powers off the ESP32’s main memory. A limited amount of RTC (real-time clock) memory is retained and can be used on wake-up. The ULP (ultra-low power) processor is active in two out of the three deep-sleep sub-modes, allowing for simple task execution and input monitoring.
  • Hibernation: Leaves only the RTC and a limited number of GPIO pins active for wake up. No memory is retained.
  • Power off: Must be switched on externally. Power consumption of 1µA is negligible in most situations.
  • Neglecting voltage effects, a small 3.7V, 850mAh rechargeable battery would be able to power an ESP32 in modem-sleep for approximately 12.5 hours. Light-sleep could run for over 1000 hours. Mid-level deep sleep hibernation affords 8500 hours of run time–roughly a year–while a hibernation state could theoretically be held for nearly 20 years. Of course, the device will need to wake intermittently to be useful, but with careful planning, an ESP32 setup can result in an extremely long lifespan between battery charges.

    ESP32 Deep Sleep Dev Board Differences

    Body Image 2 ESP32 Power Consumption Can Be Reduced With Sleep Modes

    Screencap from data sheet

    When discussing power consumption, an ESP32 chip or module is only one part of the electronics picture. For experimentation, you will likely use a development board. For more fleshed out electronics designs, a custom arrangement of associated parts will be needed to run an IoT “thing.” With careful programming, using an ESP32 can be very power efficient, but the surrounding electronics need careful consideration.

    To illustrate this point, I hooked up an Adafruit HUZZAH32 ESP32 dev board to a power supply and current measurement equipment, along with a DFRobot DFR0478 ESP32 board. Both were featured in this ESP32 composite video clock post, and performed differently in what could be considered a rather niche use case. Perhaps power efficiency would also prove to be a distinguishing feature between the two.

    To test this out, I used a modified “TimerWakeUp” ESP32 Arduino example sketch that goes into deep sleep, wakes up, shines the onboard LED light, and then starts the cycle again by going to sleep. 5.3V was fed to each board to be converted to the ~3.3 voltage level needed for the ESP32. Consumption results were as follows:

    HUZZAH32:   sleep = 6.6mA    wake = 43.2mA wake + LED = 44.6mA 
     DFR0478:  sleep = .02mA     wake = 39.7mA wake + LED = 40.0mA

    To be fair, a better simulation of actual IoT usage might have been to measure the current through the battery port. Nonetheless, it appears that in this scenario, the DFR0478 FireBeetle board is much more efficient in sleep mode than its counterpart.

    The HUZZAH32 pulls 7000µA (7mA) during deep sleep from battery power, roughly what I’d measured in my experiment. An analysis by Andreas Spiess found that the DFR0478 pulls a reported 53µA (.053mA) of current from the battery when in deep sleep. This is significantly more than what I’d measured on the DFR0478, however, his report uses a different power input and an earlier version of the board (2.0 vs 4.0 that I tested). This measurement is also pushing the lower limits of what my multimeter can report, which could be a factor into its accuracy. As final caveat, the FireBeetle tested uses a WROOM-32D ESP32 module, while the HUZZAH32 uses a WROOM-32E.

    All that being said, there are orders of magnitude of difference between the two boards tested, which is a good illustration that the circuitry supporting an ESP32 can have a dramatic effect on power consumption.

    ESP32 Power Consumption Tamed by Sleep Modes

    The ESP32 is an incredibly powerful device that can require a relatively large amount of power to operate. However, with careful programming, it’s possible to have one of these devices last on battery power for weeks, months, or even more. The key is to understand the tradeoffs involved in low power design, and what can be left out while still achieving acceptable performance.


    ArrowPerks-Loyalty-Program-Signup-banner-EN


    Latest News

    Sorry, your filter selection returned no results.

    We've updated our privacy policy. Please take a moment to review these changes. By clicking I Agree to Arrow Electronics Terms Of Use  and have read and understand the Privacy Policy and Cookie Policy.

    Our website places cookies on your device to improve your experience and to improve our site. Read more about the cookies we use and how to disable them here. Cookies and tracking technologies may be used for marketing purposes.
    By clicking “Accept”, you are consenting to placement of cookies on your device and to our use of tracking technologies. Click “Read More” below for more information and instructions on how to disable cookies and tracking technologies. While acceptance of cookies and tracking technologies is voluntary, disabling them may result in the website not working properly, and certain advertisements may be less relevant to you.
    We respect your privacy. Read our privacy policy here