I have a TIP120 NPN transistor hooked up to an output pin on my Arduino (ultimately going to be ATTiny85), that drives some 18V LED strips. The LEDs are inside an enclosed gizmo, so I don't know much about the LED strips other than applying 18V to them makes them light up :).
Partial circuit is attached.
My question is:
I've put a resistor between the Arduino and the TIP120 (R1). But I just took a wild guess on the value of the resistor.
Can anybody point me towards how the resistor value is calculated? I'd like to learn how to make the right decision here.
If you assume Vbe is 0.7V,
you want to turn the TIP120 full so its saturated,
and you want to keep the Arduino from burning up, so limit the output to say 20mA.
Then:
(5V - 0.7V)/.02A = 215 ohm, so use a 220 ohm as a nearest standard value.
Since the TIP120 is actually a Darlington arrangement of NPN transistors, it has different characteristics (I was getting there) http://www.fairchildsemi.com/ds/TI/TIP122.pdf
So read the data sheet and see what the Vbe actually is and what current is actually needed to drive it into saturation and adjust the resistor accordingly.
The OP wants to know the proper way, the proper way assumes to know the collector current. We do not know how much Ampers the LED strip needs (at 18V power supply).. Based on that we may show him/her how to calculate the resistor properly..
Here's the thing... I'm pretty sure the TIP120 was selected because... well, because that was what was available at the "buy it now" retail vendor, not because it was the best part for the job. So , call me crazy, but you can survive with some loosey-goosey "dart board toss" guidelines. I don't see that crossroads was way off the goal here.
Then you have to estimate the Vbe (for normal transistors 0.7V as Xroads said, for TIP120 darlington type 1.4V @400mA - always look into the datasheet at these parameters - there are graphs usually).
The Vce saturation voltage with TIP120 is 0.7V @400mA - that is the voltage on the transistor when fully on (fully open or saturated).
The DC gain @400mA is 2000 for TIP120 (for a normal transistor about 100).
In order to switch 400mA you need base current
Ib = Ic / DC gain = 0.4A / 2000 = 200uA, usually we take Ib 5x bigger to be sure it is saturated = 1mA
Then base resistor (arduino output is 5V):
Rb = (5V - Vbe) / Ib = (5V - 1.4V) / 1mA = 3k6
The Vce saturated is used to calculate the power dissipated on the transistor when it is fully on:
P = Ic * Vce = 0.4A * 0.7V = 0.28W, that means you need a small cooler on it.
That wasn't too painful 8)
I often do things as two posts; fairly often if I open another window to look at a spec or something our fine system crashes out on me & I have to start from scratch.
TIP120 sounded like Darlington, but I needed to post before I could look it up to be sure or to see its characteristics.
Internet dirt road around here at times, not highway ...
This will be very much helpful since I have a scrap board loaded with TIP120's. I think there is a better TIP for my application, but I wanted to make use of what fell from the sky in an H bridge motor driver. In this case, the motors are unknown and will likely vary considerably in current draw depending on their load.
I'll try to figure out for 5A, but not sure where some values come from
Ic 5
Vbe 2.25 two time transistor diode drop due to darlignton pair, but look at plot for collector current
Vce 60 from plot, not sure where this comes from exactly
Dcgain 2500 from plot
Ib 0.002 x5=0.01 this is 10ma from arduino pin, right?
Rb 275 ohm
P 300 W
My 12 year old son did the programming!
From here, we're going to solder up a board with a ATTiny85 board that fits inside the signs housing. Then we're going to add some wireless capabilities probably to expand the signs functionality to be a Twitter notifier or something
Anyway, thanks again. I learned a lot today and got to do a fun project with my son.
After successful prototyping with the TIP120 style transistors, I switched to an ULN2803 style transistor array with internal resistors.
Full details here: http://forum.arduino.cc/index.php?topic=182906.0
int2str:
Based on my lab power supply, the LED strip is pulling around 400mA @ 18V.
Any base current of 1mA or greater should work (the device's minimum gain is 1000),
400mA / 1000 = 0.4mA, but you have to add a healthy overdrive factor to get the
device into proper saturation, so 1mA minimum, 5mA might be better.
The TIP120 will get hot and you should consider a small heatsink, as its a Darlington.