RBSE Sec Voc Electronics and Hardware study materials
RBSE Sec Voc Electronics and Hardware study resources

Relay Driver Chattering When a Spindle Motor Starts

RBSE Sec Voc Electronics and Hardware · Put your knowledge to work in context.

All case studies

Relay Driver Chattering When a Spindle Motor Starts

A hobby CNC builder uses a 5 V Arduino-compatible board to switch a 12 V automotive relay that powers a 24 V spindle motor through a separate contactor. The relay coil is marked 12 V, 360 Ω. The driver is a BC547 NPN transistor with a 47 kΩ base resistor from a digital output, emitter to ground, collector to the relay coil; the coil's other end goes to +12 V. A 1N4007 is fitted across the coil with its cathode to the collector and anode to +12 V. Initially the relay pulls in, but when the spindle motor starts, the relay chatters and the BC547 sometimes fails short. The 12 V rail is a 3 A adapter also feeding the Arduino through a linear regulator. The builder proposes using a MOSFET because it has more gain and removing the diode to speed relay release.

1. Calculate the relay coil current, the base current with the 47 kΩ resistor, and the forced beta. Explain why the BC547 may not be reliably saturated.

Read the worked answer

The relay coil current is Icoil = 12 V / 360 Ω = 33.3 mA. With a 5 V output, the base-emitter drop is about 0.7 V, so the base current is Ib = (5 − 0.7) V / 47 kΩ = 91 µA. The forced beta is Ic/Ib = 33.3 mA / 91 µA ≈ 366.

A BC547 may have a small-signal hFE of 100–300, but saturation is not guaranteed at a forced beta of 366. The transistor may operate in its active region, dissipate more power, and drop enough voltage that the relay coil sees less than 12 V. When the motor starts and the 12 V rail sags, the relay can drop out and chatter. A better design targets a forced beta of about 10. For 33 mA collector current, design Ib ≈ 3.3 mA. Then Rb ≈ (5 − 0.7) V / 3.3 mA ≈ 1.3 kΩ; a 1 kΩ resistor gives about 4.3 mA and provides good saturation margin. Add a 10 kΩ base-emitter resistor to keep the transistor off when the MCU is resetting or its output is floating.

2. The 1N4007 is connected with its cathode to the collector and its anode to +12 V. What is wrong, and what happens if the diode is removed as proposed?

Read the worked answer

The diode orientation is wrong. A flyback diode across a relay coil should have its cathode at the positive supply and its anode at the collector, so it is reverse-biased while the transistor is on and only conducts when the collector voltage flies above the supply at turn-off. With the cathode on the collector and the anode on +12 V, the diode is forward-biased during normal operation and can short the coil through the transistor, causing excessive current, unreliable relay operation and possible transistor failure.

Removing the diode is worse. When the transistor turns off, the coil inductance generates a large negative voltage spike at the collector. This can exceed the BC547's VCEO and destroy it, and it can also produce EMI that disturbs the MCU. Fit the diode correctly, preferably a 1N4007 for a small relay, and add a 470 µF bulk capacitor near the relay supply. If the relay release time is critical, use a proper coil suppression network or a relay driver IC rather than removing suppression.

3. The builder wants to use a MOSFET instead because it has more gain. Evaluate that reasoning and list the practical changes needed for a reliable MOSFET drive.

Read the worked answer

A MOSFET is not chosen for current gain in the same sense as a bipolar transistor; it is voltage-controlled and draws only gate charge. The useful question is whether its gate threshold is low enough for a 5 V logic output and whether it can handle the coil current and flyback voltage. A random MOSFET may have a threshold too high for 5 V drive and may not turn fully on, causing heating.

Use a logic-level N-channel MOSFET rated for at least 2–3 times the coil current and with a suitable VDS rating. Add a gate resistor of about 100 Ω to control switching speed, and a 10 kΩ gate-to-source pull-down so the relay stays off during MCU reset. Keep the flyback diode correctly oriented across the coil, and add decoupling at the relay supply. If the motor and relay share the same adapter, separate or filter the relay supply and route the motor and relay wiring away from the logic. The MOSFET change alone will not fix a sagging supply or a miswired flyback diode.