Relay Driver Transistor Overheating and Chatter
A student builds a 12 V relay driver using a 2N2222 NPN transistor. The relay coil is rated 12 V, 400 Ω. The transistor's datasheet gives hFE(min) = 100 at IC = 30 mA, VBE(sat) = 0.7 V, VCE(sat) = 0.3 V. The base is driven from a 5 V microcontroller pin through a 1 kΩ resistor. The relay contacts switch a 230 V AC lamp. The student uses a solderless breadboard, with the relay coil wires running next to the base wire. The transistor is a TO-92 2N2222. On first power-up the relay buzzes and the transistor becomes hot within a minute; the lamp flickers. The student has a multimeter but no oscilloscope. A 1N4007 diode is available, plus 10 kΩ and 4.7 kΩ resistors. The microcontroller pin can source or sink at most 20 mA. The lamp is a 60 W incandescent bulb.
1. Calculate the relay coil current and the base current with the 1 kΩ resistor. Is the 2N2222 driven into saturation? Show the forced beta and comment on whether normal base drive explains the heating.
Read the worked answer
Coil current: IC = (12 − 0.3)/400 = 29.25 mA. Base current: IB = (5 − 0.7)/1000 = 4.3 mA. Forced beta = 29.25/4.3 ≈ 6.8, far below hFE(min) = 100, so the transistor is driven hard into saturation - assuming the pinout and wiring are correct. The MCU pin only has to source 4.3 mA, within its 20 mA limit.
Normal saturation dissipation would be about VCE(sat) × IC = 0.3 × 0.02925 ≈ 9 mW, so a hot transistor is not explained by normal base drive. The 1 kΩ resistor is therefore not the culprit.
2. The relay buzzes and the transistor heats. List the most likely causes in order of probability, and describe the tests and fixes you would perform with only a multimeter.
Read the worked answer
Check the transistor pinout first: a TO-92 2N2222 is E-B-C with the flat face toward you and leads down. A swapped collector/emitter can still pass current but with low gain, causing chatter and heating. With the relay commanded on, measure VCE; more than about 1 V means it is not saturated. With power off, measure the coil (should be about 400 Ω) and wiggle the breadboard wires while watching the meter.
Next, add the 1N4007 across the coil, cathode to +12 V and anode to the collector; without it the turn-off spike can break down the transistor and disturb the MCU. Finally, confirm the MCU pin is steadily high (a 10 kΩ pull-down from base to ground can test for a floating drive). Fix wiring/pinout before adding the diode; the diode is necessary but may not be the only fault.
3. State two safety changes that must be made before further testing of this circuit.
Read the worked answer
Do not breadboard 230 V AC. Move the mains switching to a properly enclosed relay module with screw terminals, strain relief and a fuse, and keep mains wiring physically separated from the low-voltage side. Before powering again, inspect for solder bridges and ensure the 12 V supply cannot back-feed the 5 V rail.