I want to switch a 5 V relay (70 Ω coil, so about 70 mA) from a 3.3 V microcontroller pin using a general-purpose NPN transistor as a low-side switch. The datasheet gives hFE as 100 to 300.
Using the typical gain I calculated a base current of well under 1 mA and a base resistor of several kilohms, but tutorials for the same circuit use 1 kΩ or less. Which calculation is right, and what else does this circuit need?




