According to the datasheet of the ESP32, the power consumption in deep sleep mode (RTC) is around 10µA. This page explains how we measure the real current consumption of the ESP32-DevKitC V4 in deep sleep mode. As we'll see, the current is not exactly what we expect. A comparison of the measurements of different ESP32 cards can be found on this page.
These measurements has been done with the following versions:
We used a Matrehit Energy multimeter that can measure direct curent from 10nA.
The source code used for switching from deep sleep mode to normal mode is presented below. The ESP32 remains in normal operation for 10 seconds, then switches to deep sleep mode for 10 seconds before starting again.
// Convert from microseconds to seconds
#define uS_TO_S_FACTOR 1000000ULL
// Duration of each cycle (deep sleep and wakeup)
#define TIME_TO_SLEEP 10
// Setup() is call on startup and wakeup from deep sleep mode
void setup() {
// Display a message in the console
Serial.begin(9600);
Serial.println("Wake up");
// TIME_TO_SLEEP seconds delais
delay(TIME_TO_SLEEP*1000);
// Display a message before deep sleep
Serial.println("Go to deep sleep");
// Set deep sleep duration
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
// Switch to deep sleep mode
esp_deep_sleep_start();
}
void loop() {}
In the console, we can check that the device is entering in deep sleep mode for ten seconds:
Go to deep sleep
���1��!�)))����!�Wake up
Go to deep sleep
K�����s
�l�ESO�i��-}S���Wake up
Go to deep sleep
!�����J��1���1!���!�J�Wake up
When the device wakes up from deep sleep mode, it sends some characters on the serial device. When the ESP32 wakes up it goes into the bootloader. The characters displayed in the serial monitor are the data sent by the bootloader who try to communicat with a possible programming software like AVRDUDE.
Wake up | Deep sleep | |
---|---|---|
Current | 43mA | 3.8mA |
Power | 215mW | 19mW |
In normal mode, the current is about 43mA. In deep sleep mode the current is 3.8mA. As you can see, this consumption is far from the 10µA specified in the documentation of the ESP32:
There are three reasons why the current consumption is not as low as expected. The power on led is always on, because it is connected to the power supply:
The voltage regulator is an AMS1117-3.3 DC-DC linear regulator. Even if the datasheet specifies "High Efficiency Linear Regulators", the efficiency of linear regulator is at least equal to Vout/Vin, in our case the best we can expect is 66%.
Furthermore, the current required to power the LDO’s internal circuitry is is about a few milliamps. Probably not the best choice for deep sleep applications.
Last point is the USB interface, based on CP2102N chip. The chip is powered by the output of the regulator. Even if USB is not connected, the interface is powered. The current is about 1.3mA when held in reset. This also increases the global power consumption of the board.
In conclusion, if you are working on an application that requires a sleep mode with a strong constraint on power consumption or autonomy, it is not necessarily the best choice of development board. If power consumption is a key point of your project, check the FireBeetle DFR078.