If you need to switch a load under 500mA with 5V logic, use an NPN BJT like the 2N2222. If you are switching over 500mA, driving an inductive load, or using 3.3V logic from an ESP32 or Raspberry Pi, use a logic-level N-channel MOSFET like the IRLZ44N.

Choosing between Bipolar Junction Transistors (BJTs) and Metal-Oxide-Semiconductor Field-Effect Transistors (MOSFETs) is the most common component selection hurdle on the bench. BJTs are current-controlled devices; they require continuous base current to stay on. MOSFETs are voltage-controlled; they draw virtually zero steady-state gate current, making them ideal for microcontroller GPIO pins. Below is the definitive bench guide to selecting, biasing, and testing the right transistor types for your next build.

The Safe Default Transistor Types for Your Workbench

Stop guessing part numbers. Keep these five components in your bin. They cover 95% of hobbyist and prototyping switching applications. Pricing reflects typical 2026 distributor rates for single units.

Part Number Type Max V / I Package Best Use Case Unit Cost
2N3904 NPN BJT 40V / 200mA TO-92 Signal switching, LED indicators $0.05
2N2222 (or PN2222) NPN BJT 40V / 600mA TO-92 / TO-18 Small relays, low-power motors $0.08
TIP120 Darlington NPN 60V / 5A TO-220 High-current 5V logic (with heatsink!) $0.80
AO3400 N-Channel MOSFET 30V / 5.7A SOT-23 (SMD) Compact PCBs, 3.3V logic switching $0.15
IRLZ44N Logic N-MOSFET 55V / 47A TO-220 High-current solenoids, motors, 3.3V/5V $1.20
Bench Tip: Never use a standard power MOSFET like the IRF520 with a 3.3V ESP32. The IRF520 requires 10V on the gate to fully turn on (low R_DS(on)). Always look for the 'L' or 'I' prefix (like IRLZ44N) or check the datasheet for the R_DS(on) specification at V_GS = 4.5V or 2.5V.

Pinouts, Symbols, and Operation Regions

Understanding the physical pins and schematic symbols prevents catastrophic wiring errors.

BJT (NPN): The pins are Base (B), Collector (C), and Emitter (E). The schematic symbol features an arrow on the Emitter pointing outward (Not Pointing iN). Current flows from Collector to Emitter when the Base is forward-biased.

MOSFET (N-Channel): The pins are Gate (G), Drain (D), and Source (S). The schematic symbol features an arrow on the Source pointing inward. Crucially, the symbol includes a body diode pointing from Source to Drain. This diode will conduct if you wire the Drain to a lower voltage than the Source, bypassing the transistor's switching action entirely.

Device Region Control Condition Output Behavior & Typical Voltages
NPN BJT Cutoff V_BE < 0.6V Switch OPEN. I_C = 0A. V_CE = V_supply.
Active (Linear) V_BE ≈ 0.7V, V_CE > 0.2V Amplifier. I_C = h_FE × I_B. High heat dissipation.
Saturation I_B > I_C / h_FE Switch CLOSED. V_CE(sat) ≈ 0.2V. Max current flows.
N-MOSFET Cutoff V_GS < V_th (Threshold) Switch OPEN. I_D = 0A. V_DS = V_supply.
Ohmic (Linear) V_GS > V_th, V_DS is low Switch CLOSED. Acts as a resistor (R_DS(on)). V_DS < 0.1V.
Saturation V_GS > V_th, V_DS is high Constant current source. (Note: MOSFET 'saturation' is functionally equivalent to BJT 'active' region).

Biasing and Driving: BJT vs. Logic-Level MOSFET

When using transistors as switches, we want them in the BJT Saturation region or the MOSFET Ohmic region. Here is how to bias them correctly for a 12V, 1.5A solenoid valve driven by an ESP32 (3.3V logic).

The Complete Application Circuit

  1. Microcontroller GPIO: ESP32 pin configured as OUTPUT.
  2. Gate Resistor (R_G): 100Ω resistor from GPIO to MOSFET Gate. This limits the inrush current into the gate capacitance, protecting the ESP32 pin and preventing high-frequency ringing.
  3. Pull-down Resistor (R_PD): 10kΩ resistor from Gate to Ground. This ensures the MOSFET stays off during ESP32 boot-up when GPIO pins are floating.
  4. The Switch: IRLZ44N Source to Ground. Drain to Solenoid negative terminal.
  5. The Load: Solenoid positive terminal to 12V power supply.
  6. Flyback Diode: 1N4007 diode placed in reverse-bias across the solenoid coil (Cathode/Stripe to 12V, Anode to Drain). This clamps the inductive kickback spike when the MOSFET turns off.

