You are on page 1of 52

.

EMBEDDED BASED SECURITY SYSTEM USING IR SENSORS


A Dissertation Submitted in the Partial Fulfillment of the Academic Requirements for the Award of the Degree of
BACHELOR OF TECHNOLOGY IN ELECTRONICS AND COMMUNICATION ENGINEERING

By C.ANSHUKA G.DIVYA P.SANDHAYA : 08RH1A0405 : 08RH1A0417 : 08RH1A0453

Under the Esteemed guidance of MRS.H. SHANTHI


ASST.PROFESSOR

Department of Electronics and Communication Engineering

MALLA REDDY ENGINEERING COLLEGE FOR WOMEN


MAISAMMAGUDA, DHULAPALLY, SECUNDERABAD

(Approved by AICTE, Affiliated to JNTUH )

2011-12

A MINI PROJECT REPORT ON

EMBEDDED BASED SECURITY SYSTEM USING IR SENSORS


A Dissertation Submitted in the Partial Fulfillment of the Academic Requirements for the Award of the Degree of
BACHELOR OF TECHNOLOGY IN ELECTRONICS AND COMMUNICATION ENGINEERING

By C.ANSHUKA G.DIVYA P.SANDHAYA :08RH1A0405 :08RH1A0417 :08RH1A0453

Under the Esteemed guidance of MRS.H. SHANTHI


ASST.PROFESSOR

Department of Electronics and Communication Engineering

MALLA REDDY ENGINEERING COLLEGE FOR WOMEN


MAISAMMAGUDA, DHULAPALLY, SECUNDERABAD

(Approved by AICTE, Affiliated to JNTUH )

2011-12

MALLA REDDY ENGINEERING COLLEGE FOR WOMEN


(SPONSERED BY MALLA REDDY EDUCATIONAL SOCIETY) Affiliated to JNTU, Hyderabad Maisammaguda, Dhulapally (post via Hakimpet), Secunderabad-500014

Certificate
This is to certify that this is the bonafide record of the Mini project titled Embedded based security system using IR sensors submitted by

C.ANSHUKA G.DIVYA P. SANDHYA

08RH1A0405 08RH1A0417 08RH1A0453

Of final year B.tech, in the partial fulfillment of the requirements for the degree of Bachelor of Technology in Electronics and Communication Engineering during the year 2011-2012. The results embodied in this Mini project report have not been submitted to any other university or institute for the award of any degree or diploma.

INTERNAL GUIDE Mrs. H.Shanthi

HEAD OF DEPARTMENT B.Chinranjeevi

EXTERNAL EXAMINER

ACKNOWLEDGEMENT

We feel ourselves honoured and privileged to place our warm salutation to our college Malla Reddy Engineering College for Women and department of Electronics and Communication Engineering which gave us the opportunity to have expertise in engineering and profound technical knowledge. We would like to convey thanks to our internal project guide Mrs.H.SHANTI for his/her regular guidance and constant encouragement and we are extremely grateful to him/her for his/her valuable suggestions and unflinching co-operation throughout project work. We would also like to thank our Project co-coordinators Mrs.N.NEERAJA for their kind encouragement and overall guidance in viewing this program a good asset. With profound gratitude, we express our heartiest thanks to Mr.B.CHIRANJEEVI , Head of the Department ,ECE for encouraging us in every aspect of our project. We wish to convey gratitude to our Principal Dr.Y.Madhavee Latha, for providing us with the environment and means to enrich our skills and motivating us in our endeavor and helping us realize our full potential. With regards and gratitude C.ANSHUKA G.DIVYA P.SANDHYA

DECLARATION
We hereby declare that the project entitled SECURITY SYSTEM USING IR SENSORS submitted to Malla Reddy Engineering College for Women, affiliated to Jawaharlal Nehru Technological University, Hyderabad for the award of the Degree of Bachelor of Technology in Electronics and Communication is a result of original research work done by us. It is further declared that the project report or any part thereof has not been previously submitted to any University or Institute for the award of degree or diploma.

C.ANSHUKA(08RH1A0405) G.DIVYA(08RH1A0417) P.SANDHYA(08RH1A0453)

ABSTRACT

In our daily life security one of the main concerned is when any one enters in the restricted area the security systems automatically alarms. This can be implemented in houses, offices, museums , we can achieve the project through IR transmitter and IR receiver. The signal is transmitted from IR transmitter and this signal drives receiver circuit when any obstacle occur in between IR transmitter and receiver then it signals the microcontroller and the alarm automatically buzzers controlling these are all the things can controlled through software written in 89S52 controller. Generation of the IR rays is done using 555 timer and IR led. In this construct the 555 timers is in a stable mode at output which is connected at the IR led. From this circuit we can get the IR rays continuously. These IR rays can detect from TSOP 1738 receiver. We are using 89S52 microcontroller one of the powerful micro-controller for commercial purpose. We are using the one of the powerful tool to developing the software for this project.

