Transistors: BJT and MOSFET
How a gate voltage opens a channel, and why MOSFETs run the world.
Day 2 · 55 min
After this lesson
- You can describe BJT and MOSFET operation and their three regions.
- You can choose a logic-level MOSFET to switch a load from a 3.3 V microcontroller.
- You can explain Rds(on), gate charge, the body diode and why a 'hot but on' MOSFET happens.
A valve for electrons
A transistor lets a small signal control a large current, so it can amplify or switch. John Bardeen and Walter Brattain built the first one, a germanium point-contact device, at Bell Labs in December 1947; William Shockley's junction transistor followed in 1948, and Mohamed Atalla and Dawon Kahng demonstrated the MOSFET in 1959. The bipolar transistor survives in analog and RF niches, while MOSFETs are essentially every transistor in a processor: an estimated 1.3 × 10²² had been made by 2018, more than any other manufactured object.
The bipolar junction transistor
An NPN BJT is two junctions back to back: a heavily doped n⁺ emitter, a thin p-type base (well under 1 µm in modern parts) and an n-type collector. Forward-bias the base-emitter junction, Vbe ≈ 0.6-0.7 V at milliamp currents, and the emitter injects electrons into the base. The base is so thin that about 99% of them diffuse across before recombining, and the reverse-biased collector junction sweeps them up. The small base current that does flow sets the collector current: Ic = β · Ib, with β (also written hFE) between 50 and 300. A 2N3904 specifies 100-300 at 10 mA.
- Cutoff: Vbe below about 0.5 V; no collector current.
- Active: Vce above about 0.3 V and Ic = β·Ib; Ic rises tenfold per 60 mV of Vbe. Amplifiers live here.
- Saturation: both junctions forward-biased, Vce(sat) ≈ 0.1-0.2 V; a closed switch. Designers overdrive the base with a forced β of about 10 to get there reliably.
The catch is that a BJT needs base current the whole time it is on: 10 mA of collector current at β = 100 takes 0.1 mA of continuous drive, and β itself varies two to three times between parts.
The MOSFET
An n-channel MOSFET (NMOS) starts with a p-type body. Two n⁺ regions, the source and drain, sit a channel length L apart, and above the gap lies a gate electrode separated from the silicon by a thin insulator: SiO₂, or hafnium oxide with an equivalent thickness near 1 nm in modern logic, or tens of nanometres in power MOSFETs. Because the gate is insulated it draws essentially no DC current; the MOSFET is controlled by voltage.
With Vgs = 0 the source-body-drain path is two back-to-back diodes and nothing flows. Raise Vgs and the gate field first pushes holes away from the surface, then pulls electrons in. At the threshold voltage Vth the surface inverts: electrons outnumber the body's holes and form a channel a few nanometres deep from source to drain. Vth is about 0.3-0.5 V in logic transistors, 1-2 V in logic-level power MOSFETs and 2-4 V in standard power parts.
Three regions
- Cutoff (Vgs < Vth): no channel. Only subthreshold leakage flows, falling about tenfold for every 70-100 mV below Vth.
- Triode or linear (Vds < Vgs − Vth): the channel reaches the drain and acts as a resistor set by the gate,
I_D = μCox(W/L)[(Vgs − Vth)Vds − Vds²/2]. A switch should sit here. - Saturation (Vds ≥ Vgs − Vth): the channel pinches off near the drain and the current levels out at
I_D = ½ μCox(W/L)(Vgs − Vth)². Amplifiers live here.
Mind the vocabulary: "saturation" means a fully-on switch for a BJT but the constant-current region for a MOSFET.
MOSFETs as switches
Three datasheet numbers matter. Rds(on) is the channel resistance when fully on, specified at stated gate voltages: the IRLML6344 is rated 29 mΩ at Vgs = 4.5 V and 37 mΩ at 2.5 V. Conduction loss is I²·Rds(on), and Rds(on) rises about 1.5× between 25 °C and 125 °C. Vgs(th) is defined at a tiny current, typically 250 µA: it marks where conduction starts, not where the part is on. Gate charge Qg is what the driver must deliver: 10 nC from an MCU pin sourcing 20 mA takes 0.5 µs, while a 2 A gate driver does it in 5 ns. Logic-level parts guarantee Rds(on) at 4.5 V or 2.5 V so a microcontroller can drive them directly.
MOSFETs won for three reasons. They are voltage-controlled, so a gate holding a logic state draws no static current. They shrink well: Robert Dennard showed in 1974 that scaling dimensions and voltages together keeps power density constant while speed rises. And n- and p-channel devices sit side by side in one process, which makes CMOS logic possible. BJTs remain in precision analog circuits such as bandgap references, in RF as SiGe heterojunction transistors, and, with a MOS gate added, as the IGBTs in many high-power inverters.
Power MOSFETs and gate driving
A discrete power MOSFET turns the structure on its side. Current flows from source contacts on top through thousands of channel cells in parallel (planar or trench), then down through a lightly doped n⁻ drift region to the drain on the back of the die. The drift region sets the voltage rating and the parallel cells give milliohm resistance. Because the p-body is tied to the source, every power MOSFET also contains a body diode from source to drain. It conducts whenever the drain is pulled below the source, which H-bridges use for freewheeling, and it has the reverse recovery of any PN diode.
The gate is a capacitor of a few nanocoulombs, so a good drive circuit has a series resistor of a few to tens of ohms to tame ringing, a 10-100 kΩ pull-down to keep the part off while the microcontroller is still in reset, and enough voltage to reach the Rds(on) rating without exceeding the absolute maximum Vgs, typically ±20 V, or ±12 V for many logic-level parts.
Interactive: open the channel
NMOS transistor: gate opens a channel
Raise V_GS past the 1.5 V threshold and an electron channel forms under the gate (brighter means more electrons). Raise V_DS and the channel thins toward the drain until it pinches off: the current stops growing and the transistor saturates.
- Region
- Saturation
- Drain current I_D
- 2.43 mA
- Overdrive V_GS − V_th
- 1.50 V
- On-resistance at small V_DS, 1/(k·V_ov)
- 333 Ω
- Power in the channel V_DS·I_D
- 4.86 mW
- Threshold V_th, gate current
- 1.50 V, ≈ 0 (insulated gate)
Things to try:
- Hold V_DS at 0.5 V and raise V_GS from 1.5 V to 5 V: the on-resistance falls from kilohms to 143 Ω.
- At V_GS = 3 V, sweep V_DS: the current rises until 1.5 V, then flattens as the channel pinches off at the drain.
- Compare the channel power at V_GS = 5 V, V_DS = 0.5 V (triode, about 1.7 mW) with V_GS = 2.5 V, V_DS = 5 V (saturation, about 6 mW): the half-on transistor passes less current yet burns more than three times the power.
In practice
Practice
Pick a MOSFET for a 2 A motor on a 3.3 V microcontroller
A 12 V DC motor draws 2 A while running and is switched by a 3.3 V GPIO. Choose a low-side N-channel MOSFET, estimate its loss, and list the parts around it.
Requirements
Vds rating ≥ 2 × 12 V → 30 V class
Gate Vgs(th) max < 2 V, Rds(on) specified at Vgs = 2.5 V
Current ≥ 2 × running current, survive the stall current
Candidate: IRLML6344 (30 V, 5 A, SOT-23, Vgs(th) 0.5-1.1 V)
Rds(on) at 2.5 V = 37 mΩ max
P (25 °C) = I² × R = 2² × 0.037 = 0.15 W
P (hot, ×1.5) = 0.22 W
ΔT (~100 °C/W pad) ≈ +22 °C
PWM at 20 kHz, Qg ≈ 5 nC from a 20 mA pin → edges ≈ 0.25 µs
P_sw ≈ ½ × V × I × (t_r + t_f) × f = ½ × 12 × 2 × 0.5e-6 × 20e3 = 0.12 WAnswer: a logic-level 30 V part such as the IRLML6344 dissipates about 0.15-0.22 W in conduction, comfortable on a SOT-23 with a modest copper pad. Add a Schottky flyback diode across the motor, a 100 Ω gate resistor and a 100 kΩ pull-down. For on/off control or PWM up to a few kHz the GPIO can drive the gate directly; at 20 kHz switching loss rivals conduction loss, so a small gate driver earns its place. If the motor can stall at 6 A, conduction loss jumps ninefold, so size for stall or add current limiting.
Real-world scenario
Real-world scenario
The MOSFET is 'on' but too hot to touch
A greenhouse controller uses an ESP32 to switch a 12 V, 2 A irrigation pump. The designer picked an IRF540N from the parts drawer (100 V, 33 A, 44 mΩ) and drove its gate straight from a 3.3 V GPIO. On paper the loss is 2² × 0.044 = 0.18 W, so no heatsink was fitted. Within two minutes of the pump starting, the TO-220 tab is too hot to touch.
Symptoms
- The tab reaches about 110 °C in a 25 °C room; the datasheet math predicted a barely warm part
- Vds measures 0.7 V with the gate high, instead of the expected 0.09 V
- The pump runs noticeably slower than when wired straight to 12 V
- The same board driven from a 5 V Arduino runs much cooler, and two boards built from the same reel behave differently
Interview questions
screenHow does an n-channel MOSFET turn on?
screenWhat are the operating regions of a MOSFET, and which do you use for a switch and for an amplifier?
deepYou need to switch a 2 A motor from a 3.3 V microcontroller. How do you choose the MOSFET, and what can go wrong?
deepCompare BJTs and MOSFETs. Why did MOSFETs win for digital logic, and where are BJTs still used?
screenWhat is the body diode of a power MOSFET, and when does it matter?
Quiz
References and further reading
Where the ideas in this lesson come from, and what to read next. Books are the standard texts; papers are the original sources; standards are what employers work to.
- Documentationfree online
Read: The same part number family with the opposite E-B-C order; the reason to check every TO-92.
- Documentationfree online
onsemi (2013). P2N2222A: Amplifier Transistors, NPN Silicon (datasheet, Rev. 7). onsemi.com.
Read: The pinout page: the P2N2222A is C-B-E, and the encyclopedia drawing follows it.
- Paper
John Bardeen and Walter H. Brattain (1948). The Transistor, A Semi-Conductor Triode. Physical Review 74(2), 230-231.doi:10.1103/PhysRev.74.230
Read: One page: the first transistor announcement.
- Paper
Dawon Kahng and Mohamed M. Atalla (1960). Silicon-Silicon Dioxide Field Induced Surface Devices. IRE-AIEE Solid-State Device Research Conference, Pittsburgh.
Read: The first MOSFET; cite it when asked who invented the device.
- Book
Adel S. Sedra and Kenneth C. Smith (2020). Microelectronic Circuits. Oxford University Press, 8th edition.
Read: The MOSFET chapter: threshold, the three regions, the switch model.
- Book
S. M. Sze and Kwok K. Ng (2007). Physics of Semiconductor Devices. Wiley, 3rd edition.
Read: Power MOSFET structure and the body diode.