Home > Blog > Blog

2N3904 Pinout, Specifications & Common Mistakes

2026/7/23 11:40:20

2N3904 Pinout, Specifications & Common Mistakes

The 2N3904 is the most common NPN bipolar junction transistor in through-hole electronics. TO-92 package, three pins, about three cents. It's in every Arduino starter kit, every breadboard, every "my first transistor circuit." But the pinout isn't what most beginners expect - and that single mistake accounts for probably half the "my circuit doesn't work" posts on electronics forums.

This page gives you the pinout you can reference without scrolling through a datasheet, plus the real mistakes gathered from StackExchange, AllAboutCircuits, and EEVblog discussions. If your 2N3904 circuit isn't working, the answer is probably here.

2N3904 Pin Diagram (TO-92)

Facing the flat side with the part number printed on it, pins pointing down. Left to right:

2N3904 TO-92 Pinout - Flat Side Facing You, Pins Down (E-B-C) FLAT SIDE → 2N3904 NPN BJT 1 E Emitter 2 B Base 3 C Collector (view from front - flat side facing you)
PinNameFunctionTypical Connection
1Emitter (E)Current sink - electrons flow out of the emitterGround (for NPN switch); through emitter resistor (for amplifier)
2Base (B)Control input - small current controls large C-E currentThrough a base resistor to control signal (GPIO, sensor, etc.)
3Collector (C)Current entry - load current flows in through the collectorLoad (LED, relay, resistor) to positive supply VCC

⚠️ The #1 Mistake: Pinout Confusion

This is the single most common 2N3904 problem on every electronics forum. Not all TO-92 transistors use the same pinout.

2N3904 (E-B-C) vs BC547 (C-B-E) - Pinout Comparison 2N3904 / 2N2222 (USA) 2N3904 E B C different! BC547 / BC337 (European) BC547 C B E 2N3904 = E-B-C  |  BC547 = C-B-E  |  Swapping them = circuit dead

The 2N3904 uses E-B-C (Emitter, Base, Collector left to right, flat side facing you). European parts like the BC547 use C-B-E - the collector and emitter are swapped. Japanese 2SC-series transistors often have the collector in the middle. Put a BC547 in a board laid out for a 2N3904 without checking the pinout, and your circuit won't work - or worse, you'll exceed the 6V maximum reverse base-emitter voltage and destroy the junction.

Quick fix when you're unsure: use a multimeter in diode mode. Probe pairs of pins. The one that shows ~0.6–0.7V drop to both other pins is the base. Between the remaining two, the one with the slightly larger voltage drop to the base is the emitter. The remaining pin is the collector.

Typical Application Circuits

2N3904 Switch Circuit - GPIO Driving LED +5V LED 330Ω 2N3904 GND 1kΩ GPIO 3.3V/5V When GPIO = HIGH: IB ≈ (3.3 − 0.7)/1k = 2.6 mA IC ≈ (5 − 2)/330 = 9 mA Transistor is saturated (β ≈ 100, so IC max = 260 mA) Low-Side Switch: GPIO → LED Simple on/off. Base resistor limits IB. Load goes between VCC and collector.

Switch Mode (Saturation)

The 2N3904 as a switch is the most common application. Rule of thumb: IB = IC / 20. If your load draws 100 mA, feed the base 5 mA. This guarantees saturation - VCE(sat) drops to ~0.2V, the transistor acts like a closed switch, and power dissipation in the transistor is minimal.

The most frequent switching mistake: not enough base current. A 10 kΩ base resistor from a 3.3V GPIO gives IB ≈ (3.3 − 0.7)/10k = 0.26 mA. With β ≈ 100, that can only switch ~26 mA - fine for an LED, not enough for a relay or motor. The transistor sits in the linear region, VCE stays high, and the part gets hot. Fix: calculate your base resistor for the actual load current.

2N3904 Common-Emitter Amplifier with Stiff Voltage Divider Bias +12V 47k 3.9k 2.2k 2N3904 470Ω 10µF (optional AC bypass) GND Vin 1µF 1µF Vout Stiff divider bias: 47k / 3.9k → VB ≈ 0.92V VE ≈ 0.92 − 0.7 = 0.22V IE ≈ 0.22/470 = 0.47 mA Gain ≈ −2.2k/470 ≈ −4.7 (without Ce; with Ce ≈ −100+) Common-Emitter Amplifier with Stiff Bias Voltage divider bias tolerates β variation. Stiff divider = less sensitive to transistor batch.

Amplifier Mode (Linear Region)

