Single Push Button Latch Circuit

Thread Starter

Kalindu Aragorn

Joined May 22, 2018
9
Hello guys,
Is there a way to build a circuit which only has 1 Push Button that will latch a relay when Pressed once, and disconnects when the SAME button is pressed again? (Without using microcontrollers)

Hope the question is clear :/

Thanks and Regards,
 

Thread Starter

Kalindu Aragorn

Joined May 22, 2018
9
A simple D F/F should do the trick
View attachment 154692
Hello absf. :/
I tried the circuit using real components. The switch i used is a standard Limit Switch.
But the switching doesn't happen as the simulation. It keeps switching back to HIGH when the button is pressed for a long time..
:/ Is this normal?

Is there a way to use a 555 timer to do the same thing?

Regards,
Aragoen
 

dl324

Joined Mar 30, 2015
18,220
I tried the circuit using real components. The switch i used is a standard Limit Switch.
But the switching doesn't happen as the simulation. It keeps switching back to HIGH when the button is pressed for a long time..
Probably switch bounce. Try adding a 1uF cap across the switch and increase the resistor value to 100k.
 

crutschow

Joined Mar 14, 2008
38,322
Yes, absf forgot the debounce circuit for the switch.

Below is a simple way to provide debounce with the FF without affecting the clock input risetime, which can also cause erratic results:
The RC delay in the D input feedback, prevents the FF from changing states more than once during the switch bounce time.
The PB is connected to V+.
upload_2018-6-20_1-6-17.png
 

matt_ssd

Joined Jan 19, 2019
1
Not to resurrect an old thread but... I did a quick search and found this post. I built absf's circuit exactly as shown on my breadboard and got it to work beautifully. My only issue is the true output is high when I power on the circuit.

Looking at the truth table if S and R are low (ground) and data and clock input are low then only the complement output should be high. The data input comes straight off the complement output but even so shouldn't a clock input (switch toggle) be required? Is my IC shorted?
 

crutschow

Joined Mar 14, 2008
38,322
My only issue is the true output is high when I power on the circuit.
The output that comes up high is random, and depends upon the particular IC you are using.
If you want the Q output to always come up low when power is applied, then connect a 100kΩ resistor from the Reset/Clr input to ground with a 10μF capacitor from V+ to the Reset/Clr input.
That will generate a positive pulse at the input when power is applied which will reset the Q output to the low state.

Note that absf's circuit is sensitive to mechanical switch bounce which can give erratic operation of the circuit.
Better to use the circuit in post #7 if you are triggering it from a mechanical switch.
 

eetech00

Joined Jun 8, 2013
4,704
Not to resurrect an old thread but... I did a quick search and found this post. I built absf's circuit exactly as shown on my breadboard and got it to work beautifully. My only issue is the true output is high when I power on the circuit.
Hi
That’s because in absfs circuit ,the clock input is pulled high. The D FF has an “leading edge” trigger at the clock pin.If you want Q to be low on power up, the clock should be pulled low, then “clocked” high to change state. It the clock pin is triggered by a mechanical contact, it should also include a debounce circuit.

The FF, however, really should be initialized to the desired state with a power on reset circuit to ensure its initially in the desired state. Otherwise, there is no guarantee Q will initially be low at power up.

eT
 
Top