Electronic – Push button with auto off

buttontimertransistors

How to make push button switch with auto off after about 5 seconds.
Output circuit is high (active) for max 5 seconds when I keep pressing push button.
Output will be low after this time or when I release push button.
To reactivate, I have to release push button and press again.
I think that it's using a capacitor charging with some transistors. But how to make it work?

Best Answer

This is the basic idea (functional), but it may need to be tuned like R5/C2 time constant, switching spikes on transistors (add little capacity to slow it), width of trigger pulse, etc...

Edit: You get better result with R3,R8=1k , and C2= 68uF (almost exact 5sec)

enter image description here

enter image description here

(green is button press, blue is output voltage)