electronics project report of home automation cum building secuirity

37
INTRODUCTION Home Guard The Home Guard is a Home Security cum Automation System. This can be used in home or small Industries for the security and automation. The Project is divided into two sections. 1) Security 2) Automation 1, Security section The security section provides an intruder detection system installed surround the building (four side of the building). Four pairs of IR transmitters and IR receivers are used. From any side an intruder detects an interruption signal generated by the sensor received by the µc and then the µc switches to ON a camera switching circuit. The camera switching circuit is a multiplexer circuit it connected to four cameras in to a single monitor each cameras are connected to the monitor for a 5 to 10 sec. Also the user can select the camera manually. Two alms circuit are also provided one is small beep sound for giving an indication of camera ON. And the other is hooter to 1

Upload: eldhose-george

Post on 15-Aug-2015

41 views

Category:

Education


0 download

TRANSCRIPT

INTRODUCTION

Home Guard

The Home Guard is a Home Security cum Automation System. This can be

used in home or small Industries for the security and automation. The

Project is divided into two sections.

1) Security 2) Automation

1, Security section

The security section provides an intruder detection system installed

surround the building (four side of the building). Four pairs of IR

transmitters and IR receivers are used.

From any side an intruder detects an interruption signal generated by the

sensor received by the µc and then the µc switches to ON a camera

switching circuit. The camera switching circuit is a multiplexer circuit it

connected to four cameras in to a single monitor each cameras are

connected to the monitor for a 5 to 10 sec. Also the user can select the

camera manually. Two alms circuit are also provided one is small beep

sound for giving an indication of camera ON. And the other is hooter to

provide horn for the unauthorized door openings. Proximity switches is

placed on the door to detect the door opening further expansion has been

placed to connect with internet and dial to a telephone while interruption

detects

1

2, Automation sub system

It has two lights can independently programmed to ON and OFF at

predetermined timings. It can be used as a porch light ON - OFF while

absents of members at home.

Garden watering

This is used for the watering of garden. The solenoid valve is used for the

watering it will ON for a 15 minutes. In winder season a sensor used to

monitor the water contend in the soil. If the soil is wet the watering will

not occur.

Water pump control

Full automatic control circuit is also provided for the overhead water tank

filling, including all safety and control circuit for the Pump Motor.

2

BLOCK DIAGRAM OF HOME SECURITY CUM

AUTOMATION SYSTEM

CIRCUIT DESCRIPTION

3

H S A S

HOME SECURITY

HOME AUTOMATION

ALARMINDICATOR

INTRUDERDETECTION

CAMERAMONITORING

DOOR BREAKING MONITOR

ELECTRONIC SIREN

WATER PUMPCONTROL

GARDENWATERING SYSTEM

LIGHTNING

CONTROL

Security section

IR transmitter

IR receiver

Camera switching circuit (camera multiplexing circuit)

Alarms & hooter

Automation section

Water Tank level sensing

Pond water level sensing

Soil moisture sensing

Voltage level sensing & delay circuits

Main section (common for both sections)

Microcontroller board and 1 Hz clock generator

Signal conditioning board

Relay driver board

Power supply (S.M.P.S)

LCD clock interfacing circuits

WORKING OF CIRCUITS

4

Microcontroller board (main board)

The main control board of the entire system include AT 89C51

Microcontroller. The Port 0 is used as input for various signals from

fields. Port 3 is used as out put for relay driving in port 3 The INT 1 P3 .3

is used for external clock pulse input the external clock provides One

pulse per second INT 1 is interrupted with 1 Hz pulse. For each external

interrupt it services the interrupt service at 01A0H location the clock

program resides on the location 01A0H the INT 1 vector address is 0030h

port 1 in used for LCD for sending data and commands and P2.2,P2.3 and

P2.4 are used for the LCD’s ,RW and EN respectively the display is

used for clock and to set the clock time P2.6 is used as input for

