Chat freely about anything...

User avatar
By GeorgeIoak
#19620 I'm not disputing whether your modules work or not, I'm just trying to explain the pin functions and what they do and how they work. There are many different ways to make things work, some are good ways and some are not as good. Reading the Sparkfun page you referenced you find this:

To use the Thing’s sleep capability, you’ll need to wire the XPD pin up to the ESP8266’s reset line. RST isn’t broken out, but the DTR pin will work for our application as well.

Watch out! The ESP8266 can't be programmed while the XPD pin is connected to DTR. Make sure you disconnect the two pins before trying to upload a sketch.
After you tell the ESP8266 to sleep, it’ll wait a specified number of microseconds, then trigger the XPD pin to toggle the reset line. When the ESP8266 wakes up, it’ll begin back at the start of the sketch.


In the ESP*266 Hardware Manual you can find the following statement:

When the device is working under the power-saving mode, i.e., deep sleep mode, GPIO16 should be connected to EXT_RSTB (here refers to J77) so that the device can be waked up. Besides, the EXT_RSTB can also be connected to the GPIOs of an external MCU so as to wake up the device.


Your circuit works because the series capacitor will induce a pulse but if the voltage doesn't change no current will flow. If you directly connect GPIO16 to the rest line than the ESP8266 will be able to come out of sleep because it issues a low signal on GPIO16 and if it is connected to the reset pin of the ESP8266 it will cause a reset to occur.

There is so much false or misleading information (or incomplete) information on the internet that is almost impossible to not get confused. My viewpoint is to question everything and understand why things work or don't work rather than just copying something because it does work.

I apologize for saying that
"Deep Sleep ONLY works if GPIO16 is connected to the reset pin"
Although true that's a bit misleading.

Put it this way, you have capacitors in your circuit and one side is connected to the power rail and the other side is connected to ground. If a DC signal could pass through the capacitor you would have a short and things would blow up. So if you have a capacitor between GPIO16 and the RESET pin you will only be able to make short pulses and whether those pulses are long enough to do what you want will depend on the capacitor value and the rate of change of the signal coming out of GPIO16. Since you have a RC circuit on the rest line this pulse has to be long enough to change that circuit as well as be long enough to induce a reset to the ESP8266.

My purpose to post on this forum is to try and help when I can with the knowledge that I have. I don't know everything, far from it, but I do try to only post facts rather than assumptions. Hopefully my ramblings help some people better understand what they are doing and why they are doing it.
User avatar
By cal
#19624 Moin,

any reference to that sparfun schematics?

Don't power the module at 4,76 V.
Use a good 3,3 V supply. Most usb uarts don't provide enough current.
No cap needed, for my esp 01 i used this hack for deep sleep

http://tim.jagenberg.info/2015/01/18/low-power-esp8266/
Newer esp modules break out the pins.

Depending where you put cap it may help to stabilize and some use a cap to allow automatic programming
by using BREAK signal instead of DTR if your usb uart adapter does not provide DTR.

Cal
User avatar
By twaymouth
#19625 I can also confirm that short wires and a good well filtered 3.3v supply is essential for stability and reliable functioning of the deep sleep function. I have both an ESP-01 and ESP-07 that reliably deep sleep with gpio 16 connected to RST.