A Bipolar Junction Transistor (BJT) is a three-terminal, current-controlled semiconductor device used to amplify signals or act as an electronic switch. Unlike MOSFETs, which are voltage-controlled, a BJT requires a continuous base current to maintain conduction between the collector and emitter. If you need a quick answer for general-purpose hobbyist and prototyping work, the 2N3904 (NPN, 200mA) and 2N2222 (NPN, 600mA) are your safe default part numbers for low-side switching and basic amplification.

Anatomy, Pinouts, and Safe Default Part Numbers

Every BJT transistor has three pins: the Base (B), Collector (C), and Emitter (E). In schematic symbols, the emitter is always the leg with the arrow. For NPN transistors, the arrow points outward (remember the mnemonic: Not Pointing iN). For PNP transistors, the arrow points inward (Pointing iN). Current flows from Collector to Emitter in an NPN, and Emitter to Collector in a PNP, gated by the Base current.

When stocking your bench, avoid buying random assortments with unknown specifications. Stick to these industry-standard defaults, which are widely available for $0.05 to $0.15 each in bulk:

Part NumberTypeMax VceMax IcTypical hFEPackageBest Use Case
2N3904NPN40V200mA100 - 300TO-92Logic-level switching, small signal amps
2N2222ANPN40V600mA100 - 300TO-92 / TO-18Relay drivers, medium current switching
2N3906PNP-40V-200mA100 - 300TO-92High-side switching, complementary pairs
BC547NPN45V100mA110 - 800TO-92Audio pre-amps, ultra-low current sensors
TIP120Darlington NPN60V5A1000+TO-220High-current motors, solenoids (needs heatsink)
Bench Tip: Always check the pinout for the specific package you buy. The TO-92 plastic package for a 2N2222 is typically Emitter-Base-Collector (E-B-C) when looking at the flat face. However, the metal TO-18 can version is E-B-C in a circular arrangement. Never assume pinouts across different physical packages.

The Four Operating Regions Explained

To use a BJT effectively, you must understand which of its four operating regions it is currently in. The transition between these regions is governed by the Base-Emitter voltage (Vbe) and the Collector-Emitter voltage (Vce).

RegionVbe (NPN)VceCollector Current (Ic)Primary Application
Cutoff< 0.5VEqual to Supply0A (Leakage only)Switch 'OFF' state
Active (Linear)~ 0.6V - 0.7V> Vce(sat)Ic = hFE * IbAudio/Signal Amplification
Saturation~ 0.7V - 0.8V< 0.3V (Vce_sat)Limited by external loadSwitch 'ON' state
BreakdownAny> BV_ceoUncontrolled avalancheFailure (Device destruction)

When designing a switch, your goal is to slam the transistor hard into Saturation. In this state, Vce drops to roughly 0.2V, minimizing power dissipation (P = Vce × Ic). When designing an amplifier, you bias the transistor in the Active region, allowing small changes in Base current to produce proportionally larger changes in Collector current.

Biasing for the Job: Switching vs. Amplification

Biasing is the act of setting the DC operating point of the transistor. The math changes drastically depending on whether you are switching a load or amplifying a signal.

Switching Bias (Forced Beta)

Datasheets list hFE (DC current gain) as a wide range (e.g., 100 to 300). Furthermore, hFE drops significantly at high collector currents and low temperatures. To guarantee saturation, we use a 'forced beta' of 10 or 20. This means we supply 5 to 10 times more base current than the theoretical minimum.

Complete Application Circuit: 12V Relay Driver

Let's drive a 12V relay with a 50mA coil using an ESP32 (3.3V logic) and a 2N2222A.

  1. Calculate required Ic: 50mA.
  2. Select forced beta: 20 (to ensure hard saturation).
  3. Calculate required Ib: 50mA / 20 = 2.5mA.
  4. Calculate Base Resistor (Rb): The ESP32 outputs 3.3V. The Vbe drop is 0.7V. Voltage across Rb = 3.3V - 0.7V = 2.6V. Using Ohm's law: R = 2.6V / 2.5mA = 1040Ω. Choose the standard 1kΩ resistor.
  5. Add Flyback Diode: Place a 1N4148 or 1N4001 diode in reverse bias across the relay coil (cathode to 12V, anode to the collector pin).

