Time delayed switch(trigger by opening)

Thread Starter

matemisic

Joined Jul 4, 2015
6
This is my first post so I'm going to try to explain my problem the best I can.

I need a circuit that will trigger 20-30 seconds after the switch is open. I considered using NOT gate and then normal RC delay but I think that would consume more power than just using better circuit. If this could be powered by 5v 500mA it would be great because I already have phone charger like that but 5,6,9,12 or 220 V is fine.
 

GopherT

Joined Nov 23, 2012
8,009
This is my first post so I'm going to try to explain my problem the best I can.

I need a circuit that will trigger 20-30 seconds after the switch is open. I considered using NOT gate and then normal RC delay but I think that would consume more power than just using better circuit. If this could be powered by 5v 500mA it would be great because I already have phone charger like that but 5,6,9,12 or 220 V is fine.
Do you mean
A) the device is off, then you flip the switch and 20 to 30 seconds later the device turns on - and stays on until the switch it turned off
-or-
B) the device is off, then you flip the switch and the device runs for 20 or 30 seconds and then turns off - and stays off until the switch is turned off then on again
-or-
C) something else that you will clearly describe
 

Thread Starter

matemisic

Joined Jul 4, 2015
6
I'm going to give you the way I intend to use it because English is my 2nd language.

There are doors that should be closed at all times but there are people walking through them. I don't want the alarm to start every time someone opens the door to pass but only if the doors are left open for 20-30 seconds (it doesn't have to be that specific time, just long enough so it doesn't start too often). It should ring as long as the doors are open and stop once the doors are closed. I will use just 2 metal contacts as switch, one on the door and other on the frame.
 

AnalogKid

Joined Aug 1, 2013
11,041
With CMOS gates and medium to high value resistors, the circuit should consume very little current. In fact, this could be done with one MOSFET such as a 2N7000. Do you want the circuti to control the alarm directly, or control a relay that drives the alarm?

ak
 

Thread Starter

matemisic

Joined Jul 4, 2015
6
Do you want the circuti to control the alarm directly, or control a relay that drives the alarm?

ak
I still haven't been shopping but I was hoping to get as efficient circuit as possible. I've made PCBs but every time someone else made me electronic scheme so I have absolutely no experience in choosing parts or details of circuit.

I've done some thinking and do you think this would work with monostable. The stable state would be closed circuit and the unstable while it's ringing. This would require long unstable state (around 10 minutes). I don't want to look like I'm not listening to you, I'm just trying to think of every possible solution.
 

AnalogKid

Joined Aug 1, 2013
11,041
Actually, this is a missing pulse detector. Door opens, closes, opens, closes - those are the normal pulses. If the door stays open too long, that is a missing pulse. You don't care if the door stays closed a long time, so there is no missing pulse for that signal polarity. The circuit looks like 1/2 of a monostable because there is no feedback to set a fixed alarm time - once the circuit times out, the alarm stays on indefinitly until the door closes.

That's the easy part. What about the alarm? What is it? Manufacturer, model number. datasheet? Voltage required, current to operate? Is the timer circuit and/or the alarm battery powered? All of these things combine to design how the timer controls the alarm.

ak
 

GopherT

Joined Nov 23, 2012
8,009
I was planing to use this http://www.ebay.com/itm/Piezo-Elect...343?pt=LH_DefaultDomain_0&hash=item58c35b0d47 and power it by 5V or 9V because I already have adapters for that but I can use batteries as well.
You will need a combination of one shot (monostable) timer (555 timer) and some logic to sense that
1) timer has expired (but that looks like the door is closed)
So you will also need logic to determine if the door is open.
2) you need one chip known as a "quad 2-input NAND gate."

The monostable circuitry with a 20 to 30 second timer is on left.

A circuit to determine that the 555 timer has returned to a low logic state And the door is still open.

On the far right, there is a MOSFET (transistor) circuit that can power most anything. The logic gates can only power a few milliamperes so you need a boost to make sure you can hear the alarm.
image.jpg

The alarm is active if the switch is open more than 20 or 30 seconds.
 

AnalogKid

Joined Aug 1, 2013
11,041
Nexgt is the switch. Most alarm switches are closed then the door is closed, and open when the door is open. The other alternative is one that is open when the door is closed. The circuit can use either one.

As for the circuit itself, it can be done with on transistor if you don't mind that the alarm comes on slowly, starting at low volume and increasing to full volume over a few seconds. For a more crisp turn on, it would takd two transistors. Or a CD4093 CMOS logic gate chip. Where are you located, and what components are available to you?

ak
 

Thread Starter

matemisic

Joined Jul 4, 2015
6
I'm from Europe, Croatia. I can order from ebay if I can't find component locally. I wouldn't mind if it starts low and increases the volume. Actually it would be useful.
 

GopherT

Joined Nov 23, 2012
8,009
Nexgt is the switch. Most alarm switches are closed then the door is closed, and open when the door is open. The other alternative is one that is open when the door is closed. The circuit can use either one.

As for the circuit itself, it can be done with on transistor if you don't mind that the alarm comes on slowly, starting at low volume and increasing to full volume over a few seconds. For a more crisp turn on, it would takd two transistors. Or a CD4093 CMOS logic gate chip. Where are you located, and what components are available to you?

ak
The circuit I posted above assumes the switch is closed when the door is closed. Open when the door is open.
 

GopherT

Joined Nov 23, 2012
8,009
That's how it should be
Here is a better trigger circuit (pulse instead of constant voltage trigger).

Also, the bottom waveform is the door switch (pulse is when stitch is open - otherwise there would be no voltage drop).
The yellow is the output of 555 timer and the last one Is the alarm.

image.jpg

image.jpg
 

AnalogKid

Joined Aug 1, 2013
11,041
Here are two versions of a door alarm delay circuit. The one on the left has a crisp turn-on after the time delay. The one on the right turns on more gradually because a MOSFET has a more gradual transition between the conduction and non-conduction areas of operation. The 4093 circuit will run on anything from 3V to 18V. The Q1 circuit will run down to 5V (if the zener is changed) but is happier with 9V. I'm sure you'll have questions. Think them over, then ask.

These are not intended as completely finished designs. With a 10 uF timing cap, the 4093 circuit delay will be approx. 8 seconds. For longer delays, increase C1. The delay for the Q1 circuit is a little harder to predict. Also, it is dependent on the relationship between Vcc and the zener voltage.

ak
 

Attachments

Last edited:
Top