ESP8266_ContinuousPowersaving
Posted: Thu Aug 04, 2016 4:26 am
Dear All,
I've seen a lot of on the topic of power saving for the ESP8266 however most of the real beneficial powersaving has been done using the "deep_sleep" method. Letting the ESP sleep for 15 minutes wake up and let it do its thing. A very nice concept if you need a logger or something similar.
Downside of this method however is: that it resets the ESP and it requires a new connectiont to be set up which takes time. For a project i'm conducting i need a continuous power saving method which would not loose the WIFI-Connection with the router and with which there is would not be noticible is was at a power saving mode.
After looking into the methods available i came up with the supprisingly easy method. Which i would like to share with you.
Using a 100 mili second delay it reduced my powercossumption from 70 mA to 8 mA on a 12V system with a switching power regulater. On the actual 3v3 line it reduced my powercossumtipn from 70 mA to 12 mA
Right now im capable of running the entire system for 7 hours on a capacitor bank which can be charged within 1 minute.
I hope this will help some of you who are looking to save some power for the ESP8266
Kind Regards,
Orcanbull
ps. I'm new to this forum but have been working wiht the ESP for a long time already if you have any question please send me a message and i will take a look at your problems
I've seen a lot of on the topic of power saving for the ESP8266 however most of the real beneficial powersaving has been done using the "deep_sleep" method. Letting the ESP sleep for 15 minutes wake up and let it do its thing. A very nice concept if you need a logger or something similar.
Downside of this method however is: that it resets the ESP and it requires a new connectiont to be set up which takes time. For a project i'm conducting i need a continuous power saving method which would not loose the WIFI-Connection with the router and with which there is would not be noticible is was at a power saving mode.
After looking into the methods available i came up with the supprisingly easy method. Which i would like to share with you.
Code: Select all
void fpm_wakup_cb_func1(void) {
wifi_fpm_close(); // disable force sleep function
//wifi_set_opmode(STATION_MODE); // set station mode
//wifi_station_connect();
// Serial.println("Woken up...");
}
void sleepNow(int MILI) {
// Serial.println("Going to sleep...");
wifi_fpm_set_sleep_type(LIGHT_SLEEP_T); // light sleep
wifi_fpm_open(); // enable force sleep
wifi_fpm_set_wakeup_cb(fpm_wakup_cb_func1); // Set wakeup callback
wifi_fpm_do_sleep(MILI * 1000);
delay(MILI + 10);
}
void setup()
{
// put setup code here
// Connect to your Wireless here
}
void loop()
{
sleepNow(100) // sleep for 100 milis
// execute code here
}
Using a 100 mili second delay it reduced my powercossumption from 70 mA to 8 mA on a 12V system with a switching power regulater. On the actual 3v3 line it reduced my powercossumtipn from 70 mA to 12 mA
Right now im capable of running the entire system for 7 hours on a capacitor bank which can be charged within 1 minute.
I hope this will help some of you who are looking to save some power for the ESP8266
Kind Regards,
Orcanbull
ps. I'm new to this forum but have been working wiht the ESP for a long time already if you have any question please send me a message and i will take a look at your problems