how do I make a time delay that turns on a relay upon power on and turns it off. - Page 1
Forum section: electronics / beginners

author: Deactivated-1
author_rank: Frequent Contributor
timestamp: February 14, 2020, 07:32:44 pm
content: basically I want ~10s delay and when I power on the dalay circuit it turns on a relay but after 10s it turns it off.

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 14, 2020, 09:37:50 pm
content: Here's a circuit from Colin Mitchell's Talking Electronicswebsitethat can likely be changed to fit your needs.In your case you would need to change the timing as well as how it is activated.The timing is controlled by the resistors and capacitor on the left-hand side. In your case the capacitor will need to be much smaller and the pot can be removed if you don't need the timing to be adjustable.The activation is controlled by the 'start' switch which can be replaced with a capacitor. You can leave the 'start' switch if you need to activate the relay manually. In that case just put the capacitor in parallel with it. You might need to experiment with the capacitor size to see what works best. The bigger, the better since it only needs to 'bootstrap' the timer long enough to turn the relay on.The relay shown it the schematic will likely have to be a different relay from the relay that you are going to power for 10 seconds. That is, you will need two relays. The one shown in the schematic can be very small since it is just powering itself and the components to the left of it.Because you will be driving two relays, you will need to be mindful about not exceeding the 555's maximum output current. Be careful about which 555 you use since they each have differences in the maximum output characteristics.Refer to the 555 datasheet for additional details.Edit: The more I think about it, I don't think this will work as I envisioned. It would likely turn right back on after it shutting itself off.

author: Zero999
author_rank: Super Contributor
timestamp: February 14, 2020, 09:49:14 pm
content: Quote from: ELS122 on February 14, 2020, 07:32:44 pmThere are various ways of implementing this: 555 timer, microcontroller, window comparator, spring to mind.You haven't provided enough information. What voltage and resistance is the relay coil? Is it AC or DC? How accurate does the delay need to be?

author: Zero999
author_rank: Super Contributor
timestamp: February 14, 2020, 11:21:35 pm
content: Quote from: TerminalJack505 on February 14, 2020, 09:37:50 pmThat will delay the power on, but it won't turn off the circuit after a further 10 seconds. To do that, two will need to be cascaded, one after the other, but there are more elegant ways to achieve the same effect.Quote from: ELS122 on February 14, 2020, 10:54:54 pmIf you're after simplicity, then forget about discrete components. It will be much more complicated.

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 14, 2020, 11:35:37 pm
content: Are there two delays? That circuit would turn the relay on immediately upon power-up, so if there are two delays then it wouldn't work.

author: Jwillis
author_rank: Super Contributor
timestamp: February 14, 2020, 11:41:18 pm
content: You could use a basic Astable Multivibrator Circuit. Just use one output . But you will still need 2 NPN transistors . The time on and time off can set with the capacitors and a couple variable resistors at R1 and R2and replace one LED with a diode.This circuit doesnt have the LEDs in it . My bad. Just use one of the outputs. With that you can drive another transistor for a relay.

author: Jwillis
author_rank: Super Contributor
timestamp: February 14, 2020, 11:56:16 pm
content: Or if you want only one shot you could use a monostable multivibrator .

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: February 15, 2020, 12:23:26 am
content: I did nearly the same thing for the water drain on my compressor tank. When i turn on the shop lights the relay powers a drain solenoid for ten seconds. At ten seconds the relay turns on opening the normally closed contacts to close the drain valve. The relay remains energized as long as the shop lights are on. Your problem is easily solved with any of a number of time delay relays available on Amazon as well as numerous other vendors. If you’re really just itching to roll your own then by all means, but time delay relays are readily available.