For a BJT equivalent (e.g., using a TIP120 for a 5V Arduino), you would replace the 100Ω gate resistor with a 1kΩ base resistor, and omit the pull-down resistor, as BJTs naturally default to cutoff without base current.

Bench Story: The Melted TIP120 and the Solenoid Fix

Theory is fine until a component starts smoking. Here is a real-world scenario that highlights why transistor selection matters.

The Setup: I was building an automated irrigation controller using an Arduino Uno (5V logic) to drive a 12V, 1.5A pneumatic solenoid valve. I grabbed a TIP120 Darlington BJT from the bin, wired a 1kΩ base resistor, and uploaded the code.

The Numbers: The TIP120 is rated for 5A continuous, so 1.5A seemed trivial. However, Darlingtons have a high Collector-Emitter saturation voltage (V_CE(sat)). At 1.5A, the TIP120 datasheet specifies a V_CE(sat) of roughly 1.2V.
Power dissipation (P) = V_CE(sat) × I_C = 1.2V × 1.5A = 1.8 Watts.

The Outcome: A bare TO-220 package in free air has a junction-to-ambient thermal resistance of about 62°C/W. A 1.8W dissipation causes a temperature rise of 111°C above room temperature. The chip hit 135°C, entered thermal runaway, and the Collector-Emitter junction shorted out.

What Went Wrong (and the Fix): When the TIP120 shorted, the 12V solenoid supply back-fed through the base resistor into the Arduino's 5V GPIO pin, instantly bricking the ATmega328P microcontroller. I replaced the BJT with an IRLZ44N logic-level MOSFET. At V_GS = 5V, the IRLZ44N has an R_DS(on) of 0.022Ω.
New Power dissipation = I² × R = (1.5A)² × 0.022Ω = 0.049 Watts. The MOSFET ran ice-cold, and the 3.3V/5V logic isolation was maintained.

Failure Modes and Multimeter Diode-Test Troubleshooting

Transistors rarely fail gracefully. When they exceed their Safe Operating Area (SOA) or thermal limits, they typically fail in a short-circuit state.

Warning: When a power MOSFET fails due to overvoltage or inductive kickback, the Drain-Gate oxide layer often ruptures. This shorts the high-voltage drain directly to the Gate, sending 12V+ straight into your 3.3V microcontroller. Always use optocouplers or gate driver ICs for high-voltage (>24V) industrial loads.

You can diagnose a suspected dead transistor right on the bench using your multimeter's Diode Test mode. Here is the exact procedure:

Testing an NPN BJT (e.g., 2N2222)

  1. Set DMM to Diode mode.
  2. Place Red probe on Base, Black probe on Collector. You should read a forward voltage drop of 0.60V to 0.70V.
  3. Keep Red on Base, move Black to Emitter. You should read 0.60V to 0.70V.
  4. Reverse the probes (Black on Base, Red on C or E). The meter should read OL (Open Loop).
  5. Test Collector to Emitter in both directions. Both must read OL. If you read near 0.00V, the BJT is shorted and dead.

Testing an N-Channel MOSFET (e.g., IRLZ44N)

  1. First, discharge any trapped gate charge by touching the Gate and Source pins together with a probe or wire.
  2. Set DMM to Diode mode.
  3. Place Red probe on Source, Black probe on Drain. You are forward-biasing the internal body diode. You should read 0.40V to 0.60V.
  4. Reverse probes: Red on Drain, Black on Source. The meter should read OL.
  5. Test Gate to Source and Gate to Drain in both directions. All readings must be OL. If you read continuity (beep) or a low resistance between Gate and any other pin, the gate oxide is punctured. Throw it away.

For deeper theory on semiconductor junctions and advanced MOSFET gate drive topologies, the All About Circuits semiconductor textbook and Nexperia's application notes remain the gold standard references for circuit designers. Always check the manufacturer datasheet for the exact V_GS threshold and thermal derating curves before finalizing your PCB layout.