Button box with a 12v rocker switch LED

I am planning to make my own button box for sim racing/sim trucking. I currently have an Arduino Leonardo and been playing around with it, I can get a normal toggle switch and rocker switch to work.

I want to now use a rocker switch with LEDs, do I need anything extra for the LED to work with the Arduino? Does it require to run resistors or a relay?

Thanks.

Yes. Make the resistor allow 5 - 10 mA.

There are online LED resistor calculators.

There are variations. Some lighted switches have a built-in resistor for 12V use in a car, etc. And often (but not always) the light is separate from the switch. But with a double-pole switch one pole can be used for the built-in light so the light/LED can work from 5 or 12V and the other part of the switch can be used for something else (like a speaker, or whatever).

So I can just run an inline resistor for the LED wire only correct?

I’ve seen that but I would need to find out my power supply and voltage drop then also the led current

My plan is to just use standard automotive switches made for 12v for cars. Yes the switches I'm looking at I’m pretty sure the led wiring is separate from the rest of the switch.

If I can buy a 3-9V switch which is claimed to by 5V would I still need a resistor for the led?

The switch I am looking at I noticed they got a 5V option also.

Sorry, I didn't notice these are built-in LEDs; in that case, no resistor is needed, just connect to 12V.

All good, so the Arduino Leonardo will be okay with a 12v switch with built in 12v LEDs no resistors?

Not sure what switch I am going for 100% but one has a light on all the time then another light once switch is turned on - or I might go with a switch that has a LED on all the time doesn’t matter if its off or not.

I have that type of switch; it's all self-contained.

Oh sweet as that’s good to know!

Do you have a photo of your type of switch you use? Is it just your standard automotive rocker switch with the blue LEDs?

No, just a switch with a built-in light.

You could cut the guesswork and speculation down by posting a link to the datasheet for the exact switch you have in mind.

a7

Wasn’t sure if I am aloud to post links!!!

So this is one of the switches I want to use (btw all from China)

Metal Push Button Switch LED

And also was thinking these ones:

12V Marine Grade Rocker switch

The metal push button has a 5V option, the other seems to be 12V only

So if I use the 5v ones I’ll be fine to run the LEDs with no problems.

What would I need for the 12v ones?

A 12V supply but it's not clear how to wire the switch with 12V for the LED and 5V for the switch contacts.

Ahhh so my only option is to get 5v switches because I wont be able to get a 12v supply.

@strayaa
Then yes.