
It just needs 0.01 mAs of current in deep sleep mode and that’s why we are going to try today. In deep sleep mode the ESP32 offers the lowest power consumption. There is a light sleep mode and the Deep – Sleep mode. We are going to put the ESP32 to Deep – Sleep mode where it disables everything except the RTC module. So, if we want to conserve power we have to disable them when don’t use them.
ESP32 ENTER DEEPSLEEP BLUETOOTH
The WiFi modules, the Processing Cores, and the Bluetooth module require a lot of current to operate. Also note, even the RTC memory of the ESP32 chip is 4 times larger than the memory of the Arduino Uno. This small amount of memory is very useful as you are going to find out in a moment. Inside the RTC module, we can find a PMU (Phasor measurement unit) a small and very low power 32-bit co-processor, and 8Kbs of RAM memory.

functions for setting the wake up mode and entering in power reduction (these are explained in dedicated paragraphs).The ESP32Power.h script contains Functions, Variables and Constants for dealing with Power Reduction. a connector Female Male connected to pin named D15.a connector Female Female connected to pin named 3V3.a connector Female Female connected to pin named VIM.

ESP32 ENTER DEEPSLEEP SERIAL
every two seconds, the event checks the serial port in order to manage the requests.after 2 seconds of start, displays the help and the event is disabled.
ESP32 ENTER DEEPSLEEP CODE
The sketch uses a scheduler (see the Code Project article Arduino scheduler) with three events: The wake up types are summarized in the below table: Timer

Is automatic when dealing with WIFI end/or Bluetooth The following table summarizes the possible ways of reducing the power of the ESP32 board in relation to what is achieved by the script in question. The sleeps modes considered here are essentially light and deep - they differ not only in the lesser or greater reduction in current but also in the behavior after waking up in fact, waking up from deep sleep is an almost restart, i.e., the program is reinitialized and only data in the RTC (Real Time Clock) memory are preserved. The ESP32Power.h script contains a set of functions for enter in so called sleep mode in order to reduce power consumption and functions to set how the board can be awakened. I also believe that this is an opportunity to solicit observation and criticism as I know that I am not an expert in this field so I apologize if the reader finds imprecisions or errors. I found many articles on this subject and I am grateful to their authors who allowed me to develop the program that I am about to describe. This article shows the use of functions for reducing the power consumption by putting the board into sleep and how it can be awakened.
