The pins of a transistor dictate whether your circuit switches cleanly or lets out the magic smoke. If you are holding a standard 2N3904 NPN bipolar junction transistor (BJT) in a TO-92 package, looking at the flat side with the leads pointing down, the pins from left to right are Emitter (E), Base (B), and Collector (C). However, if you are holding a BC547 in the exact same physical package, the pins are Collector (C), Base (B), and Emitter (E). Never guess based on the plastic shape alone; always verify the specific part number.
This guide cuts through the semiconductor physics and gives you the exact pinout references, biasing math, and multimeter testing procedures you need to put these components to work on the bench.
Standard Transistor Pinouts and Package Variants
Transistors come in several physical packages, but the TO-92 (small signal), TO-220 (medium power), and SOT-23 (surface mount) cover 90% of hobbyist and prototyping work. The orientation rule—flat side facing you, leads pointing down—applies to through-hole TO-92 and TO-220 packages. For metal-can TO-18 packages, you look at the bottom (lead side) and use the metal tab as a reference point.
| Part Number | Type | Package | Pin 1 (Left) | Pin 2 (Center) | Pin 3 (Right) | Max Ic / Vce |
|---|---|---|---|---|---|---|
| 2N3904 | NPN BJT | TO-92 | Emitter | Base | Collector | 200mA / 40V |
| 2N3906 | PNP BJT | TO-92 | Emitter | Base | Collector | 200mA / 40V |
| BC547 | NPN BJT | TO-92 | Collector | Base | Emitter | 100mA / 45V |
| 2N2222A | NPN BJT | TO-18 (Metal) | Emitter (near tab) | Base | Collector | 800mA / 40V |
| TIP31C | NPN BJT | TO-220 | Base | Collector (tab) | Emitter | 3A / 100V |
| IRLZ44N | N-CH MOSFET | TO-220 | Gate | Drain (tab) | Source | 47A / 55V |
Operation Regions and Biasing the Pins
To use a BJT as a switch (which is what you want for driving relays, LEDs, or motors), you must drive the Base pin with enough current to push the transistor into saturation. In saturation, the voltage drop across the Collector and Emitter (Vce) drops to nearly zero (typically 0.1V to 0.2V), acting like a closed mechanical switch.
If you only supply a tiny amount of Base current, the transistor enters the active (linear) region. Here, it acts as an amplifier or a variable resistor. This is useful for audio amplifiers but terrible for switching power loads, because the transistor will dissipate massive amounts of heat as it drops voltage across the Collector-Emitter junction.
| Region | Base-Emitter Voltage (Vbe) | Collector-Emitter Voltage (Vce) | Collector Current (Ic) | Primary Use Case |
|---|---|---|---|---|
| Cutoff | < 0.5V | Equal to Supply (Vcc) | 0 mA (Leakage only) | Switch OFF |
| Active | ~0.6V to 0.7V | > 0.3V (Varies) | Ic = hFE * Ib | Signal Amplification |
| Saturation | ~0.7V to 0.8V | < 0.2V (Vce_sat) | Ic < hFE * Ib (Limited by load) | Switch ON (Low heat) |
A Complete Switching Circuit (With Real Values)
Let us build a practical circuit: switching a 12V, 50mA automotive-style relay using a 3.3V GPIO pin from an ESP32 microcontroller. We will use the 2N3904 NPN transistor.
The Math:
1. Collector Current (Ic): 50mA (relay coil draw).
2. Required Base Current (Ib): The 2N3904 has a minimum hFE of 100 at 50mA. Theoretical Ib = 50mA / 100 = 0.5mA. Applying a 5x overdrive factor for hard saturation: Target Ib = 2.5mA.
3. Base Resistor (Rb): The ESP32 outputs 3.3V. The Base-Emitter junction drops about 0.7V. Voltage across Rb = 3.3V - 0.7V = 2.6V.
Using Ohm's Law: R = V / I = 2.6V / 0.0025A = 1040 ohms.
4. Standard Value Selection: Choose the next lower standard E12 resistor value to ensure we exceed 2.5mA. We will use a 1kΩ (1000Ω) resistor. This yields an actual Ib of 2.6mA, safely within the ESP32's 12mA per-pin limit and the 2N3904's 200mA max rating.
Component List & Wiring:
- Q1: 2N3904 NPN Transistor (Flat side facing you: E, B, C).
- R1: 1kΩ Base Resistor (Connects ESP32 GPIO to Base pin).
- R2: 10kΩ Pull-down Resistor (Connects Base pin to GND to prevent floating during ESP32 boot).
- D1: 1N4148 or 1N4001 Flyback Diode (Cathode stripe to 12V, Anode to Collector pin). Never omit this; the relay coil's inductive kickback will instantly avalanche and destroy the transistor.
- Load: 12V Relay Coil (Connects between 12V supply and Collector pin).
When the ESP32 pin goes HIGH (3.3V), 2.6mA flows through R1 into the Base. The transistor saturates, pulling the Collector to ~0.1V. The relay sees 11.9V across its coil and clicks on. When the GPIO goes LOW, the Base is pulled to ground via R2, the transistor cuts off, and the relay drops out.
How Transistors Fail and How to Test the Pins
Transistors rarely fail gracefully. The most common failure modes are thermal runaway (insufficient heatsinking causing the junction to overheat and short) and secondary breakdown (exceeding the Vce voltage rating, causing an internal arc). When a BJT fails, it almost always fails as a dead short between the Collector and Emitter, or a short between all three pins.
You can verify the health of a BJT and identify its pins using a standard digital multimeter (DMM) set to Diode Test mode (the symbol with the diode arrow and a line).
Step-by-Step DMM Testing (NPN Transistor):
- Find the Base: Place the red probe on any pin and the black probe on the other two. If you read a forward voltage drop (typically 0.55V to 0.75V) on both pins, the pin under your red probe is the Base. (If you read 'OL' or '1', move the red probe to the next pin and repeat).
- Identify Emitter vs. Collector: With the red probe still on the Base, note the exact voltage drop on the other two pins. The pin that yields a slightly higher voltage drop (e.g., 0.68V vs 0.65V) is the Emitter. The pin with the slightly lower drop is the Collector. This difference is due to the internal doping geometry of the junctions.
- Check for Shorts: Place the probes across the Collector and Emitter in both directions. The meter must read 'OL' (open loop). If it reads 0.00V or a low resistance, the transistor is blown and belongs in the trash.
Safe Default Part Numbers for Your Bench
Stop buying random assortments of unmarked transistors from questionable marketplaces. Keep these specific, well-documented, and easily sourced part numbers in your bench drawers. They cover 95% of DIY and prototyping needs.
| Category | Part Number | Key Specs | When to Use It |
|---|---|---|---|
| Small Signal NPN | 2N3904 / PN2222A | 200mA, 40V, TO-92 | Logic level shifting, driving small LEDs, low-power relays. |
| Small Signal PNP | 2N3906 | 200mA, 40V, TO-92 | High-side switching, complementary push-pull stages with 2N3904. |
| Medium Power Darlington | TIP120 / TIP122 | 5A, 60V/100V, TO-220 | Driving motors, solenoids, and high-current LED strips directly from 5V logic (hFE > 1000). |
| Logic-Level N-MOSFET | IRLZ44N | 47A, 55V, TO-220 | High-current switching (PWM motor control, large heaters) where BJT base current would be too high. Fully turns on at 3.3V/5V Gate drive. |
For deeper study on semiconductor behavior and biasing networks, the Bipolar Junction Transistor chapter on All About Circuits provides excellent schematic breakdowns. If you need to verify exact pinouts and thermal derating curves for your specific batch, always pull the manufacturer datasheet, such as the SparkFun Transistor Tutorial which bridges the gap between raw datasheets and practical breadboard implementation.
By standardizing your bench inventory around these proven part numbers and verifying your pins with a multimeter before applying power, you will eliminate the most common points of failure in custom transistor circuits.






