I'm building a battery powered device based on
ESP8266. There are few buttons (lets say 4 at the moment). After pushing any of them ESP should perform some action and go to deep sleep mode. Next press of any of these buttons should wake ESP up so it can perform another action and go to deep sleep mode again.
So what I need is to put
RST line to low for a while (about 100us) on any button press but keep proper
GPIO low as long as button is pressed.
I came with the following idea:
Unfortunately it doesn't work very well. There are two issues: one is that it's not reliable - for unknown reason voltage on
RST drops low enough only when I press SW1, it used to work for other switches too but it stopped after some time (oscilloscope shows that it drops to about 2.0V). The other issue is that there is a voltage spike on
RST line when I release the button - it goes to about
6.6V because capacitor is discharging. Maybe these spikes damaged other (electrolytic) capacitors because I tested my software mostly using SW1?
Do you have a better idea how to reset
ESP with multiple buttons and still be able to detect which one it was? I'd like to avoid anything which draws power when not used or would take much PCB space (it's very limited).