Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By jarnoldbrown
#67869 I am hoping to have a single push putton that is capable of waking the ESP8266 from deep sleep, but is also able to operate as a user input(GPIOn). My plan is to deep sleep with an argument of 0, which understand is effectively for ever, and use the schematic attached. As soon as the ESP boots up I will set GPIO16 as a low output. The reason for the capacitor is that I would like to be able to check the button 20mS or so after start up, so that I can go back to sleep in the event of an "accidental" button press. Please shoot this scheme down in flames...
You do not have the required permissions to view the files attached to this post.
User avatar
By jarnoldbrown
#67885 I'm looking for low component count here. And since the plan is to run the device from a phone "power pack", I'm happy to live with 10 or 20 uA of deep sleep current.
I've used "proper" FET based latching power supplies before, but they are no cheaper, from an IO point of view. Thanks for replying, anyway, but I was really after feedback on why the circuit wouldn't work rather than why the concept is bad. But in the absence of any such feedback, I guess I'll just prototype it and test the thing. Just thought somebody might have done something similar.
User avatar
By btidey
#67901 I think your scheme would work OK. The code starts running shortly after the switch is closed.

An alternative (which I haven't tried) is to use a purely resistive scheme.
ResetSwitch_schem.png


In deep sleep GPIO16 is off and -RST is high. If switch is closed, and released then code starts running which sets GPIO16 high (output before mode). This holds reset high irrespective of switch which may then be sensed. Deep sleep sets GPIO16 off ready for next cycle.

Behaviour is different as user presses and releases button for operation to start. I don't know whether that is important for you.
You do not have the required permissions to view the files attached to this post.