LEDs dimmer when running through transistor


I'm having a strange problem that I can't track down. I'm using an Arduino to control LED light arrays. Each array is connected through a TIP29C transistor to my Arduino PWM outputs (base resistor: 10k?) and to ground - Vcc for the light arrays is 12 V and is connected to ground through the transistors.

I'm using one transistor for each light array to control the lights. Basically, the problem is that when the ground of the light array is connected straight to the ground (NOT through the transistor), they are very bright - when connected through the transistor (to ground - no extra resistor or anything) the arrays are about 30-40% dimmer.

Any ideas on this? Really hoping to track these down - the lights aren't nearly as cool dim as they are bright.

Thanks! Drew

I would lower the base resistor to 250-500 ohms (10k is too high) to insure the transistors are saturating full on. What is the current draw of the led array at 12vdc?


Okay, here's the setup on each transistor:

Emitter: 4 parallel branches of 3 white LEDs in series with a 150? resistor - about 20 mA per branch, so 80 mA total (connected to 12V) Collector: ground Base: 10K? resistor -> digital out

I had set this up following a tutorial I had found. The hFE value is around 40 or higher (from the datasheet it's hFE (min) at Ic = 0.2 A, my Ic is 0.08 A).

It makes sense now that the transistor may not be fully saturated... With all this information you'd still suggest a substantially smaller base resistor?

TIP29C is a NPN transistor and is suitable for only 'low side swiching". You need to have the emitter wired to ground (to both 12 volt ground and arduino ground), base wires to arduino series resistor from output pin, collector wires to LED array negative lead and array positive wires to +12vdc.

So if you wired it like you wrote below you have the transistor wired backwards.


My mistake; that is how I've got it set up. You'd say the base resistor is still the problem?

Yes you have only 0.5mA of base current and if you are switching 80mA of load your transistor needs at least a gain of 160. Look at your data sheet for the minimum gain of the transistor. It needs to be at least 200 with this value of base resistor.

The 3 LEDs are connected in parallel and you have only 1 resistor? As you have it now, dimmer, does some of the LEDs in parallel light up more than others?

No, the LEDs are connected like this: (don't mind the ASCII)

12V---------------------- | | | | R R R R | | | | LED LED LED LED | | | | LED LED LED LED | | | | LED LED LED LED | | | | GND---------------------

GND could also be the collector of the transmitter. They are perfectly bright when connected straight to ground, just not through the transistor - I'm guessing that it is indeed a saturation problem.

That is most probably the problem, but if you want to "see it", set the PWM to 100% and measure voltage across the NPN (collector to emitter). I didn't look the datasheet but should be less than 0.2V if well saturated at that current.

What is the forward voltage of your LEDs? It could be you are running out of voltage to drive 3 in series. With 0.7V saturation voltage of your transistor (from the data sheet) that leaves you 3.7V for each LED. The resistor has to take some. Anyway the minimum gain of 40 for this transistor is too low for you to sustain such a high base resistor.

Won't be 0.7V, not with the proper base current (with 0.5mA base current it will typically be much higher than 0.7) - see the saturation graph.

Anyways, set your base resistor to allow for 3mA or 4mA, then report back.

If your LEDs are of the typical 3.4V you're actually giving them much less than 20mA, even without the transistor: (12V - 3.4x3) / 150 Ohm = 12mA

For some reason I was under the impression that my LEDs were operating at 3 V (water-clear) - looking at the datasheet now it looks like 3.2 V. I'll adjust my resistors for that accordingly.

Pardon this question if it's a little silly - if I want 5 mA, shouldn't I do the following: 5 mA = (5V - 0.7V)/Rb to get the base resistor? (or would Vbe be different in saturation?) This gets me 860?, quite different from what was suggested earlier in this thread.

Really appreciate the help.

4.3/.005 = 860, seems right. If you want the transistor to turn full-on tho (full saturation), I would go for more current. 4.3/.035 = 150 ohm

A 1KOhm resistor should do the trick. IMHO 35mA base current is just way too much, nothing to be gained, and several things to be lost (power consumption, uC current budget reduction).

Great! I'll give 1K? a try. Thanks for all the help!