You are on page 1of 8

Homemade Alarm System with PIC16F84A

This is a simple Alarm System with some extra functions. You can connect to this device, a cell phone and different types of sensors. For this circuit you must have a PIC programmer. You can find a PIC programmer circuit, on my webpage. Components: 1 pcs: Motion or smoke detector 1 pcs: Alarm siren (+12V) 1 pcs: Old cell phone with speed dial function U1 U2 U3 Y1 C1, C2 C3 C4 R1 R2, R3, R4, R5 (5pcs), R6, R7 R8 POT1 D1, D2, D3, D4, D5, D6, D7 D8 (2 pcs) PIC16F84A microcontroller 7809 regulator (+9V, only for smoke detector) 7805 regulator (+5V) 400khz ceramic resonator 33pF ceramic capacitor 33nF ceramic capacitor 470uF/25V 10k 750 4,7k 750 750 3,9k 1k LEDs LEDs LEDs 1N4148

Some Rights Reserved http://creativecommons.org/licenses/by-nc-sa/3.0/ CyberElectronics

ISO1, ISO2, ISO3 TLP621 optoisolators T1 BC237 T2 BD139 T3 C546 SW1(PS), normal switch (2 pos.) SW2(PS), normal switch (2 pos.) SW3(PS) normal switch (2 pos.) SW1 SW12 push buttons (keyboard) J1 J7 connectors Description: SW1(K) system power ON switch SW2(K) smoke detector switch SW3(K) laser barrier switch J1 cell phone (connector) J2 motion detector (connector) J3 smoke detector (connector) J4 alarm siren power supply (connector) J5 laser diode power supply (connector) J6 fotodiode sensor (connector) J7 smoke detector power supply (connector) D1 D2 D3 D4 D5 D6 D7 Alarm indicator (LED Red) Keyboard pressed indicator (LED Green) Disarmed mode indicator (LED Green) Armed mode indicator (LED Red) Motion indicator (LED - Red) Smoke indicator (LED - Red) Laser Barrier indicator (LED - Red)

Some Rights Reserved http://creativecommons.org/licenses/by-nc-sa/3.0/ CyberElectronics

J4 Alarm PS

PS +12V

J7- PS SD

Cell Phone
D1

D2 J2, D5 J3, D6

D3

D4

J5 PS Laser

J6, D7

Fig.1

Some Rights Reserved http://creativecommons.org/licenses/by-nc-sa/3.0/ CyberElectronics

+5V

PIC16F84_P U1 3 SW1 1 SW2 2 SW3 3 1 2 3 4 5 6 7 8 9 10 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 R2 R3 R4 750 750 750 +5V SW10 * SW11 0 SW12 # TELEFON J1 2 1 ISO1 OPT R6 750 R5 D1 5x750 LED ALARMA 2 2 1 BD139 T2 3 3 BC237 D2 LED BUTON RA4/TOCKI

14

VDD

R1 4 15 16 10K

MCLR OSC1/CLKIN RB7 RB0/INT OSC2/CLKOUT RB6 RB1 RB5 RB2 RB3 RB4 RA0 RA1 RA3 RA2 Vss

SW4 4

SW5 5

SW6 6

13 6 12 7 11 8 9

Y1

C1 33n

OSC 400KHz

C2 33n

SW7 7

SW8 8

SW9 9

10 17 18 2 1

+5V J2 ISO2 OPT D5 D6 +12V ALARMA SW2 P. ALIM. SENZOR U2 7809 IN GND 1 OUT 3 1 2 J7 2 1 J4 1 2 1 T1 D7 MISCARE FUM +5V PRAG R7 750 J3 ISO3 OPT +5V 2 D8 2x1N4148 2 1 SENZOR DE FUM 2 1 SENZOR DE MISCARE

ALIM. SENZOR DE FUM C3 33n C4 470uF 2 2

PLASER D3 LED DEZACTIVAT 1 2 J5 3 POT1 10K J6 2 1 ALIM. LASER

3 T3 C546

1 R8 3,9K 2

SW1 PORNIRE 1 2

GND

IN

OUT

+5V

D4 LED ARMAT

U3 7805 1 +12V

2 1 SENZOR LASER

+12V GND

Some Rights Reserved http://creativecommons.org/licenses/by-nc-sa/3.0/ CyberElectronics

We can find two types of Motion and Smoke detectors (with Normally Open or Normally Closed switch).

For Laser Power Supply, we can use this simple circuit (15-20mA)

Some Rights Reserved http://creativecommons.org/licenses/by-nc-sa/3.0/ CyberElectronics

Connecting the Cell phone We need a cheap cell phone, with Speed Dial function. Remove the cell phone cases. Solder two wires to a single push button (0-9) on the phone PCB. Connect the two wires from the phone, to the Alarm system (J1). If the phone doesnt work, when the Alarm is activated, you need to interchange the two wires on J1. Connecting the Laser Barrier Execute this settings in Disarmed mode. You need to mount, the laser pointer and the photodiode in the same case. Connect the laser pointer to the J5 and photodiode to J6. Place a mirror on the front of the laser, and direct the laser beam, back to the photodiode. Programming the microcontroller Write the included .hex file into the microcontroller with the following fuse bits settings: Oscillator: XT Watchdog Timer (WDT): Disabled Power-up Timer (PWRT): Enabled Code Protect (CP): Off A simple, serial PIC programmer, working with IC-Prog software: PIC-programmer: http://www.jdm.homepage.dk/newpic.htm IC-Prog: http://www.ic-prog.com/index1.htm

Some Rights Reserved http://creativecommons.org/licenses/by-nc-sa/3.0/ CyberElectronics

System Power Up:


Connect all power supply, sensors and alarm siren to the system (like in the Fig.1) Now turn On the system with SW1. In 1 minute, the system will be in Armed mode. Until then D2 and D3 will be ON, D4 will turn ON/OFF in every second. After 1 minute, D2 and D3 will go OFF and D4 ON (System Armed). Now you can Deactivate the system, introducing the PIN number (first PIN 1 1 1 1) Activating the system You can activate the system, from Disarmed mode, using the SW10( * ) push button (D3 gleaming 15 seconds, then system will be activated). Deactivating the system You can Deactivate the system, introducing the PIN number (you have 10 seconds, before the system activate the Alarm and the cell phone) If somebody introduce a wrong number, the system will be in Alarm mode instantly. You can clear the first three numbers, anytime, using push button SW10(*). PIN number change In Disarmed mode, using the push button SW12 ( #), you can change the PIN number (D3 and D4 ON, while you introduce new PIN number). You can exit from the PIN change mode, anytime, using push button SW10(*) (before introducing, all 4 numbers).

Some Rights Reserved http://creativecommons.org/licenses/by-nc-sa/3.0/ CyberElectronics

Alarm System video


http://www.metacafe.com/watch/1018992/homemade_alarm_system_with_cell_phone/

Good Luck !!!

!!! Danger !!! Laser Radiation


Do not direct them towards other people !!! Never look directly into a laser beam !!! Build and/or use at your own risk !!!

Some Rights Reserved http://creativecommons.org/licenses/by-nc-sa/3.0/ CyberElectronics

You might also like