Relay Driver Circuit Design
A relay driver is a small circuit with a large job, because the coil and the contacts have very different requirements. The coil needs a defined current and a path for the energy it stores, and the contacts have to switch a load whose nature may be far more demanding than its rating suggests.
The Coil and Its Current
A relay coil is an inductor with a resistance, and its current rises with a time constant given by the inductance and the resistance. The pull in voltage is the value at which the armature moves, and it is usually a fraction of the rated coil voltage.
The rated coil voltage is the value at which the relay is specified, and applying more than that raises the coil temperature and shortens its life. Applying less may fail to pull in, particularly at the temperature extremes.
A relay that is driven from a voltage lower than its rating may still operate at room temperature and fail in a cold environment, because the coil resistance falls with temperature and the force falls with it. The drive is designed for the worst case, not the typical one.
Driving from a Logic Output
A logic output cannot supply the coil current, which is typically tens of milliamps. A transistor or a small MOSFET between the output and the coil is the standard arrangement, with a base or gate resistor that keeps the drive within the rating of the logic device.
The transistor has to be saturated when it is on, so that the voltage across it is small and the coil receives nearly the whole supply. A transistor that is only partly on dissipates power and delivers a lower coil voltage.
A darlington pair or a small MOSFET with a low threshold suits a three point three volt logic output. The base current of an ordinary bipolar transistor at that voltage is a significant fraction of the logic output rating.

flyback diode and Coil Suppression
When the driver turns off, the coil current continues and produces a voltage spike in the opposite direction. A flyback diode across the coil provides a path and limits the spike to about a volt above the supply.
The diode is placed across the coil rather than across the transistor, so that the coil current circulates locally and the transistor sees only the forward drop of the diode. Placed across the transistor, the diode still protects the device but the current has to flow through the supply.
A diode across the coil slows the release, because the current decays at a rate set by the coil resistance. Where a fast release matters, a Zener diode or a resistor in series with the diode allows the voltage to rise higher and the current to fall faster.
Coil Suppression and Contact Life Trade
The suppression choice affects the contacts as well as the driver. A relay that releases slowly is less likely to bounce, which extends the life of the contacts, so a plain diode is a reasonable default.
A Zener diode with a voltage below the rating of the driver gives a faster release and still protects the transistor. The energy is dissipated in the Zener, which has to be rated for it.
An RC snubber across the coil is a third option, and its resistance has to be chosen so that the voltage does not exceed the driver rating. The capacitor is sized from the coil current and the acceptable voltage rise.

contact rating and Load Type
The contact rating is quoted for a resistive load and for a stated number of operations. A lamp, a motor or a capacitor presents a much harder load: a lamp draws ten times its steady current when cold, and a motor has an inrush of its own.
A direct current load is harder on a relay than an alternating one, because there is no zero crossing to extinguish the arc. The same relay that switches five amps of alternating current may be limited to half an amp of direct current at the same voltage.
The load type should be stated in the design description and compared with the manufacturer’s curves. A relay chosen from the headline rating alone is the most common cause of premature failure in a control product.
Contact Protection and Arc Suppression
An RC network across the contacts reduces the arc and extends the life, particularly with a direct current inductive load. The resistor limits the discharge current and the capacitor absorbs the energy of the arc.
A metal oxide varistor across the contacts is simpler and works well for a moderate energy, and it is often the only part needed for an alternating current load. It clamps the voltage at a level that does not sustain an arc, and its capacitance is not usually a problem for a contact circuit.
The protection network should be placed as close to the contacts as the layout allows. A network at the far end of a cable protects the cable and not the contacts. For a contact that switches a cable several metres long, the energy stored in the cable has to be considered as well.
Layout and Isolation
The coil circuit and the contact circuit carry very different voltages, and the creepage between them on the board has to meet the standard for the application. Where the contacts switch the mains, the separation is a safety requirement rather than a preference.
Keep the coil traces short and the driver close to the relay. A long trace to the coil carries a switching current and radiates it, and the same trace couples the spike into nearby circuits.
Where several relays are driven together, the coil currents add and the supply has to deliver the sum. The peak current at the moment of switching several coils simultaneously is often the largest current in the product.
Verification and Faults
Verify the driver by measuring the coil voltage with the relay energised and the supply at its minimum. A value below the pull in voltage at the lowest expected temperature indicates insufficient margin.
Measure the turn off spike at the collector of the driver with a scope of short ground lead. A spike above the device rating means the suppression is inadequate or misplaced.
A relay that fails to release or that buzzes is usually being driven with too little current or with a ripple on the coil supply. The release checks that keep such a driver consistent are collected in our PCB design release checklist, the assembly points in judging PCB quality, and the means of containing the switching noise in our guide to EMI suppression design principles.
FAQ
Where does the flyback diode go? Across the coil, so that the current circulates locally. Across the transistor it still protects the device but slows the release less predictably.
Why does my relay fail early with a lamp load? A cold lamp draws many times its rated current. Choose the relay from the load type rather than the headline contact rating.
Can a logic output drive a relay coil directly? Almost never. The coil current is tens of milliamps and the output rating is a few. Use a transistor.