increment minutes and P2.7 is used for increment hour two push button

switches are connected to this ports both the ports are provided with a

push to ON switch for time setting.

Signal conditioning board This board is used to convert the

signal from the field to a high level (+5volt) or low level (0 V).

This board consist two buffer amplifiers and 12 inverters. The out put of

this board can be obtained inverted or non inverted TTL level.

Relay driver board

This board used to drive 7 relays an IC ULN 2003 in used for driving the

relays output from port 3 are connected to the input of this board this

board gives sufficient power out put to drive the relay coil.

1 Hz clock generator

5

Commonly used IC in quarts clock IC1444 is used here. It has two output.

In every second the out put of this IC reverses the polarity in alternate

seconds to drive the clock mechanisms this out put is converted by using

diodes and a PNP transistor. The out put of this is passed through opto

isolators to the microcontroller.

Power supply (SMPS)

An SMPS is used to supply the necessary power to the circuits. The SMPS

provides an out put of +5v, +12v and -12v.

The SMPS uses a transistor as a switch to regulate the voltage. The AC

line voltage is directly filtered (to avoid the interference spike and noise)

by an EMI/RFI filter and converted to DC by the Input rectifier. The DC

further filtered to avoid ripples. Then fed to the solid state switching

circuits which act as an inverter. The inverter generates a high frequency

AC. The AC at the output windings of the switch mode transformer are

again rectified filtered to get the required DC voltage. And with the help

of pulse width modulation technique regulation is achieved.

LCD [Liquid Crystal Display]

Frequently, an 8051 program must interact with the outside world using input and output

devices that communicate directly with a human being. One of the most common devices

attached to an 8051 is an LCD display. Some of the most common LCD’s connected to

the 8051 are 16x2 and 20x2 displays. This means 16 characters per line by 2 lines and 20

characters per line by 2 lines, respectively.

Fortunately, a very popular standard exists which allows us to communicate with the vast

majority of LCD’s regardless of their manufacturer. The standard is referred to as

HD44780U, which refers to the controller chip which receives data from an external

source (in this case, the 8051) and communicates directly with the LCD.

6

44780 Displays: - The 44780 standard requires 3 control lines as well as

either 4 or 8 I/O lines for the data bus. The user may select whether the

LCD is to operate with a 4-bit data bus or an 8-bit data bus. If a 4-bit data

bus is used the LCD will require a total of 7 data lines (3 control lines

plus the 4 lines for the data bus). If an 8-bit data bus is used the LCD will

require a total of 11 data lines (3 control lines plus the 8 lines for the data

bus). The three control lines are referred to as EN , RS , and RW .

The EN l ine is called "Enable." This control line is used to tell the LCD

that you are sending the data. To send data to the LCD, your program

should make sure this line is low (0) and then set the other two control

lines and/or put data on the data bus. When the other lines are completely

ready, bring EN high (1) and wait for the minimum amount of time

required by the LCD datasheet (this varies from LCD to LCD), and end by

bringing it low (0) again.

The RS l ine is the "Register Select" line. When RS is low (0), the data is

to be treated as a command or special instruction (such as clear screen,

position cursor, etc.). When RS is high (1), the data being sent is text data

which should be displayed on the screen. For example, to display the

letter "T" on the screen you would set RS high.

The RW l ine is the "Read/Write" control line. When RW is low (0), the

information on the data bus is being written to the LCD. When RW is high

(1), the program is effectively querying (or reading) the LCD. Only one

instruction ("Get LCD status") is a read command. All others are write

commands--so RW will almost always be low.

Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected

by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2,

DB3, DB4, DB5, DB6, and DB7.

7

Security section

IR transmitter using 555 IC

An IR emitter is going to be modulated using an Astable 555 timer in this

electronics circuit. The IR emitter needs to be modulated by a frequency

of 38 kHz since the detector used in this project only detects 38 kHz

modulated IR. The detector is set to only see 38 kHz modulated IR