HARDWARE COMPONENTS:
1. 89S52 MICROCONTROLLER. 2. IR RECEIVERS (TSOP 1356/1738). 3. IR TRANSMITTERS. 4. 555 TIMER. 5. BUZZER

INDEX
Certificate Acknowledgement Declaration Abstract Contents List of Figures List of Abbreviations i ii iii 7 8 10 10

CHAPTER 1 INTRODUCTION

PAGE NOs

1.1) 1.2) 1.3) 1.4) 1.5)

OVERVIEW STATMENT OF THE PROBLEM OBJECTIVE OF THE STUDY LITERATURE SURVEY ORGANISATION OF THESIS

11 11 12 12 13

CHAPTER 2 DESCRIPTION OF HARDWARE COMPONENTS

2.1) 2.2) 2.3) 2.4) 2.5) 2.6) 2.7) 2.8)

BLOCK DIAGRAM INTRODUCTION TO AT89S52 FEATURES NESSESITY OF MICROCONTROLLER PIN DIAGRAM PIN DESCRIPTION MEMORIES POWER SUPPLY

14 14 15 15 17 18 19 20

CHAPTER 3 BUZZER AND LCD INTERFACING WITH CIRCUITRY 3.1) TRASNISTOR DRIVER 3.1.1) FEATURES 3.1.2) DESCRIPTION 3.1.3) LIMITING VALUES 3.2) LIQUID CRYSTAL DISPLAY 3.2.1) LCD CONNECTION 3.2.2) LCD INITIALISATION 3.3) LIGHT EMITTING DIODE(LED) 3.3.1) PHYSICAL FUNCTION OF LED 3.4) ULN 2003 DRIVER 3.4.1) FEATURES 3.5) IR SENSORS 3.5.1) FEATURES 3.6) 3.7) BUZZER 555 TIMER

22 22 22 22 23 24 25 25 26 26 27 28 28 29 29 30

CHAPTER 4 IMPLEMENTAION 4.1) 4.2) 4.3) 4.4) ALGORITHM FLOW CHART CIRCUIT DIAGRAM SOFTWARE DEVELOPMENT 4.4.1) 4.4. 2) 4.4.3) 4.5) 4.6) INTRODUCTION TOOLS USED WORKING WITH Keil

31 32 33 34 35 35 35 36 43 45

WORKING PROCEDURE PROGRAM

CHAPTER 5 RESULT CHAPTER 6 CONCLUSION BIBLIOGRAPHY APPENDIX 9

48 49 50 51

LIST OF FIGURES
Page Nos 1. Fig2.1 BLOCK DIAGRAM 2. Fig2.2 PIN DIAGRAM 3. Fig2.3 OSCILLATOR AND TIMING CIRCUIT 4. Fig2.4 BLOCK DIAGRAM OF POWER SUPPLY 5. Fig3.1 SIMPLIFIED OUTLINE(T0-92)SYMBOL 6. Fig3.2 CONNECT OF MICROCONTROLLER WITH BUZZER 7. Fig3.6 LCD SYMBOL 8. Fig3.7 LED SYMBOL 9. Fig3.8 ULN PIN CONNECTION 10. Fig3.9 ULN BLOCK DIAGRAM 11. Fig3.10 IR SENSOR 12. Fig3.11 PIEZO ELECTRIC BUZZER CIRCUIT 13. Fig3.12 TYPES OF BUZZER 14. Fig3.13 555 TIMER 15. Fig4.1 FLOW CHART 16. Fig4 CIRCUIT DIAGRAM 17. Fig5 KEIL SOFTWARE INTERNAL STAGES 14 17 18 20 22 23 24 26 27 27 28 29 29 30 33 34 35

LIST OF ABBREVATIONS
1. LED Light Emitting Diode 2. ULN Upper Level Negligible 3. RAM Random Access Memory 4. ROM Read Only Memory 5. I/O Input Output 6. UART Universal Asynchronous Receiver and Transmitter

10

CHAPTER-1 INTRODUCTION
1.1 OVERVIEW:
The project mainly deals with the embedded based security system using ir sensors. The system is designed with the help of microcontroller which is the heart of the project and is interfaced to the liquid crystal display (LCD) which displays the result instantenously. we can achieve the project through IR transmitter and IR receiver. When any obstacle occur in between IR transmitter and IR receiver then the signal is transmitted from IR transmitter and this signal drives receiver circuit it signals the microcontroller and the alarm automatically buzzers , these are all the things can controlled through software written in 89C52 controller. A simple program is written and dumped in the micro controller to accept the interrupts and identify the object inorder to provide security. These IR rays can detect from TSOP 1738 receiver. These all can be implemented by using keil software used in embedded C.All the components are connected by using hardware components such as 89s52 microcontroller,555 timer ,IR transmitter and receiver and buzzer these all are combined to form the security system.

