# Falling edge delay switch

Basically, what I'm trying to do is a circuit that maintains the output ON for about 10min after a switch has turned OFF.

In another words, a rising edge of the input will raise the output immediately, but a falling edge will take 10min to drop the output OFF.

This diagram will explain better:

A switch will be connected to the input, and a relay to the output.

I thought this would be a piece of cake, but it's giving me quite a headache.

Initially I tried using a falling edge detector to trigger a 555 ci in monostate mode, but no matter what configuration i use I keep getting a pulse form output, which is not what I need.

I also tried a bunch of flip-flop and 555 combinations that I've stumbled to, but none of them worked.

I'm completely open to different approaches on this, and don't need to use the 555 ci. There is only two requeriments that I would like to meet:

1) Preferably powered by a 12v source.
2) It must be controled by a ON/OFF switch.


Any guideline would the much appreciated.

• How much current? – jonk Oct 11 '16 at 1:59
• For 10 minute delays, a cheap microcontroller is likely to work better than an analog solution. – The Photon Oct 11 '16 at 2:06
• CD4060 timer with gate on stop ..to drive Logic level FET , no need relay – Tony Stewart Sunnyskyguy EE75 Oct 11 '16 at 2:12
• What do you want to happen if the switch is re-engaged before the 10 minutes expire? – ThreePhaseEel Oct 11 '16 at 2:58
• Thanks for the interest guys. The current should be enough to trigger a 12V relay, that will control another circuit. I think would 100mA be nice. – Leonard Oct 11 '16 at 12:46

## 1 Answer

There is no question in my mind that you'd probably be better off handling the timing part of the project with a SOT23-6 microcontroller, like the PIC10F220 or PIC10(L)F320. They are cheap and they can do this all day long. The main problem with them is programming them. If you aren't experienced at it, then this can be a serious chore. (For me, it would be a fractional day's work, including documentation, and a joy to do.)

But if you want something analog to wire up, no programming involved, then something like this:

simulate this circuit – Schematic created using CircuitLab

This circuit is re-triggerable. You can use a regular switch if you want. Or you can use a momentary switch. Either way, the moment the switch is disengaged is the moment the timing starts. So it will work as you'd like.

I set it up so that it will do something on the order of 6-10 minutes. It's hard to find cheap resistors larger than $4.5\:\textrm{M}\Omega$ in size, though. But you are free to increase or decrease the values of $R_3$ and/or $C_1$ to get your timing where you want it. But if $R_3=4.5\:\textrm{M}\Omega$ isn't enough, concentrate on making $C_1$ larger, instead. You should make sure that $C_1$ is rated for at least $25\:\textrm{V}$, though. Just in case.

$Q_1$, if $100\:\textrm{mA}$ is okay with you, can be most any small signal BJT. But if you need more current into your load, you will need to find a TO-220 packaged device (like the MJE170.) And you will need to change $R_2$ (and possibly $R_1$) so that $Q_1$'s base drive is sufficient.

I added $D_3$ and $D_4$ to reset the timing by discharging $C_1$ when $SW_1$ is closed. That's what makes this retriggerable. If you activate $SW_1$ for a long time, then $C_1$ remains discharged while the switch is active. But as soon as the switch is released, the capacitor can start charging up. I recall that 1N4148 diodes have low leakage (in tens and hundreds of pA), so I think the circuit should be okay timing for many minutes.

The circuit clears itself for new use instantly after shutting off, as well, by letting $C_1$ discharge through $D_1$ when the circuit powers down.

• Thanks for the fast reply @jonk. I studied microcontrollers in college, 10 years ago, but only in theory. I never used one. So I'm sure it will not be trivial to look into it. I will try your suggestion first, and post the results. – Leonard Oct 11 '16 at 13:05