Uploaded by military1944

alarm

advertisement
SHED GUARD
by
Ben Nock
Being one of those people who just hates to throw anything away it was while sorting through some
boxes I found a Passive Infra Red (PIR) unit. I had acquired this unit some time ago, ideal for a
swish alarm system I had thought. It was duly 'stored' away in that box and quickly forgotten about.
Another project bit the dust.
Even though I was trying to clear some junk and clutter I couldn't bring myself to bin the unit
right away. I'll test it first I thought, if it's not working then in the bin it goes. This particular PIR,
Fig. 1, was the type where the front, housing the actual detector, pulled off leaving the bit that wall
mounted and a small circuit board. This board housed the relay and block connector for wiring into
an alarm system. Reconnected I applied 12v to the unit and the little red led on the front lit up. I put
the Avo meter switched to the Ohms range across the output terminals.
After a short period the led went out and the contacts went short circuit. I moved in front of the
unit and the led came on and the output contacts went to open circuit. After a short wait off went the
led and the contacts closed again. Blast, the unit was working fine. Now I couldn't really throw it
away. I decided to get on and build that alarm system after all, something not quite so grand as first
envisaged but something ideal for the shack or shed.
Design Requirement
The first task in any project is to draw up a list of objectives, things the project should do. The PIR
unit on its own could not be used as the alarm, extra circuitry was needed for things like exit delay
and timing and driving the alarm sounder.
Exit delay is needed as you need to be able to turn the alarm on from within the secure area, leave
and close the door and then have the alarm activated. Timing of the alarm is needed to ensure the
alarm goes off after a period of time and resets, if a further activation is detected the alarm goes off
again. To make the project slightly more versatile the alarm drives a relay, this can then be used to
sound a bell, flash lights, etc to suit the builders needs.
Circuit Design
The circuit diagram for the completed alarm is shown in Fig. 2, and I will now detail the operation
of the various stages. A simple choice for the timing control is to use a type 555 integrated circuit in
a monostable configuration. In this circuit a small negative pulse, called the trigger, or drop in
voltage applied to a certain pin will start the 555 timer, the output pin of the 555 will go to a high
state and remain there for a period set by the choice of a resistor and capacitor in the circuit.
After this time period the output falls to a low state. This high and low state, or in reality a high
or low voltage level, can be used to switch on and off a transistor that drives the output relay.
Assuming the circuit is powered from around 10v or so this high state simply means the output of
the chip rises to near the full supply voltage, 8v or so, measured against ground. A low state means
the output will be near the zero volt level. This change in voltage level can be used to turn on or off
other chips or transistors, in effect making an electronic switch.
The output of this particular PIR is short circuit or low resistance when at rest, when motion is
detected the internal relay opens and the output goes to high resistance. It is done this way so that if
anyone, the intruder, simply cuts the wires then the alarm state is also activated. As the trigger input
to the 555 requires the opposite transition, i.e. the triggering pulse needed to go from high to low, a
transistor needs to be included between the PIR and the 555.
Edge-triggering
There can be some problems with the trigger pulse though. If the trigger input is still less than a
third of the supply volts at the end of the time period the output will remain high until the trigger is
greater than one third. This situation can sometimes occur if the input signal is from an on-off
switch or sensor. The monostable can be made edge triggered though, responding only to changes
of an input signal, by connecting the trigger signal through a capacitor to the trigger input. The
capacitor passes sudden changes, the pulse, but blocks a constant voltage signal. The circuit is
'negative edge triggered' because it responds to a sudden fall in the input signal.
Reset
Pin 4 on the 555 is called the reset pin. There could be a situation where false activation of the
alarm might occur so to eliminate that I routed the reset pin to the main on/off switch so that when
the alarm is switched off the timer is also switched off. This will ensure the alarm does not sound
until it is meant to.
Running through the circuit from start to finish then. R1 and the led D1 are used to indicate that
the PIR has set its relay, shown as SW1 on the circuit and that you can now activate the alarm. The
led is mounted so it can be seen from outside the area being protected, either through a window or
by drilling a small hole in the shed wall and pushing the led through until it can be seen from the
outside.
SW2 or switch 2 is the main on/off switch. I suggest either a hidden switch somewhere or one of
those key switches we all used years ago when fitting alarms to our cars. The function of diodes D3
and D4 is to hold the pulse transistor, TR1 and the 555 via pin 4 off until needed. I used a BC109
here but any small signal NPN should suffice. Diode D2 allows the PIR switch to do the same job
until activated.
R3, C1, R4 and D5 convert the opening of the PIR relay to the triggering pulse needed by the
555. The important bit of how long the alarm runs for is controlled by R5 and C2. These are the
timing components for the 555. The time the output of the 555 stays high and thus turns on the relay
transistor TR2 is calculated by the formula T = 1.1 x R x C, where R is in ohms and C is in farads.
The answer to this is the time (T) in seconds.
As an example, lets use a 100k resistor and a 100uf capacitor. So that's 1.1 x 100,000 x 0.0001
which equals 11 seconds. A 220k and a 470uf would give you 113 seconds or just under 2 minutes.
It should be noted though that the maximum reliable time period of a 555 in monostable use is
about 10 minutes due to the accuracy of electrolytic capacitors and their leakage effect.
Bell Ringing
Having chosen your time period the led D6 gives a visual indication of the ON period so that during
testing you do not have to have the alarm actually sounding. The relay transistor, TR2, controls the
relay, RLY, and the choice of device will depend upon the relay used. If you intend to switch
something with high current the relay might be quite beefy so something like a BD131 or such can
be used. If its a small relay requiring less current then a BC109 might suffice.
The circuit is by no means definitive, once you have the second led going on and off at the time
interval required then that signal can be used to drive all sorts of things, high power FET's, other
digital components, etc. The layout of the circuit, Fig. 3, should not cause a problem. Vero board
could be used or a small printed circuit board made. I found a real easy way to make pcb's. I take a
bit of copper clad board and draw the circuit with components life size on the board in pencil. I then
fill in the connections between them, draw over in etch resist pen then cook in the solution. The
components are mounted on the copper side, this saves any drilling etc.
I would suggest though that if your going to use the circuit to protect your shed or such, and that
you may also be operating your ham radio whilst it is on, you use a good screened box for the alarm
and screened leads between the PIR and alarm. If your radio signals do trigger the alarm a few
decouplers, 100nf or such, across the supply and PIR leads might do the trick.
Once you have the circuit built and installed the operation would be so. Ensuring the key switch
is closed, the power is applied to the alarm and PIR. You close the shed door and watch for the led
to light up. This means the PIR has settled down and its relay is closed. You can now turn the key
switch. The alarm is armed. If the PIR detects motion, the relay opens, the 555 is triggered, the
alarm relay closes and the siren sounds. The 555 will not re-trigger until the timed period is up.
At the end of the bell ringing if the PIR has detected no further movement its relay will be closed
and the alarm will be off. If the PIR detects further movement the alarm will sound for another set
period, and so on. Turning your key switch will kill the alarm and reset things.
Extra Coverage
Once built you can increase the area or even number of rooms covered by the alarm by wiring
further PIR detectors in series. Fig. 4 shows 4 PIR units with their switches wired in series then
connected to the alarm. If any one of the detectors sees movement it will trigger the system. Each
PIR will need a 12v supply or such so you will need a length of 3 core cable between each unit. One
note though. In the PIR I have here there was a resistor in series with the relay contacts. I actually
shorted this one out, if connecting several PIR together you will need to do that as well.
Power
You can power the alarm off a suitable 12v mains power unit, the current drawn by the alarm is
quite small but whatever sounder or bell you use might pull a bit more current. You can use a
battery, one of the type used in commercial alarms would be ok, you can then either trickle charge it
or simply connect the charger at regular periods.
While many of the high street cheap shops now sell shed alarms bubble packed I feel this is a
good easy exercise in project building, has a good use and could lead to bigger projects in the
future. Happy building.
Component values
R1, 7
R2,3,4,6
R8
1k
10k
2k7
C1,3
C4
10nf
470uf 25v
D2,3,4,5
D1,6
1N914
LED
Tr1,2
IC
BC109
NE555
R5/C2 to suit
Download