27 aug 2015: earlier this month this page got attention from some folk on hackaday who got their panties in a twist over this rant against continued use of antiquated electronic components. i freely admit this is a rant -- a particular style of writing, though breathlessly worded, also rigorous and backed up by testable assertions. but that didn't seem to matter to some; apparently the TIP120 is a Lifestyle, an Ethical Choice, and the very Stuff of Life. seriously, of all the arenas in western culture that claim "progress!" and "newer is better!" it's actually true when semiconductors are involved. but the real bottom line here is, regardless of our opinions components should be chosen for the task at hand. most of us (not engineering commercial product) work with what we can buy retail, and importantly, what's in the junk box, and design by "rule of thumb" (eg. overkill). that's all fine, do what you want etc, but if you want to take me to task on my rant, do so with repeatable, testable, fact, as i did. also fixed some typos and other small errors.
if you make electronic stuff, simple or complex, utter novice, beginner, experienced or expert, and have a stock of electronic parts you use, do yourself a favor: right now, go through your collection of parts and THROW MOST OF IT OUT. especially if any of the following items are familiar to you: TIP120, 2N2222A, LM386, relays, bipolar transistors, L296 half-bridge, ... [i'll grow this list over time].
it's the 21st century. stop using components from the 1970's. TIP120s belong in the trash bin. seriously, do not give them away, throw them away. 'sanitary landfill', it's called. do not inflict them on others. if there is someone telling you to use them, point them out to me.
the TIP120 is a perfect example of an idea that needs to die. an alleged use for one is to boost the output of something like an Arduino or other "logic" circuit to drive a relatively heavy current or a higher voltage load, such as a solenoid, motor, relay (see below on those pointless antiques) etc. here's a typical circuit; the input on the left would go to (say) an Arduino OUTPUT pin:
(yes i realize that the TIP120 is a Darlington pair and the above schematic shows a single NPN transistor. i found the image on the net, and as a "black box" it illustrates the configuration.)
first, as shown, the above circuit won't really work as intended -- because the collector-to-emitter voltage (compactly named Vce) when the transistor is fully on ("saturation") is about 2 volts. if you know (or at least google) Ohm's Law, you will know that the 5 volts from the supply will be spread over the motor and the TIP120s Vce: the motor will have 3V across it, and the TIP120 2V.
so far, so bad. it gets worse.
let's say the motor is of moderate size, and draws one ampere (1A) when it has a load on it. this is entirely reasonable for a non-tiny motor. if you don't know Ohm's Law, you should learn it now. you will see why it is useful about 30 seconds from now.
the TIP120 was a tolerable arrangement in 1970, just as a PDP-8 was a reasonably priced computer in 1970. while i'd love to have a PDP-8e in my living room, and i would, maybe, play TREK on it if i had DECtape, i would not attempt to use it for any modern purpose. why does anyone think a transistor from that era is still a viable choice?
you can rtfm the TIP120 if you can read a datasheet (remind me, and i will write a page here on how to read a datasheet), or take my word for it here. in the example circuit above, the TIP120 when fully "ON" will have 2 volts across it (rtfm datasheet). assuming a 5V supply as shown, the motor will then "see" 3V across it, since they are in series. also since they are in series the current will be the same through both. let's assume one ampere (1A). Ohm's Law states that the power dissipated in each part is:
|TIP120:||2V * 1A = 2 Watts||2V is Vce for a saturated TIP120|
|motor:||3V * 1A = 3 Watts||3V is all that's left of the 5V supply!|
40% of the power is pissed away as heat in the stupid TIP120!!! wtf!
two watts is a LOT OF HEAT in a silicon transistor 0.01" square, buried in a plastic package. the motor will be OK because it's got a lot of mass, and the heat is spread out over all the wire and metal that it's made of, etc. meanwhile the transistor may, literally, catch on fire. probably not what you intended. (burning resistors make a more interesting smell, btw.)
also, the TIP120 has low "current gain" -- meaning, to make it sink (as it's called; imagine current (water) flowing down from the power supply, through the motor and transistor, to ground -- down the sink!) to sink one amp you have to drive the base of the TIP120 with ... well it's complex, so conservatively assume 1/20th the sink current, so 50mA. that base-drive power also heats the transistor... lose lose lose all around.
seriously, except for specialized applications, throw away all bipolar transistors, into the trash, so that no one will be inflicted with them. sometimes you need a very tiny MOSFET for low-power switching or amplifiers; a good part for that is 2N7000. it's nearly 20 years old (1995?), but a decent design that is still more than "good enough" for turning 12V LEDs on, etc. no more than 200mA, but OK up to 60V. i use these where i used to use 2N2222A's for logic purposes.
zomg use a f***'n MOSFET! they're cheap, and after being punished with TIP120's, or worse, boat-anchors like the 2N3055 power transistor, a decent MOSFET will make you suspicious -- because it seems impossibly too easy. IT IS THAT EASY. STOP PUNISHING YOURSELF.
MOSFETs are completely different semiconductor technology. they were around in the 1970's but weren't so good at power then and were very expensive. they're cheap as dirt today. a decent power MOSFET is fundamentally different, and nearly ideal... it's current gain is essentially infinite -- plus, the modern ones are designed to work with logic-level voltages directly, eg. the output pin of an arduino, with NO OTHER PARTS. seriously.
there are zillions of good power MOSFETs. i use NTD4906N from Digikey, about two for a dollar, because it's available with "through hole" leads and i found it quickly in their catalog (did i tell you i am lazy). here is an actual schematic of an actual circuit i made and ran for this writeup. as a practical example, it's shown connected to an Arduino (loaded with the BLINK example). the 10K resistor to ground isn't strictly necessary, but it ensures that the MOSFET remains OFF if the arduino is disconnected or it's pin is not an OUTPUT.
in this example i used a 15-ohm resistor, all i had to get the desired current range. just substitute your load in place of that resistor.
the NTD4906N has a maximum "ON" resistance of 0.0055 ohms -- that's not a typo. with 12V supply, the 15-ohm load, 0.66A current flowing, the voltage drop across the MOSFET isnt 2V, its nearly zero. unlike the bipolar TIP120, an "on" MOSFET looks like a resistor, so we have to calculate the voltage drop (rather than the quantum-physics-defined-plus-resistance Vce of a bipolar):
|MOSFET "on" voltage drop:||0.0055ohms * 0.66A = 0.0036V||calc'ed voltage drop drain-to-source|
so substituting that voltage drop (it varies with the load current, as you can see above, unlike the TIP120):
|MOSFET:||0.0036V * 0.66A = 0.0036 watts||that's 3.6 mW|
|load:||4.9996V * 0.66A = 3.297 watts||ayup, load gets the goods|
the 3.6mW of heat energy wasted in the MOSFET is so small, the wire leads will heat-sink it. and the load will get all of the power. the values above are not just theoretical; i measured 0.005V across the MOSFET, drain to source (discrepancy likely breadboard leads, notoriously high resistance).
here's one i keep on my bench for breadboarding, with leads attached. it's small. the graph paper is 10x10 squares to the inch.
so why are you using that TIP120? i dare you to defend it. its JUNK. literally, throw them out, and anyone who tells you to use them really needs to RTFM. I wouldnt even use them as replacement parts. the NTD4906N will switch 54 Amperes!!! OK for that it needs a modest heatsink. you could still drive it with an arduino using NO OTHER parts. (though it's good practice to put a 10K resistor from it's gate to ground; the gate "resistance" is about 10 teraohms (look that up) so if the gate is left disconnected for some reason (eg. during RESET of an Arduino) it could turn on from currents so small you literally cannot measure them.)
consider this: one part, any power MOSFET like the NTD4906, two for a buck, will drive any load you have, more or less. ANY. (i am assuming you are not an EE and building specialty functions; low noise, high speed, etc. this article is for 'rule of thumb' design driving simple loads at low speeds, eg. less than a million operations a second.) (yes, that is "slow", in 2014.)
the schematic symbol for a MOSFET often has all that extra crap drawn in for no good reason. i draw them the same as JFETs, because it's easier, and "everyone knows what i mean" (famous last words). oh, and there are N-channel and P-channel FETs, MOSFETs, which is more or less the same as for bipolars' NPN vs. PNP. there is also, confusingly, "enhancement" and "depletion" FETs, but luckily, 99% of the FETs you'll ever see (or want, or buy) will be "enhancement mode N-channel MOSFET"s which you can think of precisely as you did (PAST TENSE) the TIP120 or other NPN transistor: a + voltage applied to the gate turns it on (source to drain becomes very low ON resistance).
the text labels for the image below are german. you can figure it out, right?
lastly, though an FET is not the same as a bipolar transistor, really, you can consider these to be equivalances for most purposes, assuming NPN transistor, N-channel enhancement FET:
|function||input||low side (ground)||high side (load)|
|bipolar transistor:||base (B)||emitter (E)||collector (C)|
|FET (all types):||gate (G)||source (S)||drain (D)|
the datasheet says the TIP120 has a current gain (equiv. hfe) of 2500, which ought to mean, if you shove 1 mA into the base, you can make it saturate and sink 2500mA (2.5A) through collector-to-emitter. alas, in the real world, you use the value from the datasheet MIN column, not TYPICAL (and MAX is pure marketing) and, the magic word for all of electronics: derate, derate, derate. eg. assume worser than worstest. Certain People In Politics give the word "conservative" a bad rep, but here it applies: you really need to assume each transistor has a gain of like 10, in open-loop designs like a stupid common-emitter amplifier (which is what this circuit really is). also, you are likely making one circuit, not planning on mass-producing 1,000,000,000 of whatever it is; who cares if you spend a buck where a dime might do? you want it to work first time every time, right? this is art not technology (eg. industrial capitalism); we have different design criteria here.