Page 1 of 1

How to wake from deep sleep

Posted: 13 Apr 2019, 20:03
by Beliar_666
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

Re: How to wake from deep sleep

Posted: 14 Apr 2019, 22:24
by kimot
When postman put something to your box you must generate short ground pulse on reset pin to boot your ESP.

Re: How to wake from deep sleep

Posted: 24 Apr 2019, 14:14
by kumaxx
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.

Re: How to wake from deep sleep

Posted: 23 May 2020, 13:53
by MadeInFck
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.

Re: How to wake from deep sleep

Posted: 23 May 2020, 14:07
by TD-er
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

Re: How to wake from deep sleep

Posted: 23 May 2020, 15:20
by MadeInFck
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 5621 times

Re: How to wake from deep sleep

Posted: 27 May 2020, 09:06
by dynamicdave
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.

Re: How to wake from deep sleep

Posted: 27 May 2020, 23:09
by MadeInFck
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.