The 2N2222 is the transistor that shows up in nearly every “learn transistors” tutorial and every beginner component kit, as a small NPN switch capable of handling enough current to drive a relay, a small motor, or a string of LEDs directly from a microcontroller pin. What trips people up isn’t the transistor itself — it’s that “2N2222” on a modern part means something slightly different from what it meant fifty years ago, and getting that mixed up is the single most common way to wire one backwards.
A generic 2N2222A NPN transistor, TO-92 package. Photo: MarkMossGH, CC0 (resized)
Pinout (TO-92 package — what’s actually sold today)
Almost every 2N2222 sold on Amazon or from a hobbyist supplier today is in the small black plastic TO-92 package, and is electrically a PN2222A or 2N2222A underneath the “2N2222” printing — more on why that matters below. Holding the transistor with the flat face toward you and the three legs pointing down:
| Pin (left to right) | Name | What it does |
|---|---|---|
| 1 | Emitter (E) | Current exits here in normal NPN operation |
| 2 | Base (B) | The control pin — a small current here switches a much larger current through collector–emitter |
| 3 | Collector (C) | Current enters here, from the load being switched |
This E-B-C left-to-right order (flat face toward you) is confirmed on ON Semiconductor’s own PN2222A datasheet, and it’s the layout printed on the vast majority of TO-92 “2N2222” listings. It’s also the same order used by other extremely common TO-92 parts like the 2N3904 and BC547 — which is genuinely useful, since it means a lot of beginner circuits built around “a small NPN transistor” wire up the same way regardless of which of those three parts happens to be in the bag.
Why “2N2222” on a TO-92 part is a bit of a misnomer
The original 2N2222, introduced in the early 1960s, was built in a small round metal TO-18 can — three pins arranged in a rough triangle, identified by a tab near the case rather than a flat face, since there’s no flat face on a metal can to reference. That’s the part that appears in old textbooks, old military and aerospace documentation, and vintage electronics.
The 2N2222A is an improved-specification version of the same design (higher voltage and gain ratings), and the PN2222A is Motorola/ON Semiconductor’s version of that same electrical part in the cheaper black plastic TO-92 case instead of the metal can. Over decades of generic manufacturing, “2N2222” became the catch-all name printed on inexpensive TO-92 transistors that are, strictly, PN2222A-equivalent parts rather than the original metal-can device — which is exactly what’s turning up in £5-for-100 packs today. Functionally this is a non-issue for almost every hobbyist circuit; the electrical behaviour is equivalent or better than the original. The part that actually matters is remembering that the physical pinout identification method is different between the two packages — tab-relative on the metal can, flat-face-relative on the plastic one — so a pin diagram memorised from an old TO-18-era textbook doesn’t carry over to a modern TO-92 part without translating it first.
Identifying it on the breadboard
With the transistor’s flat side facing you and the three legs pointing down toward the breadboard, left to right is always Emitter, Base, Collector on a standard TO-92 2N2222/2N2222A/PN2222A. The easiest way to lose track is rotating the part while poking it into a breadboard — if it’s ever unclear which way round it went in, pull it out and re-check the flat face rather than guessing, since a swapped emitter and collector will usually look like “the transistor doesn’t work” rather than failing obviously.
A basic switching circuit
The most common beginner use is switching a load — an LED, a small relay coil, a low-current motor — that a microcontroller pin can’t drive directly:
- Base resistor, typically 1kΩ–10kΩ, between the microcontroller output pin and the base. This limits base current to a safe level; skipping it is the fastest way to destroy the transistor, since the base-emitter junction behaves like a diode with very little built-in current limiting of its own.
- Load (LED, relay coil, motor) between the positive supply and the collector.
- Emitter tied to ground, shared with the microcontroller’s ground.
- A HIGH on the base pulls the base-emitter junction into conduction, which lets current flow from collector to emitter through the load — switching it on.
Driving an inductive load — a relay coil or a motor — needs a flyback diode across the coil (cathode toward the supply), because a collapsing magnetic field generates a voltage spike when the transistor switches off that can exceed the transistor’s rating and destroy it over time if nothing clamps it.
Common mistakes
No base resistor. The base-emitter junction has very low resistance once it’s conducting, and driving it directly from a microcontroller pin with no series resistor can pull excessive current through both the pin and the transistor’s base — this is the single most common way a 2N2222 dies on a first project.
Swapped emitter and collector. The 2N2222 isn’t symmetric — it still technically conducts if wired backwards, but with drastically reduced gain and a much lower breakdown voltage on what’s now acting as the “collector.” A circuit that barely works, runs hot, or has a much dimmer LED than expected is worth double-checking against the flat-face orientation before assuming a faulty part.
No flyback diode on an inductive load. Covered above — a relay or motor without one will usually still work for a while, then fail unpredictably as repeated voltage spikes degrade the transistor.
Exceeding the current rating. The 2N2222/2N2222A is rated for up to 600mA–800mA continuous collector current depending on the exact variant, and less than that with any real margin for reliability. It’s a small-signal switching transistor, not a motor driver — a motor pulling more than a few hundred milliamps needs a proper motor driver IC or a beefier transistor, not a 2N2222 pushed past its rating.
Variants worth knowing
The PNP complement of the 2N2222 is the 2N2907 — same TO-92 package, opposite polarity, useful when a circuit needs to switch the high side of a load rather than the low side. The 2N3904 is a near-equivalent general-purpose NPN transistor with a lower current rating but the same pinout convention, common enough in kits that it’s often used interchangeably with the 2N2222 in low-current signal applications.
If you don’t have any on the bench already, a pack of 2N2222A TO-92 transistors is cheap enough to keep plenty of spares around for switching circuits. If the base-resistor logic above is new territory, choosing the right resistor value covers the same current-limiting maths that applies to a transistor’s base resistor.