When you pull a transistor out of an anti-static bag, the three metal legs don't come with labels. Misidentifying transistor pins is the fastest way to fry a component, short your power supply, or blow the GPIO pin on your microcontroller. The physical pinout depends entirely on the package type (TO-92, TO-220, SOT-23) and the semiconductor chemistry inside (BJT vs. MOSFET).
For the most common hobbyist and bench packages, here is the direct answer: On a standard TO-92 NPN BJT (like the 2N3904 or PN2222A) with the flat side facing you and pins pointing down, the pins are Emitter, Base, Collector (E-B-C) from left to right. On a standard TO-220 N-Channel MOSFET (like the IRF520 or IRLZ44N) with the metal tab facing away from you and pins down, the pins are Gate, Drain, Source (G-D-S) from left to right.
But memorizing two pinouts isn't enough to build a reliable circuit. You need to know how to bias those pins, how to verify them with a multimeter when you find an unmarked part, and exactly which part numbers to default to when designing a switch. Let's break down the bench-level realities of transistor pins.
The Physical Pinouts: TO-92 and TO-220 Packages
The TO-92 (small plastic, 3 inline pins) and TO-220 (larger plastic with a metal heatsink tab and 3 thick pins) dominate through-hole circuit design. However, the pin assignments are not universal across all part numbers in the same package.
For TO-220 packages, there is a critical hardware detail tied to the transistor pins: the metal mounting tab. In almost all standard TO-220 BJTs and MOSFETs, the metal tab is electrically connected to the middle pin. For an NPN BJT, the tab is the Collector. For an N-Channel MOSFET, the tab is the Drain. If you mount a TO-220 MOSFET to a grounded metal chassis without a silicone insulator pad, you will short the Drain directly to ground the moment you apply power.
Operation Regions and Biasing Voltages
Identifying the pins is useless if you don't apply the correct voltages to them. BJTs are current-controlled devices; you inject current into the Base pin to allow a larger current to flow from Collector to Emitter. MOSFETs are voltage-controlled; you apply a voltage to the Gate pin (relative to the Source) to lower the resistance between Drain and Source.
A massive point of confusion for beginners is the terminology for the 'fully ON' state. In a BJT, the fully ON state is called Saturation. In a MOSFET, the fully ON state is called the Linear or Ohmic Region. (MOSFET 'Saturation' actually refers to the constant-current active region used for amplification, not switching).
| Device State | BJT (NPN) Pin Conditions | MOSFET (N-Ch) Pin Conditions | Practical Use Case |
|---|---|---|---|
| Cutoff (OFF) | Vbe < 0.6V (Ib = 0) | Vgs < Vgs(th) (typically < 2V) | Switch open, no load current. |
| Active / Linear | Vbe ≈ 0.7V, Vce > Vce(sat) | Vgs > Vgs(th), Vds is high | Amplifiers, linear regulators (dissipates high heat). |
| Fully ON (Switch) | Saturation: Vbe ≈ 0.7V, Ib is overdriven, Vce ≈ 0.2V | Ohmic: Vgs >> Vgs(th) (e.g., 10V), Rds(on) is minimal | Digital switching, PWM motor control, relay driving. |
When using transistor pins for switching, your goal is to push the device hard into the 'Fully ON' state to minimize voltage drop across the device, thereby minimizing heat dissipation (P = V × I).
Application Circuit: Driving a 12V Relay with an NPN BJT
Let's apply these transistor pins to a real-world problem: switching a 12V, 80mA automotive-style relay using a 5V Arduino GPIO pin. We will use the PN2222A NPN BJT as our default switch.
- The Load Path: Connect the relay coil between the 12V supply and the Collector pin of the PN2222A. Connect the Emitter pin directly to system Ground.
- The Flyback Diode: Place a 1N4007 diode in reverse bias across the relay coil (cathode stripe to 12V, anode to Collector). When the transistor turns off, the collapsing magnetic field generates a high-voltage spike that will punch through the Collector-Emitter junction and destroy the transistor. The diode clamps this spike.
- Calculating the Base Resistor: The relay draws 80mA (Ic). The PN2222A has a typical DC current gain (hFE or Beta) of 100. Theoretically, you only need 0.8mA of Base current (Ib). However, to guarantee the transistor enters hard saturation (Vce drops to ~0.2V), we use a 'forced beta' of 10. We want Ib = 8mA.
- Sizing the Resistor: The Arduino outputs 5V. The Base-Emitter junction drops ~0.7V. The voltage across the base resistor is 5V - 0.7V = 4.3V. Using Ohm's Law: R = V / I = 4.3V / 0.008A = 537Ω. The closest standard E12 value is 470Ω.
- The Control Path: Connect the 5V GPIO pin to the Base pin through the 470Ω resistor.
When the GPIO goes HIGH, 9.1mA flows into the Base pin, saturating the transistor and pulling the Collector to near-ground, energizing the relay. When the GPIO goes LOW, the Base current stops, the transistor cuts off, and the relay drops out.
Multimeter Testing: Finding Pins and Diagnosing Failures
If you have an unmarked TO-92 transistor or suspect a component has failed on your board, your multimeter's Diode Test mode is your primary diagnostic tool. A BJT is essentially two back-to-back diodes (Base-Emitter and Base-Collector).
How to identify NPN BJT transistor pins with a DMM:
- Set your multimeter to Diode mode.
- Place the Red (+) probe on the middle pin (assuming it's the Base) and the Black (-) probe on the left pin.
- If the meter reads between 0.550V and 0.750V, you have found the Base-Emitter or Base-Collector junction. Leave the Red probe where it is.
- Move the Black probe to the right pin. If you get another 0.550V - 0.750V reading, the middle pin is definitely the Base, and it is an NPN transistor.
- To distinguish Collector from Emitter: The Base-Collector junction will typically show a slightly lower forward voltage drop (e.g., 0.610V) than the Base-Emitter junction (e.g., 0.640V) due to differences in doping concentrations.
- Verify isolation: Place probes across Collector and Emitter in both directions. The meter must read 'OL' (Open Loop). If it reads a short or a low voltage, the transistor has suffered secondary breakdown and is dead.
Decision Tree: Which Transistor and Pin Config to Choose
Stop guessing which part to pull from your bin. Use this decision matrix to select the exact transistor and package for your next switching application. For deeper theory on BJT behavior, refer to the Bipolar Junction Transistors chapter on All About Circuits.
| Load Requirement | Switching Speed | Control Signal | Concrete Default Pick (Part & Package) |
|---|---|---|---|
| < 200mA (LEDs, small relays) | Low to Medium | 5V / 3.3V Logic | 2N3904 (NPN, TO-92) or 2N7000 (N-Ch MOSFET, TO-92) |
| 200mA to 1A (Motors, solenoids) | Medium | 5V Logic | PN2222A (NPN, TO-92) or TIP31C (NPN, TO-220) |
| 1A to 10A (High-power DC loads) | High (PWM) | 5V Logic (Logic-Level) | IRLZ44N (N-Ch MOSFET, TO-220) |
| 1A to 10A (High-power DC loads) | High (PWM) | 10V-12V Gate Drive | IRF520 (N-Ch MOSFET, TO-220) |
The Ultimate Bench Defaults:
- For low-side BJT switching under 500mA: Buy a 100-pack of 2N3904 (NPN) and 2N3906 (PNP). The E-B-C pinout is standard, they are cheap, and they handle 200mA continuous collector current easily.
- For high-current PWM switching: Standardize on the IRLZ44N. It is a logic-level MOSFET, meaning its Gate pin will fully open the Drain-Source channel (Rds(on) ≈ 22mΩ) with just 5V from an Arduino or ESP32. Standard MOSFETs like the IRF520 require 10V on the Gate to reach their rated low resistance, making them a poor choice for direct 3.3V/5V microcontroller driving.
By standardizing your bin stock to these specific part numbers, you eliminate the pinout guessing game. You will always know that your TO-92 BJTs are E-B-C, your TO-220 MOSFETs are G-D-S, and your microcontroller pins won't be subjected to back-EMF or excessive base current draw.






