If you grab a standard TO-92 2N2222 NPN transistor and hold it with the flat side facing you, the pins from left to right are Emitter, Base, and Collector. That is the direct answer for the most common switching BJT on the market. However, relying on memory for the pins of transistor components is a fast track to melted plastic and dead microcontrollers. Manufacturers frequently swap pinouts between seemingly identical packages, and guessing the layout will put your circuit in reverse-active mode or short your power rail.
This guide moves past abstract semiconductor physics and focuses on what you actually need at the workbench: how to read pinouts, select safe default part numbers, calculate base biasing for hard saturation, and test a suspected dead transistor with a standard digital multimeter.
The Anatomy of BJT Pinouts and Safe Default Part Numbers
The physical layout of the pins of transistor packages depends entirely on the manufacturer and the specific die inside, even when the external plastic TO-92 package looks identical. For example, the ubiquitous 2N2222 (E-B-C) and the equally common BC547 (C-B-E) share the same physical footprint but have mirrored outer pins. If you drop a BC547 into a breadboard wired for a 2N2222, you instantly swap the collector and emitter.
When stocking your bench, standardize on a few proven workhorses. Here are the safe defaults for general-purpose low-side and high-side switching, complete with their absolute maximum ratings.
| Part Number | Type | Pinout (Flat side facing) | Max Vce | Max Ic | Max Power |
|---|---|---|---|---|---|
| 2N2222A | NPN | E - B - C | 40V | 800mA | 625mW |
| 2N3904 | NPN | E - B - C | 40V | 200mA | 625mW |
| 2N3906 | PNP | E - B - C | -40V | -200mA | 625mW |
| BC547 | NPN | C - B - E | 45V | 100mA | 500mW |
| TIP120 | NPN Darlington | B - C - E (TO-220) | 60V | 5A | 65W |
Biasing for the Job: Operation Regions and Switch Design
To use a BJT as a reliable switch, you must drive it between two specific regions: Cutoff (fully off) and Saturation (fully on). The Active region is used for analog amplification, but in digital switching, lingering in the active region causes the transistor to dissipate massive amounts of heat.
| Region | Base-Emitter Voltage (Vbe) | Collector-Emitter Voltage (Vce) | Collector Current (Ic) | Use Case |
|---|---|---|---|---|
| Cutoff | < 0.5V | Equal to Vcc | ~0A (leakage only) | Switch OPEN (Off) |
| Active | ~0.6V - 0.7V | Between 0.2V and Vcc | Ic = Beta * Ib | Analog Amplifiers |
| Saturation | ~0.7V - 0.8V | < 0.2V (Vce_sat) | Limited by external load | Switch CLOSED (On) |
When selecting and biasing a transistor for a switching job, never rely on the datasheet's typical DC current gain (hFE or Beta). A 2N2222 might have a nominal Beta of 100 in the active region, but to guarantee hard saturation, you must use a forced Beta of 10. This means you design your base resistor to supply one-tenth of the required collector current. This ensures the pins of transistor switches drop the minimum possible voltage (Vce_sat), keeping the component cool.
Complete Application Circuit: Driving a 12V Relay from an ESP32
Let's build a practical low-side switch. We need to drive a 12V automotive-style relay with a coil resistance of 160 ohms using a 3.3V GPIO pin from an ESP32-WROOM-32.
1. Calculate the Load Current (Ic):
Using Ohm's Law, the relay coil draws I = V / R = 12V / 160Ω = 75mA. The 2N3904 (max 200mA) or 2N2222 (max 800mA) will handle this easily. We will use the 2N2222.
2. Calculate the Base Current (Ib) for Saturation:
Using our forced Beta of 10: Ib = Ic / 10 = 75mA / 10 = 7.5mA.
The ESP32 GPIO can safely source up to 12mA, so 7.5mA is well within limits.
3. Calculate the 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.
Rb = V / I = 2.6V / 7.5mA = 346 ohms.
We select the next standard resistor value down to ensure we slightly overdrive the base: 330 ohms.
4. The Flyback Diode:
Relay coils are inductors. When the transistor switches off, the collapsing magnetic field generates a massive reverse voltage spike that will instantly punch through the collector-base junction and destroy the transistor. You must place a 1N4148 or 1N4007 diode in parallel with the relay coil, with the cathode (stripe) facing the 12V supply.
For a deeper theoretical breakdown of why the flyback diode is non-negotiable, review the inductive kickback principles outlined in All About Circuits' BJT chapter.
Bench War Story: When the Pinout Lies
Last year, I was prototyping a high-side PNP switch for a 24V LED array. I ran out of 2N3906 transistors and grabbed a BC557 from a bin, assuming the pins of transistor components in the TO-92 package were universally E-B-C. The BC557 is actually C-B-E.
The Setup: I wired the circuit with the emitter to 24V, the base to a voltage divider, and the collector to the LED load. Because I had swapped the physical pins, the actual emitter was connected to the load, and the actual collector was connected to 24V.
The Numbers: The load required 100mA. With the transistor in normal forward-active mode, Vce(sat) would be around 0.2V, dissipating a harmless 20mW.
The Outcome: The LEDs glowed dimly, and the transistor became too hot to touch within three seconds.
What Went Wrong: By swapping the collector and emitter, I forced the BJT into reverse-active mode. In this mode, the roles of the heavily doped emitter and lightly doped collector are reversed. The reverse Beta (βR) of a standard BJT is terribly low—usually between 2 and 5. Instead of saturating, the transistor dropped about 4V across its junction while trying to pass the 100mA load. Power dissipation spiked to P = V * I = 4V * 0.1A = 400mW, exceeding the TO-92 thermal limits in free air without a heatsink. The junction overheated, causing thermal runaway, and the part failed short. Always verify your pinout with a meter if you are pulling from an unsorted bin.
Multimeter Diode Test: How Transistors Fail and How to Catch It
Transistors typically fail in one of two ways: a shorted junction (usually Collector-to-Emitter due to overvoltage or thermal runaway) or an open junction (usually Base-to-Emitter due to excessive base current). You can diagnose both on the bench using the diode test mode on your digital multimeter.
According to Fluke's official testing guidelines, treating the BJT as two back-to-back diodes is the most reliable field test.
- Isolate the Component: Remove the transistor from the circuit. In-circuit testing will yield false readings due to parallel resistor and diode paths.
- Set the Meter: Turn your multimeter dial to the Diode Test mode (usually indicated by a diode symbol).
- Test Base-to-Emitter (NPN): Place the red probe on the Base and the black probe on the Emitter. A healthy silicon BJT will read between 0.600V and 0.750V. Reverse the probes; it should read 'OL' (Open Loop).
- Test Base-to-Collector (NPN): Place the red probe on the Base and the black probe on the Collector. You should see the same 0.600V to 0.750V forward voltage drop. Reversing probes should read 'OL'.
- Test Collector-to-Emitter: Place probes across the Collector and Emitter in both directions. Both readings must be 'OL'. If you read a short (0.000V or a very low number) in either direction, the internal die has melted and the part is dead.
Mastering the physical layout and electrical boundaries of these components bridges the gap between a schematic that works in SPICE and a circuit that survives on the bench. By standardizing your component library, calculating for forced saturation, and verifying your assumptions with a multimeter, you eliminate the most common failure points in discrete transistor design.