In this circuit, the 1kΩ base resistor safely limits the ESP32 GPIO current to 2.6mA (well under the 12mA per-pin absolute max), while providing enough base drive to saturate the 2N2222A, dropping Vce to ~0.2V and delivering full 12V to the relay coil.

Bench Scenario: The 12V Relay Driver That Fried the GPIO

Theory is clean; the bench is messy. Here is a real-world failure scenario that highlights what happens when you ignore BJT limits and inductive physics.

The Setup: A hobbyist used a BC547 transistor to switch a 12V automotive relay (75mA coil current) directly from a 3.3V microcontroller pin. They calculated the base resistor using the datasheet's typical hFE of 200: Ib = 75mA / 200 = 0.375mA. They installed a 4.7kΩ base resistor and omitted the flyback diode to save board space.

The Numbers: The BC547 has an absolute maximum Ic of 100mA. Running it at 75mA leaves almost zero thermal margin. Worse, at 75mA, the actual hFE of a BC547 drops closer to 80. The 4.7kΩ resistor only supplied ~0.55mA of base current. The transistor could only support an Ic of about 44mA (0.55mA × 80).

The Outcome: The relay clicked weakly and failed to latch. The transistor became too hot to touch, and three minutes later, the microcontroller's GPIO pin permanently shorted to ground, killing the chip.

What Went Wrong: Two catastrophic errors occurred. First, because the base current was too low, the BC547 never reached saturation; it stayed stuck in the Active region. The voltage across the transistor (Vce) was roughly 8V. Power dissipation was P = 8V × 44mA = 352mW. While this sounds low, a TO-92 package is only rated for 500mW at 25°C ambient, and the thermal resistance caused the silicon junction to overheat and degrade. Second, when the microcontroller pin eventually toggled low, the relay coil's collapsing magnetic field generated an inductive voltage spike (V = L × di/dt). Without a flyback diode, this spike exceeded 60V, instantly punching through the BC547's Collector-Base junction (BV_ceo is only 45V) and feeding 12V directly back into the 3.3V GPIO pin.

The Fix: Swap to a 2N2222A (600mA rating), drop the base resistor to 1kΩ to force saturation, and always use a flyback diode across inductive loads.

Failure Modes and Multimeter Diode Testing

BJTs typically fail in one of three ways: Thermal runaway (excessive power dissipation melts the silicon), Secondary breakdown (localized hot spots in the silicon cause a short), or Overvoltage punch-through (exceeding Vce_max destroys the collector-base junction). According to Fluke's guide on testing transistors, you can quickly diagnose a dead BJT using the diode-test mode on a standard digital multimeter.

A healthy NPN transistor behaves exactly like two diodes sharing a common anode (the Base). Here is the step-by-step bench test:

  1. Set your multimeter to Diode Mode. The display should show a diode symbol.
  2. Test Base-to-Emitter (Forward): Place the red probe on the Base and the black probe on the Emitter. A healthy silicon BJT will read between 0.55V and 0.75V.
  3. Test Base-to-Collector (Forward): Place the red probe on the Base and the black probe on the Collector. You should see a similar reading (0.55V to 0.75V), usually slightly lower than the B-E reading.
  4. Test Reverse Bias: Swap the probes (black on Base, red on Emitter, then red on Collector). The meter must read 'O.L.' (Over Limit) or '1', indicating an open circuit.
  5. Test Collector-to-Emitter: Place probes across C and E in both directions. Both must read 'O.L.'. If you read a short (0.00V) or a low resistance, the transistor has suffered secondary breakdown or thermal melting and is trash.
Warning: Never test a BJT while it is still soldered into a circuit. Parallel components (like base pulldown resistors or load coils) will create alternate current paths, giving you false 'short' or low-voltage readings on your multimeter. Always desolder at least two legs before testing.

For deeper theoretical background on how the depletion regions inside these junctions behave under bias, the All About Circuits semiconductor textbook chapter on BJTs provides excellent schematic breakdowns. When selecting your next component, always verify the exact Vce(sat) and hFE curves on the manufacturer's datasheet, such as the ON Semiconductor 2N3904 specifications, rather than relying on rule-of-thumb forum advice.