How To Turn off relay after 30 seconds - Page 1
Forum section: electronics / beginners

author: yev
author_rank: Newbie
timestamp: September 14, 2021, 03:08:25 pm
content: I have a normally open relay that currently is controlled by 12V. An external device takes care of controlling the 12V.I need to add a delay of approximately 30 seconds (precision is not all that important +/- 5 seconds is OK) but might need to be as long as 60 seconds (I need to prototype and test this a bit). Can anyone help me with the best way to approach this?So the overall plan would be:1.) external device turns ON 12V.2.) Relay turns ON immediately3.) external device turns OFF 12 V4.) Relay remains ON, but 30 second countdown begins (no need to display this just that timing action takes place)5.) Countdown reaches 30 seconds6.) Relay turns OFFWould a 555 be the way to go, and if so can anyone help me with a quick head start on this? Looking for something small and simple on this.Thanks in advancePS if this matters the application is for a water pump. When someone turns off the controller I would like the pump to run for an additional 30 seconds to help prevent trapped heat.

author: Just_another_Dave
author_rank: Regular Contributor
timestamp: September 14, 2021, 03:46:35 pm
content: A 555 timer should be enough to achieve that, but you should verify if it is able to supply the required current to operate the relay. If it isn’t, you might require to use a mosfet or a driver between the timer and the relay to avoid burning it. Alternatively, you could use a cheap microcontrollerAdditionally, this topic (https://www.eevblog.com/forum/beginners/a-simple-circuit-to-trigger-relay-for-30-seconds/) may help you, as it describes a similar application and includes some posible solutions

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2021, 04:00:51 pm
content: Errrr ..... *where* do you plan to get power from to keep the relay coil energized for an additional 30 seconds after the supply from the controller goes away?Also you need to know whether the controller that provides the 12V coil power switches the low side or the high side. Higs side switching gives you an active high coil signal and low side switching, active low, which obviously affects the timer circuit design.If there is a 12V supply (and 0V/common/gnd) you can tap into, is easy but if not that could be one of the hardest parts of the project.

author: yev
author_rank: Newbie
timestamp: September 14, 2021, 04:37:48 pm
content: I have access to +5VDC supply that is always on, so I plan on using that to power the 555 itself (or whatever circuit people think would work).

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2021, 05:00:43 pm
content: Powering the 555 isn't the problem. Powering a 12V relay coil after the 12V control signal goes away is the issue. Unless your 5V supply has enough reserve current capacity to permit you to use a boost converter to get enough current at 12V for the relay coil you've got problems!If you haven't got 12V (or higher) available, swapping out the relay for a solid state one that will be happy with 5V drive may be your only viable option, but wont be cheap (as the cheap Chinese SSRs are almost invariably fakes that don't like motor loads and blow at a small fraction of their nameplate load currenrt rating)!

author: ogden
author_rank: Super Contributor
timestamp: September 14, 2021, 05:31:01 pm
content: Solution depends on what you want to achieve - build something or just solve problem. To solve it w/o risking to fail building - search for "DIN time delay relay", "DIN timing relay".

author: harerod
author_rank: Frequent Contributor
timestamp: September 14, 2021, 07:45:44 pm
content: There is a logic circuit by the name of 4060 (74HC4060: binary counter with built-in oscillator), which would be halfway between the venerable 555 and a newfangled microcontroller.

author: antenna
author_rank: Frequent Contributor
timestamp: September 14, 2021, 08:34:49 pm
content: Could you add a diode between the 12v signal and the relay, then put a supercapacitor (or maybe a normal electrolytic if the coil current is low) across the relay to provide the current to the relay for the extra time? Once external 12v stops, the diode isolates the capacitor and relay from the external circuit and the capacitor then feeds the relay coil until the capacitor drains.

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2021, 08:52:58 pm
content: @harerod,There's no real need for a 4060 as the timing components for a CMOS 555 for a 30 to 60 second delay aren't unreasonably large.@antennaThe large inrush current to charge the (super)capacitor would be likely to damage the controller so you'd have to get a bit smarter than that and add current limiting, and you'd probably still want a timing or undervoltage detection circuit to get the relay to open quickly, but the basic idea is sound.