because there are random IR sources such as overhead lights, the sun,

heaters, etc. in most environments that can cause interference if using un-

modulated IR. The following two circuits shown in Fig.4 and Fig. 5 are

modulated IR transmitter and receivers. Each circuit should be soldered on

separate proto-boards.

IR –Receiver

38 KHz IR receiver using Siemens SFH-506-38

The circuit is built around a 3-pin IR IC receiver (Siemens SFH-506-38 or

equivalent) that can detect 38 kHz burst frequency generated bythe remote

transmitter. The output pin of IR sensor goes low when it detects IR light,

triggering the monostable (1-second) built around timer NE555. The

output of the mono toggles the J-K flip flop, whose Q output drives the

relay through SL100 NPN transistor.

Camera multiplexing

8

One among the main faction of the project is video monitoring around the

house for this IR intruder detection and video cameras are used as in

picture. If any of the IR beam is interrupted by an object like human body,

each cameras are starts scanning one by one. Out put of all the cameras

are connected to a quad bilateral switch IC 4066. this IC includes four

individual identical switch, each switch includes a control pin and

switching terminal, one terminal of each switch are connected in parallel

and the other terminals to cameras, the control pins are connected to a

decade Johnson counter IC 4017 the Q5 output of this IC connected to its

reset pin therefore enabling the fourth camera a reset is automatically

takes places

Proximity switch

To detect the door opening magnetic proximity switches are used. A

proximity switch is one that activates without physical contact being

made. There are different switches are used .A read switch is an electric

switch that consists pf ferrous metal contacts in a hermetically sealed

glass envelope. A permanent magnet placed in close proximity to the

switch will cause the contacts to pull together thus completing an electric

circuit

Alarm and siren: - Any interruption received from the field the

microprocessor will send the signal to switch ON the camera along with

an audible Alarm. A reset switch is provided to switch OFF the Camera

and Alarm. Siren is used to make large sound for an unauthorized door

opening. Proximity read switch is installed on the door for sensing the

intruders.

Monitoring cameras

9

Four cameras are installed for covering all surrounding areas for

monitoring. When any interruption occur camera will ON by

Microcontroller signal.

Automation section

Tank Water level sensing: - Two level sensors are installed on the

over head tank. One is for Low level and other is for High level. When

low level sensor activates the microcontroller sends an ON command to

the Relay driver circuit to switch ON the Pump. High level the

microcontroller sends OFF command to the control circuit.

Pond level sensing: - This signal is used to avoid dry run of the pump.

The pump runs only when the signal normal.

Soil moisture sensing: - It checks the Moisture content of the soil. If

the moisture level is low the Solenoid valve will open for watering the

Garden.

Voltage level sensing and delay circuit: - Two 741 ICs are used to

check the Window. That is voltage level between 190-240volts.This

comparator send a signal to Microcontroller when the voltage is normal.

Every time check the voltage before switch ON the Motor. To avoid

frequent ON and OFF of the pump a Delay Circuit is provided.

CIRCUITS DIAGRAMS

10

MODULATED I.R TANSMITTER (38khz)

IR INTERRUPTION DETECTOR

11

CAMERA MULTIPLEXER

SENSING CIRCUITS

12

VOLTAGE LEVEL SENSING & DELAY CIRCUITS

13

MICRO CONRILLER BOARD

14

SIGNAL CONDIIONING BOARD

RELAY DRIVERS

15

COMPONENT LIST

Sl. No. PARTS QTY

1 AT89C51 12 SCL1444A 13 MCT2E 14 NE555 95 LM741 96 LM3140 17 CD4017 18 CD4066 19 ULN2003 1

10 GD74LS14 211 AC188 112 AC187 1313 1N4148 814 IR LED 415 TSOP 416 RESISTOR 7317 CAPACITOR 2818 LED 1119 RELAY 820 CONECTORS 8

21 REBONWIRE 5MTR

