# Relay protection circuit

I came across a relay circuit that uses two diodes and a capacitor. I know the diode across the coil (D1) is a flyback diode and that capacitor (C1) is a filter capacitor. What is diode D2 for?

• it does instill a max frequency of switching other than the physical inertia of the armature, not sure if that's intentional or they just want to allow AC inputs. W/o it, AC would be shorted half the time. Commented Aug 10, 2021 at 5:13

There are many circuits that need to cause a relay to remain active for a short time after power is removed or set to zero. So, when the supply (Vin) drops to 0 volts, the charge on the capacitor will provide an energy source for the relay to keep it activated for a few more tens of milliseconds to several seconds.

What is diode D2 for?

If D2 was replaced with a short and the power supply (Vin) dropped to 0 volts then the capacitor would be immediately discharged and not provide a turn-off delay.

I know the diode across the coil (D1) is a flyback diode and that capacitor (C1) is a filter capacitor.

Do you really know that C1 is a filter capacitor or did you just make that assumption?

• I made the assumption. The circuit above was reverse-engineered from a commercial PCB Commented Aug 9, 2021 at 12:21
• You might get a clearer answer if you revealed what the design came from @Joey Commented Aug 9, 2021 at 12:35
• Please see edit in the post Commented Aug 9, 2021 at 14:00
• @Joey pictures aren't helping - what is it? What type of device is it? What does it do? Where is it from? Who makes it? Answers to these questions will likely lead to a better answer. Commented Aug 9, 2021 at 14:57
• securitydistributors.com.au/transmitters/… . This is a very similar part to what I have. THe only difference is the layout (onboard LED) Commented Aug 9, 2021 at 15:16

Diode $$\D_2\$$ and capacitor $$\C_1\$$ form a half-wave rectifier, as the high value of the capacitance of the capacitor suggests: probably the relay is controlled by a pulsed/AC signal. Thus their function is not to smooth switching spikes, but to provide a sufficiently stable DC voltage to the coil.

• I was planning on using this prebuilt circuit with a 12V DC input on Vin and GND (relay has a 12V DC coil voltage). Is it then wrong to use a DC input? Commented Aug 9, 2021 at 11:29
• @Joey there is nothing wrong in using such circuit with a DC control voltage. Simply $D_2$ and $C_1$ are useless and can be removed in this case. Commented Aug 9, 2021 at 11:37
• Thanks, I will keep C1 as a filter cap on the input side and remove D2 Commented Aug 9, 2021 at 11:42
• @Joey pay attention that such a huge cap can sink very large currents during switching. If you want to keep $C_1$ for filtering reasons, perhaps it would be better to reduce its value in order to avoid damage to the driving stage. Commented Aug 9, 2021 at 11:47
• Wouldn't a half-wave rectifier involve a resistor? Or is it sufficient to have any kind of load? Wouldn't that become inaccurate since the resistance across the coil might vary a lot depending on temperature etc? Or does it rely on the cap ESR somehow? Commented Aug 9, 2021 at 12:47

"I was planning on using this prebuilt circuit.." tells what happened.
That diode prevents reverse connection. Without D2, D1 has to take all the power, if the circuit gets connected reverse. The manufacture does not want smoked products returned.

Edited
Along with the reason above, It can be a rectifier when AC is applied.