2N3904 NPN transistor
Check the onsemi 2N3904 TO-92 pinout, absolute limits and base-drive conditions before wiring it as an NPN switch.

How it works
A small base current controls a larger collector current. In a switch, the circuit deliberately drives the transistor into saturation. In an amplifier, bias sets a working point in the active region instead.
Pinout
The onsemi TO-92 drawing identifies pin 1 as emitter, pin 2 as base and pin 3 as collector. Use the drawing’s orientation marks. Other TO-92 families can have different orders even though the packages look alike.
Low-side wiring
Put the load between its positive rail and the collector. Join the emitter and controller ground. Use a base resistor sized for both the output pin and the desired collector current. Use a reverse-biased clamp across an inductive load.
Specifications
| Parameter | Value or condition | Source |
|---|---|---|
| Collector-emitter rating VCEO | 40 V absolute maximum | onsemi |
| Continuous collector current | 200 mA absolute maximum, subject to dissipation and operating conditions | onsemi |
| Package in cited datasheet | TO-92, 1 emitter, 2 base, 3 collector | onsemi |
Compatibility and practice
A microcontroller can drive the base through a resistor when voltage and current requirements fit.