If you need a general-purpose NPN semiconductor and transistor for low-power signal switching on your bench, grab a 2N3904 or 2N2222. If you are switching high-current DC loads like motors or Peltier coolers from a microcontroller, use a logic-level N-channel MOSFET like the IRLZ44N. Selecting the wrong device—or biasing it incorrectly—is the fastest way to melt a breadboard and kill your microcontroller. This guide cuts through the solid-state physics and focuses strictly on how to select, bias, and test these workhorse components in real-world circuits.

Safe Default Part Numbers and Ratings

Walking into a parts supplier or browsing DigiKey yields thousands of options. For 95% of hobbyist and prototyping jobs, you only need to stock four specific part numbers. Here are the safe defaults, complete with the critical ratings you need to check before soldering.

Part Number Type Max VCE / VDS Max IC / ID Gain / RDS(on) Package Typ. Price
2N3904 NPN BJT 40V 200mA hFE: 100-300 TO-92 $0.10
2N2222 NPN BJT 40V 800mA hFE: 100-300 TO-18 / TO-92 $0.15
IRLZ44N N-Ch MOSFET (Logic) 55V 47A 17mΩ @ VGS=5V TO-220 $1.20
IRF520 N-Ch MOSFET (Standard) 100V 9.2A 270mΩ @ VGS=10V TO-220 $0.80
Bench Tip: Notice the IRF520 in the table above. It is a standard MOSFET, not a logic-level MOSFET. It requires 10V on the gate to fully turn on. Never use an IRF520 directly with a 3.3V or 5V microcontroller GPIO without a gate driver. We will see exactly why this fails in the scenario below.

Pinouts, Symbols, and Biasing for the Job

Understanding how to bias a semiconductor and transistor starts with reading its symbol and pinout. While both BJTs and MOSFETs act as electrically controlled valves, their control mechanisms are fundamentally different.

Bipolar Junction Transistors (BJTs)

Symbol & Pinout: The BJT symbol features a circle with an arrow on the Emitter pin. For an NPN transistor, the arrow points outward. The three pins are the Base (control input), Collector (load current enters here), and Emitter (current exits to ground). When looking at a standard TO-92 package with the flat side facing you, the pins from left to right are Emitter, Base, Collector.

Biasing: A BJT is a current-controlled device. To turn it on, you must supply a continuous base current. The rule of thumb for using a BJT as a switch is to force it into saturation by providing a base current ($I_B$) that is 1/10th of the desired collector current ($I_C$). If you want to switch a 100mA relay coil, you need to bias the base with at least 10mA. You achieve this by placing a current-limiting resistor between your microcontroller pin and the Base.

Metal-Oxide-Semiconductor Field-Effect Transistors (MOSFETs)

Symbol & Pinout: The MOSFET symbol shows a distinct gap between the Gate and the channel, representing the insulating oxide layer. The pins are the Gate (voltage control), Drain (load current enters), and Source (current exits to ground). On a TO-220 package facing you, the pins are Gate, Drain, Source.

Biasing: A MOSFET is a voltage-controlled device. Once the gate capacitance is charged, it draws virtually zero steady-state current. To bias it as a switch, you must apply a Gate-to-Source voltage ($V_{GS}$) that exceeds the threshold voltage ($V_{GS(th)}$). For 5V or 3.3V logic, you must select a "logic-level" MOSFET where the datasheet guarantees a low $R_{DS(on)}$ at $V_{GS} = 4.5V$ or $2.5V$, not just a threshold voltage.

Operation Regions: Where the Magic and Heat Happen

Transistors don't just snap from "off" to "on"; they pass through intermediate regions. Operating in the wrong region is the primary cause of thermal destruction on the workbench.

Region Name BJT Equivalent MOSFET Equivalent Typical VCE / VDS Use Case & Thermal Impact
Cutoff Cutoff Cutoff Full Supply Voltage Switch OFF. Zero current flows. No heat generated.
Linear / Active Active Saturation (Triode) Variable (e.g., 6V on a 12V rail) Amplification or PWM switching transition. High voltage AND high current overlap. Generates massive heat.
Fully ON Saturation Ohmic (Linear) < 0.2V (BJT) / < 0.1V (MOSFET) Switch ON. Acts like a closed relay or low-value resistor. Minimal heat if properly biased.

According to foundational guides from All About Circuits, the terminology overlap between BJTs and MOSFETs is a notorious trap: a BJT's "Saturation" region is its fully-ON state, but a MOSFET's "Saturation" region is its active/amplifying state (where it burns up if used as a simple switch). Always look for the "Ohmic" or "Triode" region when using a MOSFET as a switch.

A Real-World Bench Failure: The Melted IRF520

Theory is clean; the workbench is not. Here is a classic scenario that highlights what happens when you ignore the gate drive requirements of a standard MOSFET.

The Setup: A maker wanted to PWM a 12V, 5A Peltier thermoelectric cooler using an ESP32 development board. The ESP32 GPIO outputs 3.3V. The maker grabbed an IRF520 MOSFET from their parts bin, wired the gate directly to the ESP32 pin, connected the Peltier to the 12V supply and the Drain, and grounded the Source. They uploaded a simple 50% duty cycle PWM sketch.

The Numbers: The IRF520 datasheet lists a Gate Threshold Voltage ($V_{GS(th)}$) of 2.0V to 4.0V. However, its $R_{DS(on)}$ of 270mΩ is only specified at $V_{GS} = 10V$. At 3.3V, the MOSFET barely crosses the threshold.

