Type of button switch

Xerox

Member
This probably seems like a terribly stupid question, but what's a general term I can use to find non-momentary push button switches? I want a button similar in form factor to a tact button but that holds its state and toggles between the two when clicked and released, either by actually holding the button down (think like a pen clicker) or otherwise.

I've seen tutorials about wiring up a tact to a programmed micro controller or to a series of circuit gates, but I'm sure a piece of hardware exists that would make this easier; I just don't know what terms to search.

Why I'd like to know: I want to use a ps2 type clicking joystick to toggle between two states. Most click joystick modules I've seen just have a little tab that sticks out and pushes down a tact when depressed. So if I could replace the momentary tact with a memory saving push switch, I could accomplish what I'm looking for.
 
I'm not familiar with any specific toggle buttons that meet your requirements, but I would imagine wiring a tact switch to a toggle flip-flop would be easy enough.
 
That's something I'd considered, but thought it would be easier said than done. Can't find much on it. Do you care to elaborate on how this could be accomplished or if there's a tutorial around where someone's done it?
 
Xerox said:
That's something I'd considered, but thought it would be easier said than done. Can't find much on it. Do you care to elaborate on how this could be accomplished or if there's a tutorial around where someone's done it?
Just a little base knowledge: A flip-flop is a storage component that changes state only at a "clock edge". Now by that, I mean that one of the inputs to a flip-flop is labeled as a clock input, meaning usually it would be used in a synchronous circuit. Due to the nature of the feedback loop of a flip-flop, they only change at the rising edge of this input (change from logical 0 to logical 1), or in the case of some flip-flops, the falling edge. Since what you are intending to do is asynchronous, though (buttons can be pressed and released whenever), you won't be hooking up the clock input to any real clock. Instead, you'll wire it in to the output of your switch, which will also go to the T input of the flip-flop (in the case of a Toggle Flip-Flop), so that the T input and clock input are both '1' when you press the button, thus toggling the output, Q, of the flipflop (note that there may also be a Q' which is the exact opposite value of Q; feel free to ignore it if you so please, or use it instead of Q depending on the initial value you want to output).

If you have a J-K flip-flop instead of a T flip-flop, it's quite easy to turn it into a T flip-flop. Simply hook both the J and K inputs together and now it's a T flip-flop. If you have a D Flip-flop, then you'd use an XOR gate that has the switch's output for one input, and the D Flip-flop's Q out as it's other input. You'd then send the output of the XOR gate to the D input of the D flip-flop.
 
Yes, that is correct. Is that more of a correct term for them?

Searching for "push button toggle switch" gets me lots of larger buttons for use in cars and such, but nothing that appears to be for small electronic use.

To the others, thank you for the flip-flop suggestions. I've been looking into it.
 
Back
Top