Wake esp8266 from deep sleep whenever a reed switch state has changed


I am working on a project with a reed switch that reads if the door is open and closed.

I have the code running correctly, but tge esp8266 will be running on a 9v battery and I want to minimise the power consumption as much as possible.

I found out aboit deep sleep, and I know that I can wake the esp8266 with the RST.

Here’s the catch.

The reed switch may be 0 or 1 but the rst pin must be pulled to low momentarily.
So how can I make it so if the reed state is changed it will send a pulse of low then HIGH?

I hope you understand my problem, or if there are some alternative approaches would be good.

I had a similar requirement and chose to use an ESP32 so that I could wake from deep sleep by pulling a GPIO HIGH or LOW.

I don’t believe that’s possible with an ESP8266.


Take a look at the TPL5110. I used it with an ESP8266 & Blynk for a temperature sensor triggered by a push button switch. Ran the whole thing from 3 AAA batteries (in series) producing 4.5v. Batteries lasted a few months - for better performance go with AA or C type batteries.

1 Like