2N2222 NPN Transistor

A widely used general-purpose NPN switching transistor, common in beginner motor-driver and relay-driver circuits.

How this component works

An NPN bipolar junction transistor has three terminals: base, collector, and emitter. A small current flowing into the base allows a much larger current to flow from collector to emitter — the ratio between them is the transistor's current gain (hFE or β), typically 50-300 for small-signal parts.

This makes an NPN transistor useful as a current amplifier (driving a relay or motor from a microcontroller pin) or as a switch (fully on or fully off, controlled by the base).

CircuitForge models the base-emitter junction with the diode equation and applies the gain parameter to derive collector current — the same core approach as a real small-signal transistor datasheet's DC characteristics.

Deep Dive: 2N2222 Transistor

The 2N2222 is the classic "heavy lifter" among small-signal NPN transistors. What sets it apart from other TO-92 package transistors is its impressively high continuous collector current rating of 600mA (or 800mA for the 2N2222A variant). This makes it an ideal low-side switch for driving electromechanical loads like 5V relays, small hobby DC motors, or long strips of LEDs directly from a microcontroller's logic pin.

When used as a switch, the transistor must be driven into "saturation" to minimize voltage drop and heat. To saturate the transistor, a good rule of thumb is to push a base current (Ib) that is about 1/10th of the desired collector current (Ic), ignoring the typical high hFE. For example, to switch a 200mA relay coil, you would target 20mA of base current. On a 5V logic system (with the base-emitter junction dropping ~0.7V), the base resistor would be R = (5V - 0.7V) / 0.02A = 215Ω (so a standard 220Ω resistor works perfectly).

Despite its current handling, it is still limited by thermal dissipation. A TO-92 package can typically dissipate around 625mW. If the transistor is not fully saturated and has a Vce (collector-emitter voltage drop) of 2V while passing 300mA, it will dissipate 600mW (P = V×I), getting extremely hot and risking thermal failure. Driving the base hard enough to keep Vce near 0.2V (Vce_sat) is critical for high-current switching.

Common Use Cases

  • Low-side switch driving a small DC motor or relay coil from a logic pin
  • Simple single-transistor amplifier stage
  • Building block for an astable multivibrator (two-transistor LED flasher)

Frequently Asked Questions

Can a 2N2222 directly drive a motor from a microcontroller pin?

The microcontroller pin drives the base through a resistor, and the transistor's collector-emitter path switches the motor's higher current — the pin never carries the motor current directly. Add a flyback diode across the motor to protect the transistor.

What does the gain (hFE) parameter control in the simulation?

It sets the ratio between base current and collector current — a higher gain means a smaller base current is needed to fully turn on the same collector current, which is exactly how it behaves on a real datasheet.

Comparison Notes

Compared to the BC547, the 2N2222 can handle roughly 6 to 8 times more collector current (600mA vs 100mA), making it far superior for driving motors and relays. However, it often requires more base drive current to fully saturate, whereas the BC547 is optimized for high-gain, low-current signal amplification.

Specifications

Electrical

Collector-Emitter Voltage (Vceo)30 V (40 V for A-suffix)
Continuous Collector Current (Ic)600 mA (800 mA for A-suffix)
DC Current Gain (hFE)Typically 100-300 at 150mA
Base-Emitter On Voltage (Vbe)~0.6 V to 1.2 V

Package & Mechanical

PackageTO-18 (metal can) or TO-92 (plastic, PN2222)
Pinout (TO-92)1: Emitter, 2: Base, 3: Collector (EBC)

Thermal

Power dissipation (max)500 mW to 625 mW (TO-92)
Transition frequency (fT)250 MHz

Pinout

1Pin 1
2Pin 2
3Pin 3

Related Components