author: Zero999
author_rank: Super Contributor
timestamp: September 14, 2021, 09:58:41 pm
content: Quote from: yev on September 14, 2021, 04:37:48 pmThen you need to switch your 12V relay, for a 5V one, for it to work.It is theoretically possible to convert 5V to 12V, with a boost converter circuit, but it's not worth the extra complexity.I'd do something like this. When the 12V is on, it switches M1 on, which charges C1 to 5V, via R2, which is just there to limit the current surge and will happen in a few milliseconds. The output of the 555 will go low, allowing current to flow through RL1. When the 12V turns off, M1 will turn off and C1 will discharge through R1. When the voltage drops below 1.67V, the 555's output goes high and the relay switches off.delay = 1.1*R1*C1

author: perieanuo
author_rank: Frequent Contributor
timestamp: September 15, 2021, 09:10:19 am
content: just buy any arduino or similar module, you can change timing and logic in sw with same cost and a lot morethe sw is easy-peasy even for beginners

author: Just_another_Dave
author_rank: Regular Contributor
timestamp: September 15, 2021, 12:17:21 pm
content: Quote from: perieanuo on September 15, 2021, 09:10:19 amTaking into account that nowadays it is possible to find arduino clones for just 2€, it is worth considering that if enough space to fit it is available. Maybe some of those clones are prepared for outputting 12V directly

author: SmokedComponent
author_rank: Regular Contributor
timestamp: September 15, 2021, 01:04:07 pm
content: Quote from: Just_another_Dave on September 15, 2021, 12:17:21 pmIf one is going that route... then buy Arduino Nano (or clone) and some 8 pin ATTiny (/25 will do)... turn arduino into AVR programmer to program the ATTiny. How to do this is well documented, super easy and ATTiny can be programmed using the same arduino IDE.In one of my projects I also used ATTiny's PWM to generate 5,5V (from 3,7V supply) to power latching relays when needed (with external components to form a simple boost converter).

author: Ian.M
author_rank: Super Contributor
timestamp: September 15, 2021, 03:39:07 pm
content: Normally, when a single chip analog or 400 series MSI logic solution is possible, my reaction to the 'just use a MCU' crowd is to point out that you then need a regulator as very few cheap MCUs have one with an input voltage range comparable to the permissible Vcc range for a 555 or for 4000 series logic. Also a MCU will almost certainly need a driver transistor for the relay coil, whereas a 555 may well be capable of directly driving a relay coil. At the end of the day, unless you *NEED* the higher timing accuracy even a cheap MCU on its internal oscillator can offer or need more complex sequencing, its just not worth it from the component count/complexity, cost and time, and future maintaibility perspectives.However the O.P. has a regulated 5V rail available, and would have to change the relay anyway, probably having great difficulty finding one that can handle motor loads with a 5V coil that draws less than the available supply current (unless the 5V supply was originally grossly over-specified) so using a low pin count MCU for the timing and a solid state relay directly driven by a GPIO pin for the pump control is still a viable option.On the gripping hand I'm with Ogden on this - simply order an appropriately rated time delay (on break) relay + a small DIN rail mounting box for it for a solution that wont give your local electrical code inspector a stiffy!

author: yev
author_rank: Newbie
timestamp: September 15, 2021, 04:18:36 pm
content: This looks like exactly what I need. I am going to wire it up. Thanks for your help.

author: Terry Bites
author_rank: Super Contributor
timestamp: September 16, 2021, 12:10:46 am
content: http://www.learningaboutelectronics.com/Articles/555-timer-delay-before-turn-off-circuit.phpUse 7555 So you can use smaller timing caps and bigger timing reistors.Or grab the garlic paste. MAX6373KA no external parts timers

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: September 16, 2021, 01:36:21 am
content: Have you looked for mechanically timed, delay-off relays? I know Allen Bradley made pneumatic off delays at one time.

author: MultiMike
author_rank: Contributor
timestamp: September 18, 2021, 04:49:58 pm
content: Quote from: Ground_Loop on September 16, 2021, 01:36:21 amThat's a dashpot delay relay. That is old-school.Mike

author: calzap
author_rank: Frequent Contributor
timestamp: September 19, 2021, 12:05:20 am
content: I agree with ogden and Ian_M. This wheel has been invented. Buy a delay on break timing relay. Depending on needed contact current and voltage specs, the timing relay can be used alone or to operate a more robust relay. Macromatic is one brand that has DIN rail, 8-pin and small box versions. Schneider and Selec are other brands with extensive selections available.Mike in California

author: Terry Bites
author_rank: Super Contributor
timestamp: September 20, 2021, 04:57:29 pm
content: Use a 7555 so you can avoid using a ghastly polarised timing cap.https://www.technologystudent.com/elec1/5553.htm