1

When I connect a blue LED complete with a 1K ohm resistor to pin 17 and turn it on, it gives out a somewhat bright, satisfying light. When I do the same with a green LED, the led light is very dull. When I do this for a yellow LED, its even duller. Why is this and how can I power 4 LED's that are: blue, green, yellow, and red independently (using separate GPIO pins) that have equal brightness?

Thanks

  • Is it the same LED each time? – joan Jan 11 '15 at 23:06
  • modified question significantly – boulder_ruby Jan 11 '15 at 23:16
  • 1
    Apart from the different band-gap of the different colours, which produce different voltage drops, this is probably telling us more about the spectral sensitivity of your eyes. – Milliways Jan 11 '15 at 23:20
  • So the question is about different colored LEDs and not different GPIO pins as it originally implied? And what does "even if 17 is turned off" mean? are you seeing the same thing with the pin on or off? – Tyson Jan 12 '15 at 1:20
  • 1
    I just discovered the resistance of blue LEDs is 113R while red is like 330, etc – boulder_ruby Jan 12 '15 at 1:45
3

The resistor will be different according to the LED colour.

You need to look at the datasheet for each LED colour and find its forward voltage.

The lower the forward voltage the larger the current for a given input voltage, so the bigger the resistor to keep everything equally bright.

E.g. see https://electronics.stackexchange.com/questions/48522/what-resistor-to-use-with-this-rgb-led

0

There's several things with leds and their brightness.

1) The resistor you use in series with the led determine the current that flows through them. leds with different colors can have different voltages that fall over them, so you might need to adjust the resistor depending on the color. 2) Not all leds are created equally. There are high power leds and low power "signal leds". Some are more efficient than others 3) the human eye sees green and yellow light brighter... So even if some leds burn at the same light intensity, the human eye will still see a difference.

If you're after balancing the leds out for the human eye, you have to look up their datasheets and figure out resistor values. And even then... Usually you'd use a variable resistor to tune the colors.

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