For analog amplification, the 2N3904 needs to sit in its linear region - not fully off, not fully on. The standard approach is a voltage divider bias (R1, R2 above). The key design rule: the current through the bias divider should be ~10× the expected base current.

Why? Because β varies wildly - 100 to 300 even within the same 2N3904 batch. A "stiff" divider swamps this variation. Weak biasing (like a single 220 kΩ resistor from VCC to base) makes the circuit β-dependent: it works with one 2N3904, fails with another from a different batch. This is the second most common forum complaint after pinout mistakes. Per the onsemi 2N3904 datasheet (Rev 11, 2N3904/D), β at IC = 10 mA ranges from 100 to 300 - a 3:1 spread. The fix: stiffen the divider.

Key Specifications

ParameterValueNotes
TypeNPN Bipolar Junction Transistor
PackageTO-92 (through-hole); SOT-23 as MMBT3904 (SMD)Pinout differs between packages
VCEO (max)40VCollector-emitter voltage, base open
VCBO (max)60VCollector-base voltage, emitter open
VEBO (max)6V⚠️ Reverse base-emitter voltage - exceed this and destroy the junction
IC (max continuous)200 mAAbsolute maximum. Stay under 100 mA for reliability.
IC (peak)400 mAPulsed only, <1 ms
hFE (DC current gain)100–300 (at IC = 10 mA)Per onsemi datasheet Rev 11. Varies 3:1 across production.
VCE(sat)0.2V typ (at IC = 10 mA, IB = 1 mA)Saturation voltage when fully on
fT (transition frequency)300 MHz typGain-bandwidth for RF. Practical switching: keep under 50 MHz.
PD (max)625 mW (TO-92, TA = 25°C)Derate above 25°C. SOT-23 version: ~350 mW.
Turn-on / Turn-off Time~35 ns / ~175 nsFast enough for most switching applications
Price Reference$0.02–0.08/unitOne of the cheapest transistors in production

Common Mistakes (Collected from Real Forum Discussions)

Mistake 1: Swapping Collector and Emitter

A reversed 2N3904 works - badly. Gain drops from ~150 to ~3–5. One AllAboutCircuits user measured an apparent gain of 3.6, rebuilt the circuit three times, then checked the pinout and measured 107 after correcting it. If your common-emitter amplifier has "almost no gain," swap C and E.

Mistake 2: Using a BC547 Where a 2N3904 Is Expected (or Vice Versa)

