71. NPN Transistor for Relay Coil Driver

1. Component Purpose

A 3.3V MCU GPIO pin can typically source only 4–20mA. But the relay coil needs 70mA at 12V. The GPIO cannot drive the relay directly — it doesn’t have enough current capacity, and the voltage levels don’t match.

An NPN transistor as a low-side switch solves both problems. The GPIO drives the transistor’s base through a resistor. When the base current flows (~1–2mA), the transistor saturates and connects the relay coil to ground, allowing the full 70mA to flow from the 12V rail through the coil.

The transistor acts as a current amplifier: a small base current controls a much larger collector current. The ratio is the DC current gain (hFE).

Required: NPN · Ic ≥200mA · Vceo ≥30V · hFE ≥80 · Vce(sat) ≤400mV · ≥200mW · SOT-23 · SMD

SOT-23-NPN-transistor

2. How to Find It on DigiKey

Go to DigiKey.com → Discrete Semiconductor Products → Transistors → Bipolar (BJT) - Single

Apply these filters:

  • Transistor Type → NPN
  • Current - Collector (Ic) (Max) → 200mA or higher
  • Voltage - Collector Emitter Breakdown (Max) → 30V or higher
  • DC Current Gain (hFE) (Min) → 80 or higher
  • Vce Saturation (Max) → 400mV or lower
  • Package / Case → SOT-23-3 (TO-236)
  • Part Status → Active

Tip: On DigiKey, the SOT-23 package may appear as "TO-236-3, SC-59, SOT-23-3" or similar. These are all the same physical package with different naming conventions.

3. Key Specifications & What They Mean

SpecificationRequiredWhy
Transistor TypeNPNLow-side switch; collector to load, emitter to GND.
Ic (Max)≥200mACoil is 70mA; ~3× margin for safe operation.
Vceo (Max)≥30VMust withstand 12V + flyback spike margin.
hFE (Min)≥80Ensures saturation with ~1mA base drive.
Vce(sat)≤400mVLow voltage drop when ON; less heat.
Power≥200mWP = 12V × 70mA ≈ 0.84W is through coil, not transistor. Transistor dissipates Vce(sat) × Ic ≈ 28mW.
PackageSOT-23-3Compact SMD; standard for small switches.
Temp Range−40°C to +125°CIndustrial conditions.
RoHSYesCompliance required.

Important: Always add a flyback diode across the relay coil (cathode to +12V, anode to transistor collector). Without it, the voltage spike when the relay turns OFF can destroy the transistor.

4. Selecting a Safe, Production-Ready Part

The filtered list will show matching parts. Before you pick one, check: Is it Active? Is stock available? Is the manufacturer reputable? Is a datasheet available?

Full checklist: How to Select a Safe, Production-Ready Component — EWskills Guide

Submit Your Solution

DigiKey Part Number

Search the suitable part on DigiKey and paste the part number. Know more

EW AI

EW AI validates your selected part with expert-level precision.

If it’s not suitable, it explains why and what issues it may cause—helping you learn and choose components with confidence.