Sie sind auf Seite 1von 30

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

CO-OPERATIVE INSTITUTE OF TECHNOLOGY VATAKARA


ENGINEERING COLLEGE UNDER CO-OPERATIVE ACADEMY OF PROFFESSIONAL EDUCATION (CAPE)
Established by Govt. of Kerala

DEPARTMENT OF ELECTRONICS AND COMMUNICATION MINIPROJECT REPORT ON

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS


SUBMITTED BY ANAND.R JITHIN KRISHNA B.S HARI K.P SHEETHAL SURENDRAN SHANIBA IBRAHIM

DEPARTMENT OF ELECTRONICS AND COMMUNICATION MARCH 2011

DEPT. OF ECE CITV

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

CO-OPERATIVE INSTITUTE OF TECHNOLOGY VATAKARA


ENGINEERING COLLEGE UNDER CO-OPERATIVE ACADEMY OF PROFFESSIONAL EDUCATION (CAPE)
Established by Govt. of Kerala

DEPARTMENT OF ELECTRONICS AND COMMUNICATION MINIPROJECT REPORT ON

TRANSFORMER PROTECTION WITH SMS ALER


GUIDED BY
Mr. PRAPU PREMANATH

SUBMITTED BY
ANAND.R JITHIN KRISHNA B.S HARI K.P SHEETAL SURENDRAN SHANIBA IBRAHIM

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

DEPT. OF ECE CITV

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

MARCH 2011

CO-OPERATIVE INSTITUTE OF TECHNOLOGY VATAKARA


ENGINEERING COLLEGE UNDER CO-OPERATIVE ACADAMY OF PROFFESSIONAL EDUCATION (CAPE) Established by Govt. of Kerala

DEPARTMENT OF ELECTRONICS AND COMMUNICATION MARCH 2011

CERTIFICATE
Certified that this project titled VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS is the bonafide record of the work done by ANAND.R, JITHIN KRISHNA B.S, HARI K.P, SHEETHAL SURENDRAN, SHANIBA IBRAHIM of B.Tech in Electronics and Communication towards the partial fulfillment of the requirement for the award of the Degree of Bachelor of Technology, by the Cochin University of Science and Technology.

Guide: Mr. PRAPU PREMANATH RAGI R.G Asst Proff Dept of ECE Mrs. HOD

DEPT. OF ECE CITV

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

Dept of ECE

ACKNOWLEDGEMENT

At the outset we would like to express our deepest gratitude to God Almighty for his abundant grace and guidance without which this project would not have been successfully presented. We express our sincere gratitude to our Principal Mrs. Smitha C.K and our college management, for providing well equipped laboratories, for our project work. Our sincere thanks to Mrs. Ragi R.G, Head of the department and all other lecturers of Electronics and Communications department, for their cooperative guidance. We would also like to thank our project guide Mr.Prapu premanath, Lecture of Electronics and Communications department, for his timely advice and support.

DEPT. OF ECE CITV

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

ABSTRACT

This project protects vehicles from accidents by finding distance and light intensity from opposite vehicle through Ultrasonic Sensor and Light Sensor. When a vehicle reaches opposite to our vehicle the sensor visualize its correct distance from our vehicle. {The project named vehicle security system using ultrasonic sensors is a security system which protects the vehicles from accidents. It has a provision for displaying the distance of any obstacle from the vehicles, with the aid of ECHO ultrasonic sensors. When a vehicle reaches opposite to our vehicle the sensor visualize its correct distance from our vehicle. It also has a light intensity controlling system envisaged with the aid of LDR (light dependent resistors). It ensures security to night drivers from the effects of high intensity light. Its provided with a buzzer that alarms when the distance between the vehicle and obstacle is less than 50cm. } This project contains a microprocessor called PIC16F876A. This controller is the heart of the Project. {Its a 28 pin device with improved core and peripheral features. With the help of microprocessor and ultrasonic sensors, we can display the distance between the vehicle and obstacle on an LCD screen.}