The Outcome: The Peltier cooler spun up, but within 15 seconds, the IRF520 became untouchable. The TO-220 package melted the plastic breadboard underneath it, and the ESP32 eventually browned out and reset due to ground bounce.

What Went Wrong: Because the gate was only at 3.3V, the IRF520 never entered the low-resistance Ohmic region. It got stuck in the Linear region. Instead of an $R_{DS(on)}$ of 0.27Ω, the effective drain-source resistance was likely over 2.5Ω. Using $P = I^2R$, the power dissipated as heat was $5A^2 \times 2.5\Omega = 62.5W$. A bare TO-220 package can only dissipate about 1W to 2W in free air before failing. The fix was simple: swap the IRF520 for a logic-level IRLZ44N, which guarantees an $R_{DS(on)}$ of 17mΩ at $V_{GS} = 5V$ (and performs excellently at 3.3V), dropping the heat dissipation to a negligible $0.42W$.

How Transistors Fail and How to Test Them

Transistors typically fail in three ways: thermal runaway (exceeding the junction temperature until the silicon shorts), overvoltage punch-through (exceeding $V_{CEO}$ or $V_{DSS}$, causing an internal arc), or ESD gate rupture (blowing the microscopic oxide layer in a MOSFET). You can diagnose a dead semiconductor and transistor using a standard digital multimeter (DMM) in diode-test mode, as outlined by Fluke's testing guidelines.

Safety Warning: Always de-energize the circuit and discharge any capacitors before testing. Testing a transistor while it is still soldered into a circuit will yield false readings due to parallel current paths through other components. Desolder at least two pins for an accurate test.

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

  1. Set your DMM to Diode Test mode.
  2. Base to Emitter: 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. Reverse the probes; it should read "OL" (Open Loop).
  3. Base to Collector: Place the red probe on the Base and the black probe on the Collector. Expect the same 0.55V to 0.75V drop. Reverse probes for "OL".
  4. Collector to Emitter: Place probes across Collector and Emitter in both directions. Both must read "OL". If you read a short (near 0.00V), the transistor has suffered thermal failure and is internally shorted.

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

  1. Discharge the Gate: Touch the black probe to the Source and the red probe to the Gate to bleed off any stored gate charge.
  2. Check the Body Diode: Place the red probe on the Source and the black probe on the Drain. You should read the internal body diode drop, typically 0.40V to 0.60V. Reverse the probes (Red on Drain, Black on Source); it must read "OL".
  3. Check for Gate Shorts: Measure between Gate and Source, and Gate and Drain. Both must read "OL" in both directions. Any low resistance reading means the gate oxide is ruptured.
  4. The Gate Charge Test: While keeping the black probe on the Source, touch the red probe to the Gate to charge it. Then move the red probe to the Drain. The meter should now read a very low voltage drop (near 0.00V) because the MOSFET has turned on. Touch the red probe back to the Source to discharge it, then check Drain-to-Source again; it should revert to "OL".

Complete Application Circuit: 12V PWM Motor Driver

To tie this all together, here is a robust, bench-tested circuit for driving a 12V DC motor using an ESP32 (3.3V logic) and an IRLZ44N logic-level MOSFET. This design includes the necessary protection components that beginners often skip, leading to destroyed microcontrollers.

Component List and Values

  • Q1: IRLZ44N N-Channel Logic-Level MOSFET
  • R1 (Gate Resistor): 100Ω to 220Ω (Limits the inrush current into the gate capacitance, protecting the ESP32 GPIO from overcurrent during the switching transient).
  • R2 (Pull-down Resistor): 10kΩ (Tied between Gate and Source. Ensures the MOSFET stays OFF if the ESP32 pin is floating during boot-up).
  • D1 (Flyback Diode): 1N4007 or 1N5819 Schottky (Placed in reverse bias across the motor terminals to snub inductive voltage spikes when the MOSFET turns off).
  • M1: 12V DC Motor (Max 10A continuous for this bare TO-220 setup; add a heatsink for higher loads).

Wiring Diagram Description

  1. Connect the 12V Power Supply positive terminal to one lead of the DC Motor.
  2. Connect the other lead of the DC Motor to the Drain (center pin) of the IRLZ44N.
  3. Connect the Cathode (stripe) of the 1N4007 diode to the 12V positive rail, and the Anode to the Drain pin. This places the diode in parallel with the motor, reverse-biased during normal operation.
  4. Connect the Source (right pin) of the IRLZ44N to the common Ground (12V PSU ground and ESP32 GND).
  5. Connect the 10kΩ pull-down resistor between the Gate (left pin) and the Source (Ground).
  6. Connect the 220Ω gate resistor between the ESP32 GPIO pin (e.g., GPIO 18) and the Gate.

With this circuit, when the ESP32 drives the GPIO HIGH at 3.3V, the gate charges through the 220Ω resistor. The IRLZ44N enters the Ohmic region, dropping the Drain voltage to near zero, and the motor spins. When the GPIO goes LOW, the 10kΩ resistor safely bleeds the gate charge to ground, turning the MOSFET off. The 1N4007 diode instantly clamps the inductive kickback from the motor coil, preventing a high-voltage spike from punching through the MOSFET's drain-source junction and frying your ESP32.

For further reading on microcontroller gate drive limitations and advanced snubber networks, refer to the SparkFun Transistor Tutorial. By sticking to logic-level part numbers, respecting the operation regions, and always including a flyback diode for inductive loads, you will eliminate the vast majority of semiconductor failures on your workbench.