You are on page 1of 7

DILSHAN R JAYAKODY (jayakody2000lk@gmail.

com)
Colombo, Sri Lanka

In this project we design low cost high performance SYSTEM FEATURES


programmable home security system using few LDR’s
as an input sensors. When above sensor(s) get  Touch tone phone dialing interface
triggered system may dial the user specified phone  5W High powerful audio alarm
number (using build-in DTMF generator) and activate
the high power audio alarm and lights. All the  2 sensor interface with separate
parameters of DTMF generator, audio alarm and light sensitivity adjustments
interface are programmed through the RS232 serial  Programmed through the RS232
interface.
interface
Current firmware of this system presents interactive
 Build-In intelligent light ON/OFF switch
control system through the RS232 interface. This
control system consist with the menu driven
configuration options, self tests, system report
tone generator and µPC2002 as a speaker driver
generators, etc.
(audio amplifier). LM7805, LM7812 and LM317
This system also contain 5W (with 4Ω speaker) audio voltage regulators are used to obtain +5V, +12V and
alarm with three selectable tone configurations, +3V respectively.
which include Police siren, Fire engine siren and
Ambulance siren. Assembly

Integrated Circuits The PCB design given with this article makes the
assembly much simpler. As PCB contain 230V AC
This system uses a Microchip’s PIC16F877A as a main main lines care must be taken while assembling the
controller, LM339 as sensor interface, UM3561 as a circuit. As shown in the fig.1 all the photoelectric
This work is licensed under the Creative Commons
All the software and firmware programs are All the schematics, PCB designs and other Attribution-ShareAlike 3.0 Unported License. To view
distribute under the terms of documents are distribute under the terms of a copy of this license, visit
http://creativecommons.org/licenses/by-sa/3.0/ or
send a letter to Creative Commons, 171 Second
Street, Suite 300, San Francisco, California, 94105,
USA.
RS232 Serial Interface Connector
DC Power Input (18V) PHONE / LINE Connector
Program/Run switch connector

3V LASER Light Supply Line

Reset switch

Tone Selector

Phone dialer enable switch

Beeper Alarm Volume Control

Environment Sensor Alarm Audio Output

Connector for Sensor 1 230V Light connector

Connector for Sensor 2 Status indicator

Fig.1 - Connectors, Jumpers and other controls of the Programmable Home Security Alarm System

sensors, some of the switches and alarm speaker are system. This button enable only when the audible
connected with the circuit through the connector alarm get activated. It is not possible to use this
bars. function at the phone dialing/ringer states.

External connectors and controls Phone dialer enable switch : Turn on this switch to
enable the phone dialing feature of this system.
DC Power input : Attach DC power supply with 18V -
25V (2A Max.) output. Environment Sensor : In-circuit LDR to detect light
conditions of the environment.
RS232 Connector : Connect RS232 serial cable to the
port to configure the system. Do not use RS232 Null Alarm Volume Control : Use this to control the
Modem cable with this port. output power (volume) of the audible alarm.

PHONE/LINE connector : Attach standard RJ12/RJ11 230V Light connector : Attach 230V AC light (or
telephone cable connector to this port. One port is related peripheral) to these terminals.
need to use with the phone line and remaining port is Tone Selector : Configure the master alarm tone
for the phone (and it is optional). from this jumper as follows,
3V LASER supply : 3V supply line for LASER diode 1—2 : Fire Engine Siren
assembly. 2—3 : Ambulance Siren

Connectors for Sensor 1/2 : Attach high sensitive Open : Police Siren
LDRs for these ports. To get the maximum sensitivity (Do not connect jumper terminal 1—3, this
it is recommended to use EG&G VACTEC LDRs. combination may permanently damage the entire
Status Indicator : Indicate run, program and sensor system)
trigger modes. Beeper : Produce beeps (e.g: at the input error, etc.)
Reset Switch : Press this button to reset entire alarm
Program / Run Switch connector : Attach switch to
this header to select Program or Run mode.

Alarm Audio Output : Attach 8Ω (8W) or 4Ω (10W)


speaker to this connector.