1.2 STATEMENT OF THE PROBLEM:

Nowadays, security system becomes the best solution to overcome House Intrusion problem when user is not in house. As we know, there are many types of security system which is too expensive and difficult to use. For that reason, an effective security system at low cost is built where user can also program the security system by their own. This project is focusing on developing a IR senors security system with an infrared detector which is controlled by Microcontroller89s52.

11

1.3 OBJECTIVE OF THE STUDY:


The objective of this project is to build a security system using microcontroller AT89S52 based on infrared detection.This can be implemented in museums,offices,large buildings . The main objective is to provide the security in the restricted area , this can be implemented by using security systemthat is when some one enters into the restricted area the management will cometo know about the person is entering so this can be possible by ringing a sound through alaram and so that the security can be alert. This can be achieved through the microcontroller using AT89S5.

1.4 LITERATURE REVIEW: IR sensors are mainly used in security systems [4]. It is typically positioned near exterior doorways or windows of a building to monitor the area around it. Since sensors are so flexible and have so many uses, it offers feelings of protection and security for the average homeowner as well as commercial organizations [4]. An electronic IR sensors is a device used to detect any physical movement in a given area and transforms motion into an electric signal. It consist of sensor that electrically connected to other devices such as security system, lighting, audio alarms, and other applications. IR sensors are used in a wide variety of applications and as a result, many different types of infrared sensors are available including the motion sensor. Infrared sensors are widely known in the arts of intrusion detection and in fire or smoke detection. It is a device that often used in automatic light switches and security systems to turn on a light or to activate some other form of alarm or warning indicator when person enters a monitored area [4]. The infrared sensors have basically two forms: active and passive. [4]

12

1.5 ORGANISATION OF THESIS: Chapter 1 explains the background of security system , the project objective, the project scope, and the literature review of ir sensors for security system. The concepts of ir detector are the major element as a guide for the development of the security system. Chapter 2 explains the systems contain microcontroller its introduction and features and the necessity of the microcontroller.A brief explanation of pin diagram and oscillator and clock.differnt types of memories such as code memory and internal RAM . The power supply involves transformer,rectifier,smoothing,regulator.. Chapter 3 explains briefly about the components used such as buzzer and lcd interfacing circuit,its features .led .lcd,ir sensor,buzzer,555timer. Chapter 4 represents the algorithm, and flow chart and schematic diagram. And also discusses about the software used and the program which is written in the microcontroller and also explains about the working procedure and the code used in the microcontroller. Chapter5 discusses about the result and represent the kit. Chapter6 represents the applications and advantages of the project and at last concludes with conclusion and the future scope of the system and bibliography.

13

CHAPTER-2 DESCRIPTION OF HARDWARE COMPONENTS


2.1 BLOCK DIAGRAM:

ALARAM

IR TRANSMITTTER

AT89C52
IR RECIEVER

ULN

2803

2.2 INTRODUCTION TO AT89S52


The system requirements and control specifications clearly rule out the use of 16, 32 or 64 bit micro controllers or microprocessors. Systems using these may be earlier to implement due to large number of internal features. They are also faster and more reliable but, the above application is satisfactorily served by 8-bit micro controller. Using an inexpensive 8-bit Microcontroller will doom the 32-bit product failure in any competitive market place. Coming to the question of why to use 89S52 of all the 8-bit Microcontroller available in the market the main answer would be because it has 8kB Flash and 256 bytes of data RAM32 I/O lines, three 16-bit timer/counters, a Eight-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power Down Mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next hardware reset. The Flash program memory supports both parallel programming and in Serial In-System Programming (ISP). 14

The 89S52 is also In-Application Programmable (IAP), allowing the Flash program memory to be reconfigured even while the application is running. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications.

2.3 FEATURES
Compatible with MCS-51 Products 8K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 1000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 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 Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer -Power-off Flag

2.4 NECESSITY OF MICROCONTROLLERS:


Microprocessors brought the concept of programmable devices and made many applications of intelligent equipment. Most applications, which do not need large amount of data and program memory, tended to be costly. The microprocessor system had to satisfy the data and program requirements so, sufficient RAM and ROM are used to satisfy most applications .The peripheral control equipment also had to be satisfied. Therefore, almost all-peripheral chips were used in the design. Because of these additional peripherals cost will be comparatively high.

15

An example: 8085 chip needs:

