I am working on a project where I use an esp8266 and a reed switch sensor (NO), this is powered by a battery so I need a low power circuit that can turn on the esp8266 when the state of the reed switch is changing.
I have been looking at monostable multivibrator (One-shot monostable) circuits and soft latching power circuits, but I haven't found any that fulfills my requirements.
I have also read through some other peoples questions about something very similar, but there is some information missing and other things that causes me to ask again.
Ref1: Circuit to turn microcontroller on when reed switch state changes (to monitor door lock state)
The answer here states that one should use another low-powered MCU to check the state. This is a good solution since there are many low-powered MCU's available, but this causes more complexity to the circuit and the process of programming the extra MCU. (The esp8266 is "easy" to program, but a PIC or ATTINY needs extra programmers and software)
It is ok to pass current through the reed-switch as long as it is a small current.
I want this to be as simple as possible so I can share it with the DIY community.
Ref2: I need a switch that not only detects open/close, but also sends a pulse to wake up an ESP8266 whenever the (debounced) state changes
This answer gives a "simple" way to solve this problem, and with a discrete circuit. The only problem is that when the reed-switch is in closed state it draws to much power. Also it should been controlling a mosfet instead of the esp8266 directly. (Since the esp8266 draws a bit power during deep-sleep)
This is the circuit I have made out of the answer from Russell McMahon.
So my question(s) is:
- What can be done with the schematic so it uses less than ~20uA during a idle state? (If possible even lower)
- How could a mosfet or transistor be implemented so I don't have to worry about using deep-sleep on the esp8266? (So the mosfet will power another circuit with a LDO so I can use more of the battery)
- Maybe there is a IC or MCU that can be used without any extra programming? If so, witch might be used?
- Is there another solution that would be better fitted for my problem that I haven't encountered?
(The last two questions are not meant as a discussion, just to show that I am open to other solutions)
Another thing that is important is that the activation time after a state change should not be more than 500ms. How long the signal will be on after activation depends on the solution.
Let me know if something is unclear or not making sense.