How do transistors work, anyway?
The internet is littered with explanations of how transistors work. Most of them don't really explain anything.
The invention of the electronic circuit changed the world. In just over a century, electronic devices upended almost every aspect of our lives — from transportation, to medicine, to the way we interact with each other and have fun.
Despite this, a firm grasp of electronics remains elusive for most. I’m confident that much of the blame lies with the hydraulic analogy — a reimagining of electronic circuits as series of tubes. The hydraulic analogy is seductive to textbook authors but quickly spring leaks. By the time you get to transistors, you’re constructing bizarre two-stage water valves that don’t truly emulate semiconductors — and would give your plumber a headache, too.
Indeed, the mechanics of transistors remain mystifying to most hobbyists, making it hard to comprehend the design of fundamental devices such as operational amplifiers. In this post, I’m hoping to shed some light on the topic — hopefully without bringing up quantum wave functions, but also without reaching for a pipe wrench.
The physics of conduction
Let’s start with a refresher on the physics of conduction. In solid-state electronics, the flow of electricity can be explained by the motion of outer (valence) electrons that skate across stationary atoms or molecules.
In most materials, valence electrons are tightly bound to the substrate, and a considerable energy is needed to knock them out; that energy is often sufficient to set things on fire along the way. This situation is different in metals, where some electrons at their normal energy levels can freely drift from one atom to another — forming what’s known as the electron gas.
The attraction to positively-charged protons confines the electrons to the bulk of the conductor. The mutual repulsion between electrons, on the other hand, compels them to spread as far as possible, filling the entirety of this available space.
It should be underscored that the flow of electricity has less to do with the travels of individual electrons, and more with what can be thought of as pressure equalization in this electron gas, mediated through electromagnetic fields. In a typical circuit, the drift of an electron averages millimeters or centimeters per hour. Yet, shoving an extra electron onto a metal wire causes nearby ones to scuttle away without coming into contact with each other — a cascading wave that propagates close to the speed of light.
Such electromagnetic forces can also act across non-conductive gaps; for example, bringing an negatively-charged rod near one end of a metal wire will cause some electrons in the conductor to scamper away toward the other side.
The two most important concepts in electric circuits are voltage and current. Current is a straightforward measurement of the number of electrons traveling through a particular spot in a unit of time. Voltage, on the other hand, describes pressure differentials in the electron gas. The higher the difference between two chosen points, the higher might be the current that flows if you accidentally drop your plumbing wrench across that portion of the printed circuit board.
The case of semiconductors
There is an intermediate class of materials, known as semiconductors, where the outer electrons are nominally immobile, but where only a slight nudge is needed to knock them into a higher-energy state and set them free. This nudging continually happens on its own due to random, room-temperature thermal events.
In semiconductors, these excited electrons soon return to a lower energy state; but in the presence of an external electric field, they might be able to drift a short distance, leaving an opening for other electrons when it’s their turn. In effect, this process allows a (rather weak) current to flow.
Pure semiconductors have poor electrical properties, but their conductivity improves significantly in the presence of impurities known as dopants. An n-type dopant, such as phosphorus, adds some mobile (conduction band) electrons to the semiconductor substrate, in effect increasing the number of charge carriers available at any given time. A p-type dopant, such as boron, does the opposite — trapping other electrons and thus creating long-lived valence shell vacancies (“holes”) in the base material.
The slack afforded by these holes means that the distribution of non-excited valence electrons can all of sudden shift with ease in response to external electric fields. You can think of this as electrons opportunistically slithering into nearby vacancies, or you can look at holes as weird disembodied “particles” that drift in the opposite direction in a sea of valence electrons. However you approach it, both n-type and p-type materials conduct much better than pure silicon.
It should be noted that doped semiconductors remain electrically neutral. Only the mobility of electrons is changing, not the ratio of electrons to protons in the crystal lattice.
Semiconductor junctions
When a p-doped semiconductor is brought into contact with an n-doped one, an interesting phenomenon takes place: within a exceedingly thin layer, free electrons from the n-side diffuse across the boundary and promptly fall into the immediately adjacent, abundant valence holes present on the p-side:
This creates a depletion region: a layer that has virtually all the holes plugged on the p-side, and practically no excited, conduction-band electrons on the n-side. Internally, the region is no longer electrically neutral, and it is characterized by a fairly strong (but self-contained) field: negative on the p-side (due to surplus electrons) and positive on the n-side (due to all the unpaired protons still stuck in place).
This internal field prevents the passage of majority charge carriers: if any electron wanders in from the n-side, or any hole wanders in from the p-side, they’re expelled back to where they belong. It is still possible for minority carriers to cross — for example, the odd mobile electron that wanders in from the p-side will be accelerated to the n-side — but the effect is comparatively small and tends to balance out.
From the diagram, it should be clear that removing electrons from the right terminal of the device and adding them to the left terminal does not accomplish much. The action adds to the existing electric field and widens the depletion region. That said, because the process is slightly increasing the number of minority charge carriers in the material, a microamp-range “reverse leakage current” will be seen.
Moving the electrons in the other direction is another story. It gradually counters the junction’s internal field, eventually squishing it enough for the charge carriers to cross with ease. For silicon devices, the voltage needed to get things going hovers around 0.6 V. Past that point, the junction (known as a diode) becomes an excellent conductor — that is, until the applied voltage drops below that magic threshold again.
Junction field effect transistors (JFETs)
A simple p-n junction may seem uninteresting, but it’s a versatile building block. To illustrate, let’s start with junction field effect transistors that use a reverse-biased p-n junction as a way to moderate the current flowing between their two primary terminals — source and drain:
There are no semiconductor junctions between the two primary terminals. You can find a p-n junction near the control terminal — the gate — but it’s never meant to conduct, and it is kept below 0.6 V.
When the gate voltage is around 0 V relative to the n-region, the depletion layer is present but very thin, so it doesn’t impede the flow of current between the source and the drain. But as the voltage is lowered, the junction becomes reverse-biased, the depletion region expands, and the apparent resistance of the device increases. By the time you get to perhaps -5 V, it grows so large that it pinches off the conductive path through the n-doped body of the device.
JFETs are remarkable because they respond stoutly to small voltages applied to the gate, making them well-suited for certain types of amplifiers. That said, in most other applications, they have been superseded by another design: the MOSFET.
Metal-oxide-semiconductor field effect transistors (MOSFETs)
Much like JFETs, MOSFETs are designed to control the flow of current between their two primary terminals — source and drain — via a variable voltage applied to the gate. That said, their internal architecture is a bit more complex:
The drawing shows an n-p-n junction in the path of the current; because one half of this junction is inevitably reverse-biased, it would appear that the transistor should never conduct.
Of course, MOSFETs have a trick up their sleeve: if a sufficiently high positive voltage is applied to the insulated gate (relative to the “substrate” terminal), the resulting electric field pushes away holes in the p-type material on the other side of the insulator and attracts minority-carrier electrons, forming an n-like inversion layer. This electron-rich channel eventually bridges the source and the drain. The marvelous property of MOSFETs is that no electrical connection is needed between the gate and the rest of the device. The nearly-perfect isolation of the input signal makes them remarkably efficient.
In theory, MOSFETs could be operated with no special regard to the polarity of their two primary terminals. In practice, most discrete MOSFETs come with the substrate internally tied to the source, turning it into a three-terminal device that, in its “off” state, behaves like a reverse-biased diode — and will unexpectedly conduct if hooked up the wrong way.
MOSFETs are the workhorses of the semiconductor industry. Their main drawback is that it takes a substantial gate voltage to get them going; about 2 V is common for discrete transistors, and as much as 10 V might be necessary to reach the “fully on” state needed to efficiently drive higher-current loads. Compared to JFETs, the required threshold voltage complicates certain signal amplification tasks.
Another gotcha of MOSFETs is that there is a substantial capacitance between the gate and the substrate. In discrete transistors, the figure usually ranges from 10 pF to 1 nF. The capacitance, if not accounted for properly, can cause energy losses, slow rise and fall times, or unwanted signal coupling at high frequencies.
Bipolar junction transistors (BJTs)
Some readers might be wondering why I didn’t begin with the bipolar junction transistor. The answer is simple: the venerable BJT is the oldest truly successful transistor design, but it’s also the messiest of the bunch.
Let’s have a look at the common n-p-n layout. Similarly to a MOSFET, the junction between its main terminals — the collector and the emitter — is nominally non-conductive because one half of it is reverse-biased. Of course, at this point, you should be expecting a hat trick. The BJT trick is that the middle layer is made extremely thin, often around 1 µm; this places the p-side depletion regions right next to each other, and keeps the layer shorter than the “diffusion” distance typically traveled by a thermally-excited electron before it emits a photon and falls back into the nearest available hole.
With this detail out of the way, let’s start with the obvious: if you apply a sufficient positive voltage to the control (base) terminal in relation to the emitter, you can overcome the internal electric field of the base-emitter p-n junction and cause electrons from the emitter region to start pouring into the base layer.
The electrons are notionally supposed to recombine with holes in the base region, but because the layer is so thin, they can also easily diffuse into the nearby base-collector depletion region. And because they’re wandering into it from the “wrong” side — from the p-region where electrons are the minority charge carriers — the depletion region’s internal field whisks them away toward the collector terminal, causing an unexpected current to flow. In fact, in a properly-designed BJT, a relatively small base current can trigger a considerably higher current across the other two terminals.
The idealized drawing of a BJT might imply that it should be a bidirectional device, working equally well if you reverse the polarity of the collector and the emitter. In practice, the emitter region is usually doped more heavily to facilitate the transport of electrons in one direction; in other words, reversing the component is possible, but its performance will be poor.
There are two things that make BJTs messy. First, they’re neither a pure voltage-controlled device, nor a pure current-controlled one: a combination of voltage and current is required to make them tick. Secondly, the “on” resistance of BJTs tends to be higher than that of comparably-sized MOSFETs, often producing a noticeable collector-emitter voltage drop. In other words, this day and age, sticking to field effect transistors can save you a headache or two.
If you liked this article, please subscribe! Unlike most other social media, Substack is not a walled garden and not an addictive doomscrolling experience. It’s just a way to stay in touch with the writers you like.
For a subsequent article dealing with the use of transistors for signal amplification, click here. To review the entire series on electronics, check out this page.
One of the most important part is two paragraphs between "From the diagram, it should be clear..." and "...if the current flowing through it isn’t limited in some way."
I've majored in physics, particularly electronics, but I still need to stop and think carefully, in steps, what those two paragraphs explain and why. I guess a bit more detailed explanation and maybe a picture could help.
I don't think this is true:
> there is always a forward-biased junction between the collector and the emitter, creating an unavoidable 0.6 V loss for any loads you are planning to drive
This drop happens only in Darlington transistors, as they need to feed the second junction from it. In standard "single" BJTs, the drop across the transistor (Vce) scales linearly with current (Ice), starting at almost-zero. There are some plots in this stackexchange: https://electronics.stackexchange.com/questions/582833/transistor-collector-emitter-saturation-voltage