ESP-01 Deep Sleep Settings

Moderators: BertB, rtenklooster, Voyager, Stuntteam, Martinus

Post Reply
Message
Author
trevorjdaniel
Normal user
Posts: 8
Joined: 22 Apr 2018, 11:28

ESP-01 Deep Sleep Settings

#1 Post by trevorjdaniel » 22 Apr 2018, 16:10

Hi,

I have built my first project, a weather station, and I want to convert it to battery power.

It's based on an ESP-01 and uses a BME280 and a BH1750. I have everything working just fine. All the data i need is being sent back to my MQTT server.

I have followed the instructions on this page to enable deep-sleep:

http://www.instructables.com/id/Enable- ... SP8266-01/

I am confused on how to configure the deep-sleep functionality as the Wiki instructions don't reflect what I am seeing in ESP-Easy.

I am tempted to just make some "guesses" at the right configuration but scared it might never wake up! :D

What I am aiming to do is for it to wake up every minute, check the sensor readings, and send the data to my MQTT server.

On the main config screen shown below I am unsure what to set the "Sleep awake time" to? I am guessing that this means how long it stays awake before going back to sleep. But, how do i know how long it takes to read the sensors? I don't want to set this value too low as it might switch off before the sensors are read and the data sent to the MQTT server.

Config.PNG
Config.PNG (9.48 KiB) Viewed 545 times
Then, on the 2 device pages, there is a setting called "Interval" - I think, if I am reading the Wiki correctly this is ignored when deep-sleep is enabled?

Config.PNG
Config.PNG (9.48 KiB) Viewed 545 times

And then, to add to my confusion, on the device page for the BH1750 device page there is an additional setting called "Send sensor to sleep"...

Config.PNG
Config.PNG (9.48 KiB) Viewed 545 times
Is anybody able to clarify what I need to do to get my ESP to go into deep-sleep, waking every 60 seconds, reading the 2 sensors, send the data to my MQTT server and go back to sleep please?
Attachments
send to sleep.PNG
send to sleep.PNG (3.36 KiB) Viewed 544 times
data aquisition bme280.PNG
data aquisition bme280.PNG (3.82 KiB) Viewed 544 times

bobbybeans
Normal user
Posts: 114
Joined: 26 Feb 2017, 17:30

Re: ESP-01 Deep Sleep Settings

#2 Post by bobbybeans » 25 Apr 2018, 18:13

I am not 100% sure by this but the way i interpreted the sleep awake time was. On first boot it is awake for X amount of seconds. Say i wanted to flash or upgrade it, I would reset it then for X seconds it will be up which would allow me enough time to open up the webpage and then turn off deep sleep. Then allow me to do w/e else I want before I put it into deep sleep again. That is my interpretation though, which may or may not be correct

trevorjdaniel
Normal user
Posts: 8
Joined: 22 Apr 2018, 11:28

Re: ESP-01 Deep Sleep Settings

#3 Post by trevorjdaniel » 30 Apr 2018, 15:50

Thanks for the reply.

What is confusing me is what to set the values to on the devices and controller...

Ideally, what I want is for it to sleep for 120 seconds, wake up, read the devices, post the value to my MQTT server and go back to sleep.

At the moment I have the devices set to 60 seconds. Which, while it is not yet configured for deep-sleep, means it sends readings every 60 seconds.

When i configure the system for deep-sleep are these values ignored? Do i need to set them to zero so they act immediately?

If anyone has any ideas it would be greatly appreciated!

Trev

User avatar
grovkillen
Normal user
Posts: 1408
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ESP-01 Deep Sleep Settings

#4 Post by grovkillen » 30 Apr 2018, 17:27

All devices send right away, the setting is referring to the time BETWEEN broadcasts.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
:idea: Sponsor ESP Easy :idea:

trevorjdaniel
Normal user
Posts: 8
Joined: 22 Apr 2018, 11:28

Re: ESP-01 Deep Sleep Settings

#5 Post by trevorjdaniel » 01 May 2018, 09:30

Well, I took the dive.

I changed the settings so it sleeps for 300 seconds and is awake for 30.

And now it won't wake up :(

The red light is constantly on but the blue light never flickers, which it normally does when booting up.

I left the device delays at 60 seconds.

What have i done wrong? Any ideas?

Trev

trevorjdaniel
Normal user
Posts: 8
Joined: 22 Apr 2018, 11:28

Re: ESP-01 Deep Sleep Settings

#6 Post by trevorjdaniel » 01 May 2018, 17:22

Is it possible that i have to change one of the "GPIO Boot States" to make sure it wakes back up?

They are all set to "Default" at the moment.

Trev

osoon
Normal user
Posts: 10
Joined: 22 Mar 2018, 21:07

Re: ESP-01 Deep Sleep Settings

#7 Post by osoon » 17 May 2018, 02:46

i have same issue with wemos: it won't wake up. ive set sleep to 70 sec, wemos blinks led ONCE after 70 sec, sending no data over mqtt and after that nothing. no blinks, no data - nothing.
have no clue what to do or what to try.... any help?

cyberclwn
Normal user
Posts: 18
Joined: 25 Aug 2017, 21:19

Re: ESP-01 Deep Sleep Settings

#8 Post by cyberclwn » 17 May 2018, 15:32

osoon wrote:
17 May 2018, 02:46
i have same issue with wemos: it won't wake up. ive set sleep to 70 sec, wemos blinks led ONCE after 70 sec, sending no data over mqtt and after that nothing. no blinks, no data - nothing.
have no clue what to do or what to try.... any help?
Hi,

What are your settings in the "Sleep Mode" part of the "Config"tab ?
Can you add a screenshot maybe?

Some more information is needed to help in a good way.

Post Reply

Who is online

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