Anba
Posts: 7
Joined: Wed Oct 22, 2014 12:27 pm
Location: Leuven, Belgium

RPi NoIR: how to power ir led's?

Sat Dec 06, 2014 8:58 pm

Hello everyone,

I have my Pi for a couple of months now, and I decided to buy a NoIR camera board.
I have also bought some IR LED's, which work perfect if I wire them up to a battery.
The only problem: I don't want to use a battery.
How can I connect these to the Pi's GPIO, if there voltage should be 1.3V to work? (and not burn ;) )
Here is a link to the LED's: link.
If you are interested in a datasheet, you can find it there too :).
Does someone know a solution for this?
Thanks in advance,

Anba

User avatar
dozencrows
Posts: 172
Joined: Sat Aug 04, 2012 6:02 pm

Re: RPi NoIR: how to power ir led's?

Sun Dec 07, 2014 12:08 pm

The trick with LEDs that need more power is to use a transistor to switch them and supply power from the 5V pins, e.g. http://www.raspberrypi-spy.co.uk/2012/0 ... output-pin. That tutorial also has information about how to configure the circuit to set the voltage and current safely for the LEDs.

If you want even more LEDs and more flexible control over brightness, you'll need to look at using some kind of more sophisticated LED driver circuit, using PWM (pulse width modulation). Google is your friend here! Or search more through the forums on this site.

One good product that does what you're looking for is the BrightPi: http://www.pi-supply.com/product/bright ... spberry-pi

Anba
Posts: 7
Joined: Wed Oct 22, 2014 12:27 pm
Location: Leuven, Belgium

Re: RPi NoIR: how to power ir led's?

Sun Dec 07, 2014 1:53 pm

Thank you for taking a look :), but the problem was: i need less power.
I need to get 1.3 volts out of the Pi somehow, to power these LED's. If you power them trough the GPIO they burn out.
I don't seem to find a solution, and I already searched Google about this, but I can't find something that downgrades the currency.
Raspi B+ with Raspbian, NOIR Camera Board (v1.3), IR-Reciever & 8 IR-LED's

Anba
Posts: 7
Joined: Wed Oct 22, 2014 12:27 pm
Location: Leuven, Belgium

Re: RPi NoIR: how to power ir led's?

Sun Dec 07, 2014 1:58 pm

The link that you posted said something about a resistor, is that the thing I need?
Raspi B+ with Raspbian, NOIR Camera Board (v1.3), IR-Reciever & 8 IR-LED's

User avatar
dozencrows
Posts: 172
Joined: Sat Aug 04, 2012 6:02 pm

Re: RPi NoIR: how to power ir led's?

Sun Dec 07, 2014 7:25 pm

Yes indeed. If you know the voltage level from the Pi pin (3.3V if GPIO), then you can use basic math to work out what value resistor you need in order to divide that voltage between the LED and the resistor. You also need to know about the current draw - GPIO pins only support small currents as outputs (maximum 16 milliamps per pin, total 50 milliamps for all pins), which if exceeded will very likely damage the Pi.

Try an online calculate like this: http://led.linear1.org/1led.wiz. If you plug in the values from the article in my previous post, it gives you the exact same value for R1 (560 ohm). You could plug in 3.3V for the GPIO, the forward voltage given for your LED, and a current between 2ma and 16ma to find a value for the resistor to use that should be safe. E.g. http://led.linear1.org/1led.wiz?VS=3.3;VF=1.3;ID=4

This next tutorial also talks about the need for a resistor, and directly drives the LED from a GPIO: https://projects.drogon.net/raspberry-p ... single-led

If you want to drive multiple IR LEDs for illumination purposes , you'll need to use the 5V supply and transistor method (or LED driver chip) as you'll probably need more current than the Pi can safely handle through its GPIOs. The 5V supply can deliver much more current, as it comes ultimately from the power supply you plug into the Pi.

If you want to do more, it's definitely worth spending some time learning more about the relationships between current, voltage and resistance - and how they apply to different components. A quick start is here: http://www.talkingelectronics.com/proje ... Guide.html

Anba
Posts: 7
Joined: Wed Oct 22, 2014 12:27 pm
Location: Leuven, Belgium

Re: RPi NoIR: how to power ir led's?

Mon Dec 08, 2014 6:40 pm

Ok, understood :).
Thank you very much for your help!
Raspi B+ with Raspbian, NOIR Camera Board (v1.3), IR-Reciever & 8 IR-LED's

Return to “Camera board”