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 pinSmall-signal BJT or MOSFET2N3904 (BJT) or 2N7000 (MOSFET)
Switching 200mA to 2A at low frequencies (< 1kHz)Darlington BJT or Standard MOSFETTIP120 (BJT) or IRLZ44N (MOSFET)
Switching > 2A or high-frequency PWM (> 10kHz)Logic-Level Power MOSFETIRLZ44N or IRLB8721
The Bench Default: If you just want one part in your bin to switch a 12V motor or solenoid from a 3.3V or 5V microcontroller without overthinking the math, buy the IRLZ44N logic-level MOSFET. It handles up to 47A, turns on fully at 3.3V gate drive, and costs about $1.50.

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.

RegionBJT (NPN) CharacteristicsMOSFET (N-Ch) CharacteristicsUse 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 / LinearV_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.

  1. Calculate Collector Current (I_C): The relay draws 100mA.
  2. Calculate Required Base Current (I_B): I_C / 10 = 100mA / 10 = 10mA.
  3. 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Ω.
  4. 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.
Never drive an inductive load without a flyback diode. When the relay coil de-energizes, its collapsing magnetic field generates a massive reverse voltage spike (often >50V) that will instantly destroy your transistor. Place a 1N4007 diode in reverse bias across the relay coil (cathode stripe pointing to the 12V supply).

Wiring the Circuit

  1. Connect the ESP32 GPIO pin to one leg of the 270Ω resistor.
  2. Connect the other leg of the resistor to the Base (middle pin) of the 2N3904.
  3. Connect the Emitter (left pin, flat side facing you) to the common circuit Ground (GND).
  4. Connect the relay coil's negative terminal to the Collector (right pin) of the 2N3904.
  5. Connect the relay coil's positive terminal to the 12V power supply.
  6. Place the 1N4007 diode across the relay coil pins, with the silver stripe facing the 12V side.
  7. 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):

  1. 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.
  2. Keep Red on Base, move Black to Collector. You should read a similar 0.55V to 0.75V drop.
  3. Swap probes: Black on Base, Red on Emitter/Collector. The meter should read OL (Open Loop / Overlimit).
  4. 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):

  1. Short all three pins together with your finger or a resistor to discharge any residual gate capacitance.
  2. 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.
  3. Swap probes (Red on Source, Black on Drain). It should read OL.
  4. 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).
  5. 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 NumberTypeMax V_DS / V_CEMax Continuous CurrentAvg Price (2026)Best Application
2N3904NPN BJT (TO-92)40V200mA$0.05Switching small LEDs, low-power relays, logic level shifting.
PN2222ANPN BJT (TO-92)40V600mA$0.08Medium loads, general-purpose amplification, motor enable circuits.
2N7000N-Ch MOSFET (TO-92)60V200mA$0.12Low-side switching where zero gate-current draw is required.
IRLZ44NN-Ch MOSFET (TO-220)55V47A$1.40High-power motors, large LED strips, PWM heating elements. (Requires heatsink >5A).
A Note on Power Dissipation: A TO-220 package without a heatsink can only safely dissipate about 1 Watt to 1.5 Watts of heat into ambient air. If you are pushing 10A through an IRLZ44N with an R_DS(on) of 0.022Ω, your power loss is P = I²R = 10² × 0.022 = 2.2W. This will overheat the bare package. Always bolt a small finned heatsink to the metal tab for continuous loads exceeding 5A. For more foundational theory on how these semiconductor junctions operate at the atomic level, refer to the All About Circuits BJT Introduction.

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.