The use of the ESP8266 in the world of IoT

User avatar
By AmineSmiri
#44508 Hey everybody :D ,

So I can exploring ESP12-E, making it send temperature data (my sensor is a DS18B20, but this has nothing to do with this topic). Recently, I learned of RTC memory and how it's super useful if we want to put long delays between two measurements.

After some surfing on Internet, I found that ESP cannot stay sleeping for a period that its internal timer would not support (which is 71minutes), which is very logical. I wanted to see what would his behavior if its RTC is saturated, would it just being hung in there ? Would it wake-up even if the deepsleep period that I specified isn't reached yet ?

I did set deep sleep time to 4 hours. Well, the chip just kept waking up each 20-25 minutes, doing its duty and sleeping again. Is that normal ? 25 minutes is less that the half of its limit (71 minutes).

I called deepsleep using "ESP.deepSleep(dsleep_time, WAKE_RF_DEFAULT);". Could 25 minutes be a limit put there by the interface? Would I get the same results if I use the SDK function for deepsleep ?

One last question : What's the max duration for deepsleep that you can get ?

Take care.

EDIT : Maybe this post should go to hardware specific. I'm not really sure. Anyway, if moderators thinks the post fits in some other forum better than here, I wouldn't have any problem if it gets moved.
User avatar
By AmineSmiri
#44519 Hey,

I found the problem. It seems I'd declared dsleep_time as an integer, so IDE was automatically casting 4*60*60*1000000 into an int. I've done a test with dsleep_time being a double, put it into deepsleep for 40 minutes, it worked right.

Silly mistake, yeah I know :?

Now I can see the chip's behavior when deepsleep period goes beyond 80 minutes.