10mm White LED with Raspberry Pi B+


#1

So I bought some of the 10mm White LEDs from the shop (http://shop.pimoroni.com/products/led-10mm-pack-of-5) and am trying to work out what resistors I will need to use to make them light up.

I have looked online and read the tutorials about calculating resistors required but can’t find a voltage drop listed anywhere on the pimoroni website. How can I calculate the resistors required without this?

I need the leds to be lit quite bright as they will be hidden behind some white perspex as back lights for capacitive buttons. I’m planning to power them through the GPIO pins as output pins, so i can turn them on and off as needed through code, so the connection would be:

[GPIO Pin] ------ [LED] ------ [Resistor] ------ [GND]

Thanks for your help in advanced


#3

Hey Mikey,

Check out http://learn.pimoroni.com/170pt-projects-part-2-let-there-be-light.html hopefully this will help!


#4

When it comes to LEDs you can generally be a bit fuzzy with the calculations for resistors.

The more important thing to remember would be that the Raspberry Pi GPIO is designed for signalling, and not necessarily for driving things like LEDs at high levels of brightness.

I loathe to recommend buying more things, but I highly recommend picking up one of our 18 channel LED drivers. They’re constant current and don’t need resistors at all: http://shop.pimoroni.com/products/18-channel-8-bit-pwm-led-driver-w-i2c-interface

This gives you bonus brightness control, too!

I’ll try and find the LEDs and get you some values for them, however!..

  • Okay, found some yellow and green ones. I believe all our 10mm LEDs are 20mA with a forward voltage of 1.8-2.2v.

If I remember correctly, the peak recommended current draw from the Pi is 16mA per pin. So you’d need something like an 80-100Ohm resistor which would allow you to drive a recommended maximum of three LEDs. You can exceed these values, but when all’s said and done it’s safer and more effective to use a constant current LED driver like the one I mentioned above.