Deep Sleep mode

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Deep Sleep mode

#1 Post by Deennoo » 09 Sep 2015, 08:52

Hello,

On my gaz counter project with Reed contact i'll need to power Esp8266 with solar panel and batterie.

First test was made yesterday with à 5v solar panel and 3 *1.5v battery.

Esp start yesterday at 9:30 am with a great sunny day (battery provide 3.6v) and dead this morning at 8

For thé moment sending message is set as default : 60 sec

During this 60 sec does esp enter to deep sleep mode ? What is the max time alowed ?

If not is there à way to made Esp sleep and wake up with an Int on GPIO ?

chrille
Normal user
Posts: 88
Joined: 26 Aug 2015, 15:11
Location: Horsens, Denmark

Re: Deep Sleep mode

#2 Post by chrille » 09 Sep 2015, 12:21

Deennoo wrote:During this 60 sec does esp enter to deep sleep mode ? What is the max time alowed ?
If not is there à way to made Esp sleep and wake up with an Int on GPIO ?
The ESP8266 supports deep sleep mode. It works by connecting GPIO 16 to Reset. When the module is deep sleeping the power consumption is very low (10 uA according to the specs). I have successfully run an ESP-01 with 1x DS18B20 and 1x AM2321 two months from 2x AA battery. The module deepsleeps for 5 minutes, then wakes up, submits data via MQTT and goes back to sleep. This works reliable down to 2.7V. Notice that some sensors (most noticeable the DHT-11/22, does not work below 3.3V)

I suggest you use a module that exposes GPIO 16, unless you have very good soldering skills. On the ESP-01 you need to run a wire directly from the GPIO16 pin on the chip to Reset.

For deepsleep to work with EasyESP the software needs to be changed.

I am not sure how your meter works. If you need to count all the time you can't put the module in deepsleep. It works only for solutions where you can poll a sensor when the module is awake.

- Jan
Jan Chrillesen, Denmark

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: Deep Sleep mode

#3 Post by Deennoo » 09 Sep 2015, 16:51

thx for your answer,

soldering GPIO 16 need solid iron and solid eyes...i don't have the last anymore.

SP1 his the one i bought 6 mounth ago and i never use them, now it's time, if a better one with GPIO 16 aviable is needed because EasyESP accept deep Sleep, i'll found one.

My counter is a pulse type one.

i'm waiting a 100uf capacitor to made serval test, actually i can just test battery with a 6000 secondes delay (1hours).

A way a got to check if sensor is still alive is to ping it twice/hour, but maybe this ping wake up device from is classic sleep mode and drain battery, i don't know this.

chrille
Normal user
Posts: 88
Joined: 26 Aug 2015, 15:11
Location: Horsens, Denmark

Re: Deep Sleep mode

#4 Post by chrille » 09 Sep 2015, 20:22

Deennoo wrote:soldering GPIO 16 need solid iron and solid eyes...i don't have the last anymore.

SP1 his the one i bought 6 mounth ago and i never use them, now it's time, if a better one with GPIO 16 aviable is needed because EasyESP accept deep Sleep, i'll found one
I recommend that you buy ESP-12 or ESP-12E for all new projects, since it exposes all usable GPIO pins and comes with 4 MB flash (really useful if you want to do OTA updates)

- Jan
Jan Chrillesen, Denmark

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: Deep Sleep mode

#5 Post by Deennoo » 10 Sep 2015, 22:35

Forget about pulse counter, i have found a way to get constant 3.3v

When you says "deep sleep need software change"

Did a code like this one can be use easly :

https://www.sparkfun.com/news/1842

This can be usefull for soil moisture sensor and ds18b20, solar powered (parrot flower power like) who need to send information twice a day.

Intégration of this on device, when ds18b20 or another 3.3v sensor is selected :
if deepsleep : 0 -> desactivate
If deepsleep : xxxx (time on msec) -> activate.

Martinus

Re: Deep Sleep mode

#6 Post by Martinus » 13 Sep 2015, 18:05

