Deep Sleep delay issue

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
yellowsky
Normal user
Posts: 30
Joined: 10 Dec 2016, 20:09

Deep Sleep delay issue

#1 Post by yellowsky » 04 Jun 2017, 07:41

Hi everyone,
i use ESP Easy but i have i issue with the deep sleep delay.

If i use a deep sleep delay > 1 hour (i.e. 3600 s), the esp module reboot each hour. It works well for delay < 3600 s

In my case i would like a reboot each 6 or twelve hours (depending the application).

Anyone has the same issue?

Martinus

Re: Deep Sleep delay issue

#2 Post by Martinus » 04 Jun 2017, 10:47

Deepsleep uses an internal 32 bit counter in uSecs. So i would expect it to be working up to 4294 seconds. I think this is bound to hardware limitation where the internal circuitry uses a 32 bit counter to wake up the main system.

yellowsky
Normal user
Posts: 30
Joined: 10 Dec 2016, 20:09

Re: Deep Sleep delay issue

#3 Post by yellowsky » 04 Jun 2017, 13:14

Ok, thank you.
Maybe put this information in the wiki.

Do you know a way to use external device to achieve that?

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Deep Sleep delay issue

#4 Post by LisaM » 04 Jun 2017, 14:44

Depending on the sensor, you could use ultra deep sleep: http://www.esp8266.com/viewtopic.php?f=11&t=4458

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Deep Sleep delay issue

#5 Post by grovkillen » 04 Jun 2017, 16:16

yellowsky wrote: 04 Jun 2017, 13:14 Maybe put this information in the wiki.
Done.

https://www.letscontrolit.com/wiki/index.php/SleepMode
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

yellowsky
Normal user
Posts: 30
Joined: 10 Dec 2016, 20:09

Re: Deep Sleep delay issue

#6 Post by yellowsky » 04 Jun 2017, 18:53

grovkillen wrote: 04 Jun 2017, 16:16
yellowsky wrote: 04 Jun 2017, 13:14 Maybe put this information in the wiki.
Done.

https://www.letscontrolit.com/wiki/index.php/SleepMode
Perfect.

But i thought to a low power timer device to wake up the pi each x seconds where x is > at the limit.
Is anyone know that, could you give me a reference (it is for a battery powered project.
Thank you

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: Deep Sleep delay issue

#7 Post by psy0rz » 04 Jun 2017, 23:40

You could also wake it up manually by pulling RST to GND, and using a deepsleep time of 0. Then it will never wakeup automaticly.

Dont know if this is feasible for your project.
Please support ESPEasy development via Patreon or buy us a coffee.

yellowsky
Normal user
Posts: 30
Joined: 10 Dec 2016, 20:09

Re: Deep Sleep delay issue

#8 Post by yellowsky » 05 Jun 2017, 16:07

No it is not possible while i would like an automatic measurement once a day.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Deep Sleep delay issue

#9 Post by grovkillen » 05 Jun 2017, 16:47

Wouldn't it be possible if we had a dump variable that let you use Deep Sleep Delay X seconds (maximum 4294) and let the ESP wake up after y number of Deep Sleep Delay Cycles.

If deep sleep delay is 3600 seconds and deep sleep delay cycle is 24 then the wake up would happen once every 24 hours?

Just a thought.

Default value for cycle is 1 for backwards compatibility.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Deep Sleep delay issue

#10 Post by Shardan » 05 Jun 2017, 17:35

grovkillen wrote: 05 Jun 2017, 16:47 Wouldn't it be possible if we had a dump variable that let you use Deep Sleep Delay X seconds (maximum 4294) and let the ESP wake up after y number of Deep Sleep Delay Cycles.

If deep sleep delay is 3600 seconds and deep sleep delay cycle is 24 then the wake up would happen once every 24 hours?

Just a thought.

Default value for cycle is 1 for backwards compatibility.
hm... not sure about that.
The deep sleep timer is an internal ESP8266 thing.
For an additional variable you have to wake up the ESP and go back to deep sleep.
The more this variable has to be written to the flash to keep it.

Regards
Regards
Shardan

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Deep Sleep delay issue

#11 Post by Shardan » 05 Jun 2017, 18:03

yellowsky wrote: 04 Jun 2017, 13:14 Ok, thank you.
Maybe put this information in the wiki.

Do you know a way to use external device to achieve that?
I know some timer chips but they are programmable up to two hours.
A solution might be using a CD4060 but this is not really low power
and not very precise.

Maybe an idea:
I just took a look into one of my timer clocks.
It is made of two PCB's, the clock itself and power supply/relay board.
It should be possible to use the clock part only, it just has Vcc/Gnd/Out.
As it is just a standard LCD clock it should not take too much power
and can be set felxibly to any wanted time.

Regards
Shardan
Regards
Shardan

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: Deep Sleep delay issue

#12 Post by psy0rz » 05 Jun 2017, 18:54

grovkillen wrote: 05 Jun 2017, 16:47 Wouldn't it be possible if we had a dump variable that let you use Deep Sleep Delay X seconds (maximum 4294) and let the ESP wake up after y number of Deep Sleep Delay Cycles.

If deep sleep delay is 3600 seconds and deep sleep delay cycle is 24 then the wake up would happen once every 24 hours?

Just a thought.

Default value for cycle is 1 for backwards compatibility.
this would be possible via rtc memory. such a wakeup would also take very little time.


this can be a post 2.0.0 feature.

also you can just wakeup the esp manually by setting deepsleep to 0 and pulling RST to gnd to wake it up.
Please support ESPEasy development via Patreon or buy us a coffee.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Deep Sleep delay issue

#13 Post by grovkillen » 05 Jun 2017, 19:16

psy0rz wrote: 05 Jun 2017, 18:54
grovkillen wrote: 05 Jun 2017, 16:47 Wouldn't it be possible if we had a dump variable that let you use Deep Sleep Delay X seconds (maximum 4294) and let the ESP wake up after y number of Deep Sleep Delay Cycles.

If deep sleep delay is 3600 seconds and deep sleep delay cycle is 24 then the wake up would happen once every 24 hours?

Just a thought.

Default value for cycle is 1 for backwards compatibility.
this would be possible via rtc memory. such a wakeup would also take very little time.


this can be a post 2.0.0 feature.

also you can just wakeup the esp manually by setting deepsleep to 0 and pulling RST to gnd to wake it up.
Great news! Glad to have been of some kind of help. :)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