An Address latch for separating address from multiplex address and data.32-KB RAM and 32-KB ROM to be able to satisfy most applications. As also Timer / Counter, Parallel programmable port, Serial port, and Interrupt controller are needed for its efficient applications. In comparison a typical Micro controller 8051 chip has all that the 8051 board has except a reduced memory as follows. 4K bytes of ROM as compared to 32-KB, 128 Bytes of RAM as compared to 32-KB.

Bulky: On comparing a board full of chips (Microprocessors) with one chip with all components in it (Microcontroller).

Debugging: Lots of Microprocessor circuitry and program to debug. In Micro controller there is no Microprocessor circuitry to debug. Slower Development time: As we have observed Microprocessors need a lot of debugging at board level and at program level, where as, Micro controller do not have the excessive circuitry and the built-in peripheral chips are easier to program for operation. So peripheral devices like Timer/Counter, Parallel programmable port, Serial Communication Port, Interrupt controller and so on, which were most often used were integrated with the Microprocessor to present the Micro controller .RAM and ROM also were integrated in the same chip. The ROM size was anything from 256 bytes to 32Kb or more. RAM was optimized to minimum of 64 bytes to 256 bytes or more. Microprocessor has following instructions to perform: 1. Reading instructions or data from program memory ROM. 2. Interpreting the instruction and executing it. 3. Microprocessor Program is a collection of instructions stored in a Nonvolatile memory. 4. Read Data from I/O device 5. Process the input read, as per the instructions read in program memory. 6. Read or write data to Data memory. 7. Write data to I/O device and output the result of processing to O/P device. 16

2.5 PIN DIAGRAM

FIG-2 PIN DIAGRAM OF 89S52 IC

17

2.6 PIN DESCRIPTION Pin Description VCC: Supply voltage. GND: Ground.

Port 0 Port 0 is an 8-bit open drain bi-directional I/O port. When 1s are written to port 0 pins, the pins can be used as high- impedance inputs. Port 0 can also be configured to be the multiplexed loworder address/data bus during accesses to external pro-gram and data memory.

Port 2 Port 2 is an 8-bit bi-directional I/O port with internal pullups. The. When 1s are written to Port 2 pins, they are pulled high by the internal pullups and can be used as inputs.

RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.

The 8052 Oscillator and Clock: The heart of the 8051 circuitry that generates the clock pulses by which all the internal all internal operations are synchronized. Pins XTAL1 And XTAL2 is provided for connecting a resonant network to form an oscillator. Typically a quartz crystal and capacitors are employed. The crystal frequency is the basic internal clock frequency of the microcontroller. The manufacturers make 8051 designs that run at specific minimum and maximum frequencies typically 1 to 16 MHz.

18

Fig-4 Oscillator and timing circuit

2.7 MEMORIES

The 8052 have three general types of memory. They are on-chip memory, external Code memory and external Ram. On-Chip memory refers to physically existing memory on the micro controller itself. External code memory is the code memory that resides off chip. This is often in the form of an external EPROM. External RAM is the Ram that resides off chip. This often is in the form of standard static RAM or flash RAM.

a) CODE MEMORY Code memory is the memory that holds the actual 8052 programs that is to be run. This memory is limited to 64K. Code memory may be found on-chip or off-chip. It is possible to have 8K of code memory on-chip and 60K off chip memory simultaneously. If only off-chip memory is available then there can be 64K of off chip ROM. This is controlled by pin provided as EA

19

b) INTERNAL RAM The 8052 have a bank of 256 bytes of internal RAM. The internal RAM is found onchip. So it is the fastest Ram available. And also it is most flexible in terms of reading and writing. Internal Ram is volatile, so when 8051 is reset, this memory is cleared. 256 bytes of internal memory are subdivided. The first 32 bytes are divided into 4 register banks. Each bank contains 8 registers. Internal RAM also contains 256 bits, which are addressed from 20h to 2Fh. These bits are bit addressed i.e. each individual bit of a byte can be addressed by the user. They are numbered 00h to FFh. The user may make use of these variables with commands such as SETB and CLR.

2.8 POWER SUPPLY


There are many types of power supply. Most are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. For example a 5V regulated supply can be shown as below

Fig 2.1: Block Diagram of a Regulated Power Supply System

Similarly, 12v regulated supply can also be produced by suitable selection of the individual elements.There are different components used such as

20

2.8.1Transformer:
A transformer steps down high voltage AC mains to low voltage AC. Here we are using a center-tap transformer whose output will be sinusoidal with 36volts peak to peak value

2.8.2 Rectifier:
A rectifier converts AC to DC, but the DC output is varying. There are several types of rectifiers; here we use a bridge rectifier.

2.8.3 Smoothing:
The smoothing block smoothes the DC from varying greatly to a small ripple and the ripple voltage is defined as the deviation of the load voltage from its DC value.

