BC547 Relay Driver Outside Safe Ratings
A student uses a BC547 NPN transistor to switch a 12 V relay from a 5 V microcontroller board. The relay coil has a resistance of 100 Ω and is connected between +12 V and the collector; the emitter is grounded. The microcontroller output is 4.8 V when high and is rated for 4 mA. The base is connected to the output through a 10 kΩ resistor. There is no diode across the coil. When the program energises the relay, it chatters and sometimes drops out; the transistor becomes hot within a minute. The datasheet gives BC547 I_C(max) = 100 mA, h_FE about 200 at 100 mA, V_BE ≈ 0.7 V and V_CE(sat) ≈ 0.2 V. A student proposes replacing the 10 kΩ resistor with a wire link, and another proposes a 1N4148 diode across the relay coil.
1. Calculate the coil current and base current. Is the BC547 within its ratings, and can it saturate?
Read the worked answer
Coil current I_C = (12 − 0.2) / 100 ≈ 118 mA, about 120 mA. This exceeds the BC547 maximum of 100 mA.
Base current with 10 kΩ is I_B = (4.8 − 0.7) / 10,000 = 0.41 mA. The forced beta needed is 118 / 0.41 ≈ 288, above the datasheet h_FE of about 200. Even at h_FE 200 the transistor would support only 0.41 × 200 = 82 mA, so it cannot pull in the relay reliably. It is not saturated; V_CE is high, dissipation V_CE × I_C can be several hundred mW, hence the heating and chatter.
2. Evaluate the wire-link proposal and design a proper base resistor if the transistor were suitable.
Read the worked answer
A wire link would let base current be limited only by the microcontroller output and the base-emitter junction. The port is rated 4 mA; it could be overloaded, and the transistor still exceeds its 100 mA collector rating.
If a BJT were suitable, hard saturation would need I_B ≈ I_C / 10 = 12 mA, giving R_B = (4.8 − 0.7) / 0.012 = 342 Ω, nearest 330 Ω. But the microcontroller cannot supply 12 mA, and the BC547 cannot carry 120 mA. Use a logic-level MOSFET, whose gate current is negligible, or a small driver transistor plus a power transistor such as BD139 with an adequate base resistor.
3. Explain the role of the diode and why chattering may persist even after it is fitted.
Read the worked answer
The coil is inductive. At turn-off, V = L di/dt can spike far above 12 V and exceed the BC547 V_CEO, causing breakdown and erratic operation. A diode connected with cathode to +12 V and anode to the collector gives the coil current a path to circulate and clamps the spike. A 1N4148 is adequate for a 120 mA coil, and a 1N4007 is also common.
The diode alone will not cure chatter caused by insufficient coil current. The transistor type and base drive must also be corrected so the relay reliably receives its rated current.