Power Saving via menuconfig?

Paladin
Posts: 23
Joined: Fri Jan 13, 2017 8:45 pm

Power Saving via menuconfig?

Postby Paladin » Thu Jul 13, 2017 5:18 pm

So, I've got a project where I need to save power, but I don't want to implement deep sleep.

Here's a quick overview of the program/timing:
each of the bold items is a separate task/thread
Read Sensors: for 1 ms /50 ms, turn on a bank of IR LEDs, read the state, turn them off, delay for 50 ms, via GPIO
Check battery: once / 15 minutes, read the battery voltage via ADC pin
POST data via WiFi: once per hour, start the wifi, send a POST request, stop the wifi
For the vast majority of time, I'm just burning CPU cycles via vTaskDelay();

So far, to save power, I've done simple things: the CPU clock is set to 80 MHz, the IR LEDs are minimally on, the esp_wifi_set_ps() is enabled, and the wifi is stopped for the majority of the hour.

Here are my questions:
Aside from dialing down the CPU in the menuconfig, are there other changes I can make to the component configuration to save some power?
Does esp_wifi_stop() actually power down the wifi antenna?
If I deep sleep, does the port tick timer continue to tick, or do I need to re-do my task scheduling to take advantage of deep sleep?

Paladin
Posts: 23
Joined: Fri Jan 13, 2017 8:45 pm

Re: Power Saving via menuconfig?

Postby Paladin » Tue Aug 08, 2017 7:41 pm

Any help here?

Lucas.Hutchinson
Posts: 79
Joined: Tue Apr 26, 2016 5:10 am

Re: Power Saving via menuconfig?

Postby Lucas.Hutchinson » Tue Aug 08, 2017 9:05 pm

I believe there will be power saving features baked into the upcoming v3.0 release of the idf.
So this doesnt really help you now. but hopefully in the future power-saving will be a more automated feature.

ESP_Sprite
Posts: 9040
Joined: Thu Nov 26, 2015 4:08 am

Re: Power Saving via menuconfig?

Postby ESP_Sprite » Wed Aug 09, 2017 5:42 pm

Missed this one seemingly... I'd use deep sleep for this. Deep sleep essentially resets the ESP32 entirely, so you would need to do the re-scheduling. If selected, it will however keep the system time, so you can use e.g. gettimeofday() and friends to figure out the current time. Also, if needed you can make variables persistent by allocating them in RTC RAM, so you can store some state there.

Who is online

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