2.8.4 Regulator:
Regulator eliminates ripple by setting DC output to a fixed voltage. Voltage regulator ICs are available with fixed (typically 5V, 12V and 15V) or variable output voltages. Negative voltage regulators are also available

21

CHAPTER 3
BUZZER AND LCD INTERFACING WITH CIRCUITRY

3.1 Transistor Driver Circuit


The transistor used in this project to drive the buzzer is BC547. The features of this transistor are discussed in the next topics.

3.1.1Features
Low current (max. 100 mA) Low voltage (max. 65 V) Applications General purpose switching and amplification.

3.1.2 Description
PNP transistor in a TO-92; SOT54 plastic package.

Figure 1 Simplified outline (TO-92;SOT 54) and symbol

22

3.1.3 Limiting Values


In accordance with the Absolute Maximum Rating System (IEC 134). Digital systems and microcontroller pins lack sufficient current to drive the circuits like buzzer circuits and relay circuits. While these circuits need around 10milli amps to be energized, the microcontrollers pin can provide a maximum of 1-2milli amps current. For this reason, a driver such as a power transistor is placed in between the microcontroller and the buzzer. Vcc

AT89C51

BUZZER

P1.0 GROUND

Figure 2 Connection of Micro Controller with Buzzer The operation of this circuit is as follows: The input to the base of the transistor is applied from the microcontroller port pin P1.0. The transistor will be switched on when the base to emitter voltage is greater than 0.7V (cut-in voltage). Thus when the voltage applied to the pin P1.0 is high i.e., P1.0=1 (>0.7V), the transistor will be switched on and thus the buzzer will be activated and produces a loud noise. When the voltage at the pin P1.0 is low i.e., P1.0=0 (<0.7V) the transistor will be in off state and the buzzer will be off. Thus the transistor acts like a current driver to operate the buzzer accordingly.

23

3.2 LIQUID CRYSTAL DISPLAY


LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs (seven segment LEDs or other multi segment LEDs) because of the following reasons: 1. The declining prices of LCDs. 2. The ability to display numbers, characters and graphics. This is in contrast to LEDs, which are limited to numbers and few characters. 3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep displaying the data. 4. Ease of programming for characters and graphics. These components are specialized for being used with the microcontrollers, which means that they cannot be activated by standard IC circuits. They are used for writing different messages on a miniature LCD.

Figure 3 LCD Display A model described here is for its low price and great possibilities most frequently used in practice. It is based on the HD44780 microcontroller (Hitachi) and can display messages in two lines with 16 characters each. It displays all the alphabets, Greek letters, punctuation marks, mathematical symbols etc. In addition, it is possible to display symbols that user makes up on its own. Automatic shifting message on display (shift left and right), appearance of the pointer, backlight etc. are considered as useful characteristics.

24

3.2.1 LCD Connection


Depending on how many lines are used for connection to the microcontroller, there are 8-bit and 4-bit LCD modes. The appropriate mode is determined at the beginning of the process in a phase called initialization. In the first case, the data are transferred through outputs D0D7 as it has been already explained. In case of 4-bit LED mode, for the sake of saving valuable I/O pins of the microcontroller, there are only 4 higher bits (D4-D7) used for communication, while other may be left unconnected.

Consequently, each data is sent to LCD in two steps: four higher bits are sent first (that normally would be sent through lines D4-D7), four lower bits are sent afterwards. With the help of initialization, LCD will correctly connect and interpret each data received. Besides, with regards to the fact that data are rarely read from LCD (data mainly are transferred from microcontroller to LCD) one more I/O pin may be saved by simple connecting R/W pin to the Ground

3.2.2 LCD Initialization


Once the power supply is turned on, LCD is automatically cleared. This process lasts for approximately 15mS. After that, display is ready to operate. The mode of operating is set by default. This means that: 1. Display is cleared 2. Mode DL = 1 Communication through 8-bit interface N = 0 Messages are displayed in one line F = 0 Character font 5 x 8 dots 3. Display/Cursor on/off D = 0 Display off U = 0 Cursor off B = 0 Cursor blink off 4. Character entry ID = 1 Addresses on display are automatically incremented by 1 S = 0 Display shift off 25

3.3 LIGHT-EMITTING DIODE (LED)


A light-emitting diode, usually called an LED, is a semiconductor diode that emits incoherent narrow-spectrum light when electrically biased in the forward direction of the p-n junction, as in the common LED circuit. This effect is a form of electroluminescence. A LED is usually a small area light source, often with extra optics added to the chip that shapes its radiation pattern. Leds are often used as small indicator lights on electronic devices and increasingly in higher power applications such as flashlights and area lighting. The color of the emitted light depends on the composition and condition of the semi conducting material used, and can be infrared, visible, or ultraviolet. LEDs can also be used as a regular household light source. Besides lighting, interesting applications include sterilization of water and disinfection of devices.

