Back to basics connection

hi everyone. I am very new to arduino boards and wiring so please excuse my lack of knowledge..

I am after some advice.
I have a SPST rocker switch that has a built in LED rated at 12V.

The back of the switch has 3 connectors.
1= gnd 2 = live and 3 = load which powers the LED i believe.
I am wondering rather than having an external 12V supply can I power the LED from the 5v rail on the arduino board.

My thoughts are to connect the 5v from the arduino to the LED then jump from the LED to the live on the switch, futher connecting that power out to a signal point on the arduino and connect gnd to gnd on the board.
would this work?
I am using it on a flight sim to actuate a panel switch.

added drawing to the above. it's a bit sketchy.

thanks in advance

Kevin

Kevin, your questions have nothing to do with installation and troubleshooting, so I have moved your topic to a more appropriate forum section. Please take care where you post your questions in future.

The led in your switch will probably work in a 5V circuit but may be disappointingly dim, because the resistor in series with it inside the switch will have a value chosen assuming a 12V supply.

Can you draw a picture of what you propose .
You could just try only powering g with 5v - the led may still be bright enough .

sorry about that Paul. Will do in future

hi hammy thanks for your reply have added a little sketch to original post.

Kevin

I suspect the link from "live" to "load" you are proposing will prevent the switch from working.

Connect ground to Arduino ground, live to 5V and load to an Arduino input pin. Also attach a 10K from the Arduino input pin to ground. If I'm right, you should then see the led light when the switch is closed and be able to read the switch with the input pin.

You forgot to say what type of arduino you are using. Most forum members will assume an Uno if you don't mention it. But for 3.3V Arduino, connecting 5V to an input pin could damage it.

am using a leonardo at this stage .

Ok, Leonardo is 5V so no problem connecting 5V to is input pins. Also good choice for flight sim projects, because it can emulate a keyboard or joystick. Pro Micro would have been a better choice for practical reasons (smaller and easier to build into breadboard prototypes and to solder into completed projects).

thanks for the reply Paul. so much to.learn.....just one more dumb question in response to your comments.
you stated "Also attach a 10K from the Arduino input pin to ground"
I assume you are saying put 10K ohm resistor in series to the gnd. ?

A 10K resistor from the input pin to ground, yes. But it's not in series with anything, it's just a pull-down. Without it, when the switch is open (off), the input pin might float and not reliably read LOW. On the other hand, the led & resistor inside the the switch might have the same effect, making the 10K unnecessary, if I'm right about how the switch works internally.

thanks again Paul.. am away for 5 days in sunny Spain tomorrow so will get back onto it when I get back and let you know how it went.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.