How this common TIP120 transistor work

Hi,

I have an RGB strip LED and I am controlling the color of the lights using 3 TIP120. I am having no problem, but I cant understand why this is working. I know how transistor works, but in this special case I think it should not work, unless you teach me :)

I have a 12V power source that I connected to the TIP120 (GND and +12). In the base terminal of the TIP120 I connected it to my Arduino without any resistor. I know, it's recommended that I use a resistor, but it's working so far and my question is not about this.

So, when I execute analogWrite(green_led_pin,0) the gree color of the LED gets turned off, which is expected. When I do analogWrite(gree_led_pin,255) it turns on with the maximum brightness. Which is expected.

BUT my question is this: I know this TIP120 transistor amplifies the current in the base to an equivalent current in the collector/emitter. BUT when I change the analogWrite from 0 to 100 or 255 I am very sure I am only changing the VOLTAGE accross the base terminal of the TIP120, I am not changing the current! The current should always be the maximum, and it should even have burned my arduino cause the TIP120 should be draining more current than it can provide.

1) So why my arduino is not burned when I dont use a resistor? 2) How changing the voltage across the base is changing the brightess of my RGB strip if chanving the TIP120 amplifies the current in the base, not the current? 3) How does my TIP120 know that when I execute analogWrite(green_led_pin,255) it should send the maximum voltage from my source (12v) to my LED strip? Arduino is scaled to send 0 to 5V but I am sure TIP120 is not "configured" to send the minimum current of my source when it gets 0V at its base and it is not "configured" to send the maximum current of my source when it gets 5V at its base.

I READ MAAAANY tutorials in the internet and I got it. I understood, I even understood how to calculate the base resistor according to the drop inside the TIP120 and the current that I need in the RGB LED but even after learning all of that I still have these 3 basic questions that I cant understand!

I thank you all and I hope this thread helps other people facing the same questions!

1) So why my arduino is not burned when I dont use a resistor?

Luck... It's bad practice and you shouldn't do that. The transistor and/or the Arduino can potentially get fried when there is no current limiting resistor.

2) How changing the voltage across the base is changing the brightess of my RGB strip if chanving the TIP120 amplifies the current in the base, not the current?

You need to understand what PWM is. PWM turns the LED on & off quickly. At 50% PWM it's on half the time and on half the time and it appears "half bright" to the human eye. (Except the eye isn't linear and it will appear brighter than half bright.)

If you apply PWM to a regular incandescent light bulb it will actually be dim, since the filament can't instantly heat-up or cool down.

3) How does my TIP120 know that when I execute analogWrite(green_led_pin,255) it should send the maximum voltage from my source (12v) to my LED strip? Arduino is scaled to send 0 to 5V but I am sure TIP120 is not "configured" to send the minimum current of my source when it gets 0V at its base and it is not "configured" to send the maximum current of my source when it gets 5V at its base.

Again, you need to understand that PWM digital. It's either fully-on or fully-off.

When the transistor is in saturation (which it is with no base resistor!) you get maximum current. In an LED strip, the current is usually limited by an internal resistor.

BTW - If you measure the output of the Arduino (or the TIP120's base voltage), you'll find it's around 1.5V, not 5V. It's a Darlington transistor so you have two base-emitter junctions in series (bout 0.7V max each). And... that's not healthy for the Arduino.

@DVDdoug thanks again :) I understand PWM, I even use it for years to control my brushless motor with an ESC. But I cant understand how changing the voltage in the base of the transistor without a resistor DOES produce a variable current in the output of the transistor!

You ARE NOT changing the voltage in the base of the transistor (except from off to on)! If you truly understood PWM, you'd know that. You are always applying full voltage, or no voltage to the base. The duty cycle (how long the full voltage is applied vs. how long no voltage is applied) is what changes the apparent brightness of the LED. The transistor is basically acting like a switch, and the voltage applied to the base is like a little Martian flipping switch on and off extremely quickly. The longer it is switched on compared to how long it is switched off makes it appear brighter. The longer it is switched off compared to how long it is switched on makes it appear dimmer. A lower number in analogWrite() turns it on for less time in a given period, a higher number turns it on for a longer time.

Put in the base resistor. You are liable to destroy your arduino without it - you're pulling significantly more than the rated maximum current, this will cause heating and potential damage to the chip. The only reason your board isn't on fire is that the output drive on the chip isn't able to supply enough current to do much damage - the voltage of the output pin isn't getting above the saturation voltage of the transistor.

You must add a base resistor, do it before you break something!

When you use a single BJT as a switch you are not ampifiying the base current in the normal way at all, and the typical gain in this mode is 10 to 20 fold (even for a transistor with a gain of 300), since the device is saturated and the base-collector junction is forward biased.

With a Darlington pair the first transistor is being used as a switch and the second one is linear (doesn't saturate) so has much more gain - probably about x10 for the first transistor and x100 for the second. Thus you'd normally use about 1/1000 of the load current to the darlington's base connection.

PWM simple creates the illusion of analog control, but its not, its just a time average that you see.

I thank you all. You were all so kind, I will use the base resistor! I dont want to burn things, but I kept my arduino running for about 2 hours while I was wathing a movie without the base resistor and nothing got destroyed.

Anyway, I thank you so much for saving me from burning my new arduino :)