3.3.1 Physical function of LED Like a normal diode, the LED consists of a chip of semi conducting material impregnated, or doped, with impurities to create a p-n junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge carriers electrons and holes flow into the junction from electrodes with different voltages. When an electron meets a hole, it falls into a lower energy level, and releases energy in the form of a photon.

Fig 3.3.1 LED

26

3.4 ULN 2003 DRIVER:


ULN is mainly suited for interfacing between low-level circuits and multiple peripheral power loads. The series ULN20XX high voltage, high current darlington arrays feature continuous load current ratings. The driving circuitry in- turn decodes the coding and conveys the necessary data to the timer.

27

3.4.1) Features of ULN 2003 Seven Darlington per package. Output current 500ma per driver (600ma peak). Output voltage 50v. Integrated suppression diodes for inductive loads. Outputs can be paralleled for high current TTL/CMOS/DTL compatible inputs. Inputs pinned opposite outputs to simplify layout. Transient protected outputs. Dual In-Line plastic package or small-Outline IC package.

3.5 IR SENSOR
IR sensor consists of two sensors. The first sensor presented is infrared based ,while the second one uses a red LED and photocell. The infrared based sensor emits the infrared rays and the second sensor detects the rays which are reflected from the obstacle. A line sensor in its simplest form is a sensor capable of detecting a contrast between adjacent surfaces, such as difference in color, roughness, or magnetic properties ,for example. The simplest would be detecting a difference in color, for example black and white surfaces. Using simple opto electronics, such as infrared photo-transistors, color contrast can easily be detected. Infrared emitter/detectors or photo-transistors are in expensive and are easy to interface to a microcontroller. The theory of operation is simple and for brevity, only the basics will be considered.

28

3.5.1 FEATURES:
High reliability Light weight Low cost Long detection range Small size Wide spectral response

3.6 BUZZER
The Piezoelectric sound components introduced herein operate on an innovative principle utilizing natural oscillation of piezoelectric elements. These buzzers are of feredin light weight compact sizes from the smallest diameter of 2mm to large Piezoelectric sounders. Today piezoelectric sound components are used in many ways such as home appliances, OA equipment, Audio equipment telephones etc. And they are widely applied for example in alarms, speakers, telephone ringers, receivers, beep sounds etc.

A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric Typical uses of buzzers and beepers include alarm devices, timers and confirmation of
user input such as a mouse click or keystroke.

29

PIEZOELECTRIC BUZZER CIRCUIT

PIEZO ELECTRIC BUZZER TYPES OF BUZZER

30

3.7 555 TIMER IC:


The 555 timer IC is an integrated circuit (chip) used in a variety of timer, pulse generation and oscillator applications. The 555 can be used to provide time delays, as an oscillator, and as a flip-flop element

31

CHAPTER 4 IMPLEMENTATION

4.1 ALGORITHM:
Algorithm is defined as process of implementing the entire process in steps. The following are the steps which occur during the process of Embedded based security system using ir sensors with instant results. 1. Start the procedure. 2. Reset all ports so that errors do not occur. 3.Initially the microcontroller will be initialized at the beginning of the system. 4.Initialisation of the IR module happens when both IR transmitter and IR receiver placed within the distance so that the object can enter into that area. 5.Initialisation of the 555 timer happens in order to generate the rays using IR leds and the 555timer acts in the stable mode at the output . 6.The buzzer is used to produce the sound when any obstacle occurs. 7.When the obstacle occurs between the ir transmitter and ir receiver then automatically the signal passes from microcontroller to the buzzer to beep the sound 8. If no obstacle occurs therefore no signal takes place and there will be no sound 9.If any obstacle occurs the lcd will displays the message inorder to indicate the object. 10. At last when the interrupt occurs then results will be displayed at that point of time instantaneously.

In this way the procedure is followed security is maintained and the results are displayed at that point time. The above steps are showed as flow chart below

32

4.2 FLOW CHART


Start

Initialization of microcontroller

Initialization of IR module

Initialization of 555 timer

Buzzer

yes If any object detected Buzzer

no

Stop

33

4.3 CIRCUITS DIAGRAMS

34

4.4 SOFTWARE DEVELOPMENT 4.4.1 INTRODUCTION:


In this chapter the software used and the language in which the program code is defined is mentioned and the program code dumping tools are explained. The chapter also documents the development of the program for the application. This program has been termed as Source code. Before we look at the source code we define the two header files that we have used in the code.

4.4.2 TOOLS USED:

Figure 5.1 Keil Software- internal stages Keil development tools for the 8051 Microcontroller Architecture support every level of software developer from the professional applications

35

4.4.3 WORKING WITH KEIL


1. 2. Click on the Keil uVision Icon on Desktop The following fig will appear