BC547 = C-B-E. 2N3904 = E-B-C. Drop a BC547 into a 2N3904 footprint without checking, and you've swapped collector and emitter. See Mistake 1 for the result. Worse: if the PCB connects the 2N3904's emitter pad (which becomes the BC547's collector) to ground, you've shorted the load through the wrong pin.

Mistake 3: Exceeding VEBO (6V Reverse Base-Emitter)

If a negative voltage spike hits the base (inductive kickback from a relay, ringing on a long trace), and it exceeds −6V relative to the emitter, the base-emitter junction avalanches and is permanently damaged. In switching circuits with inductive loads, always put a flyback diode across the load - this protects both the transistor and the rest of the circuit.

Mistake 4: Floating Base in SMD (MMBT3904) Circuits

When switching from through-hole 2N3904 to SMD MMBT3904, one StackExchange user found the SMD part partially conducting even with the base "open." The TO-92 package's larger leads and body capacitance suppress noise pickup; the tiny SOT-23 package doesn't. Solution: add a 10–100 kΩ pull-down resistor from base to ground in all switching circuits. This also speeds up turn-off by providing a discharge path for stored base charge.

Mistake 5: Too Much Base Current (Forgetting the Resistor)

Connecting a GPIO directly to the base without a resistor = shorting the GPIO through a forward-biased diode to ground. The base-emitter junction is a diode - it clamps at ~0.7V and will draw as much current as the GPIO can supply until one of them fails. Always use a base resistor. Minimum value: RB = (VGPIO − 0.7V) / IB_required.

Mistake 6: Weak Biasing in Amplifiers

The classic rookie amplifier: a single 220 kΩ resistor from VCC to base. This circuit's operating point depends entirely on β - swap the transistor and the bias point shifts. Fix: use a voltage divider (R1 from VCC to base, R2 from base to ground) with divider current ≥ 10× IB. Typical values: R1 = 47 kΩ, R2 = 3.9 kΩ for a 12V supply. This is the "stiff divider" rule and it's the difference between a circuit that works with one transistor and a circuit that works with any 2N3904 you grab from the bin.

Where to Buy 2N3904

ParameterDetails
Part Number2N3904 (TO-92) / MMBT3904 (SOT-23) / PZT3904 (SOT-223)
Manufacturersonsemi, Fairchild, STMicroelectronics, multi-source
ConditionNew, original manufacturer packaging
Lead TimeIn stock, ship from Shenzhen

Contact ICMASS for current pricing on your specific quantity. Volume pricing typically ranges from $0.02–$0.08/unit depending on manufacturer and quantity. We stock 2N3904 (TO-92) and MMBT3904 (SOT-23) with full manufacturer traceability.

Frequently Asked Questions

Q1: What is the 2N3904 pinout?

A: Flat side facing you, pins down: Pin 1 = Emitter (left), Pin 2 = Base (center), Pin 3 = Collector (right). E-B-C. Not the same as BC547 (C-B-E). Always verify with a multimeter in diode mode if unsure - the pin that conducts to both others is the base.

Q2: Can I replace a 2N3904 with a 2N2222?

A: Yes, in most circuits. Both are NPN, similar gain, similar voltage/current ratings. The 2N2222 handles slightly more current (600 mA vs 400 mA peak). But check the pinout: the 2N2222 in TO-92 also uses E-B-C - same as the 2N3904. The metal-can 2N2222A has a completely different pinout. Always verify.

Q3: Why is my 2N3904 getting hot?

A: It's not fully saturated. In switch mode, if VCE > 0.3V when "on," the transistor is operating in its linear region - dissipating power as heat. P = VCE × IC. Fix: increase base current (reduce RB) until VCE drops below 0.3V. Rule of thumb: IB = IC/20 for guaranteed saturation.

Q4: How do I bias a 2N3904 for linear amplification?

A: Use a stiff voltage divider on the base - not a single resistor. R1 (VCC to base) and R2 (base to ground). Divider current should be ≥ 10× expected base current. For a 12V supply: R1 = 47 kΩ, R2 = 3.9 kΩ gives VB ≈ 0.92V. Add an emitter resistor RE for DC stability. Gain ≈ −RC/RE.

Q5: Can I use a 2N3904 to switch a relay?

A: Yes, with two precautions. (1) Size the base resistor for IC/20 - a 75 mA relay coil needs ~3.8 mA base current: RB = (3.3 − 0.7)/0.0038 ≈ 680Ω. (2) Always add a flyback diode (1N4148 or 1N4001) across the relay coil, cathode to VCC. Without it, the inductive kick when the transistor turns off can exceed the 40V VCEO rating and destroy the 2N3904.

Q6: What's the difference between 2N3904 and MMBT3904?

A: Same silicon, different package. 2N3904 = TO-92 through-hole. MMBT3904 = SOT-23 surface-mount. The pinout is different. MMBT3904 SOT-23: Pin 1 = Base, Pin 2 = Emitter, Pin 3 = Collector. Do not assume the same pin mapping. MMBT3904 also has lower power dissipation (350 mW vs 625 mW) due to the smaller package.

Q7: What happens if I connect the base directly to a GPIO without a resistor?

A: The base-emitter junction is a diode - it clamps at ~0.7V. Without a resistor, the GPIO pin sees a near-short to ground through that diode. The GPIO will try to supply as much current as it can until either the GPIO driver burns out or the base-emitter junction fuses. Never omit the base resistor. Even for a simple test, 1 kΩ minimum.

Q8: Why does my amplifier work with one 2N3904 but not another?

A: β varies 3:1 (100–300) within the same part number. If your bias network is weak (single high-value resistor from VCC to base), the operating point shifts with β. Two transistors from different batches land at completely different bias points. Fix: stiffen the bias divider so divider current >> IB. The circuit should work identically with any 2N3904 you plug in.

Subscribe to IC-MAX!
Contact Name
*Email
Featured PartsMore
LNK304DN-TL
LNK304DN-TL Power Integrations
LNK304GN-TL
LNK304GN-TL Power Integrations
LNK304DG-TL
LNK304DG-TL Power Integrations
TNY277PN
TNY277PN Power Integrations
TNY276PN
TNY276PN Power Integrations
TNY278PN
TNY278PN Power Integrations
TNY278GN-TL
TNY278GN-TL Power Integrations
TNY280GN-TL
TNY280GN-TL Power Integrations
TOP266KG-TL
TOP266KG-TL Power Integrations
TOP258PN
TOP258PN Power Integrations
TOP253PN
TOP253PN Power Integrations
TOP253PNAU
TOP253PNAU Power Integrations
index: 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
ICMASS.COM

HOME

ICMASS.COM

PRODUCT

ICMASS.COM

PHONE

ICMASS.COM

USER