Transistor Theory: It is sometimes believed that a transistor functions like an electronic switch, that it switches on and off based on a controlling input. This can be true, but a transistor is not a binary device; it does not have only two states, "on" and "off". This is a misconception that tends to be propagated by the use of transistors in digital logic. Certainly, you can use a transistor as an on/off switch, but a transistor is really an analog device. It can pass through a full range of voltage and current levels. Before we begin going over transistors, there are some preliminaries which should be taken care of. First of all, transistors are typically made with silicon, a common semiconductor. What makes silicon a semiconductor is that it has four electrons in its valence shell (the outermost electron shell of an atom). However, the silicon in transistors is not pure; it is "doped" with other materials to make p-type silicon and n-type silicon. P-type silicon is silicon that's got a slightly positive charge. To make p-type silicon, an element is used which has only three electrons in its valence shell (aluminum is commonly used for this). Because electrons are negative, this relative lack of electrons lends a very slight positive charge to the silicon. Similarly, n-type silicon is silicon which has a tiny amount of an element with five valence electrons (commonly phosphorus) mixed in; this makes for silicon with a slight negative charge. A single piece of p-type silicon joined to a piece of n-type silicon forms a diode: ÚÄÄÄÄÄÂÄÄÄÄÄ¿ ³ P ³ N ³ ÀÄÄÄÄÄÁÄÄÄÄÄÙ If you try to connect a voltage source (like a battery) to this diode, and you connect the positive end of the battery to the N-silicon and the negative end of the battery to the P-silicon, what's going to happen is that the electrons coming from the negative end of the battery are going to embed in the P-silicon and stay there, so no electricity will flow. This is called reverse bias. If, on the other hand, you connect the positive side of the battery to the P-silicon, and the negative side of the battery to the N-silicon, then the electrons coming off the battery will push the excess of electrons from the N-silicon through the rest of the diode, and electricity WILL flow. This is called forward bias. Basically, matching the polarities of a voltage source to the polarities of a silicon junction is forward bias; mis-matching the polarities is reverse bias. Now it's time to discuss the anatomy of a transistor. There are two main types of transistor: Bipolar and field-effect. Operation of a bipolar transistor depends on the migration of both electrons and "holes", in contrast to field-effect transistors, where only one polarity carrier predominates. (A "hole" is an electron deficiency.) A transistor has 3 connections, each of which has a name. In a bipolar transistor, they are called the base, collector, and emitter. In a FET (Field-Effect Transistor), they are called the gate, source, and drain. Both types work similarly, but there are important differences. There are two type of bipolar transistors: NPN and PNP. They work the same way, except that their current flows in opposite directions. Bipolar Transistor Diagrams: NPN Transistor: ³ / Collector ³/ Base ÄÄÄ´\ ³ \ ³ Ù Emitter PNP Transistor: ³ / Emitter ³ / Base ÄÄÄ´À ³\ ³ \ Collector (The common mnemonic for remembering which symbol corresponds to which type of transistor is to note that the arrow on an NPN transistor symbol is Not Pointing iN.) An NPN transistor is so named because it consists of three blocks of silicon: A block of P-type silicon sandwiched between two much larger pieces of N-type silicon: ÚÄÄÄÄÄÂÄÂÄÄÄÄÄ¿ ³ N ³P³ N ³ ÀÄÄÄÄÄÁÄÁÄÄÄÄÄÙ The center piece of P-type silicon is the base; the other two pieces are the collector and emitter. You may wonder: Are the collector and emitter interchangeable? After all, both are blocks of N-type silicon. The answer is no: The amount of negative doping in these two pieces of silicon is different, and although you *might* be able to get the transistor to work if you reverse the collector and emitter, the results will not be optimal. So what does a transistor do? Quite simply, the transistor forms a channel for electrical current to pass through. In an NPN transistor, current enters through one block of N-type silicon, and exits through the other. The catch, as you can probably guess, is the P-type silicon. If you look at the diagram of a bipolar transistor, you'll notice that it essentially forms two diodes. On one side is a P-N junction, and on the other side of the P-type block is another P-N junction. Therefore, to get current flowing through the transistor, you might imagine that you have to forward-bias the junctions, just as in a diode. For an NPN transistor, if you apply a positive voltage to the base and a negative voltage to one of the N-blocks (let's use the emitter for this purpose), current will start flowing through those two blocks. Sure enough, this is correct, and that part of the transistor will work just like a diode. Here's the weird part though: To get current flowing through the other N-block (the collector), you have to reverse-bias the junction between it and the base. The reasons why this is so largely relate to quantum physics, and so it's probably not practical to explain exactly why this happens. However, it is important for the electrical engineer to understand that this is the case: When the base voltage on an NPN transistor is lower than the voltage on the collector (so that the collector-base junction is reverse-biased) BUT the voltage on the base is HIGHER than the voltage on the emitter (so that the base-emitter junction is forward-biased), then the entire transistor suddenly becomes a live channel through which electricity can flow. Basically, the base-emitter junction is the transistor's control switch; when the base-emitter junction is forward-biased, what was once a blocked path through which electricity could not flow suddenly becomes unobstructed, and vice-versa. (Again, this same is true for a PNP transistor, except that the voltages and the flow of current are reversed.) There's still more to the operation of the transistor, however. What becomes very interesting is the relation of the transistor's resistance to the base-emitter current. It turns out that how much resistance the transistor's channel has is a direct function of how much current is passing through the base-emitter junction. The more current which passes through the base-emitter junction, the less resistance the transistor has. As Ohm's Law teaches us, the more resistance, the less current, and vice-versa. It turns out, therefore, that you can control how much current is flowing through the transistor by controlling how much current flows through the base-emitter junction. Not only that, but the two currents are directly proportional. If you increase the base-emitter current by a factor of 10, the collector-emitter current will also increase by a factor of 10. This means that you can directly control how much current can pass through the transistor by varying how much current passes through the base-emitter junction. (Regulating the base-emitter current can be easily done by adjusting the resistance, assuming you know what voltage is being applied to the junction.) The ratio of the collector-emitter current to the base-emitter current is often called the "beta" of the transistor, symbolized with the Greek letter beta: á. This ratio is also sometimes called "Hfe". A typical bipolar transistor has a beta of about 100, so if 10 milliamps of current are flowing through the base-emitter junction, 1,000 milliamps (1 amp) of current is flowing through the whole transistor (i.e. from the collector to the emitter). The other type of transistor (besides a bipolar transistor) is a field-effect transistor, or FET. In a FET, the source and the drain are at opposite ends of the transistor, and therefore are analogous to the collector and emitter of a bipolar transistor. Unlike a bipolar transistor, however, in which the collector and emitter are usually not interchangeable, FETs often have no appreciable difference between their source and drain, and therefore can be operated "backwards". There are actually two types of FETs: JFETs (junction FETs) and MOSFETs (Metal Oxide Semiconductor FETs). However, JFETs have fallen out of common use, as the MOSFET is much more efficient, and therefore the rest of this article will focus primarily on MOSFETs. The source and the drain are made of the same polarity of doped silicon (either N-type or P-type silicon). Between them is a block of silicon which is simply called the "body" of the MOSFET. If the source and drain are P-type silicon, then the MOSFET is said to be a "P-channel MOSFET", and if the source and drain are N-type silicon, then the MOSFET is said to be an "N-channel MOSFET". In all cases, the body of the MOSFET is made of the opposite type of silicon; in an N-channel MOSFET, the body is P-type silicon, and in a P-channel MOSFET, the body is N-type silicon. This confuses many people, who think that the middle of the MOSFET is the "channel" and therefore assume that the bulk of (for example) an N-channel MOSFET is N-type silicon; it is not. The body of the MOSFET is NOT the "channel", and in fact the channel and the body of a MOSFET are opposite polarities of silicon. Over the side of this channel is laid another block called the gate. Unlike the other parts of the FET, the gate is not actually silicon; it's just a plain metal conductor. In a junction FET (JFET), the gate actually has a junction with the rest of the transistor, while in a MOSFET (Metal-Oxide Semiconductor FET), the gate does not actually have electrical contact with the rest of the transistor, because it is insulated by a thin sheet of some insulating substance (typically silicon dioxide, SiO2, which is simply glass). That's why MOSFETs are sometimes also called IGFETs (Insulated-Gate FETs). Now, to try and start out simple, let's just say that the voltage applied to the gate affects the conductivity of the channel of the FET. This is why the transistor is called a field-effect transistor: Even though electricity has a path to flow through the transistor and the gate is only sitting off to the side of that path, applying a voltage to the gate will create an electric field within the transistor's body, and that field will dictate how much current can flow through the transistor. In a depletion FET, the source and drain have a thin piece of like-type silicon connecting them; for example, in an N-channel depletion FET, there is a strip of N-channel silicon connecting the source and the drain. In such a FET, current flows easily without any voltage applied to the gate, because there is no junction in the way. However, you can reduce the possible current by applying a voltage to the gate. The voltage applied to the gate can create an electric field within the transistor which inhibits current flow. If the voltage on the gate is strong enough, current can be reduced to zero. (The gate voltage at which current becomes zero is sometimes called the "pinch-off voltage".) This is why the FET is a "depletion" FET: The flow of current can be depleted by the gate. On the other hand, in an enhancement FET, the source and the drain are isolated from each other; there is no strip of like-type silicon between them. They are completely separated by the body of the FET. Therefore, current cannot naturally flow from the source to the drain, because there are junctions in the way. The way to deal with this problem is to create an electric field within the body which neutralizes its blocking tendency and allows electricity to flow between the source and drain. The enhancement FET is an "enhancement" device because gate voltage enhances the FET's ability to pass current. Once you understand that, you will probably realize that different voltages (either positive or negative) need to be applied to the gate, depending on whether the FET is N-channel or P-channel and enhancement or depletion. These can be summarized using 4 rules: 1. In an N-channel enhancement FET, applying a positive voltage to the gate allows current to flow. 2. In a P-channel enhancement FET, applying a negative voltage to the gate allows current to flow. 3. In an N-channel depletion FET, applying a negative voltage to the gate inhibits current flow. 4. In a P-channel depletion FET, applying a positive voltage to the gate inhibits current flow. In JFETs, since the gate is joined to the rest of the transistor, some current flows to or from the gate. In a MOSFET, however, the gate is insulated from the rest of the transistor, and so although the gate can create an electric field in the transistor, virtually zero current flows to or from the gate. For this reason, MOSFETs are popular in circuits where extremely low current flow is desired. So what's the application difference between a bipolar transistor and a FET? Bipolar devices can switch signals at high speeds, and can be manufactured to handle large currents so that they can serve as high-power amplifiers in audio equipment and in wireless transmitters. Bipolar devices are not especially effective for weak-signal amplification, or for applications requiring high circuit impedance. Field-effect transistors are preferred for weak-signal work, for example in wireless communications and broadcast receivers. They are also preferred in circuits and systems requiring high impedance. The FET is not, in general, used for high-power amplification, such as is required in large wireless communications and broadcast transmitters. In any case, although it's hopefully understood by now that a transistor is NOT a discrete device (i.e. it has a full range of states, and is not simply "on" or "off"), a transistor *can* be used as a discrete device. If you only use two possible voltage inputs on a transistor, it will have only two possible states. This means that transistors, though analog, can be used as digital devices in digital logic circuits. Vacuum tubes performed a function similar to today's FETs (Field Effect Transistors). The advantage of the transistor over the vacuum tube is that the transistor is much smaller, uses much less power, does not run as hot, and is much more reliable (vacuum tubes tend to fail within a few years, requiring regular replacement, while transistors, being semiconductor-based solid-state devices, last just about forever, or at least for many decades; Not only this, tubes also degrade with time, requiring adjustment to their surrounding circuitry to accomodate their changing output levels). The invention of the transistor was not a breakthrough because it performed any new function, since vacuum tubes had performed this same function for a long time. Rather, the transistor allowed computer manufacturers to make smaller, cheaper, and more power-efficient computers. The first vacuum tubes were actually used as diodes; They served exactly the same function as today's semiconductor diodes, allowing electricity to pass in only one direction. Semiconductor diodes have the same advantages over vacuum-tube diodes as transistors do. Just as the transistor was a great improvement on the tube, so was the vacuum tube a technological advancement over its predecessor, the relay. A relay is an electromechanical device which depends upon the physical motion of a switch inside it, and so it is slower than a vacuum tube, as well as louder (early computing devices which used relays were deafening, emitting a constant cacophony of clattering and clicking sounds) and also prone to early failure. All of these are inherent characteristics of mechanical devices, and so the vacuum tube, which did not have moving parts, was a breakthrough in its time. Despite the many ways in which the transistor is superior to the vacuum tube, tubes are still being manufactured in the world, and they are preferred for specific applications, especially for use in audio amplification, where audiophiles swear that tube-based amplifiers produce less sound distortion than transistor-based amplifiers. Also, while tubes are less reliable and fail much sooner than transistors in the long term, they are more electrically durable in the short term, able to endure voltage variations or spikes that would destroy a transistor.