Working on external interrupt (wake-up) with WeMos D1
Posted: Thu Jun 15, 2017 6:43 am
Hi folks,
I'm working on a WeMos D1 board, it sends an update every 5 minutes (over Wifi) and then goes into DeepSleep for 5 mins.
In order to have it restarting after a deep-sleep i have to put a (470 Ohm) resistor between GPIO16 (D0) and RST pins, otherwise it won't restart.
Now, what i want to do is to initiate a wake-up/restart when a door opens, but only when it's in deep-sleep. In this state, GPIO16 (D0) is high (around 3.1V measured). To forse a restart, this should be pulled low shortly by grounding it.
I've found a solution to do this, some guy already had a similar issue and shared his schematic for that.
I'm using a reed-contact (magnetic, closed when the door is closed), so i started setting up the scheme as a test, but i'm not getting this to work somehow. First of all, since i couldn't get my hands on a 1uF/16V, i've used a 1uF/50V capacitor. My guess now is that this won't work because it doesn't load at this low voltage? Anyway, since my (required!) R5 resistor is there between GPIO16 and RST, the other R4 resistor might need some change?
I've tested: shorting the capacitor, removing R5 resistor, when i break the contact, the board restarts as soon as i close the contact again. But, it won't wake up after 5 minutes without the R5 resistor in place.
I'm kinda lost since i'm not that kind of an electrician to determine what is wrong here. Perhaps someone here is?
Here's my schematic:
I'm working on a WeMos D1 board, it sends an update every 5 minutes (over Wifi) and then goes into DeepSleep for 5 mins.
In order to have it restarting after a deep-sleep i have to put a (470 Ohm) resistor between GPIO16 (D0) and RST pins, otherwise it won't restart.
Now, what i want to do is to initiate a wake-up/restart when a door opens, but only when it's in deep-sleep. In this state, GPIO16 (D0) is high (around 3.1V measured). To forse a restart, this should be pulled low shortly by grounding it.
I've found a solution to do this, some guy already had a similar issue and shared his schematic for that.
I'm using a reed-contact (magnetic, closed when the door is closed), so i started setting up the scheme as a test, but i'm not getting this to work somehow. First of all, since i couldn't get my hands on a 1uF/16V, i've used a 1uF/50V capacitor. My guess now is that this won't work because it doesn't load at this low voltage? Anyway, since my (required!) R5 resistor is there between GPIO16 and RST, the other R4 resistor might need some change?
I've tested: shorting the capacitor, removing R5 resistor, when i break the contact, the board restarts as soon as i close the contact again. But, it won't wake up after 5 minutes without the R5 resistor in place.
I'm kinda lost since i'm not that kind of an electrician to determine what is wrong here. Perhaps someone here is?
Here's my schematic: