Skip to main content

Modeling a Relay with Diode for Surge Protection

Relay with diode and breaker circuits

Using diodes in this set relays can suppress voltage surges during switching


Relays, breakers, and other types of switches in high voltage systems appear to provide infallible protection, but there is a simple circuit under the hood that makes this possible. Remember those analog components you played with in your college electronics classes? When hooked up in a deceptively simple way, a relay with diode circuit provides protection from high voltage when a relay is triggered.

This circuit relies on two components: a diode and inductor. For low to moderate voltage spikes, some basic off-the-shelf components will provide significant overvoltage protection. Since this circuit is inherently nonlinear, especially in the presence of strong voltage spikes, you’ll want to simulate your designs in order to determine its operating limits. Here’s how you can design a relay with diode circuit and the analysis tools you’ll need to evaluate your design.

Defining a Relay with Diode Circuit

Every relay contains three important elements:

  • Switches: As pedestrian as it might seem, the switches are actually quite important for providing an electrical contact without switch bounce (known as chatter in the relay world). Switch bounce occurs in low-quality switches, where the electrical contact effectively vibrates when the switch is thrown. One switch sends current through the relay coil, either mechanically (solid-state relay) or electrically (electromechanical relay) with a transistor or solenoid switch.

  • Relay coil: Once the relay coil is switched on, it activates a second switch, which is responsible for moving the armature between the normally-closed (NC, or OFF state) and normally-open (NO, or ON state) positions. This switching from the relay coil is what allows the current to flow to the load.

  • Diode: The diode is responsible for providing transient voltage suppression. The idea behind having a diode is to ensure a smooth transition between states when the relay is switched such that any transient voltage spike is suppressed. When the relay is switched off, the diode provides a low impedance path for any transient in the relay, which effectively diverts any current and voltage spike away from the switching circuitry.


Whether you are using an electromechanical relay or a solid-state relay, your relay circuit should include a diode in parallel with the relay coil. A relay with diode configuration provides transient voltage suppression when the relay is activated, which keeps the surge of current in the relay from burning out the switching circuitry. This is particularly important when the relay circuit shown below is triggered with a transistor (imagine a transistor replacing switch next to the battery).


Relay with diode, switches, and power/ground

Schematic showing a basic relay with diode circuit


When the relay is closed, there is a surge of current, and the applied voltage drives the diode into reverse bias. The low impedance path is directly through the relay coil, which acts like an inductor. The coil has some inherent DC resistance, and the inductor and coil together ensure a smooth transition to high voltage. This is particularly important in high voltage applications, where a fast rise to high voltage may damage the switch.

Similarly, once the relay is opened, the magnetic field in the coil starts decreasing, which produces a back EMF that points towards the anode of the diode. This drives the diode into forward bias, providing a low impedance path for the transient current creating a circular loop of current through the coil and diode. The DC resistance of the coil slowly damps the back EMF down to zero. Again, this prevents a large spike of voltage/current from damaging any sensitive circuitry that was used to switch the relay.

Modeling Relay Circuits for Transient Voltage Suppression

As these circuits are designed to suppress a transient voltage spike when a relay switches, you’ll need to use transient analysis to analyze how the voltage spike behaves and is damped over time by the relay inductance and resistance. In this designer’s opinion, the easiest way to do this in a SPICE-based simulator is to use a piecewise DC source. Using a piecewise source allows you to define a specific transition time for the source voltage in the circuit. Your goal is then to run a transient analysis simulation and examine the voltage seen at the load over time. It is also a good idea to watch the current seen at the load and the power dissipated in the load.


Relay with diode circuit model

Circuit model for a relay with diode circuit. Differential voltage and current measurement probes are shown in this model.


Because the diode acts like a nonlinear resistor, it is difficult to immediately determine how the transient response damps over time. If you were to try this by hand, you would have to numerically solve a rather complicated time-dependent transcendental equation. Using a piecewise voltage source allows you to iterate through a number of different rise times to define various pulse strengths. You can also perform a parameter sweep for the inductance and resistance of the relay coil to examine its effectiveness in damping.

Be sure to check the datasheets for the relay you want to use in order to get the relay coil inductance and resistance. Typical relay coil inductance values are in the mH range, and typical coil resistance values are in the 10’s of Ohms range. By iterating through various resistance and inductance values, you can determine a candidate replacement relay to use in your circuit in case your desired relay does not provide the right level of protection.

You should also perform smoke tests to check whether the components in your idealized relay will burn out during operation. This requires specifying power dissipation ratings in your simulation, although this is quite easy when you use the right simulation tools. You can then identify which components will fail first and replace them with more resilient components.

Building and modeling a relay with diode circuit is much easier when you use the right PCB design and analysis software package. The layout and simulation tools in OrCAD PSpice Simulator and the full suite of analysis tools from Cadence are ideal for building and analyzing the transient behavior of your voltage suppression system and its durability. The smoke tests listed above are only possible with PSpice’s smart simulation efforts. You’ll also have access to manufacturer part search tools as you prepare to source components for your system and move to production.

If you’re looking to learn more about how Cadence has the solution for you, talk to us and our team of experts.