Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Momentary button, Led indicator question

Status
Not open for further replies.

minimustangs

New Member
Using spst momentary NO switches for a game controller mod. Switches will trigger a keyboard keypress. Toggle off to on, on to off.

Is it possible.... easily... to have the NO switch complete the keyboard circuit AND toggle a relay to drive an Led to show the on/off state that pressing the spst switch controls?

Trying to have a visual representation (led) of the "on" state as set by the first keypress. And have the 2nd spst press cancel the led indicator.

Would need a dozen of these circuits so simplicity and low part count is important.

I know I can buy a ready made usb interface which will support rotary encoders (a 2nd project ), but can I accomplish my original idea with a small number of components?
Thanks
 
You can simply toggle a LED on the leading edge of each switch with a D FF and reset by some other means.
 
A D FF used in toggle mode or divide by 2 uses the rising clock to toggle the output with Qbar feedback to D input. Can you sketch inputs and outputs with voltages and how they are paired or connected with Voltages.
 
1) put the led on control side of relay, not switching side, ensure to provide enough power!
2) use a latching relay if you want set and clear buttons,
3) transistors are smaller but trickier to use and more components too, plus you would need FF

which controller are you hacking , and what kind of mods, just long presses?
4) a micro controller could do all this and more, then that would be it for parts, extra parts would mostly only include the buttons and leds interface ... programming would be required, a bit to learn at first but code would be relatively simple and easily upgrade-able as you go along.
 
Is the switch you are using alternate-action (press-on, press-off)? An alternate-action switch has a mechanical latching mechanism built in. Press once and release, and the contacts close and stay closed; press again and release, and the contacts open and stay open. If this is the case, then you probably don't need a latch circuit to go with it. The problem becomes one of how to get double-duty out of a single pole by adding a buffer/LED driver that doesn't mess up the signal going to the controller. This could be tricky, especially if the keyboard switch is multiplexed.

If the switch is a true momentary switch, then the game controller is latching and unlatching something based on the momentary signal. A circuit can be added to create a second latch that drives an LED, but as mentioned above there will need to be a way to synchronize the two latches.

A photo/manufacturer/part number of the switch would help.

ak
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top