author: jesuscf
author_rank: Frequent Contributor
timestamp: February 15, 2020, 06:21:41 am
content: Quote from: ELS122 on February 14, 2020, 10:54:54 pmIf the relay is small, a capacitor in series could work. I made a test circuit with parts I had laying around and seems to work quite well. I used a 10mF capacitance equivalent capacitor (three 3300uF capacitors in parallel). I also placed a 10k resistor in parallel with the capacitor to bleed the charge when there is no power. This is the circuit:Here is the assembled test circuit. I used a push button to simulate the power switch.Surprisingly the relay remains activated for a long time. I had my multimeter (in conductivity test mode) attached to the NO contacts of the relay. As soon as I pressed and held the push button, the multimeter started beeping. As soon as the multimeter stopped beeping, I released the push button. I managed to capture the voltage across the solenoid of the relay with the oscilloscope. The relay stayed activated for more than 10 seconds!For more or less time, change the increase or decrease the capacitance of the series capacitor.

author: I wanted a rude username
author_rank: Frequent Contributor
timestamp: February 15, 2020, 06:27:32 am
content: If you want a ready-made solution, there are $2 modules that do this ... just wire and go.https://www.aliexpress.com/wholesale?SearchText=delay+relayI use one to suppress the aftermarket alarm lock/unlock chirp in my motorbike.

author: Zero999
author_rank: Super Contributor
timestamp: February 15, 2020, 10:33:09 am
content: Quote from: TerminalJack505 on February 14, 2020, 11:35:37 pmYes. I think most people here appear to have misread the original poster!There aretwo delays!Quote from: ELS122 on February 14, 2020, 07:32:44 pmI'll post a schematic later.

author: brucehoult
author_rank: Super Contributor
timestamp: February 15, 2020, 02:45:44 pm
content: Quote from: Zero999 on February 14, 2020, 11:21:35 pmYup.You can get ATtiny85;s for $1.20 each right off Amazon.https://www.amazon.com/MICROCHIP-TECHNOLOGY-ATTINY85-20PU-ATtiny-Microcontroller/dp/B07348SMC3Or around $2 each if you only want five.They're dead easy to use, have 8 KB of flash for the program (4096 instructions), 512 bytes of RAM, 512 bytes of non-volatile memory, have digital and analogue (10 bit ADC, 15k samples per second) inputs, and digital and analogue (PWM) output. They run at up to 20 MHz (which is 20 MIPS), run off 1.8 V to 5.5 V, and need no external components.The ADC even does differential mode, so you could program it to mimic a 555 exactly (though with a lower analogue input frequency response)A little bit more expensive than a 555, but not much, and once you start adding external components to the 555 the total price can easily become more.It's pocket change in both cases, of course.

author: Zero999
author_rank: Super Contributor
timestamp: February 15, 2020, 03:10:41 pm
content: Yes a microcontroller is a good idea but:Quote from: brucehoult on February 15, 2020, 02:45:44 pmWell that's not true. The original poster's application is for 12V, so an LM78L05 or similar and a transistor to switch the relay will be required.Here's the simplest discrete deign I could think of, which doesn't use monster capacitors. The values of R1, C1, R2 and C2 will need to be tweaked, as it's dependant on the threshold voltages of the MOSFETs. The precision will be poor, but if all that's required is an approximate delay, it will do.

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 15, 2020, 06:12:47 pm
content: If that's the case then it looks like you should be able to remove R1, C1, and M2 from Zero999's circuit and connect R2 and M1 to ground instead of M2's drain.

author: Zero999
author_rank: Super Contributor
timestamp: February 15, 2020, 06:39:31 pm
content: Quote from: ELS122 on February 15, 2020, 06:03:19 pmOK, then it appears, the other people who have responded are right and I am the one who was mistaken. The circuit posted by TerminalJack505 will work.https://www.eevblog.com/forum/beginners/how-do-i-make-a-time-delay-that-turns-on-a-relay-upon-power-on-and-turns-it-off/msg2919276/#msg2919276Quote from: TerminalJack505 on February 15, 2020, 06:12:47 pmYes, like this.