0

I have seen a few examples of wiring a red LED directly from the RPI GPIO pins, however, I need to wire a GREEN LED and am having trouble calculating the resistor needed. I believe that a green LED uses 3.3 volts and at 20ma, so if I use the 5V power on pin 1 would I end up with 5V - 3.3V = 1.7.

1.7 V = 20 mA × R

or rephrased:

1.7 V / 20 mA = R

and when we solve that we get:

1.7 V / 20 mA = 1.7 V / 0.020 A = 85Ω ?

1
  • There are two common chemistries used when making green LEDs. The traditional gives a warmer green and is more related to the red, yellow and orange and requires roughly 2 volts to operate. The green used in an RGB LED is typically colder in order to improve the gamut, and has a higher voltage, but are also available as discrete LEDs. You should figure out which one you have.
    – pipe
    Commented Dec 9, 2018 at 22:48

2 Answers 2

5

I have powered green, red, yellow, and multi-colored LEDs direct from the (3V3) GPIO. So a green LED forward voltage of 3V3 seems unlikely.

Anyhow putting 20mA through a modern LED would be absurdly bright.

Try something in the range 300-500 ohms (or higher) and use PWM on the GPIO to vary the brightness if needed.

1

You are correct and need to consider I = " Forward Current" and V = " Forward Voltage" in the equation.

enter image description here

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.