# Keep Relay Closed for 10 ms after electricity stops

I have a non-latching relay and I provide a voltage (24V) to close the relay. However, I want to keep this relay closed for 10 ms after I stop providing the 24V needed to close the relay. The relay is the TE Connectivity K81C335. I am thinking of a capacitor that holds the charge and discharges at a rate where 10 ms passes by the time the capacitor discharges to a voltage of 10 V (lockout threshold).

I looked at the use of the capacitor and ended up with.

C=(-R*ln(V/Vm))/t

where

R=coil resistance C=capacitance of capacitor V=pull-out voltage Vm=initial voltage across the capacitor (working voltage of the relay's coil) t=time

and ended with C=(-290*ln(10/24))/0.01

and I end up with a capacitance of 25 kF, which isn't possible.

Is there another way where I can keep the relay closed for 10 ms?

• What would happen if you keep it closed any longer? Commented Jul 13, 2023 at 21:55
• I could be wrong here, haven't looked at these equations in a while, but shouldn't it be C=t/(-R*ln(V/V0))? Commented Jul 13, 2023 at 21:57
• @InBedded16 Yes, that's much more like it. In the OP's version, as time (t) gets smaller, the capacitor (C) gets bigger which is counterintuitive. Using your version I get 39.4 uF which seems reasonable. So use one of the nearest preferred values, either 33uF ot 47uF or 2 X 22uF. You may have to experiment to see which works best in your particular application. Commented Jul 13, 2023 at 22:12
• Exactly how are you sending 24V to it, and how do you stop it? Commented Jul 13, 2023 at 22:45
• @BruceAbbott See image above, the 24V comes from a PSU that converts AC outlet to 24V DC. However, the 24V signal stops when a relay (in a chain of relays) disconnects. When it disconnects it's pretty much "floating" as it isn't connected to a ground. Commented Jul 13, 2023 at 23:34

Your equation is not correct- if the time is shorter the capacitor should not get larger. Similarly, if the resistance is higher the capacitor should get smaller.

Anyway, ignoring the (relatively) minor effect of the end voltage, the RC time constant of 0.01 second leads to a capacitor of about 30uF.

The relay datasheet (please link such in the future) specifies a dropout voltage of somewhere between 1V and 10V, so any calculation is not going to be very accurate anyway. If all you require is more than 10ms, then a capacitor of around 47uF should work. Of course it could take quite a bit longer if it doesn't drop out until 1V, and I've ignored the delay the relay itself has (10ms maximum, no minimum or typical given).

If, on the other hand, you want the relay to drop out smartly and with a well-defined power-off delay, then a more complex circuit would be necessary. A small (eg. 1000uF) capacitor could be used to power the circuit with a timer to release the coil. The internal delay of the relay is still an unknown and likely a significant variable.

Below is a simulation with 100Ω in series with just a 47uF capacitor. It's a bit close to the 10ms minimum if the relay happens to drop out at 10V (chances are it will be less), but you get the idea:

• Sounds good, how did you calculate the capacitor value? Also, should I connect the 24V line to the relay with a capacitor in parallel (edited in the question). I assume that there won't be enough current from the capacitor to harm the relay. More than 10 ms is all that is needed. Commented Jul 13, 2023 at 22:09
• @trident_ If you want to guard against the charge on the capacitor back feeding other circuits or being bled away too quickly by them then insert a diode (1N4001 say) in series with the capacitor / relay in parallel. According to the data sheet the relay should operate from 16V upwards so 24V gives you am[le headroom even accounting for the diode drop. Commented Jul 13, 2023 at 22:22
• The RC time constant calculation is down to somewhat under 10V (24V/e ~= 8.8V) so I added a bit rounding up to a standard value to account for tolerances, temperature etc.. As Peter says, a series diode (eg. 1N4004 or 1N5819) will isolate the capacitor/coil. Charging the capacitor when the relay turns on could conceivably damage the driving circuit but that's not what you asked about. A small resistor in series with the capacitor could limit the charge current at the expense of a bit of delay time. Commented Jul 13, 2023 at 22:36
• @SpehroPefhany I edited the image above with how the 24V signal comes in and disconnects. It is a chain of relays connected to a 24V PSU that converts AC outlet to 24V DC. If a relay is disconnected, the 24V signal stops. The disconnected relay is left "floating". The capacitor would just discharge through the coil since the other connection is disconnected. For damaging the driving circuit, if I needed a small resistor in series it would have to be a 100 ohm and would see a peak of 6W for a short time while the capacitor charges before settling at 0.5W. Commented Jul 13, 2023 at 23:37
• If the resistor is just in series with the capacitor it would not have any steady-state dissipation, however it would reduce the time somewhat. It's easy to run a simulation in Circuitlab, LTspice etc. ... see my edit above. Note that the relay will have to be energized for several times the time constant to get close to the full time. The time constant is 100Ω*47uF in this case, so only about 20ms. Commented Jul 14, 2023 at 4:31

The simplest way to increase release time is with a reverse-biased diode across the coil. This effectively 'short-circuits' the back-emf produced by the coil as the magnetic field collapses, producing an exponential current decay with a time constant determined by the coil's inductance and resistance.

According to this white paper from TE Connectivity, an automotive ISO type relay with 55 ohm coil tested at 13.5 VDC had a drop-out time of 1.5 ms unsuppressed and 9.8 ms with a diode across the coil.

Your relay has a specified maximum release time of 10 ms, so it may take longer than 10 ms with a diode directly across the coil. If a longer release time is not acceptable then you could add a resistor in series with the diode to reduce the delay. The resistor value would have to be determined by experiment.

You will want to apply some kind of suppression anyway to prevent arcing and possible sticking of the contacts on the relay that is operating yours. The diode performs this function without increasing turn-on current, whereas a capacitor could have a very high surge current as it charges (limited only by series resistance in the circuit, which may be very low).