4
\$\begingroup\$

I am learning about transistors, and can't seem to find the answer to a few questions which are stumping me. I will be referring to the TIP120/121/122 Darlington Transistor.

  1. As I understand transistors so far, I need to apply a current from my Arduino to the base of the transistor in order to allow current to flow between the collector and emitter. What I don't understand is how a microcontroller is used with the transistor in so many projects and tutorials. The arduino and other atmegas give ~50mA out of their pins, but according to the data sheet, the TIP needs 120mA at the base. On top of that, a resistor is used between the pin of the microcontroller and base of the transistor, which I would assume reduces the current going into the base even more. So what's going on here?
  2. I want to experiment with these transistors, but noticed that the TIP120 and 121 are more expensive than the TIP122. I am curious to know why this is, because as per the data sheet, it seems the TIP122 can handle higher voltages (which I suppose is a good thing), with all other things pretty much the same. So is there a scientific reason for this price discrepancy and is there any reason I should select the TIP120 over the 122 to use for my microcontroller projects?
\$\endgroup\$
  • \$\begingroup\$ "The arduino and other atmegas give ~50mA out of their pins" - Not if you respect the absolute maximum ratings for those parts (40mA for the ATmega328P). Consult the datasheet(s). \$\endgroup\$ – marcelm May 16 '18 at 20:09
8
\$\begingroup\$

The TIP120 does not need 120mA at the base for normal operation, that's the absolute maximum rating, above which you don't want to go.
The spec you are mostly interested in is the hFE (current gain), which for a darlington is very high, since it's two transistors connected in a way so the current gains multiply. For the TIP120 it's given as minimum 1,000 (compare with a typical 200 for a single bipolar transistor)
Also important are the max collector current (5A) and the collector emitter voltage (60V)

The main disadvantages are that the base-emitter voltage is doubled compared to a single transistor (~1.4V), and the saturation voltage is higher (typically ~0.8V compared to ~0.2V at low currents)
These points are rarely a problem for a simple switch driven from a micro pin. At higher collector-emitter currents though, the Vsat rises and can interfere with desired operation and cause problems with dissipation.
For example, in the TIP120 datasheet note that at 3A Ice, Vsat is given as 2V, but at 5A it has risen to 4V. That's 20W of dissipation, a lot to heat to try and get rid of to keep the temperature down. So when switching a large current you need to take these factors into account, and maybe decide to look at a more suitable part (e.g. logic level, low Rsdon power MOSFET)

Since we have a gain of 1000, we hardly have to draw anything from the micro pin. Let's say we want to switch 1 Amp:

1A / 1000 = 1mA into the base needed.
If we have a drive voltage of 5V, then we subtract the Vbe from the drive voltage and divide by the current:

(5V - 1.4V) / 1mA = 3.6k resistor. To give it a bit of leeway select something a bit smaller like 2.2k. This still only draws ~1.6mA.

I wouldn't read too much into the different prices - the price of components is often dictated by how popular they are, the more they sell the less they cost. If you see better specs at a cheaper price, go for it ;-)
You can some pretty odd prices when the component is scarce/new/obsolete - I saw a 10uF ceramic capacitor priced at £7.50 (qty 1) on Farnell the other week...

\$\endgroup\$
  • \$\begingroup\$ Perfect, thank you so much. I think I have a good understanding now. These transistors are absolutely amazing devices! The price of that capacitor is hilarious :-P \$\endgroup\$ – capcom Jul 26 '12 at 12:03
  • \$\begingroup\$ Shouldn't "This is rarely a problem for..." be: "The former is rarely a problem for..."? At 5 A VCE(sat) can be as high as 4 V, that's 20 W. (I can't find that 0.8 V anywhere in the datasheet) \$\endgroup\$ – stevenvh Jul 26 '12 at 16:06
  • \$\begingroup\$ @Steven, it was referring to both points, but I'll change it to mention the higher current issue. The Vsat was not from the datasheet of that part, it was just a general low current figure for darlingtons (i.e. a Vbe higher than a single transistor typical Vsat) \$\endgroup\$ – Oli Glaser Jul 26 '12 at 16:16
6
\$\begingroup\$

You have to check the title above the table. It says "Absolute Maximum Ratings" (AMR). Just touching those briefly is, well, not even OK, but tolerable. In any case you should not operate the transistor under AMR for a longer time.

On of the important parameters of a transistor is its hFE, that's the current gain. If you apply a current to the base, a current hFE times larger will flow through the collector. For general purpose transistor the hFE is often around 100, so 1 mA base current will give you 100 mA collector current. This is a Darlington transistor, which is basically two cascaded transistors. The first one amplifies the current by its hFE, and that gets amplified again by the second transistor's hFE. So the total hFE is much higher, the datasheet says minimum 1000.

You should start from the collector current to calculate backwards to the base current. Suppose you want to control a relay with the transistor. You read the datasheet of the relay and it says that the 5 V version has a coil resistance of for instance 50 Ω. Then, according to Ohm's Law, you need 5 V/ 50 Ω = 100 mA to drive the relay.

The transistor has a gain of 1000, so for 100 mA out you only need 100 µA in. It's wise to use a value a bit higher, like 1 mA. You may think that this would give 1 A out, but that's not true. The relay's resistance will limit the current to the 100 mA, no matter how much current the transistor will like to draw. The extra input current gives you some margin if the parameters would deviate from their nominal values.

So 1 mA base current. A common transistor needs about 0.7 V at its base, then you would use a base resistor of (5 V - 0.7 V)/1 mA = 4.3 kΩ maximum to get the 1 mA. That's Ohm's Law again. The voltage difference across the resistor divided by the current through it. But this is a Darlington, and this has twice the 0.7 V drop, so that's 1.4 V. Then (5 V - 1.4 V)/1 mA = 3.6 kΩ. Pick a 3.3 kΩ standard value. Actually the calculation is a bit more complex than this, because the transistor also has a pair of resistors integrated, but we have a large margin, so we can ignore that.

A final word: ATmega does not give you 50 mA out. Absolute Maximum Ratings says 40 mA, and you should stay well below that. 20 mA is a good maximum value to work with; many parameters are specified at that current. At 1 mA we're well below that, so we're OK.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the superb answer Steven, you come to my rescue every time! I now think I understand how these transistors work. Thanks for the advice on the ATmega's current out as well. I have one question though. Suppose I don't use a resistor, would the transistor try to use the max current the ATmega would give it (40 mA), even though, in the case of your example, it only needs 100 µA to satisfy a load that needs 100 mA? Thank you. \$\endgroup\$ – capcom Jul 26 '12 at 12:11
  • 2
    \$\begingroup\$ @capcom - yes, it will use all it can get, the base isn't aware of what happens at the collector's side. The 40 mA is what you shouldn't go beyond, but if you don't use the resistor the ATmega will supply more. It's your responsibility that this doesn't happen. Read the answer to [this question](electronics.stackexchange.com/questions/32990/). Always use a limiting resistor, never rely on the internal device's resistance. You'll get currents over 100 mA, maybe 200, which will destroy the output port, and maybe more. \$\endgroup\$ – stevenvh Jul 26 '12 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.