I am in the process of doing some wiring on my car. Part of this is adding in a switch panel in. For this I have 4 LED Missile Toggle switch's. At the moment I use one for some additional lights, this is wired as standard with 12v in, ground and then out to the lights. However, One of the switches I want to add is for the ECU to change maps. This is done via that particular pin being grounded. I know I get continuity between the positive and the accessory terminals on the switch so can use that to activate or deactivate the ground. Is there a way though that I can get the LED to light up as well ? I presume I can't just wire 12v into what would normally be the ground as this would send 12v to the ecu ( not a fun game) Is my thinking on this correct?
Figure 1. R2 and Q1 form a logic inverter.
How it works:
- The switch is unmodified.
- R2 and Q1 form an inverter. When SW1 is off, Q1 is off and the EMU input will be high (assuming it has a pull-up resistor).
- When SW1 is on R2 provides current for Q1's base and Q1 turns on pulling EMU input low.
One of the nice things about this is that it will work on a 5 V input or a 12 V input with no modifications.
If you're using mechanical switches anyway, you can use a DPST (double pole single throw) switch. It's just a single device that contains 2 separate switches that switch at the same time. Wire one set of contacts in series with the LEDs, the other between your ECU and ground. Debouncing may be necessary for the ECU, although I'm not sure of that part. Because the two built in switches are fully separate from each other, it's fine to wire one on the line side and the other on the ground rail.
Assuming its a switch like this with this pinout, you are correct that you could not directly wire it and retain the led function.
You could use a cheap relay, a few bucks at any auto parts store or junkyard.
Switch the switches' + and Headlight connections if you want the led to always be on instead of only on when the relay is on, and the ecu's pin is grounded.