Saturday 20 April 2013

A One-Time-Only Alarm

This alarm is designed to sound its Siren only once. That is - when the alarm is activated - the Siren will sound for a preset length of time. Then it will switch off and remain off. The alarm will not re-activate.

The basic alarm has a single zone with independently adjustable Exit and Entry delays. The zone will accommodate the usual types of normally-open and normally-closed input devices - such as pressure mats, magnetic-reed contacts, micro switches, foil tape and PIRs.

A range of Expansion Modules allow you to add any number of Instant Alarm Zones, Personal Attack Zones and Tamper Zones to your system. There's also an Untimed Output Module. It will keep an internal sounder, strobe-light, lamp or whatever going after the siren has stopped.

Schematic Diagram




The alarm may be operated by a simple hidden two-way switch - such as a light switch. If you want more security - you can use a key switch - or one of a number of code operated Keypad Switches. 

Before you set the alarm - make sure that the building is secure - that ALL of the Green LEDs are lighting - and that the Yellow LED is off. If the Yellow LED is lighting - there's a fault in one of the zones - and THE ALARM WILL NOT SET. 

Depending on the setting of R9 - when you move Sw1 to the "set" position - you have up to about a minute to leave the building. When you return and open the door - the Buzzer will sound. Depending on the setting of R8 - you have up to about a minute to switch the alarm off. If you fail to do so - the Siren will sound. 

Depending on the setting of R14 - the Siren will sound for up to about 20-minutes. Then it will switch off - and remain off. Of course - you can stop the noise at any time by moving Sw1 to the "off" position. 

When you return - if the Buzzer does not sound and the Yellow LED is lighting - then there's been an activation while you were away. 

Circuit Description

The Cmos 4001 has four - independent - two-input  NOR gates.

The four gates are divided into two pairs.

Gates 1 & 2 are wired together to form a type of latching circuit.

When the alarm is triggered - they will latch - and sound the buzzer.

Gates 3 & 4 are wired to form a monostable.

When the entry delay expires - the monostable will sound the siren for a fixed length of time.

Then the siren will switch off - and stay off.

          ==============

Cmos 4001 gates only have a high output when both inputs are low.

Use the truth table.

While Sw1 is in the off position it holds pins 2 & 13 high - through
R12 and D6.

This means that the outputs of gates 1 & 4 must remain low.

While pins 3 & 11 are forced to remain low - both the latching circuit and the monostable are disabled.

In other words - the alarm cannot be activated.

          ==============

Sw1, R12 and D6 also keep C5 discharged.

While it remains discharged - the capacitor acts like a wire link - connecting pins 2 & 13 to the positive line.

So - after you move Sw1 to the set position - C5 will continue to hold pins 2 & 13 high.

They will remain high until C5 charges through R9.

This is the exit delay.

During this period you may leave the building - through the exit/entry zone - without activating the alarm.

          ==============

As C5 charges - the voltage on the negative terminal of the capacitor falls.

When it falls to just below half the supply voltage - it takes pins 2 & 13 low.

When pins 2 & 13 go low - both the latch and the monostable circuits are enabled.

In other words - the exit delay is over - and it's now possible to activate the alarm.

          ==============

There are two ways to activate the alarm.

The first is to open the loop - and take pin 6 high.

The second is to close a normally open switch - and take pin 1 low.

         ==============

In standby mode - the normally closed loop connects pin 6 to ground.

Current from R1 flows to ground through LED 1.

The LED lights - and confirms that the loop is closed.

         ==============

When you return and open the door - the loop is broken.

LED 1 will switch off - and R1 will take pin 6 high - through the LED.

         ==============

Because one of the gate 2 inputs goes high its output - at pin 4 - will go low. See the truth table.

When pin 4 goes low - it takes pin 1 low - through R7.

R9 is already holding pin 2 low.

So when pin 1 goes low - both of the gate 1 inputs are low.

Therefore, its output - at pin 3 - will go high. See the truth table.

          ==============

You get a similar result by taking pin 1 low directly.

In standby mode - pin 1 is held high by pin 4 - through R7.

If a normally open switch is closed - it will take pin 1 low through D3.

Again - R9 is already holding pin 2 low.

So when pin 1 goes low - both of the gate 1 inputs are low.

Therefore, its output - at pin 3 - will go high. See the truth table.

          ==============

Whether the alarm is triggered by a normally-open or a normally-closed switch - the result is the same.

That is - pin 3 goes high.

When pin 3 goes high - it does three different jobs.

It latches itself on - sounds the buzzer - and starts the entry delay.

          ==============

When pin 3 goes high - it must remain high.

