ESP32 Power consumption considerations

frax84
Posts: 42
Joined: Thu Jan 07, 2016 11:26 am

ESP32 Power consumption considerations

Postby frax84 » Mon Aug 07, 2017 10:27 am

Hello,
i made some test to get an idea of power consumption of ESP32 (devkitC by Olimex). I tried different scenarios and i want to summarize the data in a sort of table:

VCC=5V
N. CORES ACTIVE: DEFAULT

SCENARIO-----------------------------------------CPU80MHz-------------CPU160MHz-----------CPU240MHz
- CPU + ELECTRONICS + BT-----------------------113mA------------------123mA-----------------141mA
- CPU + ELECTRONICS------------------------------38mA------------------- 51mA -----------------73mA
- CPU (deep sleep) + ELECTRONICS-------------3.5mA-------------------3.5mA-----------------3.5mA

NOTE: With the term "ELECTRONICS" i summarize the contribution in the consumption of everything on the board except for ESP32

Comparing these results with the Table 6 of the esp32 datasheet:
https://www.espressif.com/sites/default ... eet_en.pdf

I'm not able to get a full grasp of what is drawing how much. From Table 6 of datasheet we have that, in modem sleep, with CPU powered on:
Max speed (i suppose 240MHz): 20 mA
Normal speed (i suppose 160MHz): 5 ~ 10 mA
Slow speed (i suppose 80MHz): 3 mA
Even if there should be a difference of 17mA between the slowest and the fastest case i get a difference in the range 28-35mA. At first i thought that this could be due to one or two core usage but i read this post:
viewtopic.php?f=12&t=1198&p=10623&hilit=40+44mA#p10623
where Igrr said
At 80 MHz, with two idling CPUs the chip consumes 44mA (without any radios), and with one CPU it consumes 40mA.
Probably i'm missing something. Can anyone explains what happens?

frax

WiFive
Posts: 2468
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 Power consumption considerations

Postby WiFive » Mon Aug 07, 2017 11:28 am

First, get the latest datasheet. Also, not sure whether modem sleep for Bluetooth is enabled yet.

frax84
Posts: 42
Joined: Thu Jan 07, 2016 11:26 am

Re: ESP32 Power consumption considerations

Postby frax84 » Mon Aug 07, 2017 2:48 pm

I know that modem sleep is still not in ESP-IDF. I neglected it because i suppose that Antenna can be considered (almost) off in that time so that i can consider the current draw almost completely from CPU. The estimation is rough so i don't care 1-2mA of error.
You were right for the datasheet. My bad for not noticing the updated version.In here the updated Table 6 is shown:

Max speed 240 MHz: 30 mA ~ 50 mA
Normal speed 80 MHz: 20 mA ~ 25 mA

Considering these values my tests have a better margin, even if to make things really right i need to consider the lower limit of Normal speed Vs something more than the upper limit of Max speed. By the way, so far so good.

Ty for help WiFive

frax84
Posts: 42
Joined: Thu Jan 07, 2016 11:26 am

Re: ESP32 Power consumption considerations

Postby frax84 » Tue Aug 08, 2017 9:37 am

I have one more doubt about the considerations we did. From my test i have:
CPU (80MHz) + ELECTRONICS------------------------------38mA
CPU (deep sleep) + ELECTRONICS-------------3.5mA
This makes, as a rough estimation, 3.5mA the consumption of the electronics (regulator, led, etc.). If the CPU should use 20-25mA to work @80MHz, what is consuming the remaining 10-15mA?

WiFive
Posts: 2468
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 Power consumption considerations

Postby WiFive » Tue Aug 08, 2017 10:06 am

Well that says the ELECTRONICS use 3.5mA in idle mode but not necessarily in active mode.

frax84
Posts: 42
Joined: Thu Jan 07, 2016 11:26 am

Re: ESP32 Power consumption considerations

Postby frax84 » Wed Aug 09, 2017 9:38 am

