So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Zod
#62021 I am building an ESP8266 based mailbox sensor, loosely following the post found here. The concept idea is to have the MCU in deep sleep forever until it is reset by the reed switch. Then the MCU wakes up, connects to the Internet and sends a message.

Based on my previous ESP8266-01 experience I have:
  1. VCC and CH_PD pulled up with 4k6 or 10k resistors
  2. GPIO0 and GPIO2 pulled up with 4k6 or 10k resistors
  3. tact buttons in order to be able to flash the mcu with the same board
  4. GPIO16 connected to RST in order to wakeup from deep sleep.

I realized that it is impossible to wake from ESP.deepSleep(0) using the magnetic reed switch, except if I disconnect GPIO16 from RST. I suppose that the GPIO LOW is not low enough to reset the mcu, because RST is pulled up to VCC. Correct?

Of course after disconnecting GPIO16 from RST, it is not possible any more to wake up from a predefined period deep sleep (in case that this is needed), e.g. ESP.deepSleep(1000).

So I am wondering... Is it necessary for ESP8266-07 (or 12) to connect GPIO16 to RST (like we do for esp-01) in order to be able to use the deep sleep function for a predefined time period? Are they already connected?

SOLUTION: The solution to this issue is just to add a diode between GPIO16 and RST. See updated circuit below and the related posts:
  1. schematic
  2. Discussion
You do not have the required permissions to view the files attached to this post.
Last edited by Zod on Mon Apr 02, 2018 12:09 pm, edited 2 times in total.
User avatar
By Zod
#62394 By the way, adding a 470 Ohm resistor between GPIO16 and RST doesn't do the trick. In detail:

  1. 100k resistor: reset with reed switch OK - wake up after predefined time FAIL
  2. 10k resistor: reset with reed switch OK - wake up after predefined time FAIL
  3. 4k6 resistor: reset with reed switch OK - wake up after predefined time RESETS but doesn't load code again
  4. 2k2 resistor: reset with reed switch OK - wake up after predefined time RESETS but doesn't load code again
  5. 470 resistor: reset with reed switch FAIL - wake up after predefined time OK

Any ideas?
User avatar
By RichardS
#62455 resistor???? diode maybe :-)

RichardS
You do not have the required permissions to view the files attached to this post.
User avatar
By jeffas
#62461 On my ESP-07, I initially connected GPIO16 direct to RST and found it to work fine, both wake on timer and wake on reset. But I read elsewhere that it's advisable to use a resistor there, or reset won't work (some cards, and some firmware versions); so I put in a 1K resistor. Still working fine.
I emailed the card vendor about this, and he said "if I get another batch of boards made in the future, I'll connect the two" (meaning GPIO16 and RST). So I don't know whether such a connection is optional in the ESP-07.
As my resistor value lies in between the one where your wake-up worked and the one where your reset worked, maybe yours will also be OK with the 1K as mine does.
(I'll be impressed with myself if I picked the perfect value - I am not an electronics guy!)