Power consumption for Rainmaker [IDFGH-5540]

brain13
Posts: 7
Joined: Mon Nov 23, 2020 8:40 pm

Power consumption for Rainmaker [IDFGH-5540]

Postby brain13 » Fri Jul 09, 2021 7:44 am

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?

ESP_Piyush
Posts: 309
Joined: Wed Feb 20, 2019 7:02 am

Re: Power consumption for Rainmaker

Postby ESP_Piyush » Fri Jul 09, 2021 9:53 am

Copied this topic under esp-idf forum because power saving mechanism would be more relevant here.

brain13
Posts: 7
Joined: Mon Nov 23, 2020 8:40 pm

Re: Power consumption for Rainmaker

Postby brain13 » Mon Jul 12, 2021 6:57 am

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.

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Power consumption for Rainmaker

Postby fasani » Mon Jul 12, 2021 5:24 pm

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.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

brain13
Posts: 7
Joined: Mon Nov 23, 2020 8:40 pm

Re: Power consumption for Rainmaker

Postby brain13 » Mon Jul 12, 2021 7:06 pm

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.

ESP_Alvin
Posts: 211
Joined: Thu May 17, 2018 2:26 am

Re: Power consumption for Rainmaker [IDFGH-5540]

Postby ESP_Alvin » Tue Jul 13, 2021 1:43 am

Moderator's note: edit the topic title for issue tracking, thanks for reporting.

User avatar
espressif_liuuu
Posts: 2
Joined: Tue Jul 13, 2021 6:09 am

Re: Power consumption for Rainmaker [IDFGH-5540]

Postby espressif_liuuu » 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.

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. :D

brain13
Posts: 7
Joined: Mon Nov 23, 2020 8:40 pm

Re: Power consumption for Rainmaker [IDFGH-5540]

Postby brain13 » Wed Jul 14, 2021 12:54 pm

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. :D
Thank you! This helped me to achieve 10mA of average current consumption while connected to AP!

User avatar
espressif_liuuu
Posts: 2
Joined: Tue Jul 13, 2021 6:09 am

Re: Power consumption for Rainmaker [IDFGH-5540]

Postby espressif_liuuu » Wed Jul 14, 2021 1:11 pm

"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?

brain13
Posts: 7
Joined: Mon Nov 23, 2020 8:40 pm

Re: Power consumption for Rainmaker [IDFGH-5540]

Postby brain13 » Thu Jul 15, 2021 4:35 am

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.

Who is online

Users browsing this forum: Baidu [Spider] and 232 guests