Calibration and Testing


Once everything is assembled take following steps to
calibrate the system,

1. Remove IC1, IC2, IC3 and IC4 from the IC bases.


2. Apply 18V ( to 22V Max.) DC source to the power
connector (J3). Fig.2 - DTMF output generated by the system at the
testing stages. (Test points : TRN1 input terminals)
3. Check the voltage between Pin12 (GND) and Pin3
of IC2. It need to be 4.8V - 5.1V DC.
X2 connectors.
4. Check the voltage between GND and E$4 jumper.
11. Press “3” and execute “Self Test”.
It need to be 11.7V - 12.3V DC.
12. Adjust R4*, R6* and R8* preset controls, if the
5. Check the voltage between Pin1 and Pin3 (GND)
sensors are not trigged as expected.
of JP1. It need to be 2.5V - 3.1 V
13. Adjust R11 preset to control the “Day” and
6. If all the above Step 3, 4 and 5 are correct,
“Night” mode detection.
disconnect the power supply and insert IC1, IC2,
IC3 and IC4 in to the appropriate IC bases. Attach 14. Open the Jumper J2 and press 5 to return to the
suitable speaker to the X4 and connect RS232 Run mode.
cable to the system. 15. Shutdown the power supply and disconnect the
7. Close the jumper J2 (Program Mode) and power RS232 cable.
on the system.
8. Download and install PuTTY on to the target
computer and setup the “Serial” connection with
9600 baud rate (see Fig. 3).

RS232 Configuration settings for


Programmable Alarm System
 Speed (baud) 9600

 Data bits 8

 Stop bits 1

 Parity OFF

 Flow control XON/XOFF

9. Press “2” and enter into the “Parameter Setup”


mode. Configure all the parameter options with Fig.3 - PuTTY configuration setup for Programmable
the appropriate settings. Home Security Alarm System

10. Attach phone line to the PHONE/LINE connector


and fix photoelectric LDR sensors to the X1 and
* R6 - X1 sensor sensitivity, R8 - X2 sensor sensitivity,
R4 - sensor gain controller (Common mode)
Parts List

C1, C18, C19 0.1µF (25V) IC1 PIC16F877A

C2, C3 10pF IC2 LM339N

C11 0.22µF (100V) IC3 MAX232

C16, C17 0.33µF (50V) IC4 UM3561

C4, C5, C6, C7 1µF (50V) IC5 µPC2002 / TDA2002

C13, C14 1µF (100V) IC6 7805TV

C9 10µF (35V) IC7 7812TV

C10 1000µF (35V) IC8 LM317

C12 220µF (35V) D1 1N4004 Diode

C20 100µF (35V) D2 1N4148 Diode

C21 470µF (35V) C8 VE09-0151 MOV


R1, R2, R3, R1, R19 10K T1, T3 2SC945
R5, R7, R9, R10 22K T2 2SD400
R12 68K Q2 BS170
R13, R14 2.2K Q3 IRF9640
R15 330K Q1 20.00MHz Crystal
R16, R20 1K R4, R8 30K (LIN) Potentiometer
R21, R22, R42 330Ω R6 20K (LIN) Potentiometer
R23, R24, R25, R26, 100Ω R11 50K (LIN) Potentiometer
R27,R28, R29, R30 R18 50K (LOG) Gang Potentiometer
R31, R32, R33, R34, 220Ω
L1 4.8 µH Inductor
R35, R36, R37, R38
LDR1 VT90N2 LDR
R39, R40, R41 47K
LD1 5mm Tri-Color LED
R43 240Ω (0.5 W)
JP1 3 Pin Jumper Header
TRN1 600Ω : 600Ω isolation
transformer J1 Tyco Electronics 2RJ11-6L-B

SG1 F/QMX Buzzer J2 1X2MTA header

RL1 SHINMEI RSB-5-S Relay J3 DCJ0303 DC Jack connector

RL2 FANGKE JZC-23F 12V Relay X3 H3M09RA D-SUB9 connector


