# TLC5940 + TIP120

#### Philippe M.

Apr 21, 2016
8
Hello,
I have built a circuit to drive 16 led strips with PWM using TLC5940 chip with 16 TIP120 transistors.
Each pin of the TLC is sinking 20mA, connected to the base of the TIP120 (NPN, my led strips are common anode), and I have added a 10K pull-up resistor connected to 5V. Everything is working fine, I was wondering if 10K is the right value, I have tried 2.2K and it 'seemed' to do the same. I don't know how to calculate the right value for the resistor, and if it has some impact on the brightness of the leds.
Sorry if I don't explain this right, I don't have a lot of experience.
Philippe

#### dorke

Jun 20, 2015
2,342
Welcome to EP.
A few things I don't understand:
1. What is the current needed for your LED Chain,is it 20ma?
2. Why do you need the TIP120s for?
3. Where have you connected the "pull-up" ,and why?
4. Please post a simple diagram of your output connection to the LED chains.

#### Philippe M.

Apr 21, 2016
8
Hello,
thank you.
These are the strips I am driving : http://fr.aliexpress.com/item/5M-Ro...bbon-5630-SMD-lamp-Tape-More/32596052896.html

Here's my thinking : It says 4W/m and I'm gonna use 16*1 meter.
4W = 12V * 0.333A
The datasheet (http://www.ti.com/product/TLC5940) says max 120mA per channel, so that's why I am going for the TIP120.
I connect the pull up to the base of the TIP120 because the TLC5940 is sinking current, so when TLC is OFF, the light is ON via the pull-up, and when the TLC is ON the light goes off.
I don't know about diagrams, sorry. I will try on Fritzing, but have to learn.

#### Philippe M.

Apr 21, 2016
8
I made a quick diagram in fritzing, the led is representing the led strip and the resistor is 10K, and I am trying to understand how to calculate the best value for the resistor.

#### dorke

Jun 20, 2015
2,342
Well,
1.First thing is this roll is 5 Meters and needs a 12V DC supply to work.
That 12v is an external power supply connected only to the LED chain,it will supply the power not the TLC5940.

2. Using it with the TIP120 is the wrong way to go ,it is "reversed logic " .
You are losing the most important feature of the TLC5940 which is setting and controlling the LEDs current.

Are you only interested in turning the LEDs on and off?

Another issue with those LED strips is there are large differences in light brightness between different vendors.

#### Philippe M.

Apr 21, 2016
8
Yes 12V powering the leds, 5V for arduino and chips (eventhough arduino and TLC5940 can take 12V), GROUND is shared.
I understand your argument, it would have been wise to use a PNP transistor with the TLC5940, but in this case the leds are common anode.
So, I have PWM working, in fact I'm happy with this circuit, even if logic is reversed, not very difficult to manage it in code.

My question was about the 10K pull-up resistor, I used this value a bit randomly, and even f it is working, I was wondering if this is the right resistor to use.

PS : I took 10K when reading this post on arduino forum, where user is trying to do the same setup : http://forum.arduino.cc/index.php?topic=15087.0

#### cjdelphi

Oct 26, 2011
1,166
Why use the tlc5940 when a shift register like the 7hc595 does what you need, the beauty of the tlc5940 is so it can drive the led at the right amount of current

7hc595/tip120 is a better combo

#### Philippe M.

Apr 21, 2016
8
Because I wanted to drive 16 PWM lines with ease and I had them from a friend. I limited the sinking current to 20mA.

#### dorke

Jun 20, 2015
2,342
Yes 12V powering the leds, 5V for arduino and chips (eventhough arduino and TLC5940 can take 12V), GROUND is shared.
I understand your argument, it would have been wise to use a PNP transistor with the TLC5940, but in this case the leds are common anode.
So, I have PWM working, in fact I'm happy with this circuit, even if logic is reversed, not very difficult to manage it in code.

My question was about the 10K pull-up resistor, I used this value a bit randomly, and even f it is working, I was wondering if this is the right resistor to use.

PS : I took 10K when reading this post on arduino forum, where user is trying to do the same setup : http://forum.arduino.cc/index.php?topic=15087.0

The TIP220 is an overkill for driving 0.5A current and less.

I think you con do much better with a small Mosfet(like the BS170) then with a Darlington.
even a ULN2803A 8xDarlington array is better ,it will save you space and cost..

The resistor value calculation is simple for the Darlington:
You need to drive it into deep saturation when on.
Note, the relatively high VCEsat it has (up to 2V) that means your LED chain will operate at less than 12V.

Take the beta- min value from the data sheet of the TIP120 it is about 1000
Now calculate Ib needed by 330ma/1000=0.33mA

from the TIP120 datasheet VBEon=2.5V
calculate maximum value of Rpullup=(5-2.5)/0.33ma=7.5k ohm

so you say it works with 10K,
it can be so because the above is a worst case calculation,and the condition of your circuit is not there.

#### Philippe M.

Apr 21, 2016
8
I went first for the TIP120 because I wanted to drive 5m strips, then my project changed of scope.

I have a few ULN2803, I like them, easy to use and small form factor, less soldering on protoboard too, but they are rated at 500mA per channel, which now would make sense ....

same setup then, would it also be 7.5K pull-up resistor ?

I'm trying to adapt your formula but I didn't find VBEon in the datasheet, would it be the same as "VI(on) On-state input voltage - VCE = 2V" ? beta min value also not found, sorry I'm a rookie ...

Thank you for your input, very helpful, I couldn't have come up with that formula by myself ...

Last edited:

#### dorke

Jun 20, 2015
2,342
Yes ,you are correct.
There is no Beta or VBEsat on the ULN2803A datasheet.
But we do have Iin required and Vi(on).

For 350mA collector current we have:
Iin=350uA ,but can use a larger value of 500μA from the table.
Vi(on)=3V
so Rpullup max=(5-3)/500μA=4000 ohm ==>use a 3.9k or 3.3K

#### Philippe M.

Apr 21, 2016
8
I don't have the resistors, will have to find some.
thank you for your help, glad I posted my question here, I don't have that much knowledge, I read a beginner book in electronics but that's not enough, anyway I learned something
I'll let you know once I have this circuit working.
Have a nice day,
Philippe

#### dorke

Jun 20, 2015
2,342
I don't have the resistors, will have to find some.
thank you for your help, glad I posted my question here, I don't have that much knowledge, I read a beginner book in electronics but that's not enough, anyway I learned something
I'll let you know once I have this circuit working.
Have a nice day,
Philippe

The value calculated is Max for that resistor.
You can use the 2.2K you do have

#### Philippe M.

Apr 21, 2016
8
I have finally tested the setup with the values you advised, I ran both TIP120 and ULN2803 and they look the same.
Thank you, you have been very helpful.

Replies
4
Views
2K
Replies
1
Views
1K
Replies
10
Views
10K
Replies
2
Views
961
Replies
21
Views
3K