Doesn't wake up after DeepSleep

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
craicfinder
New user
Posts: 6
Joined: 04 Oct 2019, 23:49

Doesn't wake up after DeepSleep

#1 Post by craicfinder » 07 Oct 2019, 01:09

Hi ESP friends,

I am working with a ultrasonic sensor ('detector' device in code) to check when an object is close to it.
I got a NodeMCU v3 (ESP 8266 12-E) and flashed into it. GPIO16 (D0) is connected to RST

Set the wifi settings, MQTT... and the code, like this:

Code: Select all

On detector#Distance>0.0 do
Publish,home/front/mailbox,1
deepsleep,300
endon

On detector#Distance=0.0 do
Publish,home/front/mailbox,0
deepsleep,300
endon
It seems to work fine until deepsleep. It goes to deep sleep but never wakes up.
What am I doing wrong? Can anybody see the solution?

I hope you guys can give me a hand on this before I drive completely crazy.

Regards

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

Re: Doesn't wake up after DeepSleep

#2 Post by TD-er » 07 Oct 2019, 01:13

What other pins are connected?
If GPIO-0 or GPIO-2 are pulled down or GPIO-15 is pulled up, it will not boot into normal mode, but in flash mode.

craicfinder
New user
Posts: 6
Joined: 04 Oct 2019, 23:49

Re: Doesn't wake up after DeepSleep

#3 Post by craicfinder » 07 Oct 2019, 01:19

First of all, thanks for replying TD-er.

I have a proximity (ultrasonic) sensor (RCW-1601) connected like this:
Trigger to GPIO-12(D6) -> Set as Output High
Echo to GPIO-13(D7) -> Set as Input

The rest of pins are set as by default.

Without DeepSleep it works great, giving measures every second.

Do you think it is booting in flash mode with this configuration? How can I solve it?

craicfinder
New user
Posts: 6
Joined: 04 Oct 2019, 23:49

Re: Doesn't wake up after DeepSleep

#4 Post by craicfinder » 07 Oct 2019, 01:22

Forgot to say, I flashed ESP_Easy_mega-20190928_normal_core_241_ESP8266_4M1M.bin to my ESP.

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

Re: Doesn't wake up after DeepSleep

#5 Post by TD-er » 07 Oct 2019, 09:02

Does the (blue?) LED flash when the sleep time is over?
If so, then it is no software issue, but something with the board itself or your connection between GPIO16 and the reset.

I know some boards have issues waking up from deep sleep, which is then mainly caused by the shape or length of the wake pulse.
For example the ESP-12S is known to give a pulse which is not long enough. Don't know about the NodeMCU v3.
You may want to test on a board with has nothing else connected, just to make sure it does work on those boards.

craicfinder
New user
Posts: 6
Joined: 04 Oct 2019, 23:49

Re: Doesn't wake up after DeepSleep

#6 Post by craicfinder » 09 Oct 2019, 14:46

I did a few tests with several nodeMCUs I purchased in different dates and... it doesn't work in some of them. Sound like a batch of them are faulty.
Definitely it is a hardware problem.

Thabks a lot for your message, it put me in the way to the solution.

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests