Illuminated SPST Switch

arduinomatrix

I am building a HID device (for flight/space simulators) with an Arduino Micro that will have a 7 column and 4 row matrix plus 4 axes. I have the matrix working fine with normal buttons and switches but my design calls for 3 switches to have a LED on them to confirm that the switch is active (these have a red toggle guard on them).

I am using 3x 12VDC Toggle Switch with Safety Cover that I purchased from a RadioShack that was going out of business. These switches have 3 prongs on them labeled: Power, ACC, and Ground. If I wire the Power and ACC poles the matrix works fine but the LED does not illuminate. If I connect the ground pole to the ground on the Arduino, the entire row of switches becomes active while in the off state but behaves correctly in the on state.

I have only been working with DIY electronics for about a month now so my skills are rather limited but I have been trying to find an answer to this now for 4 days. Any assistance is appreciated.

Best Answer

I think that you are hooped. Although it is possible to drive a LED and read a switch at the same time when both are part of a matrix, it's not trivial to do so. Especially if the LED is intended to operate from 12 Vdc.

Is there any chance that you can open up the switches and bring the LED leads out separately from the switch? It might even be possible without taking the switch apart - some of the illuminated switches I've seen make the lamp connection right at the bottom of the switch.

You would then drive the LEDs separately from the switch.