Chapter 10
IN THIS CHAPTER
Revolutionizing electronics with the tiny transistor
Understanding transistor action
Using transistors as teeny-tiny switches
Giving signals a boost with transistors
Imagine the world without the amazing electronics building block known as the transistor. Your cellphone would be the size of a washing machine, your laptop wouldn’t fit on your lap (or in a single room), your iPod would be just another pie-in-the-sky idea — and your Apple stock would be worthless.
Transistors are the heart of nearly every electronic device in the world, quietly working away without taking up much space, generating a lot of heat, or breaking down every so often. Generally regarded as the most important technological innovation of the 20th century, transistors were developed as an alternative to the vacuum tube, which drove the development of electronic systems ranging from radio broadcasting to computers but exhibited some undesirable characteristics. The solid-state transistor enabled the miniaturization of electronics, leading to the development of cellphones, iPods, GPS systems, implantable pacemakers — and much more.
In this chapter, you find out what transistors are made of and the secrets of their success. You discover how transistors amplify tiny signals and how to use transistors as microscopic switches. Finally, you observe transistor action firsthand by building a couple of simple transistor circuits.
Transistors basically do just two things in electronic circuits: switch and amplify. But those two jobs are the key to getting really interesting things done. Here’s why those functions are so important:
Switching: If you can switch electron flow on and off, you have control over the flow, and you can build involved circuits by incorporating lots of switches in the right places.
Consider, for instance, the telephone-switching system: By dialing a 10-digit number, you can connect with any one of millions of people around the world. Or look at the Internet: Switching enables you to access a website hosted in, say, Sheboygan while you’re sitting on a train in, say, London. Other systems that rely on switching are computers, traffic lights, the electric power grid — well, you get the idea. Switching is pretty darn important.
Amplifying: If you can amplify an electrical signal, you can store and transmit tiny signals and boost them when you need them to make something happen.
For instance, radio waves carry tiny audio signals over long distances, and it’s up to the amplifier in your stereo system to magnify the signal so it can move the diaphragm of a speaker so you can hear the sound.
Before the invention of the transistor, vacuum tubes did all the switching and amplifying. In fact, the vacuum tube was widely regarded as the greatest marvel in electricity in the early 20th century. Then, Bardeen, Brattain, and Shockley showed the world that tiny semiconductor transistors could do the same job — only better (and for less money). The trio was awarded the 1956 Nobel Prize in Physics for their invention of the transistor.
Transistors these days are microscopically small, have no moving parts, are reliable, and dissipate a heck of a lot less power than their vacuum-tube predecessors. (However, many audiophiles believe tubes offer superior sound quality compared to solid-state transistor technology.)
The two most common types of transistors are
Figure 10-1 shows the circuit symbols commonly used for various types of transistors. The sections that follow provide a closer look at bipolar transistors and field-effect transistors.
One of the first transistors to be invented was the bipolar junction transistor (BJT), and BJTs are what most hobbyists use in home-brewed circuits. BJTs consist of two pn-junctions fused together to form a three-layer sandwich-like structure. As Chapter 9 explains, a pn-junction is the boundary between two different types of semiconductors: a P-type semiconductor, which contains positive charge carriers (known as holes), and an N-type semiconductor, which contains negative charge carriers (electrons).
Leads are attached to each section of the transistor, and are labeled the base, collector, and emitter. There are two types of bipolar transistors (see Figure 10-2):
A field-effect transistor (FET) consists of a channel of N- or P-type semiconductor material through which current can flow, with a different material (laid across a section of the channel) controlling the conductivity of the channel (see Figure 10-3).
One end of the channel is known as the source, the other end of the channel is called the drain, and the control mechanism is called the gate. By applying a voltage to the gate, you control the flow of current from the source to the drain. Leads are attached to the source, drain, and gate. Some FETs include a fourth lead so you can ground part of the FET to the chassis of the circuit. (But don’t confuse these four-legged creatures with dual-gate MOSFETs, which also have four leads.)
FETs (pronounced “fetts”) come in two flavors — N-channel and P-channel — depending on the type of semiconductor material (N-type or P-type, respectively) through which current flows. There are two major subtypes of FET: MOSFET (metal-oxide-semiconductor FET) and JFET (junction FET). Which is which depends on how the gate is constructed — which results, in turn, in different electrical properties and different uses for each type. The details of gate construction are beyond the scope of this book, but you should be aware of the names of the two major types of FETs.
FETs (particularly MOSFETs) have become much more popular than bipolar transistors for use in integrated circuits (ICs), which I discuss in Chapter 11, where thousands of transistors work together to perform a task. That’s because they’re low-power devices whose structure allows thousands of N- and P-channel MOSFETs to be crammed like sardines on a single piece of silicon (that is, semiconductor material).
The semiconductor material in a transistor is the size of a grain of sand or even smaller, so manufacturers put these teensy components in a metal or plastic case with leads sticking out so you can connect them in your circuits. You can find literally dozens upon dozens of different shapes and sizes of transistors, some of which are shown in Figure 10-4.
The smaller packages generally house signal transistors, which are rated to handle smaller currents. Larger packages contain power transistors, which are designed to handle larger currents. Most signal transistors come in plastic cases, but some precision applications require signal transistors housed in metal cases to reduce the likelihood of stray radio-frequency (RF) interference.
Bipolar transistors typically have three wire leads so you can access the base, collector, and emitter of the transistor. One exception to this is a phototransistor (which I discuss in Chapter 12), which is packaged in a clear case and has just two leads (collector and emitter) — light is used to bias the transistor, so you don’t have to apply a voltage to the base. All FETs have leads for the source, drain, and gate, and some include a fourth lead so you can ground the transistor’s case to the chassis of your circuit, or for the second gate of a dual-gate MOSFET.
Transistors can be combined in all sorts of ways to make lots of incredible things happen. Because the semiconductor material that makes up a transistor is so small, it’s possible to create a circuit containing hundreds or thousands of transistors (along with resistors and other components) and plop the entire circuit into a single component that fits easily into the palm of your hand. These amazing creations, known as integrated circuits (ICs), enable you to build really complex circuits with just a few parts. The next chapter takes a look at some of the ICs that are available today as a result of the semiconductor revolution.
You can set up the control mechanism for your valve in two ways. The control mechanism can
Bipolar transistors work in a similar way: The base acts like the controllable valve in Figure 10-5, controlling the flow of electrons from the emitter to the collector (or, in circuit-speak, the flow of conventional current from the collector to the emitter). By controlling the base, you can turn the transistor fully on or fully off, or you can allow small changes at the base to control large changes in current from collector to emitter.
Exactly how a transistor works internally involves technical details about free electrons, moving holes, pn-junctions, and biasing. You don’t have to know all that technical stuff by chapter and verse to use transistors in circuits. Instead, familiarize yourself with a functional model of a transistor, and you’ll know enough to get going.
Figure 10-6 shows a simple model of an NPN transistor on the left, and the circuit symbol for an NPN transistor on the right. The model includes a diode representing the base-emitter junction, and a variable resistance, RCE, between the collector and the emitter. The value of the variable resistance is controlled by the diode in this model. Voltages, currents, and transistor terminals are labeled so you can see how the model corresponds to the actual device.
Here’s what the voltages and currents represent:
When you design a transistor circuit, you choose components that will put the transistor into the right operating mode (cutoff, active, or saturation), depending on what you want the transistor to do. Here’s how:
Transistors are commonly used to amplify small signals. (See the sidebar titled “Deciphering electrical signals” for details on what signals are.)
Suppose that you produce an audio signal as the output of one stage of an electronic circuit, and you’d like to amplify it before shipping it off to another stage of electronics, such as a speaker. You use a transistor, as shown in Figure 10-7, to amplify the small up-and-down fluctuations in the audio signal (vin), which you input to the base of the transistor (labeled Q in the schematic). The transistor transforms them into large signal fluctuations (vout), which appear at the output (collector) of the transistor. Then you take the transistor output and apply it to the input of your speakers.
A transistor must be partially on to work as an amplifier. To put a transistor in this state, you bias it by applying a small voltage to the base. In the example that was shown in Figure 10-7, resistors R1 and R2 are connected to the base of the transistor and configured as a voltage divider (for more about how a voltage divider works, see Chapter 6), dividing the supply voltage, Vsupply. The output of this voltage divider, , supplies enough voltage to the base to turn the transistor on and allow current to flow through it, biasing the transistor so it’s in the active mode (that is, partially on).
Capacitor C1 allows only AC to pass through to the transistor, blocking any DC component of the input signal (an effect known as a DC offset), as shown in Figure 10-8. Without that blocking capacitor, any DC offset in the input signal would be added to the bias voltage, potentially saturating the transistor or shutting it off (cutoff) so it no longer acts like an amplifier.
With the transistor in Figure 10-7 partially on, fluctuations in the base current caused by the AC input signal get amplified by the transistor. Because the current gain, hFE, of any transistor you happen to choose can be somewhat variable (schizophrenic, in fact), you design your amplifier circuit to eliminate any dependency on the flaky current gain. You’ll give up some strength of amplification, but you’ll get stability and predictability in return.
The type of transistor setup I discuss in the preceding section is known as a common-emitter amplifier (so-named because the emitter is tied to common ground); this circuit is just one of many ways to configure transistor circuits for use as amplifiers. You use different configurations to achieve different goals, such as high power gain versus high voltage gain. How the circuit behaves depends on
For instance, you can piggyback two bipolar transistors in a setup known as a Darlington pair to produce multiple stages of amplification. (In the section “Gaining Experience with Transistors,” later in this chapter, you find out how to configure a simple Darlington pair.) Or you can get the same result the easy way: Purchase a three-lead component called a Darlington transistor, which includes a Darlington pair already hooked up.
You can also use a transistor as an electrically operated switch. The base lead of the transistor works like the toggle on a mechanical switch as follows:
How do you get this on/off thing to work? Say you use an electronic gadget to scatter chicken feed automatically at dawn. You can use a photodiode, which conducts current when exposed to light, to control the input to a transistor switch that delivers current to your gadget (the load). At night, the photodiode doesn’t generate any current, so the transistor is off. When the sun rises, the photodiode generates current, turning the transistor on and allowing current to flow to your gadget. The gadget then starts scattering chicken feed — keeping the chickens happy while you continue to snooze.
Are you’re wondering why you don’t just supply the current from the photodiode to the gadget? Your gadget might need a larger current than can be supplied by the photodiode. The small photodiode current controls the on/off action of the transistor, which acts like a switch to allow a larger current from a battery to power your gadget.
Transistors have become so popular that thousands upon thousands of different transistors are available. So how do you choose one for your circuit, and how do you make sense of all the choices on the market?
If you’re designing a transistor circuit, you need to understand how your circuit will operate under various conditions. What is the maximum amount of collector current your transistor will have to handle? What is the minimum current gain you need to amplify an input signal? How much power could possibly be dissipated in your transistor under extreme operating conditions (for instance, when the transistor is off and the entire power supply voltage may be dropped across the collector-emitter)?
After you understand the ins-and-outs of how your circuit will operate, you can start looking up transistor specifications to find one that meets your needs.
Loads of parameters are used to describe the loads of different transistors, but you need to know only a few parameters to choose the right transistor for your circuit. For bipolar (NPN or PNP) transistors, here’s what you need to know:
Total power dissipation (Ptotal): The total power that the transistor can dissipate; this value is roughly VCE×ICmax. No need to worry about this rating if you’re using the transistor as a switch because power dissipation is nearly zero anyway. If you’re using the transistor as an amplifier, however, you need to be aware of this rating.
If you think your circuit will approach the total power dissipation value, be sure you attach a heat sink to the transistor.
To determine these characteristics, consult the component's data sheet, which provides technical specifications for the component, on the manufacturer’s website. If you’re building a circuit someone else designed, you don’t have to worry too much about the specs; you can simply use the transistor specified by the designer or consult a cross-reference to find a similar model to substitute.
Many bipolar transistors originating in North America are identified by a five- or six-digit code that is part of an industry-standard semiconductor identification system. The first two digits are always 2N for transistors, with the 2 specifying the number of pn-junctions and the N signifying a semiconductor. The remaining three or four digits indicate the specific features of the transistor. However, different manufacturers may use different coding schemes, so your best bet is to consult the appropriate website, catalog, or specification sheet to make sure you’re getting what you need for your circuit.
Many suppliers categorize transistors according to the type of application they are used in, such as low-power, medium-power, high-power, audio (low-noise), or general-purpose. Knowing the category that describes your project can help guide you to choose the right transistor for your particular circuit.
In this section, you see how tiny transistors control the current in one circuit (at the output of the transistor) using electronic components in another circuit (at the input of the transistor). That’s what transistor action is all about!
You can use the circuit in Figure 10-9 to demonstrate the amplification capabilities of a transistor.
Here are the parts you need to build the circuit:
Refer to Chapter 2 or Chapter 19 for information on where to get parts.
Using Figure 10-10 as your guide, follow these steps:
Build the circuit using a general-purpose NPN bipolar transistor, such as a 2N3904 or a BC548.
Be careful to connect the base, collector, and emitter leads properly (consult the transistor package or datasheet), and to orient the LEDs correctly (as shown in Chapter 9)
Dial the potentiometer all the way up so that the resistance is 1 MΩ.
You’ll probably see a tiny glow from LED2, but you may not see any light coming from LED1 — although there is a teeny current passing through LED1.
Now slowly dial the pot down and observe the LEDs.
You should see LED2 getting steadily brighter as you dial the pot down. At some point, you'll start to see light from LED1 as well. As you continue to dial the pot down, both LEDs will glow brighter, but LED2 will be clearly much brighter than LED1.
You’re witnessing transistor action: The tiny base current passing through LED1 is amplified by the transistor, which allows a much larger current to flow through LED2. You see a dim glow from LED1 due to the tiny base current, and a bright glow from LED2 due to the stronger collector current. You can measure each current, if you’d like. (See the sidebar “Measuring teeny tiny currents” for a tip on how to measure the small base current.)
With the pot set to 1 MΩ, I measured a base current of 6.7 μA (that’s 0.0000067 A) and a collector current of 0.94 mA. Dividing the collector current by the base current, I found that the current gain of this transistor circuit is 140. With the pot set to 0 Ω, I measured a base current of 0.65 mA and a collector current of 14 mA, for a current gain of approximately 21.5. Pretty intense!
The circuit in Figure 10-11 is a touch switch. It uses a pair of NPN transistors to amplify a really teeny base current enough to light the LED. This piggyback configuration of two bipolar transistors, with their collectors connected and the emitter of one feeding into the base of the other, is known as a Darlington pair. (The letter Q is used to label transistors in schematics.)
To test it, set up the circuit as shown in Figure 10-12 using the following parts:
Close the circuit by placing your finger across the open circuit, as shown in Figure 10-12 (don’t worry, my ten-year-old son didn’t get hurt and you won’t either). Did the LED turn on? When you close the circuit, your skin conducts a teeny tiny current (a few microamps), which is amplified by the pair of transistors, lighting the LED.
18.119.106.237