My first electronics project in over a decade involves a Raspberry Pi 3 and two illuminated buttons. I want to understand what resistor I need for the LEDs, if any.

The illuminated buttons have three pins which I believe are:

  1. +12 V
  2. Signal
  3. 0 V

Configured this way, the LED is permanently lit. If I switch pins 1 and 2, the LED lights when the button is pressed, but I don't know how this affects the signal. Could I simply switch them?

The LEDs are rated for 14V and a continuous 10A. The salesman convinced me that a Raspberry Pi would be fine with these specs. I have confirmed with a power supply that 3.3V is sufficient to light the LED.

Given the LED has such a high tolerance compared to what a Raspberry Pi can supply, do I need a resistor, and if so, how do I determine which one and which pin do I attach it to?

EDIT: The project is to create a Big Red Button™ that when pressed, activates Find My iPhone, Play Sound on my wife's phone. It's a daily necessity. Ideally I'd like full control over the LED to use it for feedback, but if that's a risk to the Raspberry Pi I'll settle for lit when pressed.

  • 3
    \$\begingroup\$ I could not download a datasheet for that switch. I recommend you contact the supplier and ask for a datasheet. Without a datasheet we are reduced to guessing. Guessing: the LEDs have built in resistors because that's how these things work. Otherwise they are too awkward to use, and would have been supplanted in the market by something easier to use, which is a switch which is easy to use because the LED works without further components. BTW it is unlikely the LEDs are rated for 10A, it is the switch which is rated at 10A. \$\endgroup\$
    – gbulmer
    Jul 7, 2016 at 13:04
  • \$\begingroup\$ What is the project? The switches work without a Raspberry-Pi. You can buy switches which are illuminated when they are conducting, and 'dark' when not. They don't need a Raspberry-Pi. I think you could make this switch illuminate when it is conducting without anything as complex or costly as an R-Pi 3. So what are you trying to do? The existing question makes very little sense. Please read the help center to learn how to ask good questions. \$\endgroup\$
    – gbulmer
    Jul 7, 2016 at 13:10
  • \$\begingroup\$ I don't know why people are downvoting you, you're asking a valid question... now, despite what that salesman told you, a raspberry pi will NEVER supply 140 watts of electricity, much less, at 14 Volts. you'll need a switch and an external supply. \$\endgroup\$
    – user86234
    Jul 7, 2016 at 14:27
  • 3
    \$\begingroup\$ The LED is NOT rated for 14 volts and 10 amps. That is the switch contact. \$\endgroup\$ Jul 7, 2016 at 15:54
  • \$\begingroup\$ Thanks for clarifying the ampage relates to the switch. I did think that was an odd measurement for the LED. \$\endgroup\$ Jul 7, 2016 at 22:43

2 Answers 2


Typical automotive switch. You already know the light could be always on, or only on when the switch gets pressed. If you switch the power and accessory pin, the light will change.


simulate this circuit – Schematic created using CircuitLab

The one on the left always has the light on. The one on the right only turns on the light when the switch is "On".

But what you want is to control the led from an Output, and the Button as an input. It's still simple. Kinda.


simulate this circuit

The one on the left is simpler. Connected to the 3.3V pin. Input without pull-up resistor enable, active high/1 for button pressed. Output High/1 for LED off, Low/0 for LED on. You must change the output for 16mA or less, and the light should only pull under 16mA, because that's the max for the RPI.

The one on the right is better. The RPI 3.3V rail is limited, and if the light is a lamp it may pull too much for the 3.3V rail OR for the GPIO (Use a ammeter/multimeter to measure it's current), or if it is an LED may be dim at 3.3V. This way you use the 5V rail for a brighter light, and a transistor to switch the light with normal High/1 for On, Low/0 for Off. The two resistors on the input are a simple voltage divider. When pressed, the input will go high like before.

In any case use a multimeter to find the pinout and light current.

  • 1
    \$\begingroup\$ Wow, thanks for the detail! I see how the second circuit is far more responsible. \$\endgroup\$ Jul 9, 2016 at 12:23

If your intention is to simply light up the switch when the switch was pressed, the way you described your connections above sounds like it will work.

You tested the switch's light at 3.3 volts and were satisfied with the brightness. As the switch's light is designed to work at 12 volts there should not be a problem with running it at 3.3 volts.

Guessing, what is inside the switch is an LED connected in series with a current limiting resistor. So, guessing again, there should be no need for additional resistors to protect the LED. If you can confirm this, by opening the switch or finding the OEM's spec sheet for this switch, that would be reassuring.

If you were intending to drive the switch's light with a GPIO pin, measure the current the switch's light draws when connected to a 3.3 volt power supply. Make sure that current does not exceed what the GPIO pins can handle.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.