22 SHELD 12MTR

23 SOLDER 250GMS

24 FLUX 1B

25 CABIN 126 LCD DIS 1

27 PCB 727sq in

28 CODE 129 TX-RX 430 SMPS 131 SCRWS 2332 TAPE 133 SLEVE 534 PUSH SW 435 RCA CN 1

16

PCB LAY OUTS

INFERARED TRANSMITTER PCB

INFERARED RECIVER PCB

CAMERA MULTIPLEXER PCB

17

MAIN BOARD P C B

AT89C51 PCB

18

SIGNAL INVERTER PCB

Relay driver PCB

19

CAMERA SWITCHING P C B

20

PROGRAMS

$mode51org 00hsjmp 50horg 0013hl jmp 1a0horg 50h

rs equ p2.2rw equ p2.3en equ p2.4flag equ 01 light equ p3.2sold equ p3.4moist equ p0.4alm equ p3.1moff equ p3.6mon equ p3.7light2 equ p3.0tlow equ p0.0thigh equ p0.1pnrml equ p0.2vnrkl equ p0.3door equ p0.5cam equ p3.5ir equ p0.6almrst equ p0.7incrmi equ p2.6incrmi equ p2.7port equ p1clr rsclr lightclr soldclr almclr cammov p3,#08hmov p0.#0ffhsetb p3.3setb incrmi

21

setb incrhrmov r0,#00hmov r1,#00hmov r2,#00hmov r3,#00hmov r4,#00hmov r5,#00hmov sp,#30hlcall init_lcdsetb ie.7setb ie.2setb tcon.2

Main: jb light,off1 ; light on at 18.00 Cjne r5,#01h,next

cjne r4,#08h,nextlcall lamp_on

off1: jnd light,next ; light on at 06.00cjne r5,#00h,nextcjne r4,#06h,nextlcall lamp_off

next: jb sold,off2 ; solinoid on at 17.00setb moistjb moist, next2cjne r5,#01,next2cjne r4,#07,next2cjne r3,#00,next2cjne r2,#00,next2acall sol_on

off2: jnb sold, next2 ; solinoid off at 17.15cjne r5,#01,next2cjne r4,#07,next2cjne r3,#01,next2cjne r2,#05,next2acall sol_off

next2: jb alm, off3setb doorjb door,next3 ; door opendsetb almacall alm_on

off3: setb almrstjnb aim, next3jb almrst,next3acall alm_off

22

next3: jb cam, off4setb irjb ir,next4 ; cam systemsetb camacall cam_on

off4: setb almrstjnb cam,next4jb almrst,next4acall cam_off

next4: jb flag,on ;pump controljb tlow,next5jb vnrml,next5jb pnrml,next5acall motor_on

on: jb thigh,offjb vnrml,offjb pnrml,offsjmp next5

off: acall motor_off

next5: jnb light2, next6cjne r5,#02h,next6cjne r4,#01h,next6clr light2

next6: jb incrmi,next7acall dlyacall incresetb tcon.5jnb incrmi,next6

next7: jb incrhr,next8acall dlyacall incre1jnb increhr,next7

next8: ajmp main

sol_on: jb thigh,son1jb flag,son1acall motor_on

son1: setb soldret

sol_off: acall dly

23

clr soldret

lamp_on: setb lightret

alm_on: setb almret

alm_off: clr almret

cam_on: setb camret

cam_off: clr camret

motor_off: setb moffacall dlyclr moffclr flagret

motor_on: clr monsetb monacall dlyclr monsetb flagret

dly: mov r6,#0ffhd1: mov r7,#0ffhd2: djnz r7,d2

djnz r6,d1ret

org 01a0h ; int1 subroutineinc r0cjne r0,#0ah,last ; sec I digitmov r0,#00hinc r1cjne r1,#06,last ; sce II digitmov r1,#00h

incre: inc r2cjne r2,#0ah,last ; min I digit