yellowsky
Normal user
Posts: 30
Joined: 10 Dec 2016, 20:09

Re: Deep Sleep delay issue

#14 Post by yellowsky » 05 Jun 2017, 20:14

Indeed, i found some information about rtc memory but to be honest i won't be able to program it.
How is it possible to ask this feature? Of course, it is dedicated for low power usage (to boot without wifi and check if the sleep is stillpending or not).

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: Deep Sleep delay issue

#15 Post by budman1758 » 06 Jun 2017, 03:41

No idea how to implement it but perhaps support for this module could help with long delay issues. A new plugin maybe?

http://www.ebay.com/itm/IIC-Precision-R ... 2078379042

Looks like it has a multitude of features.
"The glass is twice as big as it needs to be".

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Deep Sleep delay issue

#16 Post by LisaM » 06 Jun 2017, 11:56

budman1758 wrote: 06 Jun 2017, 03:41 No idea how to implement it but perhaps support for this module could help with long delay issues. A new plugin maybe?

http://www.ebay.com/itm/IIC-Precision-R ... 2078379042

Looks like it has a multitude of features.
Like i said before in this thread: use ultra deep sleep en connect the ds3231 SQW to the CH_PD pin according to the attached layout. Now you only need to program the ds3231 to activate the SQW pin: https://forum.arduino.cc/index.php?topic=139955.0
Attachments
PIR-ESP8266-Low-Power.png
PIR-ESP8266-Low-Power.png (4.79 KiB) Viewed 22545 times

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: Deep Sleep delay issue

#17 Post by psy0rz » 06 Jun 2017, 13:38

yellowsky wrote: 05 Jun 2017, 20:14 Indeed, i found some information about rtc memory but to be honest i won't be able to program it.
How is it possible to ask this feature? Of course, it is dedicated for low power usage (to boot without wifi and check if the sleep is stillpending or not).
Post an feature request on github for it.
Please support ESPEasy development via Patreon or buy us a coffee.

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: Deep Sleep delay issue

#18 Post by psy0rz » 06 Jun 2017, 13:40

grovkillen wrote: 05 Jun 2017, 19:16
psy0rz wrote: 05 Jun 2017, 18:54
grovkillen wrote: 05 Jun 2017, 16:47 Wouldn't it be possible if we had a dump variable that let you use Deep Sleep Delay X seconds (maximum 4294) and let the ESP wake up after y number of Deep Sleep Delay Cycles.

If deep sleep delay is 3600 seconds and deep sleep delay cycle is 24 then the wake up would happen once every 24 hours?

Just a thought.

Default value for cycle is 1 for backwards compatibility.
this would be possible via rtc memory. such a wakeup would also take very little time.


this can be a post 2.0.0 feature.

also you can just wakeup the esp manually by setting deepsleep to 0 and pulling RST to gnd to wake it up.
Great news! Glad to have been of some kind of help. :)
Yeah we could even make it easier for the user: Just let the user specify the actual sleep delay they want. If its longer than the max sleep time of the ESP, then wake up every ~4 hours until we can do the final sleep after which we do our task.
Please support ESPEasy development via Patreon or buy us a coffee.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Deep Sleep delay issue

#19 Post by grovkillen » 06 Jun 2017, 13:46

psy0rz wrote: 06 Jun 2017, 13:40
grovkillen wrote: 05 Jun 2017, 19:16
psy0rz wrote: 05 Jun 2017, 18:54

this would be possible via rtc memory. such a wakeup would also take very little time.


this can be a post 2.0.0 feature.

also you can just wakeup the esp manually by setting deepsleep to 0 and pulling RST to gnd to wake it up.
Great news! Glad to have been of some kind of help. :)
Yeah we could even make it easier for the user: Just let the user specify the actual sleep delay they want. If its longer than the max sleep time of the ESP, then wake up every ~4 hours until we can do the final sleep after which we do our task.
Yeah let's not confuse the users. Love simplicity and ESP Easy is getting closer to perfection with each commit! Good job all developers.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 126 guests