Electronic – Press and hold the reset button to reset AVR!

avrreset

I connected a tactile switch to the AVR reset button according to the circuit below. every time I press the button the AVR resets itself but my question is: Is there a way to make this button acts after let's say 3 seconds? I mean press the button and hold it for 3 seconds and then the AVR resets itself. (some kind of resistor-capacitor circuitry)

enter image description here

Best Answer

The circuit here will activate the AVR reset about 3 seconds after the switch is pressed. The AVR will stay in reset as long as the held pressed over the 3 seconds and will then come out of reset about 0.75 seconds after the switch is released.

(Edit: Replaced schematic with one showing LM393 comparator).

enter image description here

In this schematic the V1 voltage source is there to provide a voltage controlled action of the S1 switch. Obviously in your case the S1 is simply a switch that you press with your finger.

The 3 second delay can be tweaked to get it as close to 3 seconds as you want by adjusting the R4 value.

The comparator shown for U1 is a device with a push-pull output so it would not need the R2 pullup resistor. If you choose some other 5V compatible comparator it may have an open drain output so would require the R2 resistor.