3. 4.

Click on the Project menu from the title bar Then Click on New Project

36

5.

Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\

6. 7. 8.

Then Click on Save button above. Select the component for u r project. i.e. Atmel Click on the + Symbol beside of Atmel

9.

Select AT89C51 as shown below

37

10. 11.

Then Click on OK The Following fig will appear

12.

Then Click either YES or NOmostly NO

13. 14.

Now your project is ready to USE Now double click on the Target1, you would get another option Source group 1 as shown in next page.

38

15.

Click on the file option from menu bar and select new

16.

The next screen will be as shown in next page, and just maximize it by double clicking on its blue boarder.

39

17. 18.

Now start writing program in either in C or ASM For a program written in Assembly, then save it with extension . asm and for C based program save it with extension .C

19.

Now right click on Source group 1 and click on Add files to Group Source

40

20.

Now you will get another window, on which by default C files will appear.

21. 22. 23.

Now select as per your file extension given while saving the file Click only one time on option ADD Now Press function key F7 to compile. Any error will appear if so happen.

41

24. 25.

If the file contains no error, then press Control+F5 simultaneously. The new window is as follows

26. 27.

Then Click OK Now Click on the Peripherals from menu bar, and check your required port as shown in fig below

42

28.

Drag the port a side and click in the program file.

29. 30.

Now keep Pressing function key F11 slowly and observe. You are running your program successfully

43

4.5 WORKING PROCEDURE:


Embedded based security system using IR sensors with 89C51 microcontroller is an exclusive project that can provide a highly secure component. The microcontroller controls the system by using all peripherals such as timer , IR leds and ULN driver and also buzzer. The important element in this system is both ir transmitter and ir receiver . the transmitter transmits the ir rays using timer and the reciecver receives the signal when any obstacle occurs .therfore as the interrupt occurs the signal is received to the microcontroller . The microcontroller using the sensors it can detect the object and can identify the object and automatically the alarm will produce some sound by using buzzer . these all are controlled through the microcontroller and by all these components are fetched in one board called as kit With the usage of the components hardware the design of the kit and software design is done through the embedded c language and programming is written through embedded language and it is written in such a way that the system will perform to provide security and can implement the kit at immediate real time and so it is used as real time purpose and the program which is written in the software is dumped into the microcontroller and it controls the system according to the instructions given into it.

44

4.6 PROGRAM
#include<reg51.h> sbit ir=P0^0; sbit buzzer=P0^7; stepmotor(); delay(unsigned int); main() { //unsigned char i; buzzer=1; while(1) { if(ir==0) { buzzer=0; stepmotor(); buzzer=1; } else { buzzer=1; } } } unsigned char i,j;

for(i=1;i<5;i++) { for(j=0x01;j<0x09;i++) { P0=j; delay(10); } } P0=0X11; delay(10); P0=0X22; delay(10); P0=0X44; delay(10); P0=0X88; delay(10); P0=0X11; 45

delay(10); P0=0X22; delay(10); P0=0X44; delay(10); P0=0X88; delay(10); P0=0X11; delay(10); P0=0X22; delay(10); P0=0X44; delay(10); P0=0X88; delay(10); P0=0X11; delay(10); P0=0X22; delay(10); P0=0X44; delay(10); P0=0X88; delay(10); P0=0X11; delay(10); P0=0X22; delay(10); P0=0X44; delay(10); P0=0X88; delay(10); P0=0X11; delay(10); P0=0X22; delay(10); P0=0X44; delay(10); P0=0X88; delay(10); P0=0X44; delay(10); P0=0X22; delay(10); P0=0X11; delay(10); P0=0X88; delay(10); P0=0X44; delay(10); P0=0X22; 46

delay(10); P0=0X11; delay(10); P0=0X88; delay(10); P0=0X44; delay(10); P0=0X22; delay(10); P0=0X11; delay(10); P0=0X88; delay(10); P0=0X44; delay(10); P0=0X22; delay(10); P0=0X11; delay(10); P0=0X88; delay(10); P0=0X44; delay(10); P0=0X22; delay(10); P0=0X11; delay(10); P0=0X88; delay(10); P0=0X44; delay(10); P0=0X22; delay(10); P0=0X11; delay(10); } delay(unsigned int time) { unsigned int i,j; for(i=0;i<time;i++) for(j=0;j<1275;j++); }

47

CHAPTER 5 RESULT
The embedded based security system using ir sensors results to provide security to the system are concerned in order to require for the development in the real time applications. The power supply is maintained to generate 5v by using stepdown transformer and the microcontroller will receives the power and it will control the ir transmitter and ir receiver by and also it displays the message on lcd as shown in figure. When any obstacle occurs in between ir transmitter and ir receiver the alaram automatically alarms so that the security can be alert . This simple technique is possible by using the kit through hardware and software design.

