Page 1 of 2
Power consumption for Rainmaker [IDFGH-5540]
Posted: Fri Jul 09, 2021 7:44 am
by brain13
Hi Espressif,
I tested power consumption of a board with ESP32S2 with simple Rainmaker app running.
Only ESP32S2 consumption were measured, no additional electronics added.
My results is the following:
* ESP32S2 connected to WiFi, connected to cloud and idle: ~30mA
* ESP32S2 is looking for an access point: ~80mA
The 80mA is quite big for my application and I'm looking for a way to lower this number. My goal to have about 10-20mA.
If I understood correctly the ESP32S2 in continuously in RX mode when looking for a AP. I believe the duty cycling can help. For example, to be in RX mode for 100ms in every second.
Can I add a duty cycling while looking for an AP?
Also, is there way to lower consumption when connected to AP?
Re: Power consumption for Rainmaker
Posted: Fri Jul 09, 2021 9:53 am
by ESP_Piyush
Copied this topic under esp-idf forum because power saving mechanism would be more relevant here.
Re: Power consumption for Rainmaker
Posted: Mon Jul 12, 2021 6:57 am
by brain13
Hi ESP-IDF team,
Could you please comment how to reduce the current consumption when ESP32S2 is searching for an AP?
I need to add some duty cycling to this process to keep average current in 10-20mA in this mode.
Re: Power consumption for Rainmaker
Posted: Mon Jul 12, 2021 5:24 pm
by fasani
Not part of IDF Team, but so far in all my tests WiFi is what most consumes, so I don't really think it's possible to keep consumption that low when searching for an Access point. Would love to know if it's possible though so I will stay tuned.
Re: Power consumption for Rainmaker
Posted: Mon Jul 12, 2021 7:06 pm
by brain13
Hi fasani,
Thank you for your answer.
I'm sure that the average current can be reduced.
If the searching for AP consumes 80mA we can run it each second and stop after 100-200ms.
This will cause some degradation in the AP connection time, but this the acceptable trade-off for me.
I just looking for a standard API for doing this.
Re: Power consumption for Rainmaker [IDFGH-5540]
Posted: Tue Jul 13, 2021 1:43 am
by ESP_Alvin
Moderator's note: edit the topic title for issue tracking, thanks for reporting.
Re: Power consumption for Rainmaker [IDFGH-5540]
Posted: Tue Jul 13, 2021 6:37 am
by espressif_liuuu
Hi, thanks for your questions.
For your first question, if you want to scan for AP when connected with AP, there is no other specific way to control it. You may need to call scan API periodically to control power consumption. Meanwhile, if you want to scan at disconnected status, please update your version to 4.3.0 or newest one, then enable the option ESP_WIFI_STA_DISCONNECTED_PM_ENABLE in menuconfig, which supports chip to sleep at disconnected status.
For your second question, there are three ways to do power consumption for our chip:
1. Modem sleep, average current is about 30mA
2. Light sleep, average current is about 1mA
3. Deep sleep
I recommend that you can try lightsleep in your application and get lower power consumption.
Re: Power consumption for Rainmaker [IDFGH-5540]
Posted: Wed Jul 14, 2021 12:54 pm
by brain13
espressif_liuuu wrote: ↑Tue Jul 13, 2021 6:37 am
Hi, thanks for your questions.
For your first question, if you want to scan for AP when connected with AP, there is no other specific way to control it. You may need to call scan API periodically to control power consumption. Meanwhile, if you want to scan at disconnected status, please update your version to 4.3.0 or newest one, then enable the option ESP_WIFI_STA_DISCONNECTED_PM_ENABLE in menuconfig, which supports chip to sleep at disconnected status.
I use ESP IDF 4.4.
I tried to enable ESP_WIFI_STA_DISCONNECTED_PM_ENABLE but nothing changed. It still consume 80mA while searching for AP.
One thing that could be important: the Rainmaker app invokes esp_wifi_connect() every 2 seconds.
So I suggest that esp_wifi_connect() power on WiFi RX with 100% duty. And when the connection fails the rainmaker app just restart it again. Is there a standart way to duty cycling WiFi RX in esp_wifi_connect()?
espressif_liuuu wrote: ↑Tue Jul 13, 2021 6:37 am
For your second question, there are three ways to do power consumption for our chip:
1. Modem sleep, average current is about 30mA
2. Light sleep, average current is about 1mA
3. Deep sleep
I recommend that you can try lightsleep in your application and get lower power consumption.
Thank you! This helped me to achieve 10mA of average current consumption while connected to AP!
Re: Power consumption for Rainmaker [IDFGH-5540]
Posted: Wed Jul 14, 2021 1:11 pm
by espressif_liuuu
"I use ESP IDF 4.4.
I tried to enable ESP_WIFI_STA_DISCONNECTED_PM_ENABLE but nothing changed. It still consume 80mA while searching for AP.
One thing that could be important: the Rainmaker app invokes esp_wifi_connect() every 2 seconds.
So I suggest that esp_wifi_connect() power on WiFi RX with 100% duty. And when the connection fails the rainmaker app just restart it again. Is there a standart way to duty cycling WiFi RX in esp_wifi_connect()?"
The option, ESP_WIFI_STA_DISCONNECTED_PM_ENABLE, could let chip go sleep at disconnected, otherwise chip would stay RX mode and keep current about 100mA even when its not about to connect. However, it could do nothing to decrease consumption at scaning.
We are not able to do duty cycling in esp_wifi_connect, WiFi event would be thrown according to the result of esp_wifi_connect. Is it possible to do duty cycle outside esp_wifi_connect?
Re: Power consumption for Rainmaker [IDFGH-5540]
Posted: Thu Jul 15, 2021 4:35 am
by brain13
espressif_liuuu wrote: ↑Wed Jul 14, 2021 1:11 pm
The option, ESP_WIFI_STA_DISCONNECTED_PM_ENABLE, could let chip go sleep at disconnected, otherwise chip would stay RX mode and keep current about 100mA even when its not about to connect. However, it could do nothing to decrease consumption at scaning.
We are not able to do duty cycling in esp_wifi_connect, WiFi event would be thrown according to the result of esp_wifi_connect. Is it possible to do duty cycle outside esp_wifi_connect?
Thank you for support. Will try to add some delay between esp_wifi_connect calls.