For pin 3 to remain high - pins 1 and 2 must remain low.

If the state of pin 1 were determined by the trigger switches - you could defeat the alarm by simply closing the door behind you.

Pin 3 would go low - the buzzer would be silenced - and the entry timer would cease to run.

          ==============

To prevent this from happening - pin 3 must override the trigger switches - and force pin 1 to remain low.

It does this by taking pin 5 high.

When it takes pin 5 high - pin 4 has to go low. See the truth table.

Pin 4 takes pin 1 low through R7.

R9 is already holding pin 2 low.

And since both pins 1 and 2 are now low - pin 3 will remain high.

          ==============

Now - Pin 3 no longer needs an input from the trigger switches.

By taking pin 5 high - pin 3 has latched itself on.

It makes no difference whether the switches are open or closed - pin 3 is high - and it will remain high.

          ==============

Pin 3's second job is to sound the entry buzzer.

When it goes high - current from pin 3 flows into the base of Q1.

It flows through R4 and - in the reverse direction - through Z1.

This switches the transistor on.

Q1 connects the negative lead of the buzzer to ground - and the buzzer sounds.

          ==============

Pin 3's third job is to charge C4 through R8.

While pin 3 is low - it holds pin 8 low through D4 and R5. It also keeps C4 discharged.

When pin 3 goes high - it slowly charges C4 - through R8.

This is the entry delay.

Depending on the setting of R8 - the entry delay will last up to about 60-seconds.

During this time - you will normally move Sw1 to the off position.

If you fail to do so - when the voltage on C4 reaches just over half the supply voltage - it will take pin 8 high and trigger the siren output.

          ==============

Gates 3 & 4 control the relay.

They are wired together to form a monostable.

If you'd like a detailed account of how a monostable works - click on the link below the circuit diagram.

Basically - a monostable will provide an output for a certain length of time - and then switch itself off.

          ==============

When C4 takes pin 8 high - pin 10 will go low.

Because C6 is discharged - pin 10 takes pin 12 low - through the capacitor.

And - since pins 12 & 13 are now low - the gate 4 output - at pin 11 will go high.

Pin11 will remain high until C6 charges through R14.

Depending on the setting of R14 - pin 11 will remain high for up to about 20-minutes or so.

          ==============

When pin 11 goes high - it supplies base current to Q2 through R10.

This switches the transistor on.

Q2 connects the negative side of the relay coil to ground.

This causes the relay to energize

And when the relay contacts close - they supply power to the siren.

          ==============

When the monostable triggers - C6 begins to charge through R14

This is the siren cut-off timer.

When the voltage on C6 reaches just over half the supply voltage - it will take pin 12 high.

Since one of its inputs is now high - the output at pin 11 will go low. See the truth table.

When pin 11 goes low - the Q2 base current ceases.

So the transistor will switch off - the relay will de-energize - and the siren will be silenced.

          ==============

A similar thing happens when you switch the alarm off.

When you move Sw1 to the off position it takes pin 13 high through R12 and D6.

Since one of the gate 4 inputs is now high - the output at pin 11 will go low. See the truth table.

So Q2 will switch off - the relay will drop out - and the siren will be silenced.

In other words - you can stop the noise at any time by switching the alarm off.

          ==============

The green LEDs will tell you if there's a problem with the trigger circuits.

While the normally-closed loop is closed - LED 1 will light.

If LED 1 is not lighting - at least one of the normally-closed switches must be open.

          ==============

While the normally-open switches are open - current through R2 & R3 will light LED 2.

The normally-open switches connect the junction of R2 & R3 to ground.

So the switches will divert the R2 current to ground - cutting the supply to R3 and LED 2.

If LED 2 is not lighting - at least one of the normally-open switches must be closed.

          ==============

If both of the green LEDs are lighting - it's safe to switch the alarm on.

When you switch the alarm on - the red LED will light.

The red LED is there to provide a visual indication that the alarm is set.

          ==============

When the alarm is activated - and the siren sounds - pin 10 goes low.

It goes low because pin 8 is high. See the truth table.

Pin 10 does 3 jobs.

It provides a path to ground for the yellow LED - so the yellow LED will light.

When you return - if the yellow LED is lighting - you'll know that there's been an activation.

          ==============

Pin 10 also switches off the buzzer.

It does so by diverting the Q1 base current to ground - through D2.

          ==============

There's a small voltage drop across D2 - about 0v7.

There's also a certain amount of internal resistance at the gate 3 output - typically about 200 ohms.

These two factors prevent pin 10 from connecting R4 directly to ground.

So when pin 10 goes low - there'll still be a volt or two at the junction of R4 and D2.