Deennoo wrote:If not is there à way to made Esp sleep and wake up with an Int on GPIO ?
It is now supported on R20. You have to connect GPIO-16 with RST (this is not specific to ESP Easy, it is designed that way)
Remember that deep_sleep means a total shutdown of the main MCU with exception of the RTC.
After enabling Sleep mode, you cannot access the webgui anymore because the system will wake, send data and go back to sleep before you can get a chance to access it.

To get back into the system config. Unplug the ESP from power and reconnect. Now you have 30 seconds to disable the sleep config setting and make your changes.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: Deep Sleep mode

#7 Post by Deennoo » 16 Sep 2015, 12:32

Ok thx, will try that.

I Just finish soldering gpio16 and resest on one of my sp1, not easy at all !

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: Deep Sleep mode

#8 Post by Deennoo » 16 Sep 2015, 13:11

just upload r20 on sp1.

Seen the sleep mode, i mark it, and i set time on Sensor delay ?, until i clik on submit that should be all ? easy as this ?

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: Deep Sleep mode

#9 Post by Deennoo » 29 Sep 2015, 13:11

Just recieve some ep12 today and start test with deep sleep solar powered running R20, sensor is a DHT22 runing on 3.3v

Solar system is a 3*1.2/600mah batterie come from a Solar PIR LED light, solar panel deliver 3.7v
outside.JPG
outside.JPG (44.62 KiB) Viewed 44875 times
inside.JPG
inside.JPG (39.29 KiB) Viewed 44875 times

System is uploading every 60 minutes with deepsleep enable on a Domoticz device, using Http.
deep sleep domoticz.JPG
deep sleep domoticz.JPG (18.26 KiB) Viewed 44875 times
previous test was made without deepsleep and with message every 60 sec, sensor run for 23h

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: Deep Sleep mode

#10 Post by Deennoo » 05 Oct 2015, 21:43

7 days my easyesp deep sleep dht22 run with r20.

Internal clock is not a swiss one, but job is done very well.
chart.jpeg
chart.jpeg (57.46 KiB) Viewed 44811 times
I can says it's works !

Thanks Martinus !

Next step, add luxsensor ans soilmoisture sensor to monitor my tomato.

MonkeyTown
Normal user
Posts: 25
Joined: 08 May 2016, 02:29

Re: Deep Sleep mode

#11 Post by MonkeyTown » 29 Jun 2016, 19:07

Hi guys.

Any idea why is my NodeMCU waking up and sending measurements every 5 min even though I have tried all sorts of different values in Sensor delay?

I am using R_78 stable, not modified in any way, NodeMcu with 12e and one DS18b20 sensor. I have no idea what could be causing this. It is rock solid 5 min ...

I know the limit is about an hour, I tried with 60, 600, 1500 sec and it reverts to 5 min after going into deep sleep and reports reliably (all day) in 5 min intervals. I have my GPIO16 (PIN0) connected to RST as per the wiki.

Any ideas? Thanks!

update: flashed the latest r_108 and changed the delay value on the DEVICES (task) page (not available in R_78). Still the same. Still Wakes up every 5 min!... I'm stuck ;)

Am I missing something??

UPDATE:

Solved.
Problem 1: By now I am using three ESPs in deepsleep and powering them all with Xiaomi 10000mAh power banks, all working fine. BUT... surprisingly I had to replace one of the powerbanks. It works perfectly and reliably on its own, but when used with ESP in deep sleep it acts different than the other ones. It works for the initial first set of data, then goes to sleep and never wakes up again. I don't know if the minimal current needed to keep the ESP snoozing is too little to keep the power bank in "standby" mode, or maybe the opposite. I can't disassemble the unit (still within warranty and not easily done without leaving marks) to see if the odd one maybe has a different version of the charging/control board.... so just using it to charge phones etc... as the others works fine.

Problem 2: Domoticz is plotting data in five minutes cycles ...only after exporting the actual values in CSV I could clearly see that the value only changes in accordance with my sleep time. So DS it's actually working, but Domoticz showed updates every 5 minutes, repeating the last received value until it changes upon the actual ESP waking up and updating it. Thus making me believe that ESP wakes up in five minute intervals instead of my pre-set ones. That bundled together with the weird Powerbank and I was cooked ;)

Sorry for the confusion...
Last edited by MonkeyTown on 22 Sep 2016, 03:00, edited 1 time in total.

