What it does#
Current into the base (B) lets a much larger current flow from collector © to emitter (E). With the emitter on GND it is a low-side switch, like an N-MOSFET, but driven by current: it always needs a base resistor.
The base resistor#
To switch hard (“saturate”), give the base about a tenth of the collector current. Example: 20 mA load from a 3.3 V GPIO: I_B ≈ 2 mA, R_B = (3.3 V − 0.7 V) / 2 mA ≈ 1.3 kΩ → 1 kΩ.
MOSFET or BJT?#
For tens of mA either works; the BJT is cheap and forgiving. For amperes choose a MOSFET: no base current, less heat. The catalog’s SS8050 (1.5 A) has the same pinout as the MMBT3904 (200 mA).
Pitfalls#
- No base resistor = the GPIO drives a diode to GND and both suffer.
- Saturation voltage: a switched-on BJT still drops 0.1–0.3 V.
- Pinout: SOT-23 is 1 = B, 2 = E, 3 = C for these parts. TO-92 parts differ by manufacturer.
Footprint#
SOT-23. MMBT3904 (C20526) and SS8050 (C2150) are JLCPCB basic parts.