# Need to keep a relay latched for 2-3 seconds without power supply

#### tunafish24

Joined Oct 21, 2011
28
I'm new to circuits and building a simple prototype to keep the relay latched for a couple of seconds after power is removed - so essentially the power to relay acts as the Input signal. This means I have to store energy in a capacitor (to keep the relay latched) and possibly use resistor as well to control current in the circuit. Can you guys please help me figure out C and R values and how the components would link (C would be in parallel with the Relay but not sure about R)?

Important things for me are:
1. Relay should latch as soon as 12V power is applied
2. Capacitor should charge within 500-700ms and be able to keep relay latched for 2-3 seconds.
3. Since I have to charge capacitor quickly, I need to factor in-rush current so as not to damage power supply.

Would really appreciate if you can share the calculations as well, so I can try with different relays and capacitors etc.

The relay i have is Songle 12V (SRD-12VDC-SL-C), Datasheet: http://www.songlerelay.com/Public/Uploads/20161104/581c81ac16e36.pdf

#### crutschow

Joined Mar 14, 2008
34,841
To keep the relay energized for 2-3 seconds would likely require a little less than 1 time-constant, depending upon the actual drop-out voltage of the relay.
1 time-constant is a capacitance of 3s / 400Ω = 7.5mF(7,500uF).

To charge to 98% of 12V within 500ms would take 4 time-constants, which gives a charging resistance of (0.5s /4 ) / 5mF = 25Ω.
The maximum charging current is then 12V / 25Ω = 480mA.

#### tunafish24

Joined Oct 21, 2011
28
and circuit would look like this? and 12v 2amp power supply should be sufficient right?

#### AnalogKid

Joined Aug 1, 2013
11,199
after power is removed
Does that mean that the one or both leads of the supply are physically removed (unplugged or with a switch), of that the 12 V source goes to 0 V. If the latter, you will need to add a diode in series with the supply so its output circuits do not add a discharge path for the capacitor.

ak

#### tunafish24

Joined Oct 21, 2011
28
Updated the design, also added an Led so I can tell the relay is energized. Looks good?

#### sghioto

Joined Dec 31, 2017
5,430
The relay i have is Songle 12V (SRD-12VDC-SL-C),
I have one of those relays, 5mF will get you 3 seconds.

#### AnalogKid

Joined Aug 1, 2013
11,199
Updated the design, also added an Led so I can tell the relay is energized. Looks good?
Not really.

First, the LED tells you if there is enough energy left in the cap to power an LED. Without using a second set of relay contacts, a simple LED cannot give you exact relay status. If staying lit for a few seconds after the relay has dropped out is ok, then ok.

Second, the LED is drawing energy from the hold-up cap, starting at 16 mA. That's over 50% of the current being drawn by the relay coil, and will shorten significantly the hold-up time.

ak

#### tunafish24

Joined Oct 21, 2011
28
I have one of those relays, 5mF will get you 3 seconds.
Perfect!

That's over 50% of the current being drawn by the relay coil,
Good point, I thought the energy usage would be minimal...I'll remove the led then. Does the rest look good?

PS. I noticed that you replied on my stackexchange question as well. Another person answered with this design:

Im a bit confused about the placement of resistor between capacitor and relay? and whats the 2nd diode for?

#### BobTPH

Joined Jun 5, 2013
9,265
The resistor is there to limit the charging current of the capacitor. Without it, the relay would not energize right away as the capacitor was charging. It might or might not be a real problem.

#### tunafish24

Joined Oct 21, 2011
28
Without it, the relay would not energize right away as the capacitor was charging
The way I have resistor in my design, would the relay engage immediately when power is supplied or after capacitor is charged?

#### MisterBill2

Joined Jan 23, 2018
19,419
Updated the design, also added an Led so I can tell the relay is energized. Looks good?

View attachment 313206
The LED will shorten the hold time quite a lot. How much will the LED draw?The relay consumes 30 mA, if the LED draws 20 more that will be much less hold time.

#### sghioto

Joined Dec 31, 2017
5,430
Im a bit confused about the placement of resistor between capacitor and relay? and whats the 2nd diode for?
Actually don't need D2 as R1 is small. Arranged like this with LED indicator.

#### Sensacell

Joined Jun 19, 2012
3,501
Modern LEDs are very efficient, 20mA is overkill.
At that level of current the LED can be annoyingly bright.

#### tunafish24

Joined Oct 21, 2011
28
Actually don't need D2 as R1 is small. Arranged like this with LED indicator.
Would this design with R1 in-between Capacitor and relay, would that affect relay operation? What about wattage of R1, is 1/4W good enough?

Modern LEDs are very efficient, 20mA is overkill.
What resistor value should I use for LED then?

#### BobTPH

Joined Jun 5, 2013
9,265
10K would give you roughly 1mA. If that is not enough, try 4.7K. An 1/8 W is fine.

#### tunafish24

Joined Oct 21, 2011
28
10K would give you roughly 1mA. If that is not enough, try 4.7K. An 1/8 W is fine.
But R1 is supposed to be 22ohm and current would be closed to 500mA while capacitor is charging - which will take 500ms, then just 30mA to keep relay latched.

#### ScottWang

Joined Aug 23, 2012
7,413
You didn't mention about the load, maybe you don't need to use the relay and can be use the NMosfet to save the energy from relay to load.

#### tunafish24

Joined Oct 21, 2011
28
You didn't mention about the load, maybe you don't need to use the relay and can be use the NMosfet to save the energy from relay to load.
Load is an external 5V circuit (NO), and I want to use a relay to completely isolate this circuit from the load.

#### sghioto

Joined Dec 31, 2017
5,430
Would this design with R1 in-between Capacitor and relay, would that affect relay operation? What about wattage of R1, is 1/4W good enough?
What resistor value should I use for LED then?
It wont have any noticeable effect on the relay operation and I used a 1/2 watt 22 ohm resistor when testing.
As far as the LED resistor use a value that you think provides sufficient illumination.
Another solution is to use a mosfet to activate the relay coil with a much smaller size capacitor.