jbaumann
Normal user
Posts: 16
Joined: 21 Mar 2016, 23:15

Re: Deep Sleep mode

#12 Post by jbaumann » 21 Sep 2016, 13:45

Hi,

as far as I can see (with r124 it seems to work), the sensor delay on the config page is used to determine the time that the device sleeps (see EspEasy.ino line 816)...

Cheers, Joachim

grz3
Normal user
Posts: 36
Joined: 21 Feb 2016, 21:47

Re: Deep Sleep mode

#13 Post by grz3 » 03 Oct 2016, 08:24

Hello All,

can i setup espeasy v133 in deepsleep mode + PIR senosr on any PIN (e.g GPIO12??)? I'd like to run this sensor on battery. When someone activate PIR, it will wakeup esp and send status to DOmoticz? Or is it not possible to do such a thing in deepsleep mode?

thank you.
grz

sm0k0
Normal user
Posts: 16
Joined: 24 Sep 2016, 10:41

Re: Deep Sleep mode

#14 Post by sm0k0 » 03 Oct 2016, 22:02

Hi all,

fighting with DeepSleep on an Wemos D1 and EysEsp R120. I tried now already 5 devices, 3 WeMos and 2 NodeMCU without suceess. Even the cabeling is correct and sensor delay is set properly the Boards will not wake up after gone to sleep. I validated that with a different Firmware and a appropriate LUA script where everything is working fine but with EasyEsp it stays at sleep. looks like D0 (GPIO16) is not gonna pulled up at all. Pulling reset by wire is working ....

Any suggestions?

many thanks in advance & best regards
Heiko

UPDATE :
got that sorted tonight : for R108 & R120 the DeepSleep interval is NOT set at the device Tab but at the Config Tab in "Sensor Delay" ;)

DeNB3rt
Normal user
Posts: 120
Joined: 15 Dec 2015, 14:07

Re: Deep Sleep mode

#15 Post by DeNB3rt » 22 Nov 2016, 15:49

Hi, I don't have experience with the deep sleep mode on the ESP,

so my question,
can I build a wireless battery powered door ringer by putting the device in deep sleep?
Activating it by the door ringer (push button?).

I guess door ringer connected to RST?
when booting up, send whatever signal and go back to deepsleep?
Located in Belgium, Bruges. Working on a full DIY domoticz setup with ESPEasy.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Deep Sleep mode

#16 Post by papperone » 22 Nov 2016, 17:45

DeNB3rt wrote:Hi, I don't have experience with the deep sleep mode on the ESP,

so my question,
can I build a wireless battery powered door ringer by putting the device in deep sleep?
Activating it by the door ringer (push button?).

I guess door ringer connected to RST?
when booting up, send whatever signal and go back to deepsleep?
technical answer is: YES
real-life answer: NOT with ESPEasy as the time it takes to boot is too long in my opinion for this usage; you coudl do it with your own firmware/sketch but you are still potentially exposed to delay in the WiFi connection setup at boot; if you can accept that when someone push the button the ringbeel can ring after some/few/many seconds then of course it's fine :)
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

DeNB3rt
Normal user
Posts: 120
Joined: 15 Dec 2015, 14:07

Re: Deep Sleep mode

#17 Post by DeNB3rt » 22 Nov 2016, 20:26

papperone wrote:
DeNB3rt wrote:Hi, I don't have experience with the deep sleep mode on the ESP,

so my question,
can I build a wireless battery powered door ringer by putting the device in deep sleep?
Activating it by the door ringer (push button?).

I guess door ringer connected to RST?
when booting up, send whatever signal and go back to deepsleep?
technical answer is: YES
real-life answer: NOT with ESPEasy as the time it takes to boot is too long in my opinion for this usage; you coudl do it with your own firmware/sketch but you are still potentially exposed to delay in the WiFi connection setup at boot; if you can accept that when someone push the button the ringbeel can ring after some/few/many seconds then of course it's fine :)
haha, they need to have patience when they ring on my door ;)
I can give it a try, I place it on my todo list :D
Located in Belgium, Bruges. Working on a full DIY domoticz setup with ESPEasy.

Jewcookie
New user
Posts: 1
Joined: 30 Dec 2016, 12:30

