-->
Page 1 of 8

Hangs when coming out of Deep Sleep mode

PostPosted: Fri Sep 25, 2015 9:59 pm
by TheWho
Let me give you a background.

I'm using adafruits' esp8266 HUZZAH board connected to a temp / humidity sensor (DHTxx).

My esp8266 is sending temp / humidity data to thingspeak. It connects to WiFi, sends data and then goes into a deep sleep.

The issues is that the ESP8266 will hang.

Normally when it's in a deep sleep the red LED will be dim. However, when it hangs, it is usually coming out of deep sleep it turns bright red.

What has me stumped is that I've tried multiple power supplies and cannot detect a pattern. Nor have I found a resolution.

It works 90% of the time. However, occasionally it fails and faults into this mode. I need a higher degree of reliability.

Any ideas on how to resolve?

Thanks!

Re: Hangs when coming out of Deep Sleep mode

PostPosted: Sun Sep 27, 2015 9:22 am
by kenn
random thoughts
- Put serial out debug statements in your code to try to see where it hangs when starting up.
- add delays in firmware to make the wakeup more gradual, with tests and retries
- what GPIOs are being used? Is your DHT using a GPIO that could affect boot?
- is it a DHT11? they require some longer delays than the better DHT22
- I don't know the huzzah, does it have the connection from GPIO16 to RST for the wakeup reset?

Re: Hangs when coming out of Deep Sleep mode

PostPosted: Mon Sep 28, 2015 11:14 pm
by TheWho
kenn wrote:random thoughts
- Put serial out debug statements in your code to try to see where it hangs when starting up.
- add delays in firmware to make the wakeup more gradual, with tests and retries
- what GPIOs are being used? Is your DHT using a GPIO that could affect boot?
- is it a DHT11? they require some longer delays than the better DHT22
- I don't know the huzzah, does it have the connection from GPIO16 to RST for the wakeup reset?


I don't have any serial debugs on startup. I'll try that.
I'm using Aruduino IDE with c code. I have a delay on wakeup after the deep_sleep code line. I'll put another at the beginning of the code. How would the code look with tries / retries? delay( 10000 ) or more. What's the bootup cycle?
The GPIOs being used is 16->RST. DHT uses 5. I don't believe 5 affects boot.
Have the same setup and using both a DHT11 and a DHT22.
Yes. It does. I breadboarded it and connected 16 to RST.

Re: Hangs when coming out of Deep Sleep mode

PostPosted: Tue Sep 29, 2015 3:39 am
by Barnabybear
Hi, as Ken says you are proberably best debuging this but if all else fails have a look at this post. It's a bit of a workround, I'm never saw a post to confirm if the cause was ever found.