(220V 5A) X1, X2, X4, X5 Phoenix 350 connector
S1 B3F-10XX - push on switch SPK 8Ω (8W) or 4Ω (10W) Speaker
S2 M251 SPDT micro switch

All the resistors are 1/4W unless otherwise specified


0.1MFD (25V)
DIAL MODE SWITCH
+5V +5V +5V S2 +5V +5V

47K
R41
R4, R8 - SENSOR GAIN D2
GND 1 1N4148DO35-10

C1
2
3
68K SG1
BEEPER

22K
7 IC2B 9 IC2C STATUS LED

R5
R12
SENSOR 0 1 14 F/QMX

10K

10K

10K

green
LD1
6 8 - +

R3

R2

R1

+5V
LM339N GND GND LM339N
IC1 CB1

32
11
20K LIN

30K LIN
SENSOR INPUTS
VDD

red
2 2 1
330R
MCLR/THV
40

R6

R4
R21

SYS. GAIN
PGD/RB7 CB5

1
2 39
3
RA0/AN0 PGC/RB6
38
330R
RA1/AN1 RB5

+5V
GND 5 IC2A 4 37
RA2/AN2 RB4 CB4 R22
SENSOR 1 2 5 36
RA3/AN3 PGM/RB3
4 6 35 1MFD/50V GND GND
RA4/T0CKI RB2
LM339N 7 34
RA5/AN4 RB1

30K LIN
8 33 IC3 C6 C7

3
RE0/RD/AN5 INT/RB0
2 9 C4 1
RE1/WR/AN6 C1+

22K
1MFD/50V
R7

R8
10 30 2
RE2/CS/AN7 PSP7/RD7 1MFD/50V V+

1
29 3
PSP6/RD6 C1-
+5V 13 28 6
OSC1/CLKIN PSP5/RD5 V- D-SUB9-H3M09RA
GND GND 14 27 4

20.00MHz
IC2D OSC2/CLKOUT PSP4/RD4
C5 C2+ X3-1
11 15 26

2
22K RC0/T1OSO RX/RC7 X3-5 X3-6
13 16 25 5
RC1/T1OSI TX/RC6 1MFD/50V C2- X3-4
10 17 24
R9 RC2/CCP1 SDO/RC5

Q1
LDR1

1
LM339N 18 23 11 14 GND
RC3/SCK SDI/RC4 T1IN T1OUT
19 22 SERIAL BUS 10 7
+5V RD0/PSP0 RD3/PSP3 T2IN T2OUT X3-2 X3-7
20 21 12 13
RD1/PSP1 RD2/PSP2 R1OUT R1IN X3-8
ENV. SENSOR C3 C2 9 8
X3-3
VSS 47K R2OUT R2IN
50K LIN

CB0
10pF 10pF

31
12
PIC16F877P MAX232 SERIAL OUTPUT
3

22K
R10

R39
2
1
2
47K

CB3
R11

GND GND
S1

1
1

R40 GND TONE SELECTOR


1 JP1
3
4
ENV. SENSOR GAIN MODE SELECT SWITCH
GND GND 2 1 - 2 : FIRE ALARM

J2
3
CONTROL BUS GND 3 - 2 : AMBUL. ALARM
ALARM RESET SWITCH OPEN : POLICE ALARM
CB3 CB0 +3V
2RJ11-6L-B CB6 CB7 CB2 CB2
RL1

GND
TELEPHONE INPUT/OUTPUT

6 10K
D1

+5V +12V IC4


5
C1 6 3
2.2K
R13
4 SEL1 OUT R17

R20

R16
RL1 RL2

1K

1K
TRN1

2.2K
R14
3 330K

K1

K1
RSB-5-S JZC-23F
N1

L1 Q2 1 7
2 SEL2 OSC1
H1 BS170
1
C8 R15
L2 8
J1-2 OSC2
K2

K2
H2 M1
MOV 221 T1 T2 5 2
2RJ11-6L-B VDD VSS
RL1

DC1 M2 2SC945 2SD400


6
D2

5 TPTRANS R18 UM3561


C2
DAC_BUS
4 50K LOG POT
3
N2

