

The ESP32 can go into deep sleep mode, and then wake up at predefined periods of time.
You can decide what peripherals to shut down or keep on during deep sleep.You can use one or combine more than one wake up source. This means configure what will wake up the ESP32. First, you need to configure the wake up sources.To write a sketch to put your ESP32 into deep sleep mode, and then wake it up, you need to keep in mind that:

You can use the ULP co-processor to wake up – this won’t be covered in this guide.You can use two possibilities of external wake up: you can use either one external wake up, or several different external wake ups.You can use the timer, waking up your ESP32 using predefined periods of time.You might also like reading: ESP32 Pinout Reference: Which GPIO pins should you use? Wake Up SourcesĪfter putting the ESP32 into deep sleep mode, there are several ways to wake it up: The RTC_GPIO pins are highlighted with an orange rectangular box. You can use that table as a reference, or take a look at the following pinout to locate the different RTC_GPIO pins. The ESP32 datasheet provides a table identifying the RTC_GPIO pins. RTC_GPIO Pinsĭuring deep sleep, some of the ESP32 pins can be used by the ULP co-processor, namely the RTC_GPIO pins, and the Touch Pins. This mode of operation is useful if you need to wake up the main CPU by an external event, timer, or both, while maintaining minimal power consumption. While the ESP32 is in deep sleep mode the RTC memory also remains powered on, so we can write a program for the ULP co-processor and store it in the RTC memory to access peripheral devices, internal timers, and internal sensors. In deep sleep mode neither CPU or Wi-Fi activities take place, but the Ultra Low Power (ULP) co-processor can still be powered on. Having your ESP32 in deep sleep mode means cutting with the activities that consume more power while operating, but leave just enough activity to wake up the processor when something interesting happens. If you put your ESP32 in deep sleep mode, it will reduce the power consumption and your batteries will last longer.
