How to delay a relay opening - Page 1
Forum section: electronics / beginners

author: cods4
author_rank: Contributor
timestamp: December 01, 2021, 10:53:53 pm
content: I am making a simple battery isolation circuit for my race car. This will allow the battery to be connected/disconnected with a switch in the cabin, and it will also allow the battery to be isolated using a momentary switch on the outside of the car.The attachment shows the circuit which I have copied from this forum post (https://forums.nasioc.com/forums/showthread.php?p=46666717)I want to modify this circuit slightly to include a resistor which is switched in between 12V (Fusebox, Starter, Alternator) and Gnd when the battery is disconnected. This is to avoid causing a voltage spike and frying my ECU etc when the alternator is basically open circuited. Most off the shelf battery isolator switches include one of these (i.ehttps://www.motorsport-tools.com/genuine-autolec-fia-msa-battery-master-cut-off-switch-race-rally-motorsport.html).My main concern is that I need this resistor to be switched into the circuit just before the Master relay (RY3) opens, but I don't think MBB relays exist in the automotive world. I am looking for a way to do this without using a microcontroller if possible.My first thought is to add an inductor in series with the Master relay (RY3) coil. This would hopefully keep current flowing in the coil for an extra 10-20ms to allow another relay to switch the resistor in.My question is, will an inductor do what I am hoping, and how do I go about sizing it?The Master relay will a TE V23132A2001B200The coil on this relay is 12V 39ohms and release voltage is 1.2V according to the datasheet.

author: jpanhalt
author_rank: Super Contributor
timestamp: December 01, 2021, 11:11:46 pm
content: I have used a simple RC delay triggering a 2n7000 series mosfet. There, of course, are more elegant ways to do that.

author: cods4
author_rank: Contributor
timestamp: December 02, 2021, 12:53:20 am
content: I think you've got me on the right track. I should be considering a capacitor in parallel with the relay coil (rather than an inductor in series). I just did some basic calculations and came up with a 2200uF capacitor which should keep the relay closed for an additional 50ms which should be plenty.Basically I just worked out the number of J joules required which is 3.3W x 0.05s = 0.165JAnd capacitance = 2E/V^2 = 2291uFSo a 2200uF 16V capacitor should do the job right? Or probably even a 1000uF cap since I only need it to work for about 10ms or so.

author: jpanhalt
author_rank: Super Contributor
timestamp: December 02, 2021, 07:31:12 am
content: As you calculated, you will need a large capacitor to operate a relay for that length of time. If you use a mosfet to control the relay and then control the mosfet with a capacitor and resistor on its gate, you can control the turn off (or turn on) with a much smaller capacitor. The gate of a mosfet is like a capacitor. Considering an N-channel mosfet like the 2N7000, once charged it stays on until you drain that charge. For example, a 0.47 uF capacitor and 100k resistor gives a time constant (RC) of 0.047s (47 ms).Unfortunately that is not a snap action. You can add additional components to get that, but you may not need it.

author: Zero999
author_rank: Super Contributor
timestamp: December 02, 2021, 01:48:19 pm
content: The 2N7000 isn't rated to a high enough current for a 12V 39 Ohm relay, which will draw just over 300mA at 12V and nearly 360mA, when the engine is running and the voltage is nearer 14V. Use a higher current MOSFET such as the IRFZ44 or IRF540. Check the maximum gate-source voltage rating of the MOSFET. If it can't handle 16V, you will need to use a potential divider, to drop it to a safe level.Don't forget to add a freewheeling diode in reverse parallel with the relay coil.Note that the delay will be approximate, because the threshold voltage is extremely variable. A 555 timer circuit would give a much more consistent delay, but it's many more parts.

author: GerryR
author_rank: Frequent Contributor
timestamp: December 02, 2021, 05:05:53 pm
content: I don't mean to spoil the fun of "rolling your own," but a simple Time Delay Relay like a Magnacraft 822TD-10H/UNI is programmable for various functions, including "off delay," and are not very expensive. Just a thought.

author: rstofer
author_rank: Super Contributor
timestamp: December 02, 2021, 05:57:21 pm
content: According to my calcs using the discharge equation Vout= Vin* e-t/Tau, assuming a 13V input and a minimum 2V output, the delay until discharge to 2V with a 1000 ufd capacitor and 39 Ohm coil is 0.073 seconds = 73 ms.Matlab code:Code:Vin = 13; % assume a supply voltageR = 39; % relay resistance in OhmsC = 1000*10^-6; % timing capacitor in FaradsTau = R*C; % time constant Taut = linspace(0,3*Tau); % graph from 0 to 3 TauVout = Vin * (exp((-t/Tau))); % discharge equationplot(t,Vout) % plot the discharge curveylabel("Voltage")xlabel("Time - seconds")grid on[h,~]=legend("Discharge Voltage");figure(gcf) % or shg command - pull plot to topt = - (Tau * log(2/Vin));fprintf("Time voltage will remain above 2V => %.3g seconds\n",t)% include results from Command Window% Time voltage will remain above 2V => 0.073 seconds%Graph attached... You can see where the trace crosses 2V at a little over 70 ms. The MATLAB code will also run in Octave which is free.I would use a capacitor rated at least 25V if not 50V.The only equation you really care about is "t = - (Tau * log(2/Vin))". Calculate Tau as R (Ohms) * C (Farads), pick a dropout voltage (here it's 2V) and an input voltage Vin. Assuming you have accounted for all the parallel load on the capacitor, this equation should work fine.In the world of Octave and MATLAB, log(x) returns the Natural Logarithm which is usually ln(x) on a calculator. The Common Logarithm (base 10) is log10(x).

author: cods4
author_rank: Contributor
timestamp: December 02, 2021, 07:24:28 pm
content: Quote from: GerryR on December 02, 2021, 05:05:53 pmTrue, however that relay isn't suited to vehicle use. Operating temperature is only up to 55C, and I doubt it would cope with the vibration etc.

author: cods4
author_rank: Contributor
timestamp: December 02, 2021, 07:47:26 pm
content: Quote from: rstofer on December 02, 2021, 05:57:21 pmThanks very much for that, I haven't used MATLAB for many years, but it still makes sense.Can I just ask why would I need such a large voltage rating on the cap? I was looking at 16V rated capacitors.I was planning to use this:https://nz.mouser.com/ProductDetail/661-APSG160E182MJ20Sbut since you suggest a higher voltage rating, would this be suitable?https://nz.mouser.com/ProductDetail/KEMET/PHA225KLP4110QE4?qs=iLbezkQI%252BsgOn6OnNZwgMw%3D%3DIt's fairly large, but I should be able to hide it away somewhere.

author: rstofer
author_rank: Super Contributor
timestamp: December 02, 2021, 08:56:20 pm
content: It seems to me that an alternator charges to 13.8 volts but the output, according to the gauge on my dash, is often up near 15V when I haven't driven the truck and the battery is near discharged. Clearly, that is too close to the maximum limit for a 16V capacitor. We need to consider transients and I have no idea what the industry uses for a spec.Here is a paper on Transient Voltage Suppressors (TVSs) for the automotive sector and they're talking about 87V spikes during a 'load dump' - where the alternator loses the battery.I may stand corrected, perhaps 100V is a better design.Pretty pricey at $4.19https://www.digikey.com/en/products/detail/illinois-capacitor/108CKE100M/5410851One thing to check: consider what happens when the 1000 ufd capacitor is actually -20% or 800 ufd. I get 58 ms. Then too, I made assumptions about the input voltage and the dropout voltage. These will also affect the timing.You may want to kick the capacitance up to, say, 1500 ufd @ 100Vhttps://www.digikey.com/en/products/detail/nichicon/LLS2A152MELZ/2548958

author: cods4
author_rank: Contributor
timestamp: December 03, 2021, 12:39:44 am
content: Quote from: rstofer on December 02, 2021, 08:56:20 pmHopefully my resistor will eliminate the 87V spike if it works as expected, otherwise ill have much bigger problems. I think I'll go for the 40V cap due to it's higher temperature tolerance and life expectancy. I'm grabbing two, so worst case if they read low, I can install them both in parallel.Thanks for your help