Re: Deep Sleep mode

#18 Post by Jewcookie » 12 Jul 2017, 20:37

Just fiddling around with deep sleep and I feel very stupid, but i am unable to locate where to define the Sleep Delay setting... Can somebody help?

Floxskit
New user
Posts: 4
Joined: 12 Oct 2017, 11:05

Re: Deep Sleep mode

#19 Post by Floxskit » 12 Oct 2017, 11:51

Hello,

I have a ESP8266 with a DHT22 and a batttery 600mA and the battery hold 2 days...
i have connected D0 to RST and put the deep sleep ON with 60 sec of delay.
i don't now what is the problem because the consumption is assumed to be 20µA

Help me please !

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Deep Sleep mode

#20 Post by vader » 12 Oct 2017, 12:04

Jewcookie wrote: 12 Jul 2017, 20:37 Just fiddling around with deep sleep and I feel very stupid, but i am unable to locate where to define the Sleep Delay setting... Can somebody help?
It's on the Config page direct over the "Submit" button. ;)

And this is useful to know...
https://www.letscontrolit.com/wiki/index.php/SleepMode

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Deep Sleep mode

#21 Post by vader » 12 Oct 2017, 12:19

Floxskit wrote: 12 Oct 2017, 11:51 Hello,

I have a ESP8266 with a DHT22 and a batttery 600mA and the battery hold 2 days...
i have connected D0 to RST and put the deep sleep ON with 60 sec of delay.
i don't now what is the problem because the consumption is assumed to be 20µA

Help me please !
Try Sleep enabled:YES, Sleep Delay: 0, Sleep on connection failure: YES
Why 60 sec delay? After wake-up it send all data and go to sleep mode again. No delay needed!

Floxskit
New user
Posts: 4
Joined: 12 Oct 2017, 11:05

Re: Deep Sleep mode

#22 Post by Floxskit » 12 Oct 2017, 14:16

I doesn't have "sleep delay" but sensor delay, what is the difference ?

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Deep Sleep mode

#23 Post by vader » 12 Oct 2017, 22:09

Floxskit wrote: 12 Oct 2017, 14:16 I doesn't have "sleep delay" but sensor delay, what is the difference ?
See my post #20. Device delay is for how often the sensor send values. So, switches are normally set to 0, sensors delay depends on how often you want updates of the values. So check out the Wiki for more detailed informations.

Floxskit
New user
Posts: 4
Joined: 12 Oct 2017, 11:05

Re: Deep Sleep mode

#24 Post by Floxskit » 13 Oct 2017, 09:55

I do not understand how to set the frequency of values...
The DHT22 doesn't send value automaticly ? you need to wake up the ESP for take the value ?

But i think i have find the real problem, it's my board "NodeMCU" that consume too much.

Have you ever had this problem ?

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Deep Sleep mode

#25 Post by vader » 13 Oct 2017, 14:50

Floxskit wrote: 13 Oct 2017, 09:55 I do not understand how to set the frequency of values...
The DHT22 doesn't send value automaticly ? you need to wake up the ESP for take the value ?

But i think i have find the real problem, it's my board "NodeMCU" that consume too much.

Have you ever had this problem ?
I assume ESPeasy makes a request to the sensor over SDA line. I'm using Sonoff boards with internal power supply. And they never go to sleep mode, because consumption is < 0.5W in use! That makes me not richer and not poorer. :lol:
Last edited by vader on 13 Oct 2017, 21:30, edited 1 time in total.

Floxskit
New user
Posts: 4
Joined: 12 Oct 2017, 11:05

Re: Deep Sleep mode

#26 Post by Floxskit » 13 Oct 2017, 15:52

OK thank you !

Me i'm using a solar panel and a lipo charger, so the consumption is very importante !!!

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Deep Sleep mode

#27 Post by vader » 13 Oct 2017, 21:34

Floxskit wrote: 13 Oct 2017, 15:52 OK thank you !

Me i'm using a solar panel and a lipo charger, so the consumption is very importante !!!
I have one ESP-12F in use with a normal 9V battery. It runs for 6-7 weeks now. It sends only 1-2 times a day the state of a switch. So, the sleep mode seems to work....

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 88 guests