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?
Power Saving via menuconfig?
Re: Power Saving via menuconfig?
Any help here?
-
- Posts: 79
- Joined: Tue Apr 26, 2016 5:10 am
Re: Power Saving via menuconfig?
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.
So this doesnt really help you now. but hopefully in the future power-saving will be a more automated feature.
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: Power Saving via menuconfig?
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: No registered users and 74 guests