2nd_quadrant
Posts: 4
Joined: Sun Jun 15, 2014 4:15 pm

Dim LEDS

Sun Jun 15, 2014 4:33 pm

I am trying to drive 9 bright LEDs from one GPIO port (as a light for a webcam) I appreciate that I can't drive them straight off the GPIO so have in driven them through a transistor. Please see the attached circuit.
LED driver.jpg
Circuit
LED driver.jpg (40.59 KiB) Viewed 1356 times
The problem is that when I switch on GPIO 11 the LEDs come on but only at about half brightness.

The transistor is supposed to be able to carry 4A and has a current ratio of 750

I have measured the voltage out of the regulator and it is 2.9 to 3v.
If I use a 3v pin on the GPIO rather than Pin 11 they are dim
If I connect the 3v GPIO pin directly to the transistor base bypassing the resistor they are dim.
If I drive just one LED rather than 9 it is dim.

The only time I can get all LEDs brights is if If I bypass the transistor and connect the LED anodes directly to the +3v feed then all is as I would expect and they are bright.l

Any ideas would be gratefully received - been bashing my head against the wall all weekend over this.

Thanks

User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Dim LEDS

Sun Jun 15, 2014 4:45 pm

Several errors:
1/ You put your LED circuit in the emitter of the transistor.
Thus the voltage will be maximum the base voltage minus 0.6 which is 3.3-0.6 = 2.7V.
That is the big error.

Now for some smaller ones which are more to do with quality:
2/ You should normally not put LEDs in parallel . Unless you don't care that they shine with different intensity.
(But you often can get away with it if they are all from the same batch and you built only one circtut.
A manufacturer would not be able to do that)
3/ You specify LED FV=3.2V. Often this is just an approximation and the forward voltage can vary a lot.
Thus you don't know exactly what the regulator voltage should be.

Post edit:
I would just connect them all to 5V and give each a resistor.
The price of a resistor is neglectable certainly as you can then drop the regulator.

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Dim LEDS

Sun Jun 15, 2014 5:00 pm

2nd_quadrant wrote:Any ideas would be gratefully received - been bashing my head against the wall all weekend over this.
It should look more like the circuit below...
Image

Just keep adding more LED/resistor chains in parallel for more LEDs noting that the base resistor will need to be reduced in value as the number of LEDs increases.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

2nd_quadrant
Posts: 4
Joined: Sun Jun 15, 2014 4:15 pm

Re: Dim LEDS

Sun Jun 15, 2014 6:54 pm

Thanks to both of you for the swift response. The reason I was trying to do without the resistors is that the LED are going to be mounted on a remote camera pan and tilt mechanism and I wanted to reduce the wiring between the Pi and the lights to a minimum which meant placing the resistors at the LED end which (with the design that I have) was not possible.

Time to go back and see what I can do.

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Dim LEDS

Sun Jun 15, 2014 7:26 pm

If you drive from a higher voltage you can put several LEDs in series with one resistor.
You can put several such chains in parallel to one transistor.
You can't put LEDs in parallel without series resistance (the one with the lowest VF will steal the current).

Return to “Interfacing (DSI, CSI, I2C, etc.)”