The Short Answer: What Is a Transistor and Which Should You Pick?
At its core, a transistor is a three-terminal solid-state semiconductor device that uses a small input signal to control a much larger output current. Think of it as an electronic valve: a tiny twist of the handle (input) releases a massive flow of water (output). In modern maker projects, we primarily use them as switches (fully ON or fully OFF) rather than amplifiers, allowing low-power microcontrollers like an Arduino or ESP32 to safely control high-power loads like motors, relays, and LED strips.
When deciding which transistor to use, you are almost always choosing between a Bipolar Junction Transistor (BJT) and a Metal-Oxide-Semiconductor Field-Effect Transistor (MOSFET). Here is the decision framework to terminate your part search immediately:
| If Your Application Requires... | Then Choose... | Concrete Default Pick |
|---|---|---|
| Switching < 200mA from a 5V/3.3V GPIO pin | Small-signal BJT or MOSFET | 2N3904 (BJT) or 2N7000 (MOSFET) |
| Switching 200mA to 2A at low frequencies (< 1kHz) | Darlington BJT or Standard MOSFET | TIP120 (BJT) or IRLZ44N (MOSFET) |
| Switching > 2A or high-frequency PWM (> 10kHz) | Logic-Level Power MOSFET | IRLZ44N or IRLB8721 |
BJT vs. MOSFET: Pinouts, Symbols, and Operating Regions
To use these components, you need to know how to identify their pins and understand their operating states. The physical package dictates the pinout, but the schematic symbol tells you how it behaves.
Pinout and Symbol Identification
- BJT (NPN): The pins are Emitter (E), Base (B), and Collector (C). In the schematic symbol, the arrow is on the Emitter and points outward (Not Pointing iN). For the common TO-92 plastic package (flat side facing you, pins down), the standard 2N3904 pinout is Emitter-B-Collector. Always verify with a datasheet, as the 2N2222 in a TO-92 package is Emitter-Base-Collector (EBC).
- MOSFET (N-Channel): The pins are Source (S), Gate (G), and Drain (D). The schematic symbol shows the Gate separated from the channel by a line, representing the insulated oxide layer. For the common TO-220 power package (tab facing you, pins down), the pinout is universally Gate-Drain-Source (GDS).
Operation Regions Table
Transistors operate in three distinct regions. When using them as switches, you only care about the first and the last.
| Region | BJT (NPN) Characteristics | MOSFET (N-Ch) Characteristics | Use Case |
|---|---|---|---|
| Cutoff (OFF) | V_BE < 0.6V. I_C = 0A. | V_GS < V_th (typically 2V). I_D = 0A. | Switch is OPEN. Load is off. |
| Active / Linear | V_BE ≈ 0.7V. I_C = β × I_B. V_CE is variable. | V_GS > V_th. I_D varies with V_GS. Acts as a resistor. | Amplifiers, linear regulators. (Avoid for switching; high heat). |
| Saturation / Ohmic (ON) | V_BE ≈ 0.8V. V_CE(sat) ≈ 0.2V. I_C is limited by the load. | V_GS ≥ 4.5V (Logic) or 10V (Std). R_DS(on) is minimal (e.g., 0.022Ω). | Switch is CLOSED. Load is fully powered. |
How to Bias and Drive Your Chosen Transistor
Let’s build a complete, real-world application circuit. We will use an ESP32 (3.3V GPIO output) to switch a 12V, 100mA automotive relay coil using a standard 2N3904 NPN BJT.
The Biasing Math
A BJT is a current-controlled device. To force it into saturation (fully ON), we must supply enough Base current (I_B). The 2N3904 has a DC current gain (h_FE or β) of roughly 100. However, to guarantee saturation, we use a "forced beta" of 10.
- Calculate Collector Current (I_C): The relay draws 100mA.
- Calculate Required Base Current (I_B): I_C / 10 = 100mA / 10 = 10mA.
- Calculate Base Resistor (R_B): The ESP32 outputs 3.3V. The BJT Base-Emitter junction drops about 0.7V.
Voltage across resistor = 3.3V - 0.7V = 2.6V.
R_B = V / I = 2.6V / 0.010A = 260Ω. - Select Standard Value: The closest standard E12 resistor is 270Ω. This yields 9.6mA of base drive, which is perfectly adequate for a 100mA load.
Wiring the Circuit
- Connect the ESP32 GPIO pin to one leg of the 270Ω resistor.
- Connect the other leg of the resistor to the Base (middle pin) of the 2N3904.
- Connect the Emitter (left pin, flat side facing you) to the common circuit Ground (GND).
- Connect the relay coil's negative terminal to the Collector (right pin) of the 2N3904.
- Connect the relay coil's positive terminal to the 12V power supply.
- Place the 1N4007 diode across the relay coil pins, with the silver stripe facing the 12V side.
- Tie the 12V power supply GND and the ESP32 GND together to complete the circuit.
Failure Modes and How to Test with a Multimeter
Transistors don't just "wear out"; they fail catastrophically due to specific electrical abuses. Understanding how they die helps you test them on the bench.
Common Failure Modes
- Thermal Runaway (BJT): As a BJT heats up, its current gain increases, causing it to draw more current, which creates more heat. Without proper biasing or a heatsink, it melts into a short circuit.
- Gate Oxide Puncture (MOSFET): The gate of a MOSFET is insulated by a microscopic layer of silicon dioxide. A static shock (ESD) or a voltage spike exceeding the V_GS max (usually ±20V) will punch a hole through this insulation, permanently shorting the Gate to the Source.
- Secondary Breakdown (BJT): Operating a BJT in the active (linear) region with high voltage and high current simultaneously causes localized hot spots on the silicon die, destroying the junction instantly.
Testing with a Digital Multimeter (DMM)
You don't need a curve tracer to check a transistor. Set your DMM to Diode Test mode (the symbol with an arrow and a line).
Testing an NPN BJT (e.g., 2N3904):
- Place the Red probe on the Base and the Black probe on the Emitter. You should read a forward voltage drop between 0.55V and 0.75V.
- Keep Red on Base, move Black to Collector. You should read a similar 0.55V to 0.75V drop.
- Swap probes: Black on Base, Red on Emitter/Collector. The meter should read OL (Open Loop / Overlimit).
- Measure across Collector and Emitter in both directions. It must read OL. If it reads near 0.00V, the transistor is shorted and dead.
Testing an N-Channel MOSFET (e.g., IRLZ44N):
- Short all three pins together with your finger or a resistor to discharge any residual gate capacitance.
- Place the Black probe on the Source and the Red probe on the Drain. The body diode should show a forward drop of about 0.4V to 0.6V.
- Swap probes (Red on Source, Black on Drain). It should read OL.
- While keeping the Black probe on the Source, touch the Red probe to the Gate to charge it. Then move the Red probe back to the Drain. The meter should now read near 0.00V (the MOSFET has turned ON).
- Short the Gate to the Source again. The Drain-Source reading should revert to OL (the MOSFET has turned OFF).
The "Safe Default" Part Numbers for Your Workbench
Stop guessing and stock these four workhorse transistors. They cover 95% of hobbyist and prototyping needs, are available globally, and cost pennies. For deeper specifications, always consult the manufacturer datasheets, such as the ON Semiconductor PN2222A Datasheet or the Infineon IRLZ44N Datasheet.
| Part Number | Type | Max V_DS / V_CE | Max Continuous Current | Avg Price (2026) | Best Application |
|---|---|---|---|---|---|
| 2N3904 | NPN BJT (TO-92) | 40V | 200mA | $0.05 | Switching small LEDs, low-power relays, logic level shifting. |
| PN2222A | NPN BJT (TO-92) | 40V | 600mA | $0.08 | Medium loads, general-purpose amplification, motor enable circuits. |
| 2N7000 | N-Ch MOSFET (TO-92) | 60V | 200mA | $0.12 | Low-side switching where zero gate-current draw is required. |
| IRLZ44N | N-Ch MOSFET (TO-220) | 55V | 47A | $1.40 | High-power motors, large LED strips, PWM heating elements. (Requires heatsink >5A). |
By keeping a bin of 2N3904s for logic-level tasks and IRLZ44Ns for heavy lifting, you will never find yourself stalled by a missing component. Calculate your base or gate drive, add your flyback diode, and your solid-state switch will run indefinitely.






