car built in 12v switch and led

I have an Arduino Uno and circuit that controls a car exhaust valve with an rf receiver. The Arduino is powered by a 5v USB charger and the circuit has a momentary switch & led that operate an rf transmitter. It is an independent solution.

What I would like to do is utilize the dash switch & led. Diagram is below; A2 (T31) is ground and A3 (T15) is 12V. I cannot isolate the switch as they are one circuit board with other switches. When switch A10 is closed 12v gets passed through. To illuminate led A11 ecu grounds it.

For the A10 switch I am planning on using a voltage divider to allow the Arduino to accept the signal.

What is the best way to ground the led?

I assuming I need to connect the ground A2 to the Arduino ground as well.

Any input would be apricated.

arandazz:
For the A10 switch I am planning on using a voltage divider to allow the Arduino to accept the signal.

Input02.png
Total protection. If however you need to increase the current through the button (for "contact wetting" and interference suppression) you may need to divide the resistor values by ten.

arandazz:
What is the best way to ground the led?

Any common general-purpose NPN transistor or logic-level N-FET rated for 200 mA or more and 24 V or more. A transistor will require a 1k series base resistor.

arandazz:
I assuming I need to connect the ground A2 to the Arduino ground as well.

You had better believe it! :grinning:

You need a 5 V "buck" converter to provide regulated 5 V for the Arduino and related electronics, rated for at east 24 V input to cope with possible surges.

Or you could use an opto isolator on the inputs .

Out of interest why not use the digital inputs ?

hammy:
Or you could use an opto isolator on the inputs .

Out of interest why not use the digital inputs ?

I was considering the opto isolator. I am open to your suggestion about the digital inputs. Please elaborate. Because the signal is 12v I cannot just connect it to the digital input, correct? I have basic knowledge on all of this.

I gave you the circuit in #1. It is perfectly adequate.

Hammy is confused by the circuit in your first post. :roll_eyes:

Yes Paul, you are right - the “A” mislead me. Doh.