DEPT. OF ECE CITV

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

INTRODUCTION

There has a tremendous growth of modernization of electronic systems throughout the world. Human have always tried to make life more and more comfortable. We have reached from an age where human used to walk miles and miles to reach their destination to an age which use hybrid cars for travelling. The rapid increase in the number of vehicles and the pathetic condition of our roads are unfortunately increasing the accident day by day. The accident rate is slightly more during night driving. This project is developing a prevention method against road accidents. Here in our projects we have two security measures. One is to measure the distance from our vehicle to other vehicle or object in front of us and displaying it on a LCD monitor. This is one useful technique which help us while parking our vehicle and driving through a foggy condition. The measure is done by using the ultrasonic sensor using the famous Doppler Effect. When our vehicle approaches too near to an object or vehicle in front of us, a warning sound will be produced this is a useful function while driving through fog. The other security measure is to measure the intensity of light coming from an opposite vehicle during night drive. This helps us to reduce our light intensity while an opposite vehicle is

DEPT. OF ECE CITV

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

approaching and give clear view for them without light from our vehicle blocking their view. The measuring is done with the help of light sensor. Since our aim is to detect the light and reduce light intensity, this device is being placed on the front side of the vehicle.

BLOCK DIAGRAM

DEPT. OF ECE CITV

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

PIC16F876 A

PIC16F876A

PIC16F876A

PIC16F876A

BLOCK DIAGRAM EXPLANATION

DEPT. OF ECE CITV

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

The block diagram of vehicle security system consists of 5 blocks.

1. MICRO CONTROLLER Microcontroller is a device that includes microprocessor, memory and I/O lines on a single chip fabricated using CMOS technology. The microcontroller PIC16F876 is the main brain of the project. The assembly language program written in microcontroller receives input data and manipulates it and controls the output device. The main features PIC16F876 are:

100,000 erase/write cycle Enhanced Flash program memory typical 1,000,000 erase/write cycle Data EEPROM memory typical Data EEPROM Retention > 40 years Self-reprogrammable under software control In-Circuit Serial Programming (ICSP) via two pins Single-supply 5V In-Circuit Serial Programming Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation Programmable code protection Power saving Sleep mode Selectable oscillator options In-Circuit Debug (ICD) via two pins

DEPT. OF ECE CITV

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

2. INPUT SECTION The input section consists of light sensor and ultrasonic sensor. Here we use an LDR to sense the light.LDR is connected with comparator circuit using LM368. LDR (light Dependent Resistor) or photo is resistor whose resistance decreases with increasing light intensity. Ultrasonic sensor that we here used is ECHO sensor. It is an amazing product that provides very short to long range detection and ranging. The output of sensor is a ASCII serial output.

3. OUTPUT SECTION The output section consists of relay and buzzer. A relay is an electrical switch that opens and closes under the control of another electrical circuit. Here an SPDT relay is used to adjust the vehicle light intensity. The buzzer used here is a Piezo-electric buzzer or beeper is a signaling device usually electronic, typically used in auto mobiles, house hold appliances such as microwave oven, or game shows.

4. DISPLAY SECTION The LCD is used in the display section. A liquid crystal display (commonly abbreviated LCD) is a thin, flat display device made up of any number of colour or monochrome pixels arrayed in front of a light source or reflector.

DEPT. OF ECE CITV

10

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

CIRCUIT DIAGRAMS

CIRCUIT EXPLANATION

DEPT. OF ECE CITV

11

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

1. POWER SUPPLY:

The power supply circuit is shown in the figure. We use a regulator power supply, which gives a stable output of 5V from the voltage regulator IC 7805.The entire circuit uses the +5V power supply. The pin configuration is shown in the figure. The 230V 50Hz supply is step down by the transformer and is converted into DC by using the bridge rectifier. The output of the rectifier is filtered by 100 microfarad capacitor. This filtered DC is given to the regulator IC 7805 (pin 1 and pin 2). The output of the regulator (pin 3) Supplies 5V conditionally to the entire circuit. In practical cases we use batteries in rectification section.

