So far we have covered devices that have only two legs: resistors, capacitors, batteries, LED's and switches. With the transistor we introduce the first 3 legged device. Transistors come in many varieties, shapes and sizes. For the most part, they all operate the same, with some subtle differences.
Some of the many types of transistors include Bipolar Junction Transistors (BJT) and Field Effect Transistors (FET). This guide will use FET transistors because they are easier to comprehend and generally more useful. Just about everything you learn here will apply to BJT transistors as well.
Transistor Schematic Symbols
Here is the schematic symbol for a transistor, and some examples of what they look like.
Field Effect Transistor (FET)
Real Life Transistors
Here is an FET schematic next to some various transistors.
Notice that the three legs on the schematic are labeled G, S and D. These stand for Gate, Source and Drain. We will talk about these in detail in just a minute.
One of the hard parts about using a transistor is knowing which of the three legs in real life is the corresponding leg in the schematic symbol. In the picture above, there are 3 different transistor packages. The package on the left is called a TO-92, the package in the middle is called a TO-220, and the package on the right is called a metal can. Metal can packages are almost never used anymore. TO-92 packages are very common for small signals, while TO-220 packages are common for larger things like motors and speaker drivers. Here we will show you the most common pin mappings for TO-92 and TO-220 FET transistors.
TO-92 FET Packages
TO-220 FET Packages
These are the most common pin to schematic mappings.
The Transistor as a Switch
Transistors can be thought of as electronic switches. A transistor is used to turn various devices such as motors, lights and speakers on and off. Just like the light switch in a room, a transistor can turn a light on and off. This is useful so that a small voltage source can be used to turn on and off a large voltage source. Let's look at a simple example using a light bulb.
Here we have an FET transistor hooked up to two different batteries and a light bulb. Let's look at the left half of the circuit first.
- The tiny batteries negative terminal is connected to the Source of the transistor.
- The tiny batteries positive terminal is connected to the Gate of the transistor.
In this configuration, the transistor is said to be On. You can see that a tiny current is flowing through the transistor from Gate to Source. Now let's look at the right half of the schematic.
- The large batteries negative terminal is connected to the Source of the transistor.
- The large batteries positive terminal is connected to one leg of the light bulb.
- The other leg of the light bulb is connected to the transistors Drain.
Since this transistor is On (from above) then a large current is flowing through the light bulb, and through the transistor from Drain to Source. If you disconnect the tiny battery, then the transistor will be off, and the light bulb will be off as well.
Here you can see that since we have disconnected the tiny battery, the FET is no longer on, so the light bulb is no longer on. Notice that the transistor is acting as a switch turning the light bulb on and off in response to the voltage being applied at the gate. This is where the gate gets its name. It is used to gate, or control the flow of current through the FET.
This circuit as it stands is not particularly useful. However, when we replace the tiny battery with other sources of voltage then the transistor switch becomes much more interesting.
More Useful Circuits
Instead of switching the transistor on and off with a tiny battery, we can switch it on and off with other sources of voltage. Here are some example items that create voltage capable of switching a transistor on and off.
- A microphone responds to different noise levels with voltage output.
- A solar cell responds to different light levels with voltage output.
- A moisture sensor responds to different moisture levels with voltage output.
Notice that all of the above sensors respond to a different stimulus with a voltage output. By connecting that voltage output to the gate of your FET you can use the small voltage source to control a much larger device.
In this example we have a microphone connected to the gate of the FET, and the same light bulb connected to the current loop side of the circuit. As you yell into the microphone the light bulb will light up. The louder you yell, the brighter the light bulb will be. This is because the microphone is creating a voltage on the gate of the FET. When the FET senses a voltage on the gate, it allows a large Drain to Source current to flow.
In fact, in this circuit the FET is acting as an amplifier. The signal from the microphone is being amplified by the transistor. Amplification is another use of transistors.
Note: in this circuit we have actually used a speaker instead of a microphone, because speakers will generate a voltage when a loud sound is made near them.
Another Transistor Example
Let's use the same circuit to instead control a motor.
This should look familiar. Now instead of using sound to control a light bulb, we are using sound to control a motor. The louder you yell into the microphone, the faster the motor will turn.
On When Off - The Transistor Inverter
So far all of our examples have been using a transistor to turn a device, such as a motor or a light bulb, on when a voltage is applied. You can also use transistors to turn a device off when a voltage is applied. This is called inverting because the state of the output is opposite to the state of the input.
We will use the example of a trip wire. Let's assume that you have a trip wire stretched across a path connected to a buzzer. You want the buzzer to sound when the trip wire is no longer present (someone has tripped over it). This is a perfect problem to solve with a transistor.
First we have to introduce transistor types. All transistors come in two different types: P Channel and N Channel .
N Channel FET
On when voltage is applied to gate
P Channel FET
Off when voltage is applied to gate..
The only difference in the symbol is the direction of the arrow.
Up until now all of our examples have all been with N Channel transistors. N channel FET's tend to be dominant because they are cheaper to manufacture. However, for our trip wire example we want to use a P channel FET.
When the wire is removed, the buzzer will sound.
Remember that P Channel FET's are off when voltage is applied to the gate. So this circuit will just sit there doing nothing as long as the trip wire is in place. When the wire is removed, the FET will turn on and the buzzer will sound.
As long as the trip wire is in place, the large battery is not doing anything so it will not be depleted. However, the small battery is doing a tiny amount of work providing voltage to the gate of the FET and over time will be depleted. When this happens, the FET will turn on and the buzzer will sound. However, it is such a tiny amount of work required to turn the FET off that a typical battery in this setup will last years.
One Less Battery
We can actually optimize the circuit above a little bit by removing one of the batteries. Remember that with FET's a small signal to the gate makes a large change in the Drain to Source current. In the trip wire circuit, the signal to the gate is telling the buzzer to be off. If a small voltage is a little bit off, then a large voltage is a lot off. Really they are both just off.
With that in mind, we can use the same battery that powers the buzzer to turn the FET off. All we have to do is connect the trip wire to the large battery instead of connecting it to the small battery.
The only change that we have made is that now the FET gate is connected to the positive terminal of the large battery, and the small battery is no longer needed. The FET is off as long as the wire is connected. When tripped the wire is removed and the gate no longer has voltage applied. This turns the FET on, and the buzzer begins to buzz.
Note that in this case whenever the trip wire is in place the large battery is being depleted in order to provide voltage to the gate of the FET. Again the amount of power required to keep an FET off is so minimal that the battery should last for years.
All About Transistors
In this guide we have talked briefly about transistors and how they are used to both switch and amplify. We specifically used an FET for our examples, but you could use a BJT in almost the exact same way. We also talked about N channel and P channel FET's, and how to make an FET inverter.