Professional Documents
Culture Documents
Bachelor of Technology
In
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
G.NAGA SIRISHA (12H71A0487)
T.KATHIK (13H75A0422)
Of
ELECTRONICS AND COMMUNICATION ENGINEERING
2015-2016
1
CERTIFICATE
This is to certify that the Main Project entitled PIR SENSOR BASED SECURITY
SYSTEM USING 89C52 MICRO CONTROLLER is a bonafide work done by
G.NAGA
SIRISHA
(12H71A0487),
K.MADHU
BINDU
(13H75A0406),
Y.ANIL
Bachelor
of
Technology
in
ELECTRONICS
AND
COMMUNICATION
(Mrs. A.SARADA )
Associate Professor
Professor,Dept of ECE
Project Guide
(Dr.K.B.K.RAO)
Principal
Examiner 1
Examiner 2
I would like to take this opportunity to express our deep gratitude to the members who
assisted us directly and indirectly for the completion of this project work.
I would like to thank Mrs.A.SARADA, Associate Professor in the Department of
Electronics and Communication Engineering, department the project supervisor for her
esteemed guidance and support, especially the valuable ideas and thoughts provided during
this project work. She is expertise in the area of Communication systems, this makes us
very useful in solving the problems encountered during the project work.
I would like to express our immense pleasure in expressing immeasurable sense of
gratitude to, Dr.A.GURUVA REDDY, Professor& Head of the Department in
Electronics and Communication Engineering for his valuable suggestions in the
completion of the project.
I wholeheartedly acknowledge Dr. K. B. K. RAO, Principal, Prof. N. KRISHNA,
Director Academics and Prof. D. PANDURANGA RAO, CEO for giving opportunity to
make this project a successful one.
I also extend our thanks to all the faculty members of Electronics and Communication
Engineering Department for their valuable contributions in this project.
I would like to extend our warm appreciation to all my friends for sharing their
knowledge and valuable contributions in this project.
Finally I express our deep sense of gratitude to all our parents for their continuous
support throughout our academic carrier and their encouragement in completion of this
project work successfully.
G.NAGA SIRISHA
K.MADHUBINDU
Y.ANIL KUMAR
T.KARTHIK
DECLARATION
G.NAGA SIRISHA(12H71A0487)
K.MADHUBINDU(135A0406)
Y.ANIL KUMAR(12H71A0463)
T.KARTHIK(13H75A0422)
ABSTRACT
The main aim of this project is to develop a low cost security system using small
Pyro-electric infrared (PIR) sensor built around a micro controller. The low-power PIR
detectors take advantage of pyro electricity to detect a human body that is constant source of
Passive Infrared and is usually not at thermal equilibrium with the surrounding environment.
Detecting the presence of any unauthorized person, the system sets up a voice message and
call to a predefined number. In addition to this the system also sets alarm when it detects
smoke particles.
CHAPTER-1
1.1 INTRODUCTION TO EMBEDDED SYSTEMS:
An embedded system can be defined as a computing device that does a specific
focused job. Appliances such as air conditioner, VCD Player, DVD Player, Printer, FAX
Machine, Mobile phone etc are some of examples of embedded system. Each of these
appliances will have a processor and special hardware to meet the specific requirement of
application along with embedded software that is executed by the processor for meeting that
specific requirement. The embedded software is also called FIRM WARE. In contrast, the
software in embedded systems is always fixed listed below.
Embedded systems do a very specific task; they cannot be programmed to do different
things. Embedded systems have very limited resources, particularly memory. Generally, they
do not have secondary storage devices such as CDROM or FLOPPY DISK. Embedded
systems have to work against some dead line. A specific job has to be completed within a
specific time. In some embedded systems, called real time systems, the deadlines are
stringent. Missing a dead line cause a catastrophe-loss of life or damage to property.
Embedded systems are constrained for power. As many embedded systems operate through a
battery, power consumption has to be very low. Some embedded systems have to operate in
extreme environmental conditions such as very high temperatures and humidity.
1.2 APPLICATION AREAS
Nearly 99% of processors manufactured end up in embedded systems. The embedded
system market is one of the highest growth areas as these systems are used in every market
segment-consumer electronics, office automation, industrial automation, biomedical
engineering wireless communication, data communication, telecommunication, transportation
and so on.
Consumer Appliances:
At home we use a number of embedded systems which include digital camera, digital
diary, DVD player, electronic toys, microwave oven, remote controls etc. Todays high-tech
car has embedded systems for transmission control, engine sparkcontrol, air conditioning,
navigation etc.
The operating system runs above the hardware, and the application software runs
above the operating system. The same architecture is applicable to any computer including a
desktop computer. However, there are significant differences. It is not compulsory to have an
operating system in every embedded system. For small appliances such as remote control
units, air conditioners, toys etc., there is no need for an operating system and you can write
only the software specific to that application. For applications involving complex processing,
it is advisable to have an operating system. In such a case, you need to integrate the
application software with the operating system and then transfer the entire software on to the
memory chip. Once the software is transferred to the memory chip, the software will continue
to run for a long time you dont need to reload new software.
Now, let us see the details of the various building blocks of the hardware of an
embedded system.
Input Devices
Input devices:
Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the embedded
system is no easy task. Many embedded systems will have a small keypad-you press one key
to give a specific command. A keypad may be used to input only the digits. Many embedded
systems used in process control do not have any input device for user interaction; they take
inputs from sensors or transducers, produce electrical signals that are in turn fed to other
systems.
Output devices:
The output devices of the embedded systems also have very limited capability. Some
embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the health status
of the system modules, for visual indication of alarms. A small Liquid Crystal Display (LCD)
may also be used to display some important parameters.
Communication interfaces:
The embedded systems may need to interact with other embedded systems at they
may have to transmit data to a desktop. To facilitate this, the embedded systems are provided
with one or few communication interfaces such as RS232, RS422, RS485, Universal Serial
Bus (USB), and IEEE 1394, Ethernet etc.
Application-specific circuitry:
Sensors, transducers, special processing and control circuitry may be required for an
embedded system, depending on its application. This circuitry interacts with the processor to
carry out the necessary work. The entire hardware has to be given to power supply either
through the 230 volts main supply or through a battery. The hardware has to design in such a
way that the power consumption is minimized.
10
Figure1.4:Block diagram
Nowadays life style has become very fast and busy and it is not possible to continuously track
the alarming events. Hence, the automation of capturing the events and communicating them
has become necessity. To achieve this we have developed the system named PIR SENSOR
BASED SECURITY SYSTEM USINGMICRO CONTROLLER.
If a sensor detectsany unauthorized situation then the system triggers an alarm and initiates
call to the configured mobile number. This system can be used in many applications such as offices,
companies and home. For this, a smoke sensor, a PIRsensoralong withGSM are used.
The Microcontroller interprets the received call from the SIM within GSM and
initiates the required action.The Microcontroller will continuously check the status of the
sensor. If any of the sensors condition breaks, then the Microcontroller detects that and sends
respective CALL through Mobile to the concerned person, so that the person can take further
action. Thus the system can secure the respective situation.
11
CHAPTER-2
SYSTEM DESIGN
This chapter clearly explainsthe Block Diagram and its description, its Hardware details and
Software details.
PIR
MICRO CONTROLLER
Comparator
89C52
GSM mobile
GSM module
Smoke
Threshold
level
Sensor
Buzzer
Reset
POWER SUPPLY 5V
2.1.1.PIR Sensor:
This sensor continuously checks entry to the room.
Element Size: 2 1 mm
Spacing: 1 mm
Operating Voltage: 12 V
12
Voltage -+12 V
Current - 20mamp
Distance - Unlimited
2.1.5. Buzzer:
It is used to bring attention for any faulty operation detected.
2.1.6. LCD:
It is a 2*16 LCD which is mainly used for displaying any message. Data entering and
message acknowledgement can be displayed through this microcontroller.
13
14
CHAPTER-3
Hardware Description
3.1 Introduction
This chapter clearly explains the details of Hardware components that are used in this project
i.e., circuit, Interfacings of various components
CIRCUIT DIAGRAM:
15
3.2PIR SENSOR:
General Description:
The PIR (Passive Infra-Red) Sensor is a pyroelectric device that detects motion by measuring
changes inthe infrared levels emitted by surrounding objects. This motion can be detected by
checking for a high signal on a single I/O pin.
Features
Small size
3.2.1Theory of Operation
Pyroelectric devices, such as the PIR sensor, have elements made of a crystalline material
that generates an electric charge when exposed to infrared radiation. The changes in the
amount of infrared striking the element change the voltages generated, the devicecontains a
special filter called a Fresnel lens, which focuses the infraredsignals onto the element. As
16
Fig3.2.1.1:pir sensor
Name
Function
GND
V+
Out
OUTPUT
Definition:
Like most computers, microcontrollers are simply general-purpose Instruction executors. The
real star of a computer system is a program of instructions that is provided by a human
programmer. This program Instructs the computer to perform long sequences of very simple
actions to accomplish useful tasks as intended by the programmer like most computers,
microcontrollers are simply general-purpose Instruction executors. The real star of a
computer system is a program of instructions that is provided by a human programmer. This
program instructs the computer to perform long sequences of very simple actions to
accomplish useful tasks as intended by the programmer
18
3.3.1: FEATURES:
Compatible with MCS-51 Products.
8K Bytes of In-System Reprogrammable Flash Memory.
Endurance: 1,000 Write/Erase Cycles.
Fully Static Operation: 0 Hz to 24 MHz.
Three-level Program Memory Lock.
256 x 8-Bit Internal RAM.
32 Programmable I/O Lines.
Three 16-bit Timer/Counters.
Eight Interrupt Sources.
Programmable Serial Channel.
Low Power Idle and Power Down Mode
3.3.2: PIN DIAGRAM AND ITS DESCRIPTIONIPTION:
19
20
Port 0:
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink
eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance
inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during
accesses to external program and data memory. In this mode P0 has internal pull-ups. Port 0
also receives the code bytes during Flash programming, and outputs the code bytes during
program verification. External pull-ups are required during program verification
Port 1:
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled
high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are
externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1
21
ALTERNATE FUNCTIONS
P1.0
P1.1
P1.5
P1.6
P1.7
Port 2:
Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by
the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being
pulled low will source current (IIL) because of the internal pullups.Port 2 emits the highorder address byte during fetches from external program memory and during accesses to
external data memory that use 16-bit addresses (MOVX A,@DPTR). In this application it
uses strong internal pull-ups when emitting 1s. During accesses to external data memory that
uses 8-bit addresses (MOVX A,@RI), Port 2 emits the contents of the P2 Special Function
Register. Port 2 also receives the high-order address bits and some control signals during
Flash programming and verification.
Port 3:
Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output buffers
can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by
the internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being
pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of
various special features of the AT89C52 as listed below:
22
PORT PIN
ALTERNATE FUNCTIONS
P3.0
P3.1
P3.2
P3.3
P3.4
P3.5
P3.6
P3.7
Table: 3.3.3.2
RST:
RST means RESET; 89C52 uses an active high reset pin. It must go high for two
machine cycles. The simple RC circuit used here will supply voltage (Vcc) to reset pin until
capacitance begins to charge. At a threshold of about 2.5V, reset input reaches a low level
and system begin to run.
23
ALE/PROG:
Address Latch Enable output pulse for latching the low byte of the address during
accesses to external memory. This pin is also the program pulse input (PROG) during Flash
programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator
frequency, and may be used for external timing or clocking purposes. Note, however, that one
ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation
can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only
during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the
ALE-disable bit has no effect if the microcontroller is in external execution mode.
PSEN:
Program Store Enable is the read strobe to external program memory. When the
AT89C52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external
data memory.
EA/VPP:
External Access Enable. EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at OOOOH up to FFFFH. Note,
however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should
be strapped to Vcc for internal program executions. This pin also receives the 12-volt
programming enable voltage (Vpp) during Flash programming, for parts that require 12-volt
Vpp.
XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating
circuit
XTAL2: Output from the inverting oscillator amplifier.
T2: External count input to Timer/Counter 2, Clock out.
24
On the chip there are three lock bits which can be left unprogrammed (U) or can be
programmed (P) to obtain the additional features .When lock bit 1 is programmed, the logic
25
A & B Registers:
The 89C52 contains 34 general-purpose, working, registers. Two of these, registers A
and B, hold results of many instructions, particularly math and logical operations, of the
89C52 CPU. The other 32 are arranged as part of internal RAM in four banks, B0-B3, of
eight registers. The A register is also used for all data transfers between the 89C52 and any
external memory. The B register is used for with the A register for multiplication and division
operations.
26
Internal RAM:
The 256-byte internal RAM. The upper 128 bytes occupy a parallel address space to
the Special Function Registers. Instructions that use indirect addressing access the upper 128
bytes of RAM. Stack operations are examples of indirect addressing.
Internal Data Memory addresses are always one byte wide, which implies an address
space of only 256 bytes. However, the addressing modes for internal RAM can in fact
accommodate 384 bytes, using a simple trick. Direct addresses higher than 7FH access one
memory space, and indirect addresses higher than 7FH access a different memory space.
Thus Figure shows the Upper 128 and SFR space occupying the same block of addresses,
80H through FFH, although they are physically separate entities.
ACC
PORT 3
PORT2
FFH
EDH
PORT1
BOH
PORT0
AOH
27
FFH
No bit addressable
space
80H
Su00465
Su00465 Su00465
28
T2CON Address=0C8H
Bit addressable
C/T2(LOW) CP/RL2(LOW)
Bit
Table: 3.3.6.1
T2MOD Address=0C9H
Not bit addressable
T20E
DCEN
Bit
7 6
Table: 3.3.6.2
29
Name
Function
A
B
DPH
DPL
IE
IP
P0
P1
P2
P3
PCON
PSW
SCON
SBUF
SP
TMOD
TCON
TL0
TH0
TL1
TH1
Accumulator
Arithmetic
Addressing external memory
Addressing external memory
Interrupt enable control
Interrupt priority
Input/output port latch
Input/output port latch
Input/output port latch
Input/output port latch
Power control
Program status word
Serial port control
Serial port data buffer
Stack pointer
Timer/counter mode control
Timer/counter control
Timer 0 low byte
Timer 0 high byte
Timer 1 low byte
Timer 1 highbyte
3.4.1Features
30
The supply given is the +5V D.C. The input a.c. supply is stepped down from 230V to
9-0-9V. The rectifier consists of diodes D1 and D2 makes the supply D.C. that is,
unidirectional waveform. The output from rectifier is a URDC, whose value is 12.726V peak
to peak. The voltage regulator makes this URDC to RDC of +5V. The capacitor C1 is used to
maintain constant voltage between two consecutive positive cycles where as C2 is used to
remove the fluctuations caused by regulator.
31
A regulated power supply maintains the output voltage constant irrespective of A.C.
mains fluctuations or load variations. The output voltage remains constant whether the load
current changes or there are fluctuations in the input A.C voltage.
The rectifier converts the transformer secondary A.C voltage into pulsating voltage. The
pulsating D.C. voltage is applied to the capacitor filter. This filter reduces the pulsationsin the
rectifier D.C. output voltage. Finally, it reduces the variations in the filtered output voltage.
3.6 BUZZER
A buzzer or beeper is a signaling device, usually electronic, typically used in
automobiles, household appliances such as a microwave oven, or game shows. It most
commonly consists of a number of switches or sensors connected to a control unit that
determines if and which button was pushed or a preset time has lapsed, and
usuallyIlluminates a light on the appropriate button or control panel, and sounds a warningin
the form of a continuous or intermittent buzzing or beeping sound. Initially this device was
based on an electromechanical system which was identical to an electric bell without the
metal gong (which makes the ringing noise). Often these units were anchored to a wall or
ceiling and used the ceiling or wall as a sounding board. Another implementation with some
AC-connected devices was to implement a circuit to make the AC current into a noise loud
enough to drive a loudspeaker and hook this circuit up to a cheap 8-ohm speaker. Now-adays, it is more popular to use a ceramic-based piezo-electric sounder like a Sonalert which
makes a high-pitched tone. Usually these were hooked up to driver circuits which varied the
pitch of the sound or pulsed the sound on and off.
+
Buz
Q?
BC547
C PORT
D?
4007
distances,
so these signals are converted to some other form to be transmitted. With a jumper between
the points numbered 7 and 8, a high on the TxD output of the 8251A produces a high on the
base of the transistor, which turns it off. With points numbered 9 and 10 jumped, the CR TX
line will then be pulled to -12V, which is a legal high or marking condition for RS-232C. A
low on the TxD output of the 8251A will turn on the transistor and pull the CR TX line to
+5V, which is legal low or space condition for RS- 232C.
34
11
14
T2 IN
10
R1 OUT
12
R2 OUT
13
T1 OUT
T2 OUT
R1 IN
R2 IN
35
3.8.1GSM SIM300/900
GSM/GPRS RS232 Modem is built with SIMCOM Make SIM900 Quad-band
GSM/GPRS engine, works on frequencies 850 MHz, 900 MHz, 1800MHz and 1900 MHz .It
is very compact in size and easy to use as plug in GSM Modem. The Modem is designed with
RS232 Level converter circuitry, which allows you to directly interface PC Serial port .
3.8.2 Features:
High Quality Product (Not hobby grade)
Quad-Band GSM/GPRS
850/ 900/ 1800/ 1900 MHz
Built in RS232 Level Converter (MAX3232)
Configurable baud rate
SMA connector with GSM L Type Antenna.
Built in SIM Card holder.
Built in Network Status LED
Inbuilt Powerful TCP/IP protocol stack for internet data transfer over GPRS
Audio interface Connector
Most Status & Controlling Pins are available at Connector
Normal operation temperature: -20 C to +55 C
Input Voltage: 5V-12V DC
36
3.8.4Special firmware
MMS
Java (cooperate with isolation)
Embedded AT
This is the first interfacing example for the parallel port. We will star with
something simple. This example does not use the Bi-directional feature found on newer ports,
thus it should work with most, ifnot all Parallel Ports. It however does not show the use of the
status port as an input. So what are we interfacing? A 16 Character X 2 Line LCD Module to
the Parallel Port. These LCD Modules are very common these days, and are quite simple to
work with, as all the logic required running them is on board.
3.9.1 Features:
Interface with either 4-bit or 8-bit microprocessor.
Display data RAM
-matrix patterns.
Pin
symbol
Function
Vss
Vdd
39
V0
Contrast Adjust
Rs
Instruction
/Data
Register
Select
5
R/W
Enable Signal
7-14
Db0-Db7
15
16
40
CHAPTER-4
4.FLOWCHART AND SOFTWARES
start
PIR Sensor
IF motion
detected
If smoke
Detected
Buzzer on
Initialize GSM
Default Message transfers to GSM
GSM transfer Voice message to owner
Buzzer activated
stop
41
42
44
This document is a 'quick start', describing some of the most commonly used operations for
PCB design using Orcad. For more details see on-line help and also the pdf manuals which
are usually in Program Files\Orcad\Document. These pdf files seem generally much more
comprehensive than the on-line help.
Schematic Design
Use
Capture to enter your design. Multiple schematic pages for same design can be used.
Tip:
label nets you may want to locate at the PCB stage net names are carried through to
Design Rule Check for Tools menu. Correct any errors in design.
Select
project in project window, select Create Net list from Tools menu.
Choose Layout tab (to generate Layout compatible net list), generate net list.
Choose units (English or metric) compatible with what you will use in your
45
PCB Layout
Run Layout Plus. Choose File/New.
Select a technology file appropriate for your design. These are in Program
Files\Orcad\Layout Plus\data and set defaults for things like track spacing, hole sizes etc.
Some examples:
1BET_ANY.TCH allows single track between pins on standard DIP;
2BET_SMT.TCH for surface mount and mixed smt/through hole designs, 2 tracks
between pins of standard DIP;
3BET_THR.TCH through hole boards, up to 3 tracks between pins.
You're best using 1bet_any.tch if at all possible, since this is the least demanding pcb
technology.
Choose your net list file (.mnl extension). If the units (English/metric) are not the same you
won't be able to load it. Just go back to Capture and generate the net list again with the right
units.
If some of your components chosen from the Orcad Capture libraries did not
School of Engineering Orcad PCB Quick Start have PCB footprints associated with them you
will get Cannot find footprint for... messages. If this happens, choose link existing
footprint to component. Browse footprint libraries to find the required footprint
(Preview of footprint shown on screen). You can often guess footprints from names.
Examples:
TM = through hole mounted (as opposed to surface mount)
BCON100T = block connector, 0.1 pitch, through hole
BLKCON.100/VH/TM1SQ/W.100/3 = block connector, 0.1 pitch, vertical (as opposed to
right angle), through hole, pin 1 square pad, width 0.1, 3 pins.
Library DIP100T = dual in line packages, through hole, 0.1 between pins.
If you can't find the right footprint then you'll need to make your own. See
Creating a new Footprint at the end of this document.
Choose Layers
Use spreadsheet toolbar button to see the Layers spreadsheet.
Enable only the layers you want for routing, set other layers to unused
(Double click on the spreadsheet entry, select unused routing). For a single sided board you
probably want only the bottom layer, for double sided you
Probably want top and bottom, for a 4 layer board you probably want these plus power
and ground plane layers. Tip: you can select multiple layers using click with ctrl key, then
right click, select properties, then set/clear unused routing to simultaneously enable or disable
several layers.
Place Components
Select component tool from toolbar, click on required component and drag it where you
want. Right click to see some options, including rotate.
Auto/place board will attempt to place components automatically for you within board
outline. You may want to move components manually as well.
School of Engineering Orcad PCB Quick Start
Track Thickness
47
Routing
Automatic routing is ok, but you can manually route as well (use toolbar buttons).
Make sure you've set the track thicknesses as you want before routing (see above).
You may want to route power and ground first, especially if it's a 1 or 2 layer board. Use the
nets spreadsheet to enable/disable those nets you want to route at any one time. Tip: select
Routing Enabled column, right click, disable to disable all nets, then enable the ones you
want.
You may want to give priority to critical nets (those that need shortest paths), to optimally
route those. Priority can be selected from the nets spreadsheet for each net.
To automatically route, select Tools, auto, route board. To put everything back to the rat's
nest net, tools/auto/unroute board.
You can auto route just one component by selecting auto route/component then click on a
pin on that component.
After an auto route/board is completed, orcad thinks it's finished, and if you run it again
(e.g. to route some more signals that were disabled the first time) it says all sweeps done or
disabled and won't run again. To run auto route again you have to remove "done" from all
auto route passes. Click the spreadsheet toolbar button and select strategy/route pass. Select
the whole "enable" column, right click, and select properties. Remove the "done" tick and
click OK. Close the spreadsheet and you can now run the auto router again.
48
Copper Pour
Copper pour fills selected unused board area with copper. This allows creation of large
ground (and/or power) areas which improves noise properties. Also reduces amount of
copper that needs to be etched off the board by manufacturing process.
Tip: don't do this until you've finished placement and routing.
Select required layer (e.g. TOP or BOTTOM).
Select obstacle tool (toolbar button), right click in design, select new.
School of Engineering Orcad PCB Quick Start
Right click again, select properties
Select copper pour, net = GND (or as required), OK. (This example would connect copper
pour to the GND net.)
Draw (by left click and drag) the outline for the copper fill.
Repeat as required for other copper pour areas and/or layers.
If you want to delete it, select it by using obstacle tool then ctrl left click on the pour. Then
press the delete key.
Tips
49
School of Engineering Orcad PCB Quick Start object). Then you have the option to create a
new library. I'd recommend this make a library in your own design folder and keep this
with the rest of your design files.
51
CHAPTER-5
RESULTS
1.When power supply is given, the kit will be on and the LED will be displayed as above
52
5.First we will be intimated with a message, then LED will display like this.
53
7.After message sending, LED will show this message, which indicates getting phone call.
54
9. Smoke detection is done and again a message is sent to the predefined numbers after
buzzer sound.
55
CHAPTER 6
FUTURE WORK AND CONCLUSION
In this security system PIR sensor has been used which is low power, and low cost, pretty
rugged, have a wide lens range, and are easy to interface with. This security system can be
implemented in places like home, office, shop etc. The sensitivity range for detecting motion
of the system is about 3 to 4 feet. It can be raised up to 20 feet through careful use of
concentrating optical lenses as future development. In addition to this, this system can be
equipped with glass break detectors to enhance the level of protection. Use of multi-sensor
data fusion and complex algorithm can be used to increase the effective FOV for larger
spaces. In order to enhance the location accuracy and to enhance the method of processing
the PIR sensor signal, use of more advanced techniques such as probabilistic theories and soft
computing is left open for the future.
56
57
ANNEXURE
;P1.0=DTMF0
;P1.1=DTMF1
;P1.2=DTMF2
;P1.3=DTMF3
;P1.4=DTMF4
;P0 = DISP DATA
;P2.7 = RS
;P2.6 = R/W
;P2.5 = EN
TXD
MACRO
JNB TI,$
CLR TI
MOV SBUF,R6
58
ORG 0
LJMP START
ORG 0050H
;--------------------
LCALL SPINI
LCALL LCDINI
LCALL DEL
XX2:
MOV DPTR,#0900H
LCALL TLINE
MOV DPTR,#0910H
LCALL BLINE
LCALL SSEC
SETB P1.2
SETB P1.3
59
CLR P2.0
SETB P2.1
SETB P2.2
MOV DPTR,#0920H
LCALL TLINE
MOV DPTR,#0930H
LCALL BLINE
XX1: JB P1.0,YY1
LCALL DEL
JB P1.0,XX1
MOV 19H,#01H
LJMP CCVV
YY1:
JNB P1.1,XX1
LCALL DEL
JNB P1.1,YY1
MOV 19H,#02H
LJMP CCVV
60
SETB P2.0
CLR P2.1
LCALL SEC3
LCALL SEC3
LCALL SEC3
JNB P2.4,START
LJMP SMSX
RETSMTX:
;*****************************
DIAL1:
MOV DPTR,#09A0H
LCALL TLINE
MOV DPTR,#09B0H
LCALL BLINE
61
;DIAL MODE
MOV R2,#0EH
LCALL CMD1
LCALL ENTER
LCALL VSEL
LCALL SSEC
LCALL SSEC
LCALL SSEC
LCALL SSEC
LCALL SSEC
MOV DPTR,#AT_H
;DIAL MODE
MOV R2,#03H
LCALL CMD1
LCALL ENTER
LCALL SSEC
LCALL SEC
SETB P2.0
LCALL SEC
CLR P2.0
62
;DIAL MODE
MOV R2,#0EH
LCALL CMD1
LCALL ENTER
LCALL VSEL
LCALL SSEC
LCALL SSEC
LCALL SSEC
LCALL SSEC
LCALL SSEC
MOV DPTR,#AT_H
;DIAL MODE
MOV R2,#03H
LCALL CMD1
LCALL ENTER
LCALL SSEC
LCALL SEC
SETB P2.0
LCALL SEC
CLR P2.0
;-------------DIAL3: MOV DPTR,#AT_D3
;DIAL MODE
63
MOV DPTR,#AT_H
;DIAL MODE
MOV R2,#03H
LCALL CMD1
LCALL ENTER
LCALL SSEC
LCALL SEC
SETB P2.0
LCALL SEC
CLR P2.0
LJMP START
VSEL: MOV A,19H
CJNE A,#01H,VOI2
64
MOV 3EH,#03H
;-----------------------SMSXX: MOV DPTR,#AT_CMGF
MOV R2,#09H
LCALL CMD1
LCALL ENTER
65
MOV DPTR,#AT_ERS
;ERASE OF 1 ST LOCATION
MOV R2,#09H
LCALL CMD1
LCALL ENTER
LCALL SEC
LCALL SEC
MOV DPTR,#AT_CPMS
MOV R2,#0CH
LCALL CMD1
LCALL ENTER
LCALL SEC
CJNE A,#03H,NP2
MOV DPTR,#AT_CMGW
LJMP NP4
66
CJNE A,#02H,NP3
MOV DPTR,#AT_CMGW2
LJMP NP4
NP3:
CJNE A,#01H,NP4
MOV DPTR,#AT_CMGW3
LOCATION
NP4:
MOV R2,#14H
LCALL CMD1
LCALL ENTER
;-----------------------------------
LCALL SEC3
; MOV DPTR,#AT_CMD
LOCATION
; MOV R2,#0BH
; LCALL CMD1
LCALL CMDRAM
LCALL SEC3
MOV DPTR,#AT_CMSS
MOV R2,#09H
LCALL CMD1
67
SETB P2.0
LCALL SEC
CLR P2.0
LCALL SEC3
DEC 3EH
MOV A,3EH
CJNE A,#00H,SMSXX
;LJMP XX1
LJMP RETSMTX
;*******************************************
SMSRX: SETB P2.0
MOV DPTR,#0980H
LCALL TLINE
MOV DPTR,#0990H
LCALL BLINE
LCALL SEC3
MOV DPTR,#AT_ERS
;ERASE OF 1 ST LOCATION
MOV R2,#09H
68
MOV DPTR,#AT_ERS2
;ERASE OF 2 ST LOCATION
MOV R2,#09H
LCALL CMD1
LCALL ENTER
MOV DPTR,#AT_ERS3
;ERASE OF 3 ST LOCATION
MOV R2,#09H
LCALL CMD1
LCALL ENTER
MOV DPTR,#AT_ERS4
;ERASE OF 4 ST LOCATION
MOV R2,#09H
LCALL CMD1
LCALL ENTER
MOV DPTR,#AT_ERS5
;ERASE OF 5 ST LOCATION
MOV R2,#09H
LCALL CMD1
LCALL ENTER
;---------------------
69
MOV R2,#09H
LCALL CMD1
LCALL ENTER
LCALL SEC
MOV DPTR,#AT_CNMI
MOV R2,#11H
LCALL CMD1
LCALL ENTER
LCALL SEC
MOV DPTR,#AT_CNMA
;READY TO RECEIVE
MOV R2,#07H
LCALL CMD1
LCALL ENTER
LCALL SEC3
LCALL SEC
CLR P2.0
;********************************
MAIN: MOV R0,#20H
70
LCALL DISP
LCALL MOTON
LCALL MOTOF
LJMP MAIN
SETB P1.3
CLR P1.4
71
MOTOF:
MOV A,52H
CJNE A,#4FH,NRET
MOV A,53H
CJNE A,#46H,NRET
MOV A,54H
CJNE A,#4DH,NRET
CLR P2.1
CLR P1.3
SETB P1.4
LCALL SEC3
CLR P1.3
CLR P1.4
NRET: RET
;************************************
RXD:
MOV R4,#00H
MOV R7,#1FH
72
MOV R6,#FFH
AD:
MOV R5,#FFH
AB:
JNB RI,AC
CLR RI
MOV R1,SBUF
MOV R4,#01H
;MOV R6,SBUF
;TXD
RET
AC:
DJNZ R5,AB
DJNZ R6,AD
DJNZ R7,AE
MOV R4,#02H
RET
;*************LOCATION SENSING***********
LSEN:
LDISP:
RET
;****************************************
DISP:
73
CLR p2.7
CLR p2.6
MOV P0,#C0H
LCALL WRI
MOV R1,#50H
XTKL:
CLR A
MOV A,@R1
MOV P0,A
LCALL WRD
INC R1
CJNE R1,#55H,XTKL
;----------------------RET
CLR P2.5
CLR p2.7
CLR p2.6
74
CLR p2.7
CLR p2.6
MOV P0,#30H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#30H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#38H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#01H
LCALL WRI
75
CLR p2.7
CLR p2.6
MOV P0,#01H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#01H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#02H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#0CH
LCALL WRI
CLR p2.7
CLR p2.6
76
CLR p2.7
CLR p2.6
MOV P0,#38H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#06H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#01H
LCALL WRI
RET
;---------------------------TLINE: CLR p2.7
CLR p2.6
MOV P0,#80H
LCALL WRI
77
78
RET
79
DEL:
MOV R7,#FFH
DJNZ R7,$
RET
DEL1:
MOV R7,#FFH
DJNZ R7,$
RET
SEC:
MOV R5,#03H
M1:
MOV R6,#FFH
M2:
MOV R7,#FFH
M3:
DJNZ R7,M3
DJNZ R6,M2
DJNZ R5,M1
RET
SEC3:
MOV R5,#0FH
M13:
MOV R6,#FFH
M23:
MOV R7,#FFH
M33:
DJNZ R7,M33
DJNZ R6,M23
DJNZ R5,M13
RET
80
SSEC:
MOV R5,#3FH
SM1:
MOV R6,#FFH
SM2:
MOV R7,#FFH
SM3:
DJNZ R7,SM3
DJNZ R6,SM2
DJNZ R5,SM1
RET
;********************************************
XDEL:
mov r4,#0FH
djnz r4,$
RET
XDEL1:
mov r4,#0FH
djnz r4,$
RET
mov r4,#FFH
djnz r4,$
DJNZ R5,GB
RET
81
CMD1: CLR A
MOVC A,@A+DPTR
MOV R6,A
TXD
INC DPTR
DJNZ R2,CMD1
RET
MOV R2,#32H
LCALL CMD1
RET
MOV R2,#32H
LCALL CMD1
BBBM: RET
SPINI:
MOV A,#00H
MOV TCON,#40H
MOV TMOD,#20H
MOV SCON,#52H
MOV IE,#9AH
MOV TH1,#FDH
MOV TL1,#FDH
RET
;##############################
ORG 0900H
;************ 1 LINE
83
'
DB 'WAITIN FOR
'
DB ' SENSOR
DB ' ACTIVATED
'
'
'
'
'
;*********************************
ORG 1B00H
AT_CMGF: DB "AT+CMGF=1"
84
ORG 1B20H
AT_CPMS: DB "AT+CPMS="
DB 22H
DB "SM"
DB 22H
ORG 1B40H
AT_CMGW: DB "AT+CMGS="
DB 22H
DB "8885463472"
DB 22H
ORG 1B60H
AT_CMD: DB "SOMEBODY ENTERED INTO YOUR HOUSE
"
DB 1AH
ORG 1BA0H
AT_CMSS: DB "AT+CMSS=1"
ORG 1BC0H
AT_D:
DB "ATD8885463472;"
ORG 1C00H
85
ORG 1C50H
AT_CNMI: DB "AT+CNMI=2,2,0,0,0"
ORG 1C70H
AT_CNMA: DB "AT+CNMA"
ORG 1C80H
;2ND SMS
AT_CMGW2:DB "AT+CMGS="
DB 22H
DB "9177965408"
DB 22H
86
;3RD SMS
AT_CMGW3:DB "AT+CMGS="
DB 22H
DB "8187017099"
DB 22H
ORG 1CD0H
AT_D2:
DB "ATD9177965408;"
ORG 1CF0H
AT_D3: DB "ATD8187017099;"
ORG 1E10H
AT_H:
DB "ATH"
ORG 1E20H
AT_CMD1: DB "FIRE ACCIDENT IN YOUR HOUSE AT HOME "
DB 1AH
END;
;AAAAAAAAAAAAA#############################################
#####
87
88