btidey wrote:EN must be kept high 3.3V all the time the ESP8266 is running. As soon as it goes low the ESP8266 will instantly stop.
So if you are pushing the switch and releasing it then that is not going to work. The ESP8266 will start up but will stop as soon as you release the switch.
EN must be kept high long enough for the ESP8266 to complete its actions and then go into deep sleep.
You can simulate this by keeping the switch pressed fo rthe several seconds needed for this, but the real solution, as I mentioned, is to use a GPIO to hold the EN high as soon as the software starts via a schottky diode until the software completes its actions.
Thanks again! I haven't tried that setup yet, but what I can tell is that I even tried having the button closed, so giving the pin multiple seconds of 3V3 and it still doesn't wake up :/
Is it maybe my board? I just started off developing with ESP8266 with some boards from Banggood. The board has an ESP-12F module. I can't help myself why it is not working... So I'm really, really thankful for all the help here! I will revisit the EN pin solution with another set of board fro another vendor, maybe it is just the board...
However, I came up with a much simpler solution (I think ), which is very similar to what I had before, where the ESP is awake all the time and just waits that GPIO4 is pulled to LOW / to GND.
I came across this after reading some guides about deep sleep on the web, where they always connect D0 and RST for timed deep sleep, because D0 goes low when the timer runs out and then resets the ESP to wake it up, like this one: https://randomnerdtutorials.com/esp8266 ... duino-ide/
Same page actually then lists what I came up with while reading: I can just use what I have right now with an NPN tranistor and the 5V door signal connecting to the base! Which will then pull the RST LOW / to GND.
However, he was doing it slightly different, also connecting a 3V3 from the ESP to the circuit, which didn't really understand yet.
While this works PERFECTLY on my breadboard, it does not on the phone / doorbell itself. It takes like 5-8 seconds for the ESP to actually wake up and I also figured out why, but need to find a solution for it:
Turns out, the 5V signal is present for a few seconds if somebody rings the doorbell, which would be great for the EN solution, if it would work, but not for this solution it seems. So the ESP wakes up when the 5V drop again... I can also simulate the same behavior on the breadboard. If I longpress, nothing happens, but when i open the switch again, the ESP wakes up.
I again admit, I have not yet fully understood why this happens. But I will try to read up a bit... I'm thinking if a diode would help here (similar to what you described in another post), like drawn in v4 diagram attached. I haven't tested it yet though.
EDIT: The diode solution doesn't work
Attached again my iterations of the this transistor version:
* v1: Working perfectly, but with the ESP being awake all the time. That's what I'm having/using right now.
* v2: Modified version of v1, trying to wake up the ESP out of deep sleep by (trying) to pull the RST pin low
* v3: Modified version of v2, copied from the linked tutorial, where he connects the 3v3 to it.
v2 and v3 have the issue, that the ESP wakes up when the voltage goes away, not when it rises / somebody rings the doorbell.
Thanks for listening to my noob stories