The Core Concept: What Is a BJT Transistor Actually Doing?
At its core, a Bipolar Junction Transistor (BJT) is a current-controlled current valve. Unlike a MOSFET, which is controlled by voltage, a BJT uses a small current flowing into its Base terminal to regulate a much larger current flowing between its Collector and Emitter. If you want to switch a 500mA motor using a 5mA microcontroller pin, the BJT acts as the muscle, provided you bias it correctly.
To use one on the bench, you need to know its physical layout and schematic symbol. The most common through-hole package is the TO-92. When you hold a standard NPN transistor (like a 2N3904) with the flat side facing you and the pins pointing down, the pinout from left to right is:
- Emitter (E): The source of charge carriers. Usually tied to ground in NPN switching circuits.
- Base (B): The control terminal. A small current here opens the main valve.
- Collector (C): Where the main load current enters the transistor.
On a schematic, the symbol tells you everything. An NPN transistor has an arrow on the Emitter pointing outward (a common mnemonic is 'Not Pointing iN'). A PNP transistor has the arrow pointing inward. For 95% of hobbyist and DIY switching applications, you will be using NPN transistors with the Emitter grounded and the load connected to the Collector.
The Big Three: Safe Default BJT Part Numbers and Ratings
Walk into any electronics lab, and you will find three BJT part numbers covering almost every low-voltage DC requirement. When selecting a BJT, never just look at the maximum Collector current ($I_C$); you must also check the power dissipation and the DC current gain ($h_{FE}$). Here are the safe defaults you should stock in your bench drawer.
| Part Number | Type | Max $V_{CE}$ | Max $I_C$ | Typical $h_{FE}$ | Max Power ($P_D$) | Package | Use Case |
|---|---|---|---|---|---|---|---|
| 2N3904 / 2N3906 | NPN / PNP | 40V | 200mA | 100 - 300 | 625mW | TO-92 | Logic level shifting, LED driving, low-power signal switching. |
| 2N2222 / 2N2907 | NPN / PNP | 40V | 800mA | 100 - 300 | 500mW (TO-92) / 1.5W (TO-18) | TO-92 / TO-18 | Relay coils, small solenoids, medium-power switching. |
| TIP31C / TIP32C | NPN / PNP | 100V | 3A | 25 - 50 | 40W (with heatsink) | TO-220 | High-current motors, linear power supplies, heavy inductive loads. |
Note: Always consult the specific manufacturer's datasheet, such as the ON Semiconductor 2N3904 datasheet, as absolute maximum ratings can vary slightly between fab houses.
Operation Regions: Where Does Your Circuit Live?
A BJT doesn't just turn 'on' and 'off'. It operates in three distinct regions depending on the bias voltages applied to its junctions. Understanding these regions is the difference between a reliable switch and a melted component.
| Region | Base-Emitter Junction | Base-Collector Junction | Typical $V_{CE}$ | Circuit Function |
|---|---|---|---|---|
| Cutoff | Reverse biased ($V_{BE} < 0.5V$) | Reverse biased | $V_{CC}$ (Supply Voltage) | Switch is OFF. No collector current flows. |
| Active (Linear) | Forward biased ($V_{BE} \approx 0.7V$) | Reverse biased | $1.0V$ to $V_{CC}-1V$ | Amplifier. $I_C = h_{FE} \times I_B$. High power dissipation. |
| Saturation | Forward biased ($V_{BE} \approx 0.7V$) | Forward biased | $0.1V$ to $0.3V$ ($V_{CE(sat)}$) | Switch is ON. Max current flows, minimal voltage drop. |
When using a BJT as a switch, you must drive it deep into Saturation. If it lingers in the Active region, the transistor acts like a resistor, dropping significant voltage and turning that electrical energy into heat.
Designing a Reliable BJT Switch: A Complete Application Circuit
Let's build a real circuit. You need to switch a 12V automotive-style relay coil (drawing 75mA) using a 5V output from an ESP32 or Arduino GPIO pin. We will use a 2N2222 NPN transistor.
The Component List:
- Q1: 2N2222 (NPN BJT)
- R1: Base resistor (calculated below)
- D1: 1N4007 Flyback diode
- K1: 12V Relay (75mA coil)
Step 1: Calculate the Base Resistor ($R_B$)
To guarantee the transistor saturates, we don't use the datasheet's typical $h_{FE}$ (which might be 200). We use a 'forced beta' of 10. This ensures the transistor is fully turned on even if the specific part has low gain or the temperature drops.
- Target Collector Current ($I_C$) = 75mA
- Required Base Current ($I_B$) = $I_C / 10 = 7.5mA$
- GPIO Voltage ($V_{GPIO}$) = 5V
- Base-Emitter Voltage Drop ($V_{BE}$) = 0.7V
Using Ohm's Law: $R_B = (V_{GPIO} - V_{BE}) / I_B = (5V - 0.7V) / 0.0075A = 573\Omega$.
Select the next standard lower resistor value to ensure enough current: 560Ω or 470Ω. We will use 470Ω for a rock-solid saturation margin.
Relay coils are inductors. When the BJT turns off, the collapsing magnetic field generates a massive reverse voltage spike (often >100V) that will instantly punch through the BJT's Collector-Base junction, destroying it. Always place a 1N4007 or 1N4148 diode in reverse-bias across the relay coil (cathode to 12V, anode to the Collector). For a deeper look at inductive kickback, refer to Electronics Tutorials on BJT Switching.
Step 2: Wiring it up
- Connect the 12V supply positive to one side of the relay coil.
- Connect the other side of the relay coil to the Collector (right pin) of the 2N2222.
- Connect the Emitter (left pin) directly to the common system Ground.
- Connect the 470Ω resistor between the ESP32/Arduino GPIO pin and the Base (middle pin).
- Place the 1N4007 diode across the relay coil, with the silver stripe (cathode) pointing toward the 12V supply.
Bench War Story: When the 'Safe' Default Melts
Theory is clean; the bench is messy. A few years ago, I was designing a fluid control board that needed to switch a 12V brass solenoid valve. The datasheet for the valve stated a steady-state current draw of 400mA. I looked at my trusty 2N2222, saw its 800mA maximum $I_C$ rating, and thought I had plenty of headroom. I designed the board, calculated the base resistor for a forced beta of 10, and ordered the prototypes.
The Setup: 12V supply, 2N2222 in a TO-92 package, 150Ω base resistor driven by a 5V logic buffer, and a flyback diode across the solenoid.
The Numbers: In steady state, the $V_{CE(sat)}$ was about 0.3V. Power dissipation in the transistor was $P = V_{CE} \times I_C = 0.3V \times 0.4A = 120mW$. The TO-92 package can easily handle 500mW. Math said it was safe.
The Outcome: During the first endurance test, after about 50 cycles, the 2N2222 grew too hot to touch. By cycle 100, the plastic TO-92 package literally cracked, and the transistor failed short-circuit, locking the solenoid open and flooding the test rig.
What Went Wrong: I had ignored the inrush current. Solenoids have a massive air gap when open, meaning the coil's impedance is very low until the plunger physically moves and closes the magnetic circuit. I hooked up an oscilloscope with a current probe and saw the truth: the inrush current spiked to 1.4A for the first 40 milliseconds. Worse, during that 40ms spike, the base drive wasn't strong enough to keep the transistor saturated. It got pushed back into the Active region. The $V_{CE}$ spiked to 4V while passing 1.4A. That's 5.6 Watts of instantaneous heat in a tiny silicon die with almost no thermal mass. The silicon melted.
The Fix: For high-inrush inductive loads, abandon the TO-92 BJT. I replaced it with a logic-level MOSFET (IRLZ44N) which has virtually zero gate current requirements and a massive Safe Operating Area (SOA) for transient spikes. If you must use a BJT for high inrush, use a TO-220 package like the TIP31C, bolted to a heatsink.
How to Test a BJT with a Multimeter (And Spot a Dead One)
When a circuit fails, the BJT is usually the first casualty. You don't need a curve tracer to test one; a standard digital multimeter (DMM) in Diode Test mode is all you need. A BJT is essentially two diodes sharing a common anode (for NPN) or cathode (for PNP).
Testing an NPN Transistor (e.g., 2N3904, 2N2222):
- Set your DMM to Diode Test mode (the symbol with an arrow and a line).
- Base to Emitter (Forward): Place the Red probe on the Base, Black probe on the Emitter. You should read a forward voltage drop between 0.55V and 0.75V.
- Base to Collector (Forward): Red on Base, Black on Collector. You should read a similar drop (0.55V to 0.75V), usually slightly lower than the B-E junction.
- Reverse Bias Check: Swap the probes (Black on Base, Red on Emitter, then Red on Collector). The meter must read 'OL' (Over Limit / Open). If it reads a voltage or zero, the junction is shorted.
- Collector to Emitter: Place probes across C and E in both directions. It must read 'OL' both ways. If it reads near 0.00V, the transistor has suffered a thermal meltdown and shorted internally.
Testing a PNP Transistor (e.g., 2N3906, 2N2907):
The process is identical, but the polarities are reversed. Place the Black probe on the Base and the Red probe on the Emitter/Collector to get the 0.6V forward drop. Reversing the probes should yield 'OL'.
By mastering these bias calculations, understanding the physical limits of your package, and knowing how to verify the silicon with a DMM, you move from guessing to engineering. The BJT is an older technology compared to the MOSFET, but its predictable linear region and low cost make it an irreplaceable tool in any maker's arsenal.






