Skip to content
Home > Components > Power Components > NPN Transistor

NPN Transistor (2N2222)

A widely used NPN bipolar junction transistor used for amplifying or switching electronic signals and electrical power.

Component Preview

NPN TransistorTO-92 Package

The 2N2222 is a common NPN bipolar junction transistor (BJT) used for general purpose low-power amplifying or switching applications. It acts as an electrically controlled switch: a small current at the Base controls a larger current flowing from Collector to Emitter.

Power ComponentsSemiconductorActive

Pin Reference

PinTypeDescription
E (Emitter)passiveCurrent flows out of the Emitter to Ground.
B (Base)inputControl pin. A small current here turns the transistor ON.
C (Collector)passiveCurrent enters the Collector from the load/VCC.

Configurable Attributes

This component has no configurable attributes.

Wiring Diagram

Example of connecting the NPN Transistor as a switch. A digital pin drives the Base (through a current-limiting resistor, not shown in basic diagram but required in practice) to switch a load on the Collector.

Wiring Diagram

Example Arduino Code

The transistor acts as a switch. Driving the base pin HIGH allows current to flow through the Collector to Emitter.

cpp
const int basePin = 3; // Connect to the Base (B) of the NPN transistor

void setup() {
  pinMode(basePin, OUTPUT);
}

void loop() {
  // Turn the transistor ON (allowing current from C to E)
  digitalWrite(basePin, HIGH);
  delay(1000);
  
  // Turn the transistor OFF (blocking current)
  digitalWrite(basePin, LOW);
  delay(1000);
}

Released under the MIT License.