OHMYARD

DISCOVER · EXPERIMENT · BUILD

TRACK 6 · HARDWARE REFERENCE31/52
NOV 27, 2026
14:20:00
ΩY // ohmyard.comPN2222AFLAT FACE · E-B-CTO-92 · 40V 600mAEPIN 1BPIN 2CPIN 3BASE DRIVE & SATURATIONI_B = 2.58 mA (R_B = 1000 Ω)Forced β = 58.1 · P = 212 mW⚠ ACTIVE REGION: LOWER R_BBase (Pin 2 · MCU Trigger) — Requires series base resistor R_B (e.g. 1 kΩ) from GPIO; V_BE ≈ 0.7V.
Drag or WASD to pan · Q / E to rotate · Scroll to zoom

2N2222 NPN Transistor Pinout & Base Resistor Calculator

✓ Reviewed by Jason Guo (OhmYard Lab)· IEC & Datasheet Verified· Updated Nov 27, 2026
QUICK ENGINEERING ANSWER (TL;DR)

The 2N2222 / PN2222A is a general-purpose NPN BJT rated up to 40V V_CEO and 600 mA collector current. Facing the flat side of a standard TO-92 PN2222A with leads down, the pinout from left to right is Emitter (1), Base (2), Collector (3) — whereas P2N2222AG reverses it to C-B-E.

R_B = (V_GPIO − 0.7V) ÷ (I_load ÷ 10) | P_D = V_CE(sat) × I_C

Using forced beta = 10 guarantees V_CE(sat) stays around 0.2V–0.3V instead of heating up in the linear region. Never connect a GPIO pin directly to the Base without R_B.

SymbolComponentReal-World Engineering Tip
Q_NPNPN2222A (TO-92 Plastic, E-B-C)Flat face toward you, legs down: Left = Emitter, Middle = Base, Right = Collector.
TO-182N2222A (TO-18 Metal Can)The metal can case is internally connected to the Collector — do not let it touch GND.
REVP2N2222AG (Reversed C-B-E)If your breadboard transistor circuit refuses to turn on or gets hot immediately, check if you bought P2N2222AG.

Real-World Bench Scenario: Switching a 150 mA 5V relay coil from a 3.3V ESP32 GPIO: (3.3V - 0.7V) / 15 mA ≈ 173 Ω -> use a 220 Ω or 330 Ω base resistor to keep GPIO current safe while saturating the 2N2222.

Bench Challenge: Toggle between PN2222A (E-B-C), TO-18 Metal Can, and P2N2222AG (Reversed C-B-E), then lower R_B until the status flips to HARD SATURATION.

Frequently Asked Questions

What is the pinout of a 2N2222 / PN2222A transistor?

For a standard TO-92 PN2222A held with the flat face toward you and leads pointing down, the 2N2222 pinout from left to right is Emitter (Pin 1), Base (Pin 2), and Collector (Pin 3). On a TO-18 metal can 2N2222A, the metal tab marks the Emitter, followed counterclockwise by Base and Collector.

Are 2N2222A and PN2222A interchangeable on a breadboard?

Electrically, 2N2222A (TO-18 metal can) and PN2222A (TO-92 plastic) share 40V V_CEO and 600 mA ratings for low-side switching. However, never drop in a P2N2222AG without rotating it 180 degrees, because P2N2222AG swaps Collector and Emitter (C-B-E instead of E-B-C).

What base resistor should I use with a 2N2222 on Arduino or ESP32?

For common 20 mA to 150 mA loads (LEDs, buzzers, small 5V relays), a 1 kΩ resistor works on 5V Arduino pins and 330 Ω to 470 Ω works on 3.3V ESP32 pins. Always target a forced beta (I_C / I_B) of 10 to 15 for cool, saturated switching.

Continue Exploring Related 2.5D Labs
← All 52 Labs Hub11. Transistor & Flyback →5. LED Resistor & E24 →29. Opto Relay Module →

OHMYARD · ALL 52 INTERACTIVE LABS & SIMULATORS

1. Closed Loop & Faults
/closed-loop
2. Ohm's Law & Thermal
/ohm-law
3. Series vs Parallel
/series-parallel
4. X-Ray Breadboard
/breadboard-simulator
5. LED Resistor & E24
/led-resistor-calculator
6. Voltage Divider & Load
/voltage-divider
7. Multimeter Trainer
/multimeter-simulator
8. RC & Oscilloscope
/rc-oscilloscope
9. 555 Timer Pulse Lab
/555-timer
10. Diode & Rectifier
/diode-rectifier
11. Transistor & Flyback
/transistor-switch
12. PWM Dimmer & Fan
/pwm-dimmer
13. Op-Amp Comparator
/opamp-comparator
14. H-Bridge & Shoot-Through
/h-bridge-motor
15. Buck vs LDO Power
/buck-converter
16. Digital Logic Gates
/logic-gates
17. Resistor Color Code
/resistor-color-code
18. ESP32 Pinout Guide
/esp32-pinout
19. Arduino Uno Pinout
/arduino-uno-pinout
20. Zener Voltage Clamp
/zener-diode-regulator
21. I2C Pull-Up Bus
/i2c-pullup-bus
22. Battery Life & Sleep
/battery-life-calculator
23. PCB Trace Width
/pcb-trace-width
24. Wheatstone Bridge
/wheatstone-bridge
25. Raspberry Pi GPIO
/raspberry-pi-pinout
26. WS2812B LED Strip
/ws2812b-led-strip
27. SG90 Servo PWM
/servo-pwm-control
28. HC-SR04 Ultrasonic
/ultrasonic-hcsr04
29. Opto Relay Module
/relay-optocoupler
30. 3.3V ⇄ 5V Shifter
/logic-level-shifter
31. 2N2222 Pinout
/2n2222-pinout
32. SMD Resistor Code
/smd-resistor-code-calculator
33. Distribution Board
/inside-distribution-board
34. Wire a 3-Pin Plug
/wire-a-three-pin-plug
35. Power Strip Overload
/power-strip-overload
36. RCD & Earthing Safety
/rcd-gfci-earth-leakage
37. Live & Neutral Wires
/mains-live-neutral
38. Inside an MCB Breaker
/mcb-trip-breaker-anatomy
39. Why Did It Trip?
/why-did-it-trip
40. Two-Way Staircase Switch
/two-way-staircase-switch
41. AC Transformer Core
/ac-transformer-step-down
42. Induction Hob & Eddies
/induction-cooktop-eddy
43. Kettle Bimetal Thermostat
/thermostat-bimetal-kettle
44. Rooftop Solar & Grid
/home-solar-inverter-grid
45. Common Ground Pitfall
/floating-ground-common-gnd
46. OLED SSD1306 I2C Lab
/oled-ssd1306-i2c-wiring
47. Stepper A4988 Vref Lab
/stepper-a4988-vref-calculator
48. 18650 & TP4056 Lab
/lipo-18650-tp4056-protection
49. DHT22 vs BME280 Lab
/dht22-bme280-sensor-wiring
50. Rotary Encoder & Bounce
/rotary-encoder-debouncing
51. Soil Moisture & Corrosion
/capacitive-soil-moisture-adc
52. ESP32 vs S3 vs C3 Lab
/esp32-s3-c3-pinout-comparison