2
1 MASTER ALARM VOLUME
+12V +5V
J1-1 GND GND GND GND
PAD1 230V / 5A MAX. LOAD
LIGHT INPUTS

10MFD/35V

ALARM AUDIO OUTPUT


RL2

1000MFD/35V
12 3
1MFD/100V
C13

WIREPAD3,17/1,3
O1

C14 C9
PAD2 P1 15 16

IC3P
1MFD/100V GND VCC

10K
R19
S1

WIREPAD3,17/1,3

C10
GND GND Q3 1 IC5 GND +
IRF9640 4
T3 2
DC0 C11
DC7 2SC945 UPC2002

220MFD/35V
3
R31

R32

R33

R34

R35

R36

R37

R38
220R

220R

220R

220R

220R

220R

220R

220R

0.22MFD/100V
IC5 - HEAT SINK REQ.
GND
4R SPEAKER

C12
100R 100R 100R 100R 100R 100R 100R 100R
2 4.8uH 1
R23 R24 R25 R26 R27 R28 R29 R30
GND IC8 - HEAT SINK REQ.
IC6 - HEAT SINK REQ. IC7 - HEAT SINK REQ. L1

LASER POWER OUTPUT


+3V
GND GND
DC - INPUT (15V - 25V)

IN OUT
IC6 IC7 ADJ +3V
7805TV 7812TV 0.1MFD (25V) IC8

R43
240R
1 3 1 3 LM317

+
VI VO VI VO
C19
J3 1 C16 GND C17 GND C20
C21 0.1MFD (25V)
2

2
R42
330R

3 D1 0.33MFD/50V 0.33MFD/50V 100MFD/35V


1N4004 470MFD/50V +5V C18 +12V

GND GND
J3
S1

C21
1 2

SG1
E$4
2 1
S2 3 4

470MFD/50V

D2

LDR1
F/QMX
E$3 E$2 D1
1 2 3 1 2 3

N1
IC7
C18 IC6 1N4004
R9 7812TV 7805TV
22K 0.1MFD (25V)

1N4148DO35-10
47K
47K
22K

R41
R40
C17
C16

R11 R10
0.1MFD (25V)

N2
C1
R12
68K E$13
E$11
50K LIN E$12

0.33MFD/50V
0.33MFD/50V

X1
N$21

1MFD/50V
C6
LM339N N$20
MAX232

IC2
X3

E$17
IC3

1751248
R4
R7
E$10

R39
X2
D-SUB9-H3M09RA

22K
47K
E$16

30K LIN
1MFD/50V
C7

22K C4 C5
R5 1MFD/50V 1MFD/50V

1751248
R6
R38

R8
30K LIN
220R

20K LIN
E$9 R37

LD1
R22 220R
330R R30
R21 E$15
N3

100R
330R E$14
J2 R36
220R

100R

PAD2
R29
RL2 R35
E$5
220R
R14

JZC-23F
2.2K

PIC16F877P R28
100R

PAD1
IC1

R34
220R
E$19
T2
N1

20.00MHz E$6
E$18 100R
10K R33 R27
2SD400 R1 220R
R20
N2

10K Q1
T3 1K R2 10pF C2 R26
10K 100R
R3 C3 10pF R32
2SC945 220R
N3

E$8 100R
1000MFD/35V R31 R25
100MFD/35V

C20

C19
220R
R19
10K
R13

R24
C12
2.2K

0.1MFD (25V) 100R


Q3
IRF9640

C10 T1
1K
R16

C11 100R
E$7

R23
R15 A O I
R43

0.22MFD/100V 330K IC8 1MFD/100V


2SC945 1MFD/100V
240R

220MFD/35V

E$20 LM317 R42


C14 C13
Q2

C9 330R
IC5
BS170

10MFD/35V TPTRANS
UM3561
IC4

L1
1

UPC2002
JP1
MOV 221

C8

R17
3

4.8uH E$1

10K
RSB-5-S
2RJ11-6L-B

1751248 R18 1751248


J1
N$25

TRN1
X4
X5

RL1
50K LOG POT

You might also like