What Is a Transistor and How Does It Work?
Last updated 29 June 2026 · 8 min read
Direct Answer
A transistor is a three-terminal semiconductor device that controls current flow between two terminals (collector/emitter for BJT, drain/source for MOSFET) using a signal applied to the third terminal (base for BJT, gate for MOSFET). BJTs are current-controlled: a small base current drives a larger collector current (Ic = hFE × Ib, where hFE is the current gain, typically 50–300). MOSFETs are voltage-controlled: a gate-to-source voltage above the threshold voltage (VGS(th)) turns the device on; no gate current flows in steady state. MOSFETs dominate modern switching applications because they are more efficient and easier to drive digitally; BJTs are still used for low-power signal amplification, precise bias circuits, and legacy designs.
Detailed Explanation
The transistor is the foundational active component in modern electronics — the basis of every integrated circuit, microprocessor, power converter, and amplifier. In discrete form, transistors appear in circuit designs as switches, current sources, amplifiers, and level translators. Understanding both the BJT and MOSFET is essential for reading schematics and designing with discrete components.
Bipolar Junction Transistor (BJT)
A BJT has three terminals: base (B), collector (C), and emitter (E). It is a current-controlled device: the current flowing from base to emitter (Ib) controls the current flowing from collector to emitter (Ic).
NPN BJT operation:
- When Vbe ≈ 0.6–0.7V: the base-emitter junction forward biases, Ib flows, and Ic = hFE × Ib.
- hFE (DC current gain, also called β): typically 50–300 for small-signal NPN transistors.
- When the transistor is fully on (saturated): VCEsat ≈ 0.1–0.3V (the switch is nearly closed).
- When Vbe < 0.5V: the transistor is off, Ic ≈ 0 (the switch is open).
NPN as a low-side switch:
VCC ──── Load ──── Collector
(NPN)
Base ──── R_base ──── GPIO (3.3V or 5V)
Emitter ──── GND
When the GPIO is high, Ib = (Vgpio − Vbe) / R_base flows into the base. For the transistor to saturate, Ib must exceed Ic / hFE. Choose R_base so that Ib × hFE > Ic_load by a factor of 10:
R_base = (Vgpio − 0.7V) / (Ic_load / (hFE / 10))
Example: GPIO = 3.3V, load current = 100 mA, hFE = 100. Ib required for saturation: 100 mA / 100 = 1 mA. With ×10 margin: 10 mA. R_base = (3.3 − 0.7) / 10 mA = 260 Ω → use 270 Ω.
Common NPN small-signal transistors: 2N2222 (600 mA, Vceo = 30V), BC547, 2N3904.
MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor)
A MOSFET has three terminals: gate (G), drain (D), and source (S). It is a voltage-controlled device: the voltage between gate and source (VGS) controls the current flowing from drain to source.
N-channel enhancement-mode MOSFET operation:
- When VGS < VGS(th) (threshold voltage): the channel is off, no current flows.
- When VGS > VGS(th): the channel opens; drain-source current flows proportional to (VGS − VGS(th))².
- When VGS is well above VGS(th) (fully on): the MOSFET operates in the linear region like a resistor, with on-state resistance RDSon.
Key parameters:
- VGS(th) (threshold voltage): The gate voltage at which the channel just begins to conduct. Standard MOSFETs: 2–4V. Logic-level MOSFETs: 0.5–2V (important for 3.3V GPIO drive).
- RDSon (on-state drain-source resistance): Resistance of the fully-on channel, measured at a specified VGS (e.g. 10V for standard, 4.5V for logic-level). Determines conduction loss: P = Ic² × RDSon.
- Qg (gate charge): Total charge needed to charge the gate capacitance from 0V to full VGS. Determines how much current the gate driver must supply to switch the MOSFET at a given frequency.
- Body diode: Every MOSFET contains an intrinsic diode from source to drain (for N-channel). This diode conducts in the reverse direction; in synchronous buck converters it provides the freewheeling path.
N-channel MOSFET as a low-side switch:
VCC ──── Load ──── Drain
(N-MOSFET)
Gate ──── R_gate ──── GPIO (3.3V or 5V)
Source ──── GND
No current-limiting base resistor is required for DC switching — the MOSFET gate draws negligible DC current (the gate is capacitive). However, a small series resistor (10–100 Ω) is recommended to limit gate drive current transients and prevent oscillation.
Logic-level MOSFETs: For GPIO driving from a 3.3V or 5V supply, the MOSFET must turn fully on with VGS = 3.3V or 5V. Standard power MOSFETs specify RDSon at VGS = 10V; at 3.3V they may be only partly on, with much higher RDSon. Always choose a MOSFET rated as "logic-level" (VGS(th) ≤ 2V) for direct GPIO drive.
Common N-channel logic-level MOSFETs: 2N7002 (60V, 115 mA, SOT-23), BSS138 (50V, 200 mA, SOT-23), IRLZ44N (55V, 47A, TO-220).
Transistor Operating Regions
Both BJT and MOSFET have three operating regions:
| Region | BJT | MOSFET | Behaviour |
|---|---|---|---|
| Cut-off / Off | Vbe < 0.5V | VGS < VGS(th) | Switch open, no current |
| Saturation / Linear | Vce at minimum, fully on | VDS < VGS − VGS(th) | Switch closed, low voltage drop |
| Active / Saturation | Controlled by Ib/Ic ratio | VDS > VGS − VGS(th) | Amplifying region, high power loss |
For switching applications, the transistor should spend minimum time in the active/amplifying region (where both voltage and current are non-zero, causing high instantaneous power dissipation). Transistors used as switches should transition quickly from cut-off to saturation and back.
Switching Speed Considerations
BJT switching speed is limited by stored charge in the base region. During saturation, excess minority carriers build up in the base. When the base drive is removed to turn off the device, these carriers must be removed first — a process that takes time (storage time, typically 0.1–10 µs for small-signal BJTs). This limits the practical switching frequency of BJT switches to ~100 kHz.
MOSFET switching speed is limited by the gate capacitance that must be charged and discharged. With a gate driver that can supply adequate peak current to the gate capacitance, MOSFETs can switch in nanoseconds — enabling switching frequencies of 100 kHz to several MHz in power converters.
For high-frequency switching circuits like DC-DC converters, MOSFET's speed advantage is decisive. For signal-level switching at low frequencies, the difference is irrelevant.
For help selecting the right switching device — BJT vs MOSFET, package, and gate drive — and integrating it into a PCB design for an embedded or power electronics product, Zeus Design's engineering team provides end-to-end circuit and PCB design — contact Zeus Design.
Design Considerations
- Verify the MOSFET is logic-level rated for 3.3V GPIO drive. A MOSFET's datasheet specifies RDSon at a specific VGS (often 10V). At 3.3V, a non-logic-level MOSFET may be operating in the ohmic region with significantly higher RDSon — or not fully enhancing at all. Always check the RDSon vs VGS curve at the actual drive voltage, not just the headline specification.
- Add a pull-down resistor on the MOSFET gate to GND. During power-up, if the gate voltage is undefined (floating), the MOSFET may partially conduct and pass current through the load before the MCU takes control. A 10 kΩ–100 kΩ resistor from gate to source ensures the device starts in the off state.
- Derate the transistor for heat. Transistor power ratings (e.g. 1W, 300 mW) are specified at 25°C with an infinite heatsink. In a real circuit with ambient temperature of 60°C and no heatsink, the rating may drop by 70–80%. Calculate the junction temperature at worst-case conditions and ensure it is well below the maximum rating (typically 150°C for power devices).
- Protect the transistor from inductive kickback. When switching inductive loads (relays, motors, solenoids), the collapsing magnetic field produces a large voltage spike across the transistor. Add a freewheeling diode (1N4007 for slow loads; Schottky for faster loads) in reverse across the load to clamp the spike to a safe level.
Common Mistakes
- Driving a standard MOSFET from 3.3V GPIO without checking the threshold voltage. Many inexpensive MOSFETs (e.g. IRF530, IRF540) have VGS(th) of 2–4V and are specified at VGS = 10V. At 3.3V drive, they may not fully turn on, resulting in high RDSon, excessive heat, and unreliable switching. The forum discussion N-channel MOSFET not switching fully from 3.3V GPIO walks through this failure mode with a real circuit example.
- Omitting a base resistor on a BJT switch. The base-emitter junction of a BJT is a forward-biased diode when on. Connecting a base directly to a GPIO without a series resistor limits base current only by the BJT's internal resistance (very low) and the GPIO driver's current limit — potentially exceeding the GPIO's maximum output current. Always use a series resistor.
- Using a BJT in the active region as a switch. A BJT in the active region (not saturated) dissipates Ic × Vce continuously. For a 1A load with Vce = 5V (not saturated), that's 5W of heat — much more than the 100–300 mW during saturation. Ensure adequate base drive for complete saturation in every switching application.
- Neglecting gate charge when driving MOSFETs at high frequencies. Each switching cycle requires charging and discharging the gate capacitance. At 500 kHz with Qg = 10 nC, the gate charge current = 10 nC × 500 kHz = 5 mA average, but the peak gate current during transition is much higher. Ensure the GPIO or gate driver can supply this peak current, or use a dedicated gate driver IC.
Frequently Asked Questions
- What is the difference between NPN and PNP transistors?
- Both are bipolar junction transistors (BJTs), but current flows in opposite directions. An NPN transistor turns on when the base voltage is higher than the emitter by about 0.7V (Vbe ≈ 0.7V); collector current flows from collector to emitter. An NPN switch connects the load between the collector and the positive supply, with the emitter to GND. A PNP transistor turns on when the base voltage is lower than the emitter by about 0.7V; current flows from emitter to collector. PNP switches connect the load between GND and the emitter, with the collector pulling toward the positive supply — useful for high-side switching where the emitter is at a higher potential than the base drive. For most low-side switching applications, NPN is simpler to drive; PNP or high-side MOSFET drivers are used for high-side switching.
- What is transistor saturation and why does it matter?
- A BJT transistor is saturated when the base drive current is high enough that the transistor is fully on — the collector-emitter voltage (VCEsat) is at its minimum, typically 0.1–0.3V for signal transistors and up to 1V for power transistors. In saturation, the transistor acts like a closed switch with a small voltage drop across it. The conduction loss in a saturated BJT switch is Ic × VCEsat — for a transistor carrying 1A with VCEsat = 0.2V, that's 200 mW of heat. Saturation is the desired operating mode for a transistor used as a switch. The alternative — the transistor operating in the linear (active) region — means it's not fully on, and more power is dissipated across the device. A transistor driving a load must be driven into saturation by providing adequate base current: Ib ≥ Ic / hFE (minimum), but in practice provide Ib × 10 or more margin.
- How do I know whether to use a BJT or MOSFET for a switching application?
- For switching loads with GPIO signals from a microcontroller (3.3V or 5V logic), a logic-level N-channel MOSFET (VGS(th) ≤ 2V, such as the 2N7002 for small loads or IRLZ44N for large loads) is almost always the better choice. The MOSFET draws no gate current in steady state, making it easy to drive directly from a GPIO without a current-limiting resistor in most cases. MOSFETs also switch faster, have lower on-state losses at high currents (RDSon is lower than VCEsat × Ic), and are more widely available in small, cheap packages. BJTs make sense when: you need precise linear control (op-amp output stage, audio amplifier), you're working at very low currents where MOSFET gate charge is a significant fraction of the signal, or you're designing to a reference schematic that uses BJTs for legacy compatibility.
References
Related Questions
BJT vs MOSFET: Which Transistor Should You Use?
BJTs are current-controlled and suit precision analog circuits. MOSFETs are voltage-controlled, switch faster, and dominate power switching. When to use each.
What Is a Diode and How Does It Work?
Covers P-N junction, forward voltage drop, silicon vs Schottky, Zener regulation, TVS suppression, and LED — with guidance on each type.
How Does a Buck Converter Work?
A buck converter steps down voltage using a switching MOSFET and LC filter. Learn how duty cycle sets Vout, CCM vs DCM, and key component selection pitfalls.
Linear vs Switching Regulator: Which Should You Use?
Choose a linear (LDO) regulator for low-noise designs with a small voltage drop; use a switching regulator when efficiency matters more than simplicity.
What Is an Op-Amp (Operational Amplifier)?
An op-amp is a high-gain differential amplifier whose behaviour is determined by external feedback. Covers open-loop gain, virtual short, GBW, and applications.
What Is a Comparator and How Is It Different From an Op-Amp?
A comparator outputs a digital signal based on which input is higher. Covers open-drain output, hysteresis, propagation delay, and when to use one vs an op-amp.