-->
Page 1 of 2

RAM / EEPROM to allow longer deep sleep phases without WiFi?

PostPosted: Fri Apr 14, 2017 10:58 am
by extasic
Hi!

I created an ESP8266-based project which is a battery-powered LCD information board. As it's battery-powered, I'm concerned about energy consumption.

Most times the circuit is inactive (LCD powered off, and so should the ESP8266 be). But as ESP.deepSleep() (and its native SDK counterpart) only allow a deep sleep of about 1h, the device currently wakes up every hour just to fetch another "go to sleep" command - even if it should sleep 4 whole days.

My question is as follows: Consider the ESP just got a command to sleep for 4 days. Is it somehow possible (and reasonable) to store this information in RAM or EEPROM, so it would still wake up each hour, but wouldn't need to use WiFi but locally retrieve the stored value of hours to sleep, decrease it and go to sleep again? Is RAM preserved during deep sleep and how could I store this value then? Isn't EEPROM a bad idea due to a fast wearout?

Thanks in advance!

Re: RAM / EEPROM to allow longer deep sleep phases without W

PostPosted: Fri Apr 14, 2017 12:26 pm
by rudy
take a look at RTC ram. It is preserved as long as power is applied.

viewtopic.php?f=8&t=3505

viewtopic.php?f=13&t=8097

example>esp8266>RTCUserMemory

Re: RAM / EEPROM to allow longer deep sleep phases without W

PostPosted: Fri Apr 14, 2017 4:23 pm
by drwheeler

Re: RAM / EEPROM to allow longer deep sleep phases without W

PostPosted: Tue Apr 18, 2017 11:08 am
by extasic
thanks for your posts, I'll go and try it :)