This would be enough to keep Q1 switched.

But, the zener diode increases to about 6-volts - the voltage required to switch the transistor on.

So - when pin 10 takes the junction of R4 and D2 down to a volt or two - Q1 will switch off.

          ==============

Pin 10's third job relates to the expansion modules.

They create an instant alarm by quickly charging C4 and taking pin 8 high directly.

If you like - they bypass the entry delay.

          ==============

However, this means that the exit entry zone hasn't activated - so pin 3 is still low.

Pin 3 would quickly discharge C4 - through D4 and R5.

This would allow the instant zones to trigger the alarm repeatedly. See the link below the circuit diagram.

          ==============

When pin 10 goes low - it takes pin 1 low through D5. So pin 3 goes high.

In effect - pin 10 is acting like one of the normally-open trigger switches.

When it takes pin 1 low - it triggers the exit/entry zone - and pin 3 goes high.

This cuts off the C4 discharge path through D4 and R5 - and so prevents the repeated triggering of the alarm.

          ==============

D2 and D5 allow pin 10 to take both R4 and Pin 1 low - without connecting them together.

They also prevent both R6 - and a high pin 10 - from sounding the buzzer and taking pin 1 high.

D3 allows a normally-open switch to take pin 1 low - but it prevents R2 from holding pin 1 high.

If R2 were holding pin 1 high - pin 4 wouldn't be able to take it low.

          ==============

Some expansion modules are connected to the "off" terminal.

D6 prevents C5 from charging rapidly through the expansion modules.

Instead - it has to charge slowly - through R9.

          ==============

When Sw1 is moved to the "off" position - it discharges C5 rapidly - through R12 and D6.

This resets the exit delay - and the alarm is ready for immediate re-use.

R12 limits the peak discharge current through Sw1 and D6.

          ==============

When Sw1 is moved to the "off" position - it takes pin 2 high.

So pin 3 will go low - and C4 will discharge rapidly into pin 3 - through D4 and R5.

This resets the entry delay - and the alarm is ready for immediate re-use.

R5 limits the peak discharge current through and D4.

          ==============

Without D4 - there would be no entry delay.

D4 allows a low pin 3 to discharge C4 rapidly.

But it prevents a high pin 3 from charging C4 rapidly.

Instead - a high pin 3 has to charge C4 slowly - through R8.

          ==============

Relay coils and some Sounders produce large reverse voltage spikes that will destroy Cmos ICs.

D1, D8 & D9 short circuit these spikes at source - before they can do any damage.

          ==============

D7 & R11 are there to sharpen the point at which the relay drops out.

Although Cmos 4001 gates are digital devices - there are times when they behave like analogue devices.

When timing components are used - the voltage on the inputs rises and falls slowly.

It may hover around the gate's switching point for a significant period of time.

During this period - the output voltage will rise or fall in an analogue manner.

          ==============

This means that any device connected to the output will switch on or off - slowly.

The effect is particularly noticeable where the timer circuit is set up to provide long delays.

It can cause relays to rattle - and buzzers to fade in and out slowly.

To prevent this from happening - we need a little positive feedback.

          ==============

As C6 charges through R14 - and pin 12 starts to go high - pin 11 begins to go low.

As pin 11 starts to go low - Q2 begins to switch off.

As Q2 starts to switch off - the voltage on its collector begins to rise.

As the voltage on the Q2 collector rises - it charges C6 through R11 and D7.

This speeds up the rate at which C6 charges.

          ==============

In other words - R11 & D7 create an avalanche effect.

Once Q2 starts to switch off - R11 & D7 push it over the top.

At the last minute - they take over from R14 - and rapidly complete the charge of C6.

This causes the relay to drop out quickly and cleanly.

          ==============

I specified a relay with a minimum coil resistance of 270 ohms. Use a higher value if you wish.

With a 12-volt supply - the maximum current through Q2 will be about 45mA.

This is well within the limits of the BC547 - which has an IC(max) of 100mA.

          ==============

There is nothing special about the transistors.

Any small NPN transistors - with a gain (hfe) greater than 100 and an IC(max) of at least 100mA - should do.

But remember that the pin configuration of your transistors may be different from that of the BC547.

          ==============

The wires going to the doors and windows act like radio antennas.

They pick up interference that could cause false alarms.

C1 and C2 short circuit the high frequency signals to ground.

C3 does a similar job for the power leads.

          ==============

It's only when the relay is energized - and the siren is sounding - that any real current is required.

The actual current consumption depends on the sounder you use.

A conventional bell uses up to about 400ma. An electronic siren generally uses less.

          ==============

No comments:

Post a Comment