IC 7805:
DEPT. OF ECE CITV 12

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

A voltage regulator (also called a regulator ) with only three terminal appears to be a simple device, but it is in fact a very complex integrated circuit. It converts a varying input voltage into a constant regulated output voltage. Voltage regulators are available in a varying of output like 5V, 6V, 9V, 12V and 15V. The LM78XX series of voltage regulators are designed for positive input. For application requiring negative input, the LM79XX series is used. The output of a regulator circuit can be increased by using a pair of voltage divider resistors. It is not possible to obtain a voltage lower than the started rating. You cannot use 12V regulator to make a 5V power supply, but you can use 5V regulator to make 12V supply. Voltage regulators are very robust. These can withstand over-current drawn due to due to short circuit and also overheating. In both cases regulator will cut off before any damage occurs. The only way to destroy a regulator is to apply reverse voltage to to its input. Reverse polarity destroys a regulator almost instantly.

PIC16F876MICROCONTROLLER:
PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to "Peripheral Interface Controller". PICs are popular with both industrial developers and hobbyists alike due to their low cost, wide availability, large user base, extensive collection of application notes, availability of low cost or free development tools, and serial programming (and reprogramming with flash memory) capability.

DEPT. OF ECE CITV

13

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

PIN OUT The pin out of PIC16F876 microcontroller is shown below:

CORE ARCHITECTURE The PIC architecture is characterized by its multiple attributes: Separate code and data spaces (Harvard architecture) for devices other than PIC32, which has Von Neumann architecture. A small number of fixed length instructions. Most instructions are single cycle execution (2 clock cycles), with one delay cycle on branches and skips. One accumulator (W0), the use of which (as source operand) is implied (i.e. is not encoded in the opcode). All RAM locations function as registers as both source and/or destination of math and other functions.
DEPT. OF ECE CITV 14

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

A hardware stack for storing return addresses. A fairly small amount of addressable data space (typically 256 bytes), extended through Banking. Data space mapped CPU, port, and peripheral registers.

PERFORMANCE: The architectural decisions are directed at the maximization of speed-to-cost ratio. The PIC architecture was among the first scalar CPU designs,[citation needed] and is still among the simplest and cheapest. The Harvard architecturein which instructions and data come from separate sourcessimplifies timing and microcircuit design greatly, and this benefits clock speed, price, and power consumption. The PIC instruction set is suited to implementation of fast lookup tables in the program space. Such lookups take one instruction and two instruction cycles. Many functions can be modeled in this way. Optimization is facilitated by the relatively large program space of the PIC (e.g. 4096 x 14-bit words on the 16F690) and by the design of the instruction set, which allows for embedded constants. For example, a branch instruction's target may be indexed by W, and execute a "RETLW" which does as it is named - return with literal in W. Execution time can be accurately estimated by multiplying the number of instructions by two cycles; this simplifies design of real-time code. Similarly, interrupt latency is constant at three instruction cycles. External interrupts have to be synchronized with the four clock instruction cycle; otherwise there can be a one instruction cycle jitter. Internal interrupts are already synchronized. The constant interrupt latency allows PICs to achieve interrupt driven low jitter timing sequences. An example of this is a video sync pulse generator. This is no longer true in the newest PIC models, because they have a synchronous interrupt latency of three or four cycles.

DEPT. OF ECE CITV

15

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

ADVANTAGES: The PIC architectures have these advantages: Small instruction set to learn and RISC architecture. Built in oscillator with selectable speeds. Easy entry level, in circuit programming plus in circuit debugging PICKit units available from Microchip.com for less than $50. Inexpensive microcontrollers. And wide range of interfaces including I2C, SPI, USB, USART, A/D, programmable Comparators, PWM, LIN, CAN, PSP, and Ethernet.

