I have an ESP8266 Wemos D1 board with Pin D2 in a Pullup mode connected to a button that is connected to grd when it is pressed. The button is normally used while the ESP8266 board is active. But after the ESP8266 is inactive for a while I want to put the board into deepsleep with no timeout. Right before it is put it into deepsleep it should connect the RST pin to the button circuit so that the next time the button is pressed it will wake up the board. The first command of setup would then be to disconnect the button from the RST pin.
I have some Enhancement Mode MOSFETs(IRFZ44NPBF). It is normally open but I need more of a normally closed switch. But depletion mode MOSFETs need negative voltage. Is there a way to design a circuit with a few more resistors or other components to make the Enhancement mode MOSFET work as I need it to. Or is there a better component to be able to make the connection when the board is off but disconnect it when the board turns on. As I am just controlling gnd I don’t need something that is rated for high voltage obviously. Also, the board is running on battery so it would be best if it does not consume a lot of power especially during deepsleep mode.
Thanks for any input.