I've got a typical monostable 555 circuit, with a long pulse, set up pretty much exactly like this: However, I want to be able to use this circuit in a way that the trigger switch can also shut off the output immediately, before the pulse would normally end, and preferably using the same button for initiating the pulse as well as ending it. I know that it's possible to use a 555 to make a toggle button, is it also possible to easily combine these functionalities?
This also has a retrigger wait time equal to the One shot time but cuts the time short with the switch. It also has 10ms debounce filtering.
- R2C2 = 10ms debounce time filter shown
- Adjust T=1/(R3)C1 [s] for time constant while pressed (e.g. 10 s shown)
- R2C1= retriggerable wait time to avoid repeat triggers (e.g 10s shown)
user must define all 3 values
One sneaky solution using an ADG419 2-1 analog mux (also called a SPDT analog switch by some) to route the button press to the correct pin (TRIGGER or RESET) on the 555 is depicted below:
This works as follows: when the 555 output is in its normal LOW state, the ADG419 connects D to S1 as its control (IN) terminal is driven by the 555's output, connecting SW1 to the 555's TRIG terminal. When SW1 is pushed, the 555 monostable is triggered and drives its output HIGH, causing the ADG419 to connect D to S2, which connects SW1 to the RESET pin on the 555 instead. Pushing the button again pulls the 555's RESET pin low, which causes the 555's output to get pulled low, switching the ADG419 back to connecting SW1 to TRIGGER and starting the process over again. The same logic holds if the 555 times out -- its output again goes low, causing the ADG419 to connect SW1 to TRIGGER.
(The original DG419 is available as well, and somewhat cheaper, if you can't get your paws on an ADG419.)