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

Go to DigiKey.com → Discrete Semiconductor Products → Transistors → Bipolar (BJT) - Single
Apply these filters:
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.
| Specification | Required | Why |
|---|---|---|
| Transistor Type | NPN | Low-side switch; collector to load, emitter to GND. |
| Ic (Max) | ≥200mA | Coil is 70mA; ~3× margin for safe operation. |
| Vceo (Max) | ≥30V | Must withstand 12V + flyback spike margin. |
| hFE (Min) | ≥80 | Ensures saturation with ~1mA base drive. |
| Vce(sat) | ≤400mV | Low voltage drop when ON; less heat. |
| Power | ≥200mW | P = 12V × 70mA ≈ 0.84W is through coil, not transistor. Transistor dissipates Vce(sat) × Ic ≈ 28mW. |
| Package | SOT-23-3 | Compact SMD; standard for small switches. |
| Temp Range | −40°C to +125°C | Industrial conditions. |
| RoHS | Yes | Compliance 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.
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