Relay Basics: How A Coil Drives A Contact
An electromechanical relay is a deliberately crude device: a coil of wire, a magnetic circuit, and a set of metal contacts that open and close in air. That crudeness is exactly why it still appears on boards that also carry transistors and solid state switches. A relay provides galvanic isolation that no semiconductor can match cheaply, it holds its state with no power in a latching version, and it tolerates overloads that would destroy a MOSFET in microseconds.
Using one properly on a printed circuit board is mostly a question of understanding what the coil does to the supply, what the contact does to the circuit it switches, and what the current path does to the board. This article covers those three problems and the component choices that follow from them.
How The Coil And The Contact Interact
Current through the coil creates a magnetic field that pulls an armature, and the armature carries the moving contact. The mechanical linkage means the coil circuit and the contact circuit share no electrical node at all; the only coupling is magnetic, and the isolation barrier is whatever the package and the creepage distance on the board allow. That is why relay datasheets quote a dielectric withstand voltage and a creepage distance rather than a simple voltage rating.
Coil and contact specifications are largely independent, and confusing them is a common mistake. A coil rated for five volts and seventy milliamperes says nothing about whether the contact can switch two amperes at mains potential. The contact rating depends on the load type, the voltage, the current and the number of operations, and it degrades quickly as any of those increase.

Driving The Coil
The coil is an inductor, and interrupting its current produces a large negative voltage. Without a clamp, that spike will destroy the driving transistor, and it will also radiate from the loop formed by the coil and its wiring. A flyback diode across the coil is the standard answer: it provides a path for the stored energy and limits the transient to one diode drop above the supply.
The diode has a cost. Circulating the current through a diode makes the field collapse slowly, so the contact releases a few milliseconds later than it otherwise would and the arc at the contacts lasts longer. Where release time or contact life matters, a diode in series with a Zener diode allows the voltage to rise to the Zener level and collapse the field faster, at the price of a higher transient that the transistor must tolerate.
Supply Decoupling And Ground Disturbance
A coil that draws tens of milliamperes will not disturb a well designed supply, but several relays switching at once will. Each coil draws a step of current when it is energised, and the shared trace resistance converts that step into a voltage disturbance that other circuits see as a glitch. Place bulk capacitance near the relay group rather than at the regulator, and give the coil driver its own decoupling capacitor.
The return path deserves equal attention. Coil current that shares a ground trace with an analogue sensor will inject a step into the measurement. Route the coil returns together to a single point near the supply input, and keep that path away from the reference used by low level signals. Where the contact side switches mains or a high voltage rail, the isolation barrier between coil and contact must be respected on the copper as well as inside the package.

Contact Life And The Load It Sees
Contacts wear out, and the rate depends on what they switch. A resistive load is the easy case quoted in the datasheet. A lamp draws a large inrush current while its filament is cold. A motor draws several times its rated current at start and generates a back EMF when it stops. A capacitive load looks like a short circuit at the instant of closing. Derating for these loads is normal practice, and the manufacturer’s curves should be read rather than assumed.
Arc suppression extends life where inductive or high voltage loads are switched. A series RC network across the contacts absorbs the high frequency energy of the arc, and a metal oxide varistor clamps the peak voltage. Both change the timing of the contact waveform, so a snubber designed for a heater circuit should not be copied onto a signal path without checking that the leakage through the capacitor is acceptable.
Layout And Creepage On The Board
The relay package defines the internal clearance, but the board defines the external one. Between coil pins and contact pins there must be enough surface distance for the working voltage, and that distance must not be reduced by solder mask slop, flux residue or a stray copper pour. Slots milled through the board under the relay are a legitimate way to increase creepage when space is tight.
Contact traces themselves must be sized for the load current, not for the signal current that flows before the relay closes. Thermostats, heater controllers and motor drivers all carry their working current through the relay footprint. Widening those traces and adding copper area for cooling is far cheaper than discovering the temperature rise during qualification, and the width calculation follows the same current capacity rules as any other power trace.
Relay Or Semiconductor
The decision between a relay and a solid state switch rarely turns on speed. A relay wins where the circuit must be genuinely disconnected, where the load is unknown or abusive, where contact resistance in the closed state must be very low, or where a latching device must hold a state through a power failure. A semiconductor wins on life, on switching speed, on silent operation and on the ability to switch at zero crossing.
Where the isolation requirement is the driving factor, the creepage and clearance numbers decide the layout. A relay whose barrier sits close to the board edge leaves little room for the high voltage side, so the part is often positioned with the contact side facing inward and the barrier running across the middle of the board. Checking the creepage and clearance requirement before placement is what prevents an expensive rearrangement later.
One practical check before release is to measure the coil current waveform with the relay in place and the supply at its minimum specified value. If the coil does not reach its must-operate current at that corner, the contact will chatter under vibration or fail to close at temperature extremes, and the symptom will look like a mechanical fault in the relay rather than an electrical margin problem in the driver.
FAQ
Is a flyback diode always necessary? Yes for any inductive coil driven by a semiconductor. The only question is how the energy is absorbed. A diode is simplest and slowest, a diode with a Zener is faster, and an RC network trades efficiency for speed and lower emissions.
Can a relay be driven directly from a microcontroller pin? Occasionally, when the coil current is only a few milliamperes and the pin is rated for it, but the inductive transient must still be clamped and the logic supply must tolerate the disturbance. A dedicated driver or a small MOSFET is the normal arrangement.
Why does the contact rating fall for DC loads? A direct current arc does not pass through zero, so it does not extinguish naturally the way an alternating current arc does at each half cycle. The arc persists, erodes the contact material and can hold the contacts closed, which is why DC ratings are always lower than AC ratings at the same voltage.



