How to wake from deep sleep

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Message
Author
Beliar_666
Normal user
Posts: 2
Joined: 11 Apr 2019, 00:08

How to wake from deep sleep

#1 Post by Beliar_666 » 13 Apr 2019, 20:03

Hello,
my next problem: Iuse a Nodemcu with a connected Microswitch to Send a mqttstate to my Iobroker. The Node is powered by one 18650 Cell so it should go to deepsleep and wake up when the postman inserts something in my Postbox. So it has to wake up when the Lid is opened and then send the change of the switch via mqtt.

I´m totally stuck on this. If its not configured to go to sleep everything works fine, but if sleep is activated the Nodemcu wont wake up.

The Mikroswitch is connected to Ground and D6. Mo other connections are wired

kimot
Normal user
Posts: 171
Joined: 12 Oct 2017, 20:46

Re: How to wake from deep sleep

#2 Post by kimot » 14 Apr 2019, 22:24

When postman put something to your box you must generate short ground pulse on reset pin to boot your ESP.

kumaxx
Normal user
Posts: 3
Joined: 22 Apr 2019, 18:44

Re: How to wake from deep sleep

#3 Post by kumaxx » 24 Apr 2019, 14:14

On all forums write about scheme (in attach).

Connect to "Interrupt Signal" to your sensor. I myself want to check on the sensor leakage of water.
Attachments
Deep Sleep wakeup.png
Deep Sleep wakeup.png (18.14 KiB) Viewed 886 times

MadeInFck
Normal user
Posts: 9
Joined: 05 Apr 2020, 20:53
Location: France
Contact:

Re: How to wake from deep sleep

#4 Post by MadeInFck » 23 May 2020, 13:53

Hello, I'm having the same type of issue to wake up a Wemos with a PIR to detect movement.
Did you figure it ou?
Here's the sketch I try to use.
Attachments
PIR_sketch.png
PIR_sketch.png (128.97 KiB) Viewed 96 times
Last edited by MadeInFck on 23 May 2020, 15:26, edited 1 time in total.
MadeInFck
Hobbyist in DIY & Coding
madeinfck.com

TD-er
Core team member
Posts: 2631
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to wake from deep sleep

#5 Post by TD-er » 23 May 2020, 14:07

Why are you pulling the RST up to 5V?
Why not to 3.3V?

That's probably not the problem you're facing, but at least it is incorrect to pull it up to 5V.

Also the GND of the sensor is connected to +5V

MadeInFck
Normal user
Posts: 9
Joined: 05 Apr 2020, 20:53
Location: France
Contact:

Re: How to wake from deep sleep

#6 Post by MadeInFck » 23 May 2020, 15:20

Indeed it could have been from 3.3v pin but with the 10k resistor, signal is 3.3V so no worry there.
Actually here's an update of the sketch to be more accurate.
PIR_sketch.png
PIR_sketch.png (128.97 KiB) Viewed 99 times
MadeInFck
Hobbyist in DIY & Coding
madeinfck.com

User avatar
dynamicdave
Normal user
Posts: 214
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: How to wake from deep sleep

#7 Post by dynamicdave » 27 May 2020, 09:06

Just a quick observation... in the original circuit there was a diode between RST and D0.
This has disappeared in the recent schematics - is it important?
No too sure as to the function of the diode, perhaps someone could explain.

MadeInFck
Normal user
Posts: 9
Joined: 05 Apr 2020, 20:53
Location: France
Contact:

Re: How to wake from deep sleep

#8 Post by MadeInFck » 27 May 2020, 23:09

Actually figured out that D0 and RST don't need to be linked, only essential for periodic wake up but not for external wake up. Just changed the capacitor to 10uF to have a 10ms low signal on RST pin instead of 1ms with a 1uF capacitor. Works fine since.
MadeInFck
Hobbyist in DIY & Coding
madeinfck.com

Post Reply

Who is online

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