Current consumption esp32 in different states

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
asmeenk12
Posts: 5
Joined: Fri Feb 26, 2016 7:31 pm
Location: Netherlands

Current consumption esp32 in different states

Post by asmeenk12 » Sat Jul 08, 2017 11:23 am

Hallo

To measure the current consumption of an esp32 platform:
* platforms lolin32 and sparkfun esp32 thing were used, both with a connector for a 1S lipo battery
* I did cut the red wire of a lipo battery, and connected a good milliAmpere meter in the circuit
* Connected the lipo battery to the circuit.

Now I am able to program the device, and check to program while connected to USB.
When in the correct state I disconnect the device from the USB and measure the power consumption via the LIPO battery.(without reset)

While keeping the reset button pressed
* sparkfun esp32 uses 4 mA
* lolin32 uses 0.45 mA.

The difference is caused due to the red light on the esp32 thing (+2mA) (wire can be cut to switch off the red led).
On the esp32 thing the usb2serial chip always is powered (3v3), while for the lolin32 the usb2serial chip is only powered when connected to the usb.

So for low power stuff, my advice: use the lolin32 board.
Next measures are only done on the lolin32 board.

1. No modules loaded (first statement in main.py:

Code: Select all


print("Loading module main ...")
import machine  
led    = machine.Pin(5, mode=machine.Pin.OUT)

print("Sleeping forever")
while True:
    machine.idle()
    if led.value() == 1:
        led.value(0)
    else: 
        led.value(1)    
(Note I made a hack to be able to switch the CPU frequency)
cpu 80Mhz: 25.8 mA cpu 240 Mhz: 40.2 mA

Thats really nice!

Next: import network
cpu 80 mhz: 99.0 mA (increase of 73.2 mA)
cpu 240 Mhz: 116.6 mA (increase of 76.4 mA)

Connected to an AP (no traffic) : cpu240 Mhz: 118.0 mA
wlan.disconnect() or wlan.active(False) has no change in power consumption.

So the main reason for the high current consumption is the network import, switching on the wifi stuff.
Reasonable, because wifi takes a lot of power.
For low power bluetooth 4.2 is much better!

At the moment it is not possible to switch off the network.

I hope that the esp_idf team (or micropython team) comes with a solution to be able to switch of network dynamically.
And implement the idle() and deepsleep() functions!

Thanks for the work done so far.

Capstan
Posts: 117
Joined: Sun Jan 29, 2017 4:03 pm
Location: Texas, USA

Re: Current consumption esp32 in different states

Post by Capstan » Fri Jul 14, 2017 2:56 am

Thanks for posting your measurements. That's less current draw than I was expecting. Pretty similar to the ESP8266, right? Or maybe even less?

I am seeing the ESP32 selling at under $4 for quantity of 10 in the States, ESP8266 at around $1.60 direct from China, so both pretty darn cheap. The ESP32 is vastly better in so many ways and I am seeing Micropython run on it just fine so far. Will attempt I2C on it over the next few days.

smurfendrek123
Posts: 6
Joined: Sat Dec 10, 2016 3:46 pm

Re: Current consumption esp32 in different states

Post by smurfendrek123 » Thu Jul 20, 2017 8:44 pm

Damn, if the esp32 is more/as power efficient as the esp 8266, is there still any use left for it? I'm exited to see that much computing power (relatively) with such low power consumption.

iwl
Posts: 1
Joined: Fri Sep 22, 2017 4:09 am

Re: Current consumption esp32 in different states

Post by iwl » Fri Sep 22, 2017 4:14 am

Isn't 70mA for wifi a lot of current and Smartphones take less?

Post Reply