You are on page 1of 3

PIC ALARM PROJECT

INTRODUCTION:

This project was developed for a colleague of mine,


Simon Nicholls who wanted to develop the basic 555
monostable commonly used for a simple alarm circuit. He
wanted to develop a Movement Alarm with more timings,
ie an entry and exit time facility. This can be done by
utilising the "reset" input of the 555 but I have found this to
be frustratingly inconsistant in timing and reliability. So a
low end PIC was used with a simple common program
with set timings..

To give some variations on the timings I have written


software that students can use to alter the EXIT, ENTRY,
and ALARM durations to suit their individual application.
An animated flow chart also simulates the operation of the
program inside the timer.

DESCRIPTION:

This project is a development of a basic 555 alarm circuit. The


difference is that a PIC has been used to give more functionality.
The PIC is an 8pin 12F629 with a standard program producing the
following timings:

The LED and socket are


Exit time: 20sec This is the time you have to exit before the
attached to the underside of the
alarm becomes armed. The LED flashes long
PCB and used as a means of
pulses until exit time over then short pulses
securing it in place. The nut
showing the alarm is now armed
threaded onto the socket
Entry time: 10sec When triggered, this is the time you have to combined with the LED mounting
disable the alarm before the sounder is is enough to secure the PCB to
activated. LED flashes long pulses to show its the case especially if an LED
been triggered holder is used.
Alarm time: 30sec Time the sounder is activated for before the
alarm resets. If the alarm is triggered again then
the cycle repeats.
While the alarm is armed the LED flashes very brief pulses to
conserve power. However if the alarm has been triggered and
reset, the LED will remain on all the time to acknowledge the
intruder. The sounder is a PCB mount beeper which provides a
surprising amount of sound for its size at 25mA. If you want to drive
something more powerful, you must use a transistor driver as the
PIC can only manage 25mA output current. Any demands above
this can cause the microcontroller to lock up.
The power switch is a 2.5mm
THE TRIGGER SWITCH
jack socket with the two end
terminals bent out to be soldered
to the board. To deactivate the
The trigger switch is a movement sensor
made from a length of thin gauge tinned
copper wire wound around a thin rod of
about 2-3mm. This is then soldered to the
pad on the PCB at one end with the other
end in line with the second pad. A blob of
solder on the other end acts a weight for the alarm, simply insert a 2.5mm
switch. Finally the coil is bent in such a way plug into the socket.
that blob of solder is a millimetre or two
above the pad thus any movement will
cause it to touch the pad and trigger the
alarm. Tinning both plates first with solder
will prevent the copper oxidising.

CIRCUIT DIAGRAM:

A very basic circuit thanks to the versatility of the PIC. The power supply is from a PP3 9 volt battery. The supply is
dropped to around 6 volts by using a 3.9 volt zener diode in series.

The case is vacuum formed around a set size mould with


Details of the holes for the LED and socket are shown be
some form of logo or design on the front using relief. This
and should be followed fairly accurately - although by ben
cover is placed over a base made from 6mm MDF. A battery
the legs of the LED give some margin for error. Note that
holder made from 3mm acrylic shaped using a strip heater
LED and switch-socket act as the mounting for the PCB.
makes a good battery holder.

You might also like