3
\$\begingroup\$

I use a ESP-12E, where all the pins are broken out and nothing is connected on the board itself.

Online I found different ways to connect the pins GPIO16 and RST (RESET) to allow automatic wake-up from deep sleep:

I also found someone using CH_PD ("EN") pin instead of RST, but I see it's not the preferred way.

What are the differences between the two alternatives I listed?

\$\endgroup\$

3 Answers 3

4
\$\begingroup\$

Most of the people face the problem while connecting them. The issue is that GPIO16 provides a strong HIGH during deepSleep and your external reset from Serial-TTL is fighting to make a reset, but loosing, the GPIO16 is the strongest. To avoid such issue, simply replace the wire by a 470R or 1K between GPIO16 and RES, which will allow the Serial-TTL to win. (you can also use a schottky diode with the cathode on GPIO16 side)

\$\endgroup\$
6
\$\begingroup\$

The answer from A. Roy solved a similar problem for me. I'm prototyping a a circuit using a Nodemcu devkit board https://github.com/nodemcu/nodemcu-devkit-v1.0 with an ESP-12E. The board has an internal pullup resistor between RST and 3.3v, and reset button that shorts RST to GND.

My problem was that when direct connecting GPIO16 (WAKE) to RST for wake-after-sleep, or for a program controlled hard-reset, the RESET button on the board no longer functions.

My code programs GPIO16 as a HIGH OUTPUT and this voltage prevents the RST signal from going LOW -- and also direct shorts GPIO16's +3.3v to ground when the button is pressed. (not a nice thing to do to the circuit)

I solved the problem by connecting a 1N5819 Schottky diode between the RST and GPIO16, with the cathode towards GPIO16. This prevents the GPIO16 conventional current from flowing to ground when the hardware button is pressed, but allows the GPIO16 to effectively ground the RST pin when set as a LOW output.

\$\endgroup\$
1
  • \$\begingroup\$ It's silly that this single diode has not been built into the product by now. \$\endgroup\$
    – EdHayes3
    Sep 23, 2021 at 22:57
2
\$\begingroup\$

I'm using and ESP-01 with CH/PD tied to Vcc with a 10K resistor. That keeps the ESP running in deep sleep. To wake it up connect the CH/PD to ground through your switch. My switch is a reed switch and this method also seems to debounce the reed switch.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.