48

CHAPTER 6 CONCLUSION

APPLICATIONS
Prevention from un authorized access Burglar alarm system Obstacle detection Home and industrial automation Infrared remote control units with high power requirements Infrared source for optical counters and card readers Museums Military purposes

ADVANTAGES:

Tested and proved in conditions of industrial production plants Modern technology, high security Possibility of interconnection with other safety applications, camera systems Offer and installation exactly chosen according to its suitability for each application

CONCLUSION:
The project SECURITY SYSTEM USING IR SENSORS has been successfully designed and tested. Integrating features of all the hardware components used have developed it. Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit. Secondly, using highly advanced ICs and with the help of growing technology the project has been successfully implemented.

FUTURE SCOPE:
This project has IR transmitter and receiver system, IR sensor interfaced to micro controller. Micro controller is programmed in such a way that it can be easily analysed .This project can be extended by using wireless technology like Zigbee and by interfacing it with PC.

49

BIBILOGRAPHY
.1. "The 8051 Microcontroller Architecture, Programming & Applications" By Kenneth J Ayala. , IEEE Conference, 12-14 April 2007, 2. "Power Electronics by M D Singh and K B Khanchandan IEEE Conference on Power Electronics, 2005 3."The 8051 Microcontroller & Embedded Systems" by Mohammed Ali Mazidi and Janice Gillispie Mazidi, 4.. "Linear Integrated Circuits by D Roy Choudary & Shail Jain 5. "Electrical Machines by S K Bhattacharya 6. "Electrical Machines II by B L Thereja

50

APPENDIX
The main aim of this project is to provide security . The system is designed with the help of microcontroller which is the heart of the project and is interfaced to the liquid crystal display (LCD) which displays the result instantenously. Access control system is one system that is used for security purpose in many organisations . Many modern electronic systems including personal computers, PDAs ,cell phones,Network routers, smart cards, and networked sensors to name a few need to access , store,manipulate, or communicate sensitive information, making security a serious concern in their design embedded systems, which account for a wide range of products from the electronics,semiconductor, telecomunicationds, and networking industries . Electronic security systems protecting estate are suitable complementary security measures to industrial television systems CCTV . The electronic security systems can ensure the security in all the categories including outdoor and indoor surveillance , systems of entry control systems , electronic fire fighting and for estate and buildings . The security can be achevied by using IR transmitter and IR receiver . when any obstacle comes in between both transmitter and receiver the alaram automatically buzzers the beep . These are all the things can controlled through software written in 89S52 controller. Ir rays are generated using 555 timer and led transmitter. We are using 89S52 microcontroller one of the powerful micro controller for commercial purpose. We are using the one of the powerful tool to developing the software for this project. Many modern electronic systems---including personal computers, PDAs, cell phones, network routers, smart cards, and networked sensors to name a few---need to access, store, manipulate, or communicate sensitive information, making security a serious concern in their design Embedded systems, which account for a wide range of products from the electronics, semiconductor, telecommunications, and networking industries, face some of the most demanding security concerns---on the one hand, they are often highly resource constrained, while on the other hand, they frequently need to operate in physically insecure environments.Security has been the subject of intensive research in the context of generalpurpose computing and communications systems.The challenges unique to embedded systems require new approaches to security covering all aspects of embedded system design from architecture to implementation. Security processing, which refers to the computations that must be performed in a system for the purpose of security, can easily overwhelm the computational capabilities of processors in both low- and high-end embedded systems. The aim of the project is to provide a security system that can monitor a the obstacle by using sensors. The main design principles used in designing the security system with IR sensors they are flexible and easily enhanced for future use. In system the main problem is to protect the user area from unauthorized access. The indoor and outdoor problems can be overcome by using sensors .Power consumption is the major factor in that can be implemented by using this system, for the purpose IR sensor is used. Security problems may arrive due to absence of man power in the required places.

51

A security system policy is a set of rules that apply to activities for the computer and A security policy is a set of rules that apply to activities for the computer and communications resources that belong to an organization. These rules include areas such as physical security, personnel security, administrative security, and network security.communications resources that belong to an organization. These rules include areas such as physical security, personnel security, administrative security, and network security. When you have a security system, it will work to deter burglars from entering your home, which means that it is also minimizing your chances of losing your possessions. Losing your things can be traumatic and expensive. The alarm system will sound if an intruder tries to get in and most times will scare them off. If it doesn't then help will be on the way immediately which means that they won't have much time to take hardly anything. Most of the alarms these days have a way that you can hook up your smoke alarms to them. That way if a fire is detected, the alarm will sound alerting you to the danger. It will also alert the security company to the danger so they can call for help for you. This could save your family's lives.

52

You might also like