Yes, this is a good point, but i'm wondering about what's happen a bit more in detail. Actually there are not so many components on the board and i don't understand how the deep sleep on the esp32 could influence the consumption of the rest of the board.
We have regulator, led, Serial interface (CP2102) and flash memory.
1) Regulator should have a current consumption <100uA;
2) led should be some mA, let's say 2-5mA (probably almost all the 3.5mA i get from the board in deep-sleep);
3) CP2102 could be a candidate for consumption, having a normal consumption of 20mA (100uA in suspend mode), but i verified the chip is always in suspend mode when the board is supplied by a voltage supplier and not PC.
4) Finally, we have the flash memory. This is harder to evaluate because of my ignorance. Considering a generic flash module:
http://www.elinux.org/images/f/f5/Winbond-w25q32.pdf at pag.48
can be read that "Current read data" can go from 4 up to 12mA (based on the frequency used) and the standby current is 25uA.
With this consumption, if the flash memory is put in standby when the esp32 is in deep-sleep i could consider everything off except for the power led and the current of 3.5mA could make sense.
By the way, during the normal mode i'm not able to evaluate the contribution of the flash memory on the overall consumption. The only explicit command about the flash memory in my main.c is nvs_flash_init().
Any suggestion?

frax

pontificator
Posts: 6
Joined: Fri Oct 27, 2017 11:09 pm

Re: ESP32 Power consumption considerations

Postby pontificator » Fri Oct 27, 2017 11:46 pm

Hi,

Using an oscilloscope I have measured current consumption of DOIT ESP32 DevKit with ESP-WROOM-32 module running Arduino WiFiScan demo sketch.

While executing WiFi.scanNetworks() function very first time, module consumes average current of 0.5A for 10 ms with four peaks of approx. 0.7A during that period.

After that module consumes average 130 mA with 0.6A current spikes. The spikes have duration of 0.5 ms and appear in bursts with spike rate of 100 ms.

Apparently it is about 2 times worse than promised in the ESP-32 data sheet. I expected to see about 0.3A max (50 mA for CPU and 240 mA max for WiFi transmitter).

Running ChipID demo sketch with WiFi off, current consumption is steady 50 mA, as expected.

Is it a problem of ESP-32 silicon or of ESP-WROOM-32 WiFi circuitry? Is it possible to get ESP-WROOM-32 modules with correct current consumption?

Update:
I have noticed that Espressif DevKitC has antenna hanging out of board. When I cut a piece of DOIT ESP32 DevKit PCB beneath antenna, the peak current consumption reduced by approx. 1/3
ESP-32 DevKit modified.png
ESP-32 DevKit modified.png (778.62 KiB) Viewed 30272 times
Thus, apparently the problem was caused by incorrect DOIT ESP32 DevKit design.

rustyx
Posts: 4
Joined: Thu Mar 14, 2019 10:19 pm

Re: ESP32 Power consumption considerations

Postby rustyx » Mon Apr 01, 2019 8:35 pm

pontificator wrote:
Fri Oct 27, 2017 11:46 pm
After that module consumes average 130 mA with 0.6A current spikes. The spikes have duration of 0.5 ms and appear in bursts with spike rate of 100 ms.
100ms is the WiFi beacon rate.
But my ESP32 dev kit (thus including the USB chip and power LED) consumes 40mA when connected to WiFi, spiking to ~150mA every 100ms.

ESP_Angus
Posts: 1649
Joined: Sun May 08, 2016 4:11 am

Re: ESP32 Power consumption considerations

Postby ESP_Angus » Tue Apr 02, 2019 1:33 am

rustyx wrote:
Mon Apr 01, 2019 8:35 pm
pontificator wrote:
Fri Oct 27, 2017 11:46 pm
After that module consumes average 130 mA with 0.6A current spikes. The spikes have duration of 0.5 ms and appear in bursts with spike rate of 100 ms.
100ms is the WiFi beacon rate.
But my ESP32 dev kit (thus including the USB chip and power LED) consumes 40mA when connected to WiFi, spiking to ~150mA every 100ms.
Earlier versions of IDF didn't enable any power saving modes by default. Recent IDF enables WiFi modem sleep by default, and further power savings are possible by enabling "max" power saving mode or enabling light sleep as well.

mikemoy
Posts: 295
Joined: Fri Jan 12, 2018 9:10 pm

Re: ESP32 Power consumption considerations

Postby mikemoy » Tue Apr 02, 2019 1:36 am

A better approach to testing current draw is to get a ESP32 Test Board. Like one of these. With the ESP32 removed test the current draw of the board alone. Then pop the ESP32 in there and subtract the new reading from when it was removed.
81nUR4BcgmL._SL1500_.jpg
81nUR4BcgmL._SL1500_.jpg (207.49 KiB) Viewed 6324 times

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 18 guests