-->
Page 1 of 2

How does deep sleep work?

PostPosted: Sat Sep 12, 2015 3:34 am
by PaulRB
Hello all, I've been experimenting with deep sleep on esp01. Putting the chip into deep sleep for 1 minute (60,000,000us) causes the current drawn by the esp01 to drop to around 350uA. I assume much of that is the red led rather than the chip. After 60s, the current drawn increases to around 16mA. So the sleep time has ended, but my sketch does not restart. I had read that this would be the case, and so I intend to connected the ch_pd pin to an output of an attiny84 which will be programmed to wake the esp after the required delay (that won't be the attiny's only function, it will monitor sensors while the esp sleeps).

My question is; what is going on once the deep sleep time is over and the current increases? Why can the sketch not restart automatically?

I know that on esp modules with more pins, connecting a particular gpio pin to ch_pd causes the restart. But why this clumsy mechanism that uses up 2 pins? Why does the esp not simply have this connection made internally?

Thanks

Paul

Re: How does deep sleep work?

PostPosted: Sat Sep 12, 2015 6:13 am
by schufti
to wake up from deepsleep the gpio16 has to be connected to rst.
AFAIK there is no other way to wake from deepsleep.
The trick with PD is only possible if you need even less power consumption in deepsleep and have an external wakeup source ...

Re: How does deep sleep work?

PostPosted: Sat Sep 12, 2015 7:38 am
by Barnabybear
Hi Paul, with the ESP8266-01 the only way I can see is to get your soldering iron and microscope out.

Image
Photo from http://hsto.org/files/73d/4a4/855/73d4a ... a8fcc3.jpg (well done to whoever labled this up).
Not an easy job by the looks of things, on the plus side at least the pins are at the ends of the IC.
Edit:
It might be easier to find a different way to get power to CH_PD (possably cut the track and bridge to the 3.3V side of the cap), then bridge whats left of the track to XPD_DCDC. That gives you the XPD_DCDC & EXT_RSTB next to each other on the headder.

Re: How does deep sleep work?

PostPosted: Sat Sep 12, 2015 9:33 am
by PaulRB
Thanks BB & Martin. I guess the answer is "nobody knows why they designed it like that" but I suppose the original purpose of the ESP01 was to fulfil the role of a "dumb" serial to Wifi adaptor. If they could have foreseen what we are doing with them they may have designed it differently.