Push on, push off LED activation


#1

I’m adding LEDs to one of my sticks (not in the buttons) and I have been thinking of ways of turning them on and off without a rocker switch (like pressing/holding 2 punches or something).
The easiest way I have found to do this would be to use/make an SR NOR latch.

Not being an electrical engineer, I don’t really have much experience with circuits and there is probably a much simpler way to do something like this. Any suggestions would be appreciated.


#2

There are push button switches that “latch” or lock into position instead of being momentary or better described as push to click one to turn on again to turn off

This page has some example but there are others
http://www.frozencpu.com/cat/l3/g52/c343/s894/list/p1/Switches-16mm_Bulgin_Style_Switches-16mm_Latching_Bulgin_Switches-Page1.html


#3

Thanks for the reply. I guess I was looking for a way to do it so I wouldn’t have to add any extra buttons or switches, otherwise I would just use a rocker switch.


#4

I could probably show you an idea or two for a method of doing it, but I have to ask… which button combo would you use to turn it on? It would have to be something that you wouldn’t accidentally do during the course of a match, I would assume, and I can imagine a lot of situations where two punches would be pressed at once <_<… So yeah, which buttons does your stick actually have? And which don’t you use often, or ever? Maybe something like Select + PP?


#5

Use something like a Sparky Jr. board and set it so that pressing a button combination turns on the LEDs. If you need a builder, get in touch with spenzalii, he usually puts out baller shit with LEDs.


#6

Just remember that the signal lines on a common ground pcb are high when not pressed, low when pressed. Using an SR flip flop like that, not so much a good idea because things can get wonky when both are high at the same time, which would anytime you werent pressing the buttons :slight_smile:

Frankly, if I were doing it, I’d be using a single microcontroller chip, just because it’d be low number of components and close to the same cost, with way more possibilities. But that’s me. If you want to do it with just logic gates, that’s doable to.

You can do ‘press toggles on and off’ pretty easily, using whats called a T flip flop (T for ‘Toggle’). But, no one makes T flip flop chips. You’d have to use a JK or a D flip flop, tie the inputs high, and connect the button’s signal line to the Clock input for that gate. Connect the output Q gate to a resistor, and the other end of that resistor to the positive leg of the LED and the other leg to Ground and you’re good to go.

I’d probably start with (number of buttons/2) of these chips:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-4342-5-ND
Connect your power to VCC, both NOT_CLR’s, both NOT_PRE. Connect your ground to GND. Connect the signal line for button 1 to 1CLK, the first LED positive leg to 1Q, the signal line for button 2 to 2CLK, and the second LED positive leg to 2Q. connect 1D to 1NOT_Q, and 2D to 2NOT_Q, viola on/off toggle on press.

EDIT: PLEASE NOTE there was an error in the original wiring description. The D’s should go to the same gates `Q lines, and NOT to VCC like I had originally described. My apologies for any confusion.


#7

Edit : Disregard anything I have ever said in my life and just listen to Toodles.


#8

Awesome advice, thanks Toodles:). I don’t know what I would have done without it.


#9

I’d be a little concerned using just a flipflop with nothing to debouce the switch, but I guess for just turning LEDs on or off it doesn’t matter much.