†Transistors I: Simple Amplifiers Chris Greacen This is the column I've been waiting for. After resistors (issue #31), and diodes (issue #32), we're ready to dive into the heart of electronics: transistors. Transistors are used in every place that electricity controls other electricity. They create and respond to the pulses of electricity that transmit information in computers. They control the big pulses of electricity in inverters and regulators in renewable energy systems. As amplifiers, they amplify small signals (like those of a radio antenna) into larger ones. This issue we'll look at transistors as amplifiers. Next issue, we'll look at transistors as electronically controlled switches. Dr. Klge Duck Deluge Think of a transistor as a water faucet which is controlled by a small stream of water. A smaller signal is amplified into a bigger signal. You feed a transistor a small electrical signal, and out comes a signal with more power than the input signal. The extra power comes from an external source of power. Dr. Klge demonstrates the idea with his "eight fluid ounce controlled duck shower". It's a plumbing transistor. Pour a small amount into the funnel, and a proportionately larger flow dumps on the ducks. If Dr. Klge pours the water in in slurps and spurts, giant slurps and spurts spill on the ducks. INSERTFig1KlgeDeluge.2PICT An electrical transistor is considerably smaller, and does not require a water truck. Shown below is a typical NPN transistor and its electrical symbol. It has three legs, called the base, the collector, and the emitter. The base corresponds to the funnel in Dr. Klge's Duck Shower. The collector corresponds to the top pipe of the Duck Shower, going to the water truck. The emitter corresponds to the output of the Duck Shower. INSERT Fig2NPNsym Feed a small current into the base (Ibase or Ib) and you control a larger current into the collector (Icollector or Ic). Just as the deluge out of the duck shower is many times larger than the water poured in the funnel, Ic is much larger than Ib. Mathematically, Ic = bIb where b (often written hFE) is called the "current gain" of the transistor, and is typically 20 to 300 depending on the type of transistor. Power transistors have small gain (20 to 50), while smaller signal transistors have gains of 100 or more. The base current (small) is added to the collector current (big) and both come out the emitter Ie = Ic + Ib ÷ Ic. In the graph below, a rather random, small current signal is fed into the base (Ib), and this controls a current into the collector which is b times bigger. The emitter current is the sum of the collector and base currents. Hierarchy of Voltages A transistor will only do this amplifying stuff if a strict hierarchy of voltages is observed. 1) The collector voltage (Vc) must be greater than the emitter voltage (Ve). 2) The base voltage (Vb) is approximately equal to the emitter voltage (Ve) plus one diode drop (0.6 Volts). SIDEBAR: Build These Circuits You can look at these on paper, and you'll get a certain understanding of what's happening. But electronics doesn't happen on paper; it happens in the circuits themselves. Build them! Make mistakes! Be creative! As long as your battery is fused, the worst you can do is fry some inexpensive parts. If you're careful and make sure every wire is in the right place before you power it up, you won't blow up anything. You'll need a 12 Volt battery with a 1 amp fuse, a "breadboard" to wire up circuits. I like breadboards with "banana plugs" for external connections so that there's as few alligator clips as possible. You'll also need some 24 gauge wire pieces, and the pieces parts in the schematics. Unless otherwise stated, the NPN transistor in the circuit is the common 2N2222A. The PNP transistor is a 2N2905. All this stuff is available at your local electronics store. For the most edifying electronics experience, get a hold of an electronics nerd who has an oscilloscope, and you'll be able to watch voltages within the circuits. INSERT Fig3KlgeBreadboardPICT INSERT Fig4XistorPkgs INSERT Fig5EmitterFollPICT Lets look at some typical transistor circuits. In the "emitter follower" circuit above, the voltage across the load follows the base voltage, and is always about 0.6 Volts lower. This is a direct consequence of rule #2. What's the point of the circuit? You get less voltage out (Ve) than you put into the base (Vb) Ä see figure 6. But your low amperage control current (Ib) controls a larger current through the transistor (Ic ÷Ie) Ä figure 7. Even though the voltage out is lower, the power (voltage times current) output is greater. INSERT Fig6VoltEmitFolPICT INSERT Fig7CurrentEmitFolPICT You could use it as a fancy, rather inefficient dimmer for a 12 Volt light. In this case for the variable voltage source you might use a 5 Kę potentiometer as shown below (Figure 8). INSERT Fig8DimmerEfolPICT Common Emitter Amplifier Emitter followers show clearly the hierarchy of voltages in an operating transistor, but often you want to amplify low voltage signals. Emitter followers don't do this Ä the output voltage (Ve) is always lower than the input voltage. If you connect the load from the collector to ground, and connect the emitter to ground with a small resistor, the circuit is called a "common emitter amplifier". (See figure 9). We'll use a lot of Ohm's law and algebra to look at this circuit. Skip to the "Touch-Controlled Light" if this makes you uncomfortable. INSERT Fig9ComE This circuit amplifies small voltage signals. Lets see how it works. For the sake of argument, let's start with 1.6 Volts on the base. Then the emitter voltage is 1.6V - 0.6V = 1 Volt. If there's 1 volt at the emitter, then the current through the 240ę emitter resistor is Ie =1 Volt/240ę = 4.2 mA. In a way, this 240ę resistor "programs" the transistor by setting how much current drains out of the emitter. Now remember that Ic ÷ Ie, so the current flowing through resistor R is approximately Ie. Therefore the output voltage (Vc) = 12 Volts - IeR. If you choose R = 2.4 kę, the output voltage is 12 - (4.2mA)(2.4kę) = 2 Volts. Ok, I hope your head doesn't hurt yet. Hang on just a little more. Let's say we raise the input voltage by 0.1 volts to 1.7 Volts. Now Ve= 1.1 Volts, programming Ie =1.1 Volt/240ę = 4.58 mA. Now Vout = 12 - (4.58mA)(2.4kę) = 1 Volt. The bottom line is that changing the input voltage by 0.1 volts (that is 1.7 V - 1.6 V) changed the output by 1 V - 2 V = -1 Volt! The change in the output voltage is -10 times the change in the input voltage. We say the "gain" of the transistor is -10. If we changed R to something else, the gain would be R/240ę. Build the circuit with a potentiometer in series with a 1 kę resistor for R so you can change the amplifier's voltage gain with a knob. Clipping What happens when we put in, say, 2 Volts in the base? This is change of 3V - 1.6V = 1.4 Volts, so we'd expect to see a change of -10 x 1.4 Volts = - 14 Volts. The output would supposedly be 2V - 14V = -12 Volts. This won't happen of course since the voltages available to the circuit are zero to twelve, determined by the battery that's powering the thing. In this case the output is simply pinned at zero volts. When the output is flattened like this, we say it is "clipped". See Figure 10. Conversely, if you make Vb = 0 Volts, a change of -1.6 volts, you'd expect to see the output change 16 Volts Ä again output is pinned, this time at 12 Volts. Usually amplifiers are designed so the output wiggles around half the supply voltage Ä in this case six volts. We could get this amplifier to wiggle around 6 volts by choosing R = 6 Volts/ 4.2mA = 1.43 kę, at the expense of less gain. INSERTFigure10Clipping Biasing In the amplifier above, the input signal wiggled around 1.6 Volts. Typically the small signal you want to amplify wiggles below and above zero volts. If you were to feed this into the common emitter amplifier you would only amplify some of the positive parts of the signal. To amplify the whole signal, we need to boost it up so that it wiggles around 1.6 Volts. This is called biasing the transistor. A component called a capacitor passes the wiggles up to the biased base voltage. We could bias the base with a 1.6 Volt battery (figure 11). But since batteries are expensive, wear out, and only come in certain voltages, in practice, biasing is usually done with two resistors forming a voltage divider, as shown with 72kę and 10kę (figure 12). You probably won't find grounded emitter amplifiers inside your stereo. They've got lots of distortion, poor temperature stability, and they can waste power when there's no incoming signal. These are the concerns of amplifier designers, and the techniques to improve amplifiers are deep and devious. INSERTFig11ComEBat INSERTFig12ComEVDiv Touch-Controlled Light On the other hand, a very similar circuit is useful and common as a transistor "switch". Here's a circuit which sums up all the demented transistor stuff we've been looking at. It's a common emitter circuit used to control a lightbulb. If you touch a moistened finger to both wires, a small current (Ib) flows through it (you won't feel it). A proportionately larger current Ic = bIb lights the light bulb. The 1kę resistor keeps too much current from flowing into the base if your finger has too little resistance, or if you touch the wires together. Touch a dry finger lightly to the two wires, and the lamp will light dimly. Moisten your finger and make a good contact, and the light will be bright. Incidentally, you might try the circuit without the transistor (figure 15). Put your finger across the two wires, and nothing will happen. Your finger has too much resistance to conduct current to light the bulb. INSERTFig13TouchLightNPN INSERTFig14WontWork PNP Transistors So far we've been talking only about NPN bipolar transistors. They're turned on by feeding a positive current into the base. Bipolar transistors come in another common flavor: PNP. They're sort of a an upside down cousin of the NPN. All the voltage hierarchies of NPN transistors are reversed, and you turn them on by "sucking" current out of the base. INSERT Fig15PNPTRANSISTOR PNP voltage hierarchy 1) The emitter voltage (Ve). must be greater than the collector voltage (Vc) 2) The base voltage (Vb) is approximately equal to the emitter voltage (Ve) minus one diode drop (0.6 Volts). Here's the touch controlled light using a PNP transistor. Notice that here when your finger contacts the two wire ends, current is sunk to ground. This makes the PNP conduct from emitter to collector, turning on the light. INSERTFig16TouchLightPNP Next time: Transistors as Electronic Switches All the circuits we've looked at so far take advantage of the ability of a transistor to work like a faucet turned partway on Ä we say it is "operating in its linear region". This is inefficient because leaving the transistor part way on dissipates energy as heat. Consider the emitter follower light dimmer in Figure 7. Lets say you've set the base voltage at 6.6 volts. Then the emitter voltage (the voltage across the light) is 6 Volts (6.6 - 0.6 Volts). The current in the light is 6 Volts ö 100 ę = 0.06 Amps, dissipating IV = 0.360 Watts. But where did the other six Volts go? You're supplying the circuit with 12 Volts. The remaining six Volts are eaten by the transistor, which also dissipates IV = 0.360 Watts. A more efficient way to make a light dimmer is to switch the transistor fully on and fully off quickly. The circuit is just like the common emitter above, but in designing it you ensure that the base voltage is either zero, or at 0.6 Volts, and doesn't spend much time in between. You "drive it hard" Ä give it more than enough current to turn it on, and when you turn it off, make sure it's turned off. You do this many times a second, and adjust the amount of "on time" and "off time". This technique is called "pulse width modulation" and is found in nearly all inverters, charge controllers, and other equipment like Linear Current Boosters. See the Pulsar article in HP#31, page 54 for more discussion on pulse width modulation, and a homebrew circuit using this technique in a flashlight battery charging circuit. Next issue we'll look more transistors in "switch mode" and we'll look at a new generation of power Field Effect Transistors (FETs) which are ideal for switching large amounts of current. Access: Author: Chris Greacen, Home Power Magazine, POB 520 Ashland, OR 97520 ů 916-475-3179