3.9 Transistor Basics
In Chapter 1 we discussed some basics of the semiconductor physics involved with the bipolar junction transistor (BJT), so we aren’t going to discuss that again. Instead we are going to see how they are used practically, using a very simple (yet accurate) model. In general transistors are used for two things: switching and amplification. Switching is the more pertinent application in our case; amplification is a secondary concern. However we will still want to understand the how use transistors as amplifiers.
Referring to Figure 3.61, there are two types of transistors NPN and PNP: They look identical physically, but internally they are different inasmuch as the doping of the semiconductor material. In either case, the figure shows the symbols for both NPN and PNP transistors and their most common package (for through hole work), the TO92 package.
Figure 3.61 NPN and PNP transistors.
The only difference between NPN and PNP as far as their schematic symbols go is the direction of the arrow on the emitter lead. For NPN the emitter arrow points away from the base or body of the transistor; for PNP the emitter arrow points toward the base or body of the transistor.
That’s all fine and dandy, but what does a transistor do? It basically allows you to control a secondary circuit with a small current or voltage in another primary circuit. For example, we can switch on a large amount of current with a small current, or we can use transistor to create digital gates, etc. The point is that the ability to turn on/off another circuit, thereby mimicking a mechanical relay, is very powerful, so transistors in one configuration are devices that allow us to control current in another circuit in a digital on/off manner. Additionally, transistors can be used as amplifiers. With that in mind, we can model a transistor as a current controlled switch or resistor with the following properties.
3.9.1 Transistor Properties and Rules
The rules we are going to derive are for the NPN transistor; for the PNP all polarities are simply inverted, but the operation is the same other than that. Please refer to Figure 3.62 for this discussion. Here are the rules:
Figure 3.62 Transistor analysis model.
- Rule 1: The collector voltage must always be greater than the emitter by approximately 0.2V.
- Rule 2: The base-emitter and base-collector circuits in a transistor act like diodes. The base-emitter diode is forward biased and conducting when the transistor is operating. The base-collector diode is reverse-biased and not conducting. This should seem like a paradox, and it is. Since internally transistors are not just diodes, we are doing a little hand waving here, so don’t feel uneasy if you look at the figure and see current flowing through a reverse biased diode: Remember there is no diode there. Using a couple diodes to help you understand parts of the transistor operation is okay—but in reality transistors do not act like diodes!
- Rule 3: Transistors all have maximum current and voltage ratings. Some of the values of importance are IB (base current), IC (collector current), IE (emitter current), not shown here yet. Also there are the voltages VBE (base-emitter), VCE (collector-emitter), and so forth.
- Rule 4: Now comes the fun part: So as long as the collector voltage is greater than the emitter voltage and we don’t exceed any of the voltage maximums, the transistor "action" will occur. This action describes the relationship between the currents in the transistor. This relationship is
Equation 3.4: Transistor base/collector current relationship.
- IC = hFE*IB = β*IB
hFE and or β (beta) is called the current gain, beta, or just plain gain of the transistor, and is a measure of the current amplification from the base current to the collector current. For common transistors such as the 2N3904/3906, the gain is anywhere from 50–250. A reasonable average gain to count on is 100 minimum.
So the gain formula tells us that a small amount of base current causes a large amount of collector current. This is the key to the transistor, its current amplification ability. Also, since the base-emitter leg of the transistor is very similar to a diode, we can even model the diode drop properly; in other words when you apply a voltage to the base, the base-emitter diode will drop about 0.6–0.7V, no matter what. Or in other words, you cannot ever apply a voltage across the base-emitter junction greater than this or you will destroy the transistor. Therefore, we can write this modeling equation:
- VB = VE + VBE (approximately 0.6–0.7V)
Most people just use 0.6V and be done with it, resulting in
Equation 3.5: Transistor base-emitter voltage relationship.
- VB = VE + 0.6V
And of course, all this is reversed for PNP, but luckily for us in digital electronics +5V= "1", +0V = "0", and a positive voltage happens to turn on a NPN transistor, so you will tend to use NPN transistors only in your designs! Lastly, try not to think of the base-collector as a real diode; it only has some of the properties as a diode.
3.9.1 Transistor Switching
As a first example, let’s see how the transistor works as a simple switch. Figure 3.63 depicts a NPN transistor with a 1K base resistor controlled by a switch connected to the +5 rail. In the collector circuit there is a load resistor RL (this could be a light, device, whatever). Finally the emitter is connected to ground.
Figure 3.63 Transistor switching analysis circuit.
22.214.171.124 Switch Off—Transistor Off
With the switch off, there is no base current. Since there is no base current, there is no collector current, since IC = hFE*IB and IB=0. Due to this, the load is not driven.
126.96.36.199 Switch On—Transistor On
When we flip the switch on, the transistor starts to conduct; it does this since there is a current path from the base to the emitter through R1. The base-emitter junction drop increases to about 0.6V, so the base ends up at 0.6V. That means that the voltage drop over R1 must be 5.0V – 0.6V = 4.4V, therefore the current through R1 and consequently into the base must be:
- IB = 4.4V/1K = 4.4mA
Now, here comes the fun part: Referring back to our modeling equation of the current gain, and assuming that the transistor has an average beta of 100, we know that
- IC = 100*IB = 100*4.4mA = 440mA
Is this right? Yes, but it’s not good; remember the beta may vary wildly from one transistor to another, but if you design assuming that beta can range from 50–250 then you would be covered. And in a switch like this, that would be easy. In any case, continuing the analysis, we see that the collector current is 440mA—that’s a lot of current, but is this possible? This depends on the load. If the load was 10 ohms then the voltage across the load would be
- Vload = 440mA * 10Ω = 4.4V
Therefore, the voltage at the collector itself VC is still above the emitter by at least .2V, so we are okay. But let’s up the load to 100 ohms and see what happens. At 100 ohms, the voltage drop would be
- Vload = 440mA * 100Ω = 44V
Which is actually funny and makes no sense since the supply is only 5V. However, you would be amazed at how many people would leave this as an answer on a test. Anyway, something’s got to give. And that something is the current, so we assume that the transistor will only allow enough current such that the voltage VC is 0.2V greater than the emitter voltage VE (which is at ground). Or in other words, VC = 0.2V; therefore, the voltage drop over our 100 ohm load will be
- Vload = 5V – 0.2V = 4.8V
and the current through the 100 ohm load is
- Iload = IC = 4.8V / 100Ω = 48mA
Therefore, the circuit can only supply 48mA to a load of 100 ohms, but can supply 440mA to a load of 10 ohms.
This is basically how transistors are used as switches. You control the base with a voltage or current to turn the "switch" on or off, and then based on the collector circuit design, it serves whatever purpose you need.
3.9.2 Emitter Followers and Impedance Reflection
Another interesting use for transistors is what’s called "emitter followers"; that is, using a transistor to "pass" a voltage to another stage untouched, with the added benefit that the transistor’s base has huge impedance, which is good for the input signal. Let’s take a look at this property by referring to Figure 3.64. We know that the base voltage VB is always 0.6V or so higher than the emitter voltage VE, so let’s just turn this equation around like this:
- VE = VB – 0.6V
Figure 3.64 Circuit to demonstrate impedance reflection.
And presto, you have a voltage follower. That is, whatever voltage you apply to the base, the emitter follows it with a slight translation (decrease) of 0.6V. However, there are limits to this of course. You must make sure that VBE is always 0.6V; if it’s less, the transistor will stop conduction, and of course you must have the emitter resistor there to create a voltage drop. The reason why is if you put 3V on the base, and the emitter was tied directly to ground, then you would damage the transistor, since we must maintain the property that the base-emitter junction never has more than approximately 0.6V across it.
All right, the voltage following capability is interesting, but is there anything else we can get from this configuration? The answer is impedance reflection, or in other words, when you are sending a signal from one part of the circuit to another, you don’t want to load your output: You want the input to the next stage to have infinite impedance if possible (unless you are transferring power, then you want to match the impedance). This is hard to do when the load can change, but with a transistor you can "reflect" the load through the transistor’s gain and multiply the apparent impedance by the gain factor. The analysis follows.
First, we need to slightly modify our current model and define IE:
- IE = IB + IC
In most cases, IE = IC since IB is so small, but in this case, let’s use a more exact model. Plugging in the fact that IC = hFE*IB, we get:
- IE = IB + hFE*IB = IB*(1 + hFE)
- IB = IE / (1 + hFE)
And we know that VE = VB – 0.6, but if are looking at the differences in VB and VE then we can write
- ΔVE = ΔVB
Computing the current thru R, we get
- ΔIE = (ΔVE / R) = (ΔVB / R)
And combining the results, we get:
- ΔIB = ΔVB / [R*(1 + hFE)]
Paying close attention to this result, we see that the load impedance R seen from the base is not just R, but R multiplied by (1+hFE). Or in other words, if there was a 1K load R and the gain of the transistor was 100 nominal then using an emitter follower "reflects" the impedance and multiplies it by the gain, resulting in 100*1K = 100K of equivalent input impedance. That is very useful; we just unloaded the output by a factor of 100 in comparison to if we were just driving the 1K directly.
The transistor modeling for amplification is a little more complex than for a switch, so we don’t need to cover it. However, I do want to leave you with a general circuit for amplification of small signals with AC coupling and some discussion of its operation. Figure 3.65 is a nice single stage transistor amplifier with high pass filters on the input and output and "voltage divider" biasing.
Remember, the transistor always has the ability to amplify current, but if you want to amplify a voltage such as an audio signal then you must first realize that the audio signal is very small, and it’s probably AC. So step one is to "AC couple" the signal into the amplifier, so you don’t amplify the DC component; this is accomplished at C1. Only AC will pass through C1, so the small signal will get through, but whatever DC component will get blocked. Next we see that the base of the transistor is biased such that the resistors R1 and R2 create a voltage divider network; we would want to set the voltage of the base, which is somewhere in the middle of the voltage supply, so that we can swing the input as large as possible and with symmetry. The actual voltage on VB will of course be
- VB = VCC * R2/ (R1+R2)
Figure 3.65 Single stage transistor amplifier.
Additionally, we should note that the C1 and the parallel combination of R1||R2 create a high pass filter.
Okay, next we need an output load resistor to drop the output signal on; this is RL. Attached to RL’s top node is another capacitor C2, which once again AC couples the signal out of the amplifier without any DC component. And of course C2 and RL create yet another high pass filter.
Now, to actually select the values of the resistors and capacitors we have to decide on a few things, but the interesting part will be that the final gain of the circuit will have nothing to do with the gain hFE! And that’s what we want—gain invariance: We want the gain to be a function of the component values which we can control, not a random process on the transistor. In any event, let’s set some values. If VCC is 5V and we want to maximize output swing then we assume that VE is at 2.5V; given that we know that RL has a 2.5V drop over it, but we need to decide on the quiescent operating point. That is, how much current flows with no input. A good range might be from 100μA to 10mA, so let’s pick something in the middle with easy math: 1.0mA. Therefore, if there is 1.0mA flowing through RL with a voltage drop of 2.5V then RL must be
- RL = 2.5V / 1.0mA = 2.5K ohm
Next is to figure out what values for the voltage divider we need. The base will be about 0.6V above the emitter voltage or VB = VE+0.6 = 2.5+0.6 = 3.1V; therefore we need to select voltage divider resistors that divide the voltage 1.9V over R1 and 3.1V over R2, or a ratio of 1:1.63. There are of course an infinite number of pairs that will do this, so we need some more information to pin the values down better. One is the impedance reflection: The rule of thumb is to make sure that the input impedance voltage divider network is about 1/10 that of the reflected impedance seen at the base, which is calculated as (hFE*2.5K) = 250K, and 1/10th of that is 25K. So we know the parallel combination of R1 and R2 should be in that range, so we select them as follows (rounding off to common values):
- R1 = 50K
- R2 = 50K*1.63 = 82K
Perfect. Next, we need to decide on the AC coupling capacitors C1 and C2; this means we need to think about what it is we are amplifying. Since 99% of the population commits 1,000 felonies a year stealing MP3s, it looks like people are willing to die and go to jail to listen to music! So let’s make audio frequencies from 20–20KHz our target frequencies. Since the assemblies (C1, R1, R2) and (C2, RL) both create high pass filters, we simply need to select C1 and C2 to pass anything greater than 20Hz. If you recall from our discussion of high pass filters, the 3dB point for a high pass filter—that is, the point at which the filter kicks in and passes 70% or more of the input—is
- f3dB = 1/2**R*C
Since the parallel combination of R1||R2 = 31K ohm, we can find C1 for the input filter as follows:
- 1Hz = 1/2**31K*C1
C1 = 5.13μF, so we might use a 10μF, which would cause the f3dB point to be even sooner, which is fine. Next, let’s calculate C2 with RL=2.5K:
- 1Hz = 1/2**2.5K*C2
C2=63.66μF, so a nice 100μF capacitor would work fine. This concludes our analog coverage of transistors. You have seen how to use them as switches, impedance reflectors, and amplifiers. Now, we are going to briefly delve into some very crude transistor models for digital logic for fun before we see real ICs in the upcoming chapters.