Home > Group Projects > PIC Alarm Project
UPDATED:.12:22 01 December 2013

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:

Exit time: 20sec This is the time you have to exit before the alarm becomes armed. The LED flashes long pulses until exit time over then short pulses showing the alarm is now armed
Entry time: 10sec When triggered, this is the time you have to disable the alarm before the sounder is activated. LED flashes long pulses to show its been triggered
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 TRIGGER SWITCH

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 switch. Finally the coil is bent in such a way 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.

The LED and socket are attached to the underside of the PCB and used as a means of securing it in place. The nut threaded onto the socket combined with the LED mounting is enough to secure the PCB to the case especially if an LED holder is used.

The power switch is a 2.5mm jack socket with the two end terminals bent out to be soldered to the board. To deactivate the alarm, simply insert a 2.5mm plug into the socket.


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.

PCB LAYOUT:

PCB size - 48x32mm

The switch is connected to the 2 large pads. In the original design, a movement switch was made from wire and solder, but any non-mercury movement switch can be connected.


The case is vacuum formed around a set size mould with some form of logo or design on the front using relief. This cover is placed over a base made from 6mm MDF. A battery holder made from 3mm acrylic shaped using a strip heater makes a good battery holder.

Details of the holes for the LED and socket are shown below and should be followed fairly accurately - although by bending the legs of the LED give some margin for error. Note that the LED and switch-socket act as the mounting for the PCB.

SIMULATION SOFTWARE:

This piece of software is optional and allows students to set their own timings for Exit, Entry and Alarm duration.
There are 2 versions available.

The full version will allow students to alter timings, view operation using an animated flow chart and compile a HEX program for programming the PIC.
This is available from our shop.

The evaluation version is the same without the option to compile.

RESOURCES:

Step-by-step making plan for assembling components onto the PCB using PowerPoint - 1MB
Sheet of 25 PCB's with text boxes to add students names, ready for Photo-etching process - 41KB
For pre-programmed PIC's then please see our shop. Sold in batches of 1 or 10.
ALARM EDITOR software - for editing and generating the hex program for the IC. You will need a PIC programmer - 1.5MB
EDUTEK LTD.
22 STROUD LANE,
BOURNEMOUTH.
DORSET, BH23 3QU
Tel./Fax: 01202 474720
Tel: 07714 096258

Contact us by email.
www.edutek.ltd.uk - Working Electronics For Students & Teachers