Difference in accuracy between light sleep and deep sleep modes

daniel1704
Posts: 6
Joined: Wed Oct 09, 2019 4:48 am

Difference in accuracy between light sleep and deep sleep modes

Postby daniel1704 » Tue Feb 11, 2020 3:12 am

I'm working on a project that will require to keep the ESP32 on an idle state for about 5 mins and then start again. As the project will be running with a battery, I decided I would like to use power saving options. When I run the code using light sleep, the accuracy of the sleep time is pretty good, and everything works fine. However, when I tried to use deep sleep, keeping every other configuration the same, the sleep time started to lag for about 10 s. Do any of you know why is this happening?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Difference in accuracy between light sleep and deep sleep modes

Postby WiFive » Tue Feb 11, 2020 8:51 am

Light sleep can resume but deep sleep has to boot the whole app again. Are you taking that into account?

daniel1704
Posts: 6
Joined: Wed Oct 09, 2019 4:48 am

Re: Difference in accuracy between light sleep and deep sleep modes

Postby daniel1704 » Tue Feb 11, 2020 8:53 pm

WiFive wrote:
Tue Feb 11, 2020 8:51 am
Light sleep can resume but deep sleep has to boot the whole app again. Are you taking that into account?
I did, I measured the time from sleep start to reboot when I was using deep sleep. Even if I didn't, boot time with the configurations I'm using is about 1 s, and the difference between both sleeps modes is around 10 s, so it wouldn't be justified

sargun1
Posts: 1
Joined: Mon Apr 27, 2020 12:43 pm

Re: Difference in accuracy between light sleep and deep sleep modes

Postby sargun1 » Mon Apr 27, 2020 12:54 pm

IMO if you are putting the ESP32 idle for 5 mins, it will be better to use Deep sleep mode, because there is significant current consumption difference while in Light sleep mode and deep sleep mode. according to the table below: Image
table source: https://iotdesignpro.com/projects/vario ... sleep-mode

It will take approx 300ms for bootloader to reload when ESP32 is restarted, so 300ms in nothing compared to 5min idle state, so better use Deep sleep mode.

Who is online

Users browsing this forum: No registered users and 93 guests