I have a simple 5 second Monostable 555 Timer circuit. Trigger Pin (#2) is connected to a momentary push switch. When it is pressed, the timer is started and LED stays on for 5 seconds.
What I want is that if the tactile switch is released during those 5 seconds, the timer should reset. I know, I need to ground PIN # 4 but how to do that when the switch is released?
-
1\$\begingroup\$ What do you mean by "switch is let-go"? The switch keeps being pressed for the whole time? \$\endgroup\$dim– dim2017年01月31日 20:49:22 +00:00Commented Jan 31, 2017 at 20:49
-
2\$\begingroup\$ Can you post a schematic? \$\endgroup\$Vince Patron– Vince Patron2017年01月31日 21:00:10 +00:00Commented Jan 31, 2017 at 21:00
-
1\$\begingroup\$ You want the LED to light for 5 seconds maximum when the button is pressed and to turn off when the button is released? \$\endgroup\$RoyC– RoyC2017年01月31日 21:08:14 +00:00Commented Jan 31, 2017 at 21:08
-
\$\begingroup\$ @dim - I've re-phrased the question (correctly, I hope) to remove the awkward/ambiguous "let-go" to "released", so I think the question is at least understandable now. If the OP disagrees with my interpretation, then my edit can be rolled back. However I agree with your comment - as originally written, the question was a bit ambiguous. \$\endgroup\$SamGibson– SamGibson ♦2017年01月31日 21:10:39 +00:00Commented Jan 31, 2017 at 21:10
-
\$\begingroup\$ Yes @dim the switch will be kept pressed the whole time \$\endgroup\$Kashif– Kashif2017年01月31日 21:15:09 +00:00Commented Jan 31, 2017 at 21:15
1 Answer 1
Connect the switch to the reset input of the 555, and connect the trigger through a small RC delay:
schematic
simulate this circuit – Schematic created using CircuitLab
The 555 is held in reset as long as the switch isn't pushed. When the switch is held in, the 555 goes through its normal timing cycle once, but it aborts if the switch is released early.
-
1\$\begingroup\$ This is good solution except the Reset input on an NE555 needs to be pulled below 1V and may source up to 400uA, so a 10K pull-down is too high. Swap the values of R2 and R4 and it should work. \$\endgroup\$Bruce Abbott– Bruce Abbott2017年02月01日 00:25:36 +00:00Commented Feb 1, 2017 at 0:25
-
\$\begingroup\$ @BruceAbbott: OK, fixed. \$\endgroup\$Dave Tweed– Dave Tweed2017年02月01日 03:17:44 +00:00Commented Feb 1, 2017 at 3:17