24

mov r2,#00hinc r3cjne r3,#06,last ; min II digitmov r3,#00h

incre1: inc r4cjne r5,#00h,l1a

l1a: cjne r5,#01h,l1bl1b: cjne r5,#02h,l1

cjne r4,#04h,lastmov r4,#01hmov r5,#00h

l1: cjne r4,#0ah,last ; hr I digitmov r4,#00hinc r5

l2: cjne r5,#03,last ; hr II digitmov r5,#00hmov r4,#01hmov r3,#00hmov r2,#00hmov r1,#00hmov r0,#00h

last: clr rsMOV A,#01Hlcall write11

setb rslcall delay1

mov dptr,#asciimov a,r5movc a,@a+dptr ; hr displcall write11mov a,r4movc a,@a+dptrlcall write11mov a,#':'lcall write11mov a,r3movc a,@a+dptr ; min displcall write11mov a,r2movc a,@a+dptrlcall write11mov a,#':'lcall write11mov a,r1

25

movc a,@a+dptr ; sec displcall write11mov a,r0movc a,@a+dptrlcall write11

skip: retiret

ascii: db 30h,31h,32h,33h,34h,35h,36h,37h,38h,39h

init_lcd: clr rsmov p1,#38hlcall write1mov p1,#0chlcall write1mov p1,#06hlcall write1

mov p1,#01hlcall write1ret

write11: mov port,aWRITE1: CLR en ;make all control signals low CLR rw SETB en ;make EN high

ACALL DELAY1 ;wait for sometime CLR en ;make EN low

NOP NOP

RETLLOOP: MOV R7,#0FFH ;delay for write cycleLOOP1: nop

nopnop

DJNZ R7,LOOP1RETend

26

APPLICATION

Light control: - Lighting of certain porch Light according to the user

required timing (On-OFF duration can be programmed by the user.)

Water tank filling: - When the water level goes to low level the pump

will start automatically. The main voltage level is sensed for the safety of

the motor. Likewise it can used for the level of the pond to avoid dry

running of the pump.

Garden Watering: -Watering in the garden every day by sensing the

water content in the soil to avoid the un necessary watering at rainy

season.

Security

An unauthorized entry can be detected in an area. It is done with the help

of four IR transmitters and receivers as intruder detectors. The monitoring

section includes four cameras and a monitor; to view the four cameras in a

single monitor a switching circuit is used. Two alarms are used for

intruder detection and door braking. The out put of the cameras can

recorded in a VCR automatically.

27

CONCLUSION

This Security system can be used to recognize any intruders entered

on a particular area. The camera will receive their image and displayed in a

video display.

If anybody opens the door a siren is initiated by the proximity

detectors.

Automation system controls a pump, when the water tank becomes

less than a pre determined level. All protections are provided for the safety

Pump motor.

Automatic garden watering and lighting controls are also included.

28

COST OF PRODUCT

Sl. No. PARTS QTY PRICE

1 AT89C51 1 502 SCL1444A 1 133 MCT2E 1 124 NE555 9 485 LM741 9 1176 LM3140 1 357 CD4017 1 178 CD4066 1 249 ULN2003 1 38

10 GD74LS14 2 3211 AC188 1 3.512 AC187 13 3913 1N4148 8 1214 IR LED 4 1215 TSOP 4 8816 RESISTOR 73 14.617 CAPACITOR 28 5618 LED 11 16.519 RELAY 8 8020 CONECTORS 8 7621 REBONWIRE 5MTR 2522 SHELD 12MTR 13223 SOLDER 250GMS 6024 FLUX 1B 725 CABIN 1 35026 LCD DIS 1 25027 PCB 727sq in 3,63528 CODE 1 2529 TX-RX 4 7530 SMPS 1 25031 SCRWS 23 14.532 TAPE 1 1333 SLEVE 5 534 PUSH SW 4 1235 RCA CN 1 18

29

30