LIMITATIONS: The PIC architectures have these limitations: One accumulator. Register-bank switching is required to access the entire RAM of many devices Operations and registers are not orthogonal; some instructions can address RAM and/or immediate constants, while others can only use the accumulator.

DEPT. OF ECE CITV

16

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

LIGHT SENSOR CIRCUIT

Light sensor circuit consists of LM358 and LDR. Here the LDR senses the presence of light and corresponding voltage is compared with reference voltage by LM358 comparator.

LDR (LIGHT DEPENDENT RESISTOR):

DEPT. OF ECE CITV

17

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

The LDR is a device whose resistance varies with respect to the incident Light. The LDR negative region, which is intensity of the increases the decreases. This LDR is made project for dimming the light of the vehicle. has a working as the incident light resistance feature of use in this

LM358

The LM358 consists of two independent, high gain, internally frequency compensated operational amplifiers which were designed specifically to operate from a single power supply over a wide range of voltages. Operations from split power supplies are also possible and the low power supply current gain is independent of the magnitude of the power supply voltage.

DEPT. OF ECE CITV

18

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

Application areas include transducer amplifiers, dc gain blocks and all conventional op amp circuits which now can be more easily implemented in single power supply systems. The LM358 is available in a chip sized package (8-bump micro SMD) using Nationals micro SMD package technology.

BUZZER

A buzzer or a beeper is a signaling device, usually electronic, typically used in automobiles, house hold appliances like microwave oven or game shows. The word buzzer presumably comes from the buzzing noise that some buzzers make. The sound source of a piezoelectric buzzer is a piezoelectric diaphragm. A

piezoelectric diaphragm consists of a piezoelectric ceramic plate, which has an electrode on both sides and a metal plate. Applying dc voltage between electrodes of a piezoelectric diaphragm causes mechanical distortion due to the piezoelectric effect. Hence it produces sound waves .It is more popular to use a ceramic based piezoelectric sounder like sonalert,which makes a high pitched tone. Usually these

DEPT. OF ECE CITV

19

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

were hooked up to driver circuit which varies the pitch of the sound or pulsed the sound ON and OFF. Other sounds commonly used to indicate that a button has pressed are a ring or a beep.

LCD DISPLAY This component is specifically manufactured to be used with microcontrollers, which means that it cannot be activated by standard IC circuits. It is used for displaying different messages on a miniature liquid crystal display. The model described here is for its low price and great capabilities 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 can display all the letters of alphabet, Greek letters, punctuation marks, mathematical symbols etc. It is also possible to display symbols made up by the user. Other useful features include automatic message shift (left and right), cursor appearance, LED backlight etc.

DEPT. OF ECE CITV

20

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

LCD SCREEN An LCD screen can display two lines with 16 characters each. Every character consists of 5x8 or 5x11 dot matrix. This book covers a 5x8 character display which is most commonly used.

Display contrast depends on the power supply voltage and whether messages are displayed in one or two lines. For this reason, varying voltage 0-Vdd is applied to the pin marked as Vee. A trimmer potentiometer is usually used for this purpose. Some of the LCD displays have built-in backlight (blue or green LEDs). When used during operation, a current limiting resistor should be serially connected to one of the pins for backlight power supply (similar to LED diodes). If there are no characters displayed or if all of them are dimmed when the display is switched on, the first thing that should be done is to check the potentiometer for contrast adjustment. Is it properly adjusted? The same applies if the mode of operation has been changed (writing in one or two lines). RELAY

DEPT. OF ECE CITV

21

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

A relay is an electrical switch that opens and closes under the control of another electrical circuit. It is therefore connected to output pins of the microcontroller and used to turn on/off high-power devices such as motors, transformers, heaters, bulbs, etc. These devices are almost always placed away from the boards sensitive components. There are various types of relays, but all of them operate in the same way. When current flows through the coil, the relay is operated by an electromagnet to open or close one or more sets of contacts. Similar to optocouplers, there is no galvanic connection (electrical contact) between input and output circuits. Relays usually demand both higher voltage and higher current to start operation, but there are also miniature ones that can be activated by low current directly obtained from a microcontroller pin. In order to prevent the appearance of high voltage self-induction, caused by a sudden stop of the current flow through the coil, an inverted polarized diode is connected in parallel to the coil. The purpose of this diode is to 'cut off' the voltage peak.

ULTRASONIC SENSOR

DEPT. OF ECE CITV

22

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

In this project we are using an ECHO Ultrasonic distance sensors. ECHO ultrasonic distance sensors with ASCII serial O/P is an amazing product that provides very short to long range detection and ranging. The sensor provides stable, non contact distance measurements from about 2cm to 4meters with very high accuracy. Its compact size, easy usability and higher range make it a handy sensor for distance measurement and mapping the board can easily interfaced to microcontrollers pin RX (USART). Every 500 ms, the sensor transmits an ultrasonic burst and sends out ASCII value of distance (through its signal pin at 9600 baud rate) that corresponds to the time required for the burst echo return to the sensor.

This sensor is perfect for any number of applications that require that require u to perform measurements between moving or stationary objects. Naturally, robotics applications are very popular but youll find this product to be very useful in security systems or infrared replacement if so desired.

DEPT. OF ECE CITV

23

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

FLOW CHART

START INITIALIZE PORTS &SERIAL MODULE


ULTRAS OUND

SENS OR
CHEC KING

RELAY OFF
DEPT. OF ECE CITV

RELAY ON

RELAY

24

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

BUZZE R ON

BUZZER OFF

DELAY

PROGRAM

#include<pic.h> #include"lcd.h" #include"delay.h" #include"usart.h" #define BUZZ RC2 #define ON 1

#define OFF 0 #define dat_max 6 __CONFIG(HS&WDTDIS&BORDIS); unsigned char dat[dat_max],i; void main() { unsigned char data;

DEPT. OF ECE CITV

25

MINIPROJECT MARCH 2011 TRISC0 TRISC1 TRISC2 TRISA BUZZ = 0; = 0; = 0; = 0xF0; = OFF;

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

lcd_init(); init_comms(); lcd_clear(); lcd_goto(0x00); lcd_puts("Initilised"); //puts("Initilised..."); DelayMs(250); DelayMs(250); lcd_clear(); lcd_goto(0x00); lcd_puts("ULTRASOUND C.P.S"); lcd_goto(0x40); lcd_puts("DIST:");

while(getch() != 0x0D); while(1) { i = 0; data = 0; while(data != 0x0D) { data = getch(); dat[i] = data; i++; }

DEPT. OF ECE CITV

26

MINIPROJECT MARCH 2011 i--; dat[i] = 0; lcd_goto(0x46); lcd_puts(dat); lcd_puts(" c.m");

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

if((dat[0] == '0')&&(dat[1] < '5')) BUZZ = ON; else BUZZ = OFF;

} }

MERITS AND DEMERITS

The device that we are presenting in front of you is a fully automatic device. It is easy to operate and environmental friendly device. As it is simple in construction, it is easy to install. Also the cost is low. Here in our project we are able to measure the distance between the vehicle and the object in the back side only. If we are equipping this device on all four sides of our vehicle, or by using highly improved echo sensors, it will provide a complete parking and solution.

DEPT. OF ECE CITV

27

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

CONCLUTION

Our project is aimed on decreasing the vehicle accidents which is increasing day by day. We have implemented two security measures in this device both of which are easy to control, requires less maintenance and the entire system can be used without much difficulty. In future when conditions will change from the present which is one car for one family to one car for a person, this device will be an inevitable one which can reduce the road accidents up to a long extend.

DEPT. OF ECE CITV

28

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

DEPT. OF ECE CITV

29

MINIPROJECT MARCH 2011

VEHICLE SECURITY SYSTEM USING ULTRASONIC SENSORS

DEPT. OF ECE CITV

30

Das könnte Ihnen auch gefallen