vbts report

Upload: chandravinita

Post on 07-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 VBTS Report

    1/40

    BANASTHALI UNIVERSITY

    Dept. of Electronics & CommunicationsFor the partial fulfillment of the degree of Bachelor of Technology in

    Electronics & Communications

    PROJECT REPORT

    GPS BASED VEHICLE TRACKING SYSTEM

    Submitted by:

    Neha Agarwal (6045) Guided by

    Niharika Rajoriya (6048) C.M.S. Negi

    Pooja Chauhan (6050)Poonam Rathore (6051)

  • 8/3/2019 VBTS Report

    2/40

    ACKNOWLEDGEMENT

    We take this opportunity with much pleasure to thank all the people who have

    helped us through the course of our journey towards this project.

    We sincerely thank our teacher, Dr. Ritu Vijay, for giving us such a wonderful

    opportunity to showcase our knowledge that we have gained over the entire

    curriculum.

    We would like to express our special thanks of gratitude to our teacher,

    mentor and supervisor, Mr. CMS Negi, for his guidance, help and motivation.

    We are also thankful to our technical guide Mr. Vipan Sharma, who helped us

    a lot during the course of our project. We are also grateful to our technician,

    Mr. Asutosh Pareek for his help and support in making this project come true.

    Neha Agarwal

    Niharika Rajoriya

    Pooja Chauhan

    Poonam Rathore

  • 8/3/2019 VBTS Report

    3/40

    CERTIFICATE

    This is to certify that Neha Agarwal, Niharika Rajoriya, Pooja Chauhan andPoonam Rathore of B.Tech (EC) 3rd year from BANASTHALI UNIVERSITY has

    done the project work entitled GPS BASED VEHICLE TRCKING SYSTEM as a

    part of the fulfillment of their degree. The project embodies the original work

    done by them during their 6th semester.

    Date: April 29, 2011

    Mr. CMS Negi H.O.D

    Faculty, Dept. of Electronics Dept. of Electronics

    Banasthali University Banasthali University

  • 8/3/2019 VBTS Report

    4/40

    TABLE OF CONTENT

    1. ABSTRACT2. INTRODUCTION3. BLOCK DIAGRAM4. COMPONENT DESCRIPTION

    a. INTEGRATED CIRCUITSi. AT89S52

    ii. Max232b. CONNECTOR RS232c. LCD DISPLAYd. RESISTORSe. CAPACITORSf. GSM MODEM

    5. CIRCUIT DIAGRAM6. CIRCUIT OPERATION7. SOURCE CODE8. BREADBOARD RUNNING9. PCB DESIGNING10. RESULT11.FUTURE SCOPE12.BIBLIOGRAPHY

  • 8/3/2019 VBTS Report

    5/40

    ABSTRACT

    Of all the applications of GPS (Global Positioning System), vehicle tracking andnavigational systems have brought this technology to the day-to-day life of the

    common man. Today GPS fitted cars, ambulances, fleets and police vehicles

    are common sights on the roads of developed countries. Known by many

    names such as Automatic Vehicle Locating System, Vehicle Tracking and

    Information System, Mobile Asset Management System, these systems offer

    an effective tool for improving the operational efficiency and utilization of

    vehicles.

    GPS is used in vehicles for both tracking and navigation. Tracking systems

    enable a base station to keep track of the vehicles without the intervention of

    the driver where, as navigation system helps the driver to reach the

    destination. Vehicle Tracking Systems combine a number of well-developed

    technologies. Irrespective of the technology being used, VTS consist of three

    subsystems:

    In-vehicle unit (IVU), Base station and Communication link.

    The project uses two main underlying concepts. These are GPS (Global

    Positioning System) and GSM (Global System for Mobile Communication). The

    main application of this system in this context is tracking the vehicle to which

    the GPS is connected, giving the information about its position whenever

    required and for the security of each person traveling by the vehicle. This is

    done with the help of the GPS satellite and the GPS module attached to the

    vehicle which needs to be tracked. The GPS antenna present in the GPSmodule receives the information from the GPS satellite in NMEA (National

    Marine Electronics Association) format and thus it reveals the position

    information. This information got from the GPS antenna has to be sent to the

    Base station wherein it is decoded. For this we use GSM module which has an

    antenna too. Thus we have at the Base station, the complete data about the

    vehicle.

  • 8/3/2019 VBTS Report

    6/40

    INTRODUCTION

    In this Project it is proposed to design an embedded system which is used fortracking and positioning of any vehicle by using Global Positioning System

    (GPS) and Global system for mobile communication (GSM).

    In this project AT89S52 microcontroller is used for interfacing to various

    hardware peripherals. Embedded C is used for programming the application

    software to the microcontroller. The current design is an embedded

    application, which will continuously monitor a moving Vehicle and report the

    status of the Vehicle on demand. For doing so an AT89S52 microcontroller is

    interfaced serially to a GSM Modem and GPS Receiver. A GSM modem is usedto send the position (Latitude and Longitude) of the vehicle from a remote

    place. The GPS modem will continuously give the data i.e. the latitude and

    longitude indicating the position of the vehicle. The GPS modem gives many

    parameters as the output, but only the NMEA data coming out is read and

    displayed on to the LCD. The same data is sent to the mobile at the other end

    from where the position of the vehicle is demanded.

    The hardware interfaces to microcontroller are LCD display, GSM modem and

    GPS Receiver. The design uses RS-232 protocol for serial communicationbetween the modems and the microcontroller. A serial driver IC is used for

    converting TTL voltage levels to RS-232 voltage levels.

    When the request by user is sent to the number at the modem, the system

    automatically sends a return reply to that mobile indicating the position of the

    vehicle in terms of latitude and longitude.

    Major constituents of the GPS based tracking are

    1. GPS Tracking Device: The Device Fits into the vehicle and captures the GPS

    location information.

    2. GPS tracking Server: The tracking server has dual responsibility. One is

    receiving data from theGPS tracking unitand securely storing it, and other of

    serving this information on demand to the user. It is the intelligence, power

    and configuration of GPS tracking server that culminates into usability and

    feature support.

  • 8/3/2019 VBTS Report

    7/40

    BLOCK DIAGRAM

    COMPONENTS:

    A. GPS MODEMB. GSM MODEMC. MICROCONTROLLER AT89S52D. LDC DISPLAY

  • 8/3/2019 VBTS Report

    8/40

    COMPONENTS DESCRIPTION

    A. INTEGRATED CIRCUITS (ICS)i. AT89S52

    Microcontroller is a microprocessor designed specifically for control

    applications, and is equipped with ROM, RAM and facilities I / O on a single

    chip. AT89S52 is one of the family MCS-51/52 equipped with an internal 8

    Kbyte Flash EPROM (Erasable and Programmable Read Only Memory), which

    allows memory to be reprogrammed. It is a low-power, high-performance

    CMOS 8-bit Microcontroller with 8K bytes of in-systemprogrammable Flash memory. The device is manufactured using Atmels high-

    density nonvolatile memory technology and is compatible with the indus try-

    standard 80C51 instruction set and pinout. The on-chip Flash allows the

    program memory to be reprogrammed in-system or by a conventional

    nonvolatile memory pro-grammer. By combining a versatile 8-bit CPU with in-

    system programmable Flash on a monolithic chip, the Atmel AT89S52 is a

    powerful Microcontroller which provides a highly-flexible and cost-effective

    solution to many embedded control applications

    Microcontroller Features:

    A CPU (Central Processing Unit) 8 Bit 256 bytes of RAM (Random Access Memory)

  • 8/3/2019 VBTS Report

    9/40

    Four-port I/O, which each consist of eight bits

    the internal oscillator and timing circuits.

    Two timer / counters 16 bits

    Five interrupt lines (two fruits and three external interrupt internal

    interruptions). A serial port with full duplex UART (Universal Asynchronous Receiver

    Transmitter).

    Able to conduct the process of multiplication, division, and Boolean.

    8 KB EPROM for program memory

    Maximum speed execution of instructions per cycle is 0.5 s at 24 MHz clock

    frequency.

    CPU (Central Processing Unit): This section serves to control the entireoperation on the microcontroller. This unit is divided into two parts, the

    control unit, or CU (Control Unit) and the arithmetic and logic unit or ALU

    (Arithmetic Logic Unit) The main function of control unit is to take instructions

    from memory (fetch) and then translate the composition of these instructions

    into a simple collection of work processes (decode), and implement instruction

    sequence in accordance with the steps that have been determined the

    program (execute). Arithmetic and logic unit is the part that deals with

    arithmetic operations like addition, subtraction, and logical data manipulation

    operations such as AND, OR, and comparison.

    Part Input / Output (I / O): This section serves as a communication tool with a

    single chip device outside the system. Consistent with the name, I / O devices

    can receive and provide data to / from a single chip. There are two kinds of

    device I / O is used, i.e., devices for serial connection UART (Universal

    Asynchronous Receiver Transmitter) and device for so-called parallel

    relationship with the PIO (Parallel Input Output).Both types of I / O has been

    available in a single chip AT89S52.

    Software: Single flakes MCS-51 family has a special programming language that

    is not understood by other types of single flakes. This programming language

    known by the name of the assembler language instruction has 256 devices.

    However, this can be done with microcontroller programming using C

    language. With the C language, microcontroller programming has become

    easier, because the C language format will be automatically converted into

    assembler language with a hex file format.

  • 8/3/2019 VBTS Report

    10/40

    Pin Configuration: AT89S52 microcontroller has 40 pins with a single 5 Volt

    power supply

    ii. MAX 232The MAX232 is an integrated circuit that converts signals from an RS-232 serial

    port to signals suitable for use in TTL compatible digital logic circuits. The

    MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS and RTS

    signals.

    The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single

    + 5 V supply via on-chip charge pumps and external capacitors. This makes it

    useful for implementing RS-232 in devices that otherwise do not need any

    voltages outside the 0 V to + 5 V range, as power supply design does not need to

    be made more complicated just for driving the RS-232 in this case.

    The receivers reduce RS-232 inputs (which may be as high as 25 V), to

    standard 5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a

    typical hysteresis of 0.5 V. When a MAX232 IC receives a TTL level to convert, itchanges a TTL Logic 0 to between +3 and +15 V, and changes TTL Logic 1 to

    http://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Charge_pumphttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Hysteresishttp://en.wikipedia.org/wiki/Hysteresishttp://en.wikipedia.org/wiki/Transistor-transistor_logichttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Charge_pumphttp://en.wikipedia.org/wiki/Transistor-transistor_logic
  • 8/3/2019 VBTS Report

    11/40

    between -3 to -15 V, and vice versa for converting from RS232 to TTL. This can

    be confusing when you realize that the RS232 Data Transmission voltages at a

    certain logic state are opposite from the RS232 Control Line voltages at the

    same logic state.

    Pin Configuration: MAX232 microcontroller has 16 pins with a single 5 Volt

    power supply

    B. CONNECTOR RS232The RS232 standard describes a communication method where information is

    sent bit by bit on a physical channel. The information must be broken up in

    data words. The length of a data word is variable. On PC's a length

    between 5 and 8 bits can be selected. This length is the net to informationlength of each word. For proper transfer additional bits are added for

    synchronization and error checking purposes. It is important, that the

    transmitter and receiver use the same number of bits. Otherwise, the data

    word may be misinterpreted, or not recognized at all.

    Data bits are sent with a predefined frequency, the baud rate. Both the

    transmitter and receiver must be programmed to use the same bit frequency.

    After the first bit is received, the receiver calculates at which moments the

    other data bits will be received. It will check the line voltage levels at thosemoments.

  • 8/3/2019 VBTS Report

    12/40

    With RS232, the line voltage level can have two states. The on state is also

    known as mark, the off state as space. No other line states are possible. When

    the line is idle, it is kept in the mark state.

    START BIT: RS232 defines an asynchronous type of communication. Thismeans, that sending of a data word can start on each moment. If starting at

    each moment is possible, this can pose some problems for the receiver to

    know, which is the first bit to receive. To overcome this problem, each data

    word is started with an attention bit. This attention bit, also known as the start

    bit, is always identified by the space line level. Because the line is in mark state

    when idle, the start bit is easily recognized by the receiver.

    DATA BITS: Directly following the start bit, the data bits are sent. A bit

    value 1 causes the line to go in mark state, the bit value 0is represented by aspace. The least significant bit is always the first bit sent.

    PARITY BIT: For error detecting purposes, it is possible to add an extra bit to

    the data word automatically. The transmitter calculates the value of the bit

    depending on the information sent. The receiver performs the same

    calculation and checks if the actual parity bit value corresponds to the

    calculated value. This is further discussed in another paragraph.

    STOP BITS: Suppose that the receiver has missed the start bit because of noiseon the transmission line. It started on the first following data bit with a space

    value. This causes garbled date to reach the receiver. A mechanism must be

    present to resynchronize the communication. To do this, framing is introduced.

    Framing means, that all the data bits and parity bit are contained in a frame of

    start and stop bits. The period of time lying between the start and stop bits is a

    constant defined by the baud rate and number of data and parity bits. The

    start bit has always space value, the stop bit always mark value. If the receiver

    detects a value other than mark when the stop bit should be present on the

    line, it knows that there is a synchronization failure. This causes a framing errorcondition in the receiving UART. The device then tries to resynchronize on new

    incoming bits. For resynchronizing, the receiver scans the incoming data for

    valid start and stop bit pairs. This works, as long as there is enough variation in

    the bit patterns of the data words. If data value zero is sent repeatedly,

    resynchronization is not possible for example. The stop bit identifying the end

    of a data frame can have different lengths. Actually, it is not a real bit but a

    minimum period of time the line must be idle (mark state) at the end of each

    word. On PC's this period can have three lengths: the time equal

    to 1, 1.5 or 2 bits. 1.5 bits is only used with data words of 5 bits length

    http://www.lammertbies.nl/comm/info/RS-232_specs.html#errohttp://www.lammertbies.nl/comm/info/RS-232_specs.html#erro
  • 8/3/2019 VBTS Report

    13/40

    and 2 only for longer words. A stop bit length of 1 bit is possible for all data

    word sizes.

    Pin 1

    Received Line Signal

    Detector

    (Data Carrier Detect)

    RS232 DB9 pinout

    Pin 2 Received Data

    Pin 3 Transmit Data

    Pin 4 Data Terminal Ready

    Pin 5 Signal Ground

    Pin 6 Data Set Ready

    Pin 7 Request To Send

    Pin 8 Clear To Send

    Pin 9 Ring Indicator

    C. LCD DISPLAYFEATURES:

    5 x 7 dot matrix format for 2.96 x 5.56 mm characters, plus cursor line Built-in controller (KS 0066 or Equivalent) + 5V power supply 1/16 duty cycle B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED) N.V. optional for + 3V power supply Intelligent, with built-in Hitachi HD44780 compatible LCD controller and

    RAM providing simple interfacing

    61 x 15.8 mm viewing area Can display 224 different symbols Low power consumption (1 mA typical) Powerful command set and user-produced characters TTL and CMOS compatible Connector for standard 0.1-pitch pin headers

  • 8/3/2019 VBTS Report

    14/40

    Fig.: LCD Display

    D.RESISTORSTheelectrical resistanceof anelectrical elementmeasures its opposition to the

    passage of anelectric current. The inverse quantity is electrical conductance,

    measuring how easily electricity flows along a certain path. Electrical resistance

    shares some conceptual parallels with the mechanical notion offriction.

    TheSIunit of electrical resistance is theohm(), while electrical conductance

    is measured in Siemens (S).

    An object of uniform cross section has a resistance proportional toitsresistivityand length and inversely proportional to its cross-sectional area.

    All materials show some resistance, except forsuperconductors, which have a

    resistance of zero.

    The resistance of an object is defined as the ratio of voltage across it to current

    through it.

    For a wide variety of materials and conditions, the electrical

    resistance R isconstantfor a given temperature; it does not depend on the

    amount of current through or the potential difference (voltage) across the

    object. Such materials are called Ohmic materials. For objects made of ohmic

    materials the definition of the resistance, with R being a constant for that

    resistor, is known as Ohm's law.

    http://en.wikipedia.org/wiki/Omegahttp://en.wikipedia.org/wiki/Omegahttp://en.wikipedia.org/wiki/Omegahttp://en.wikipedia.org/wiki/Siemens_(unit)http://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Ohm%27s_lawhttp://en.wikipedia.org/wiki/Ohm%27s_lawhttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Siemens_(unit)http://en.wikipedia.org/wiki/Omega
  • 8/3/2019 VBTS Report

    15/40

    Fig.: Resistors

    In the case of a nonlinear conductor (not obeying Ohm's law), this ratio can

    change as current or voltage changes; the inverse slope of a chord to an IV

    curve is sometimes referred to as a "chordal resistance" or "static resistance".

    E. CAPACITORA capacitor(formerly known ascondenser) is a device for storing electric

    charge. The forms of practical capacitors vary widely, but all contain at least

    two conductors separated by a non-conductor. Capacitors used as parts of

    electrical systems, for example, consist of metal foils separated by a layer of

    insulating film.

    A capacitor is a passive electronic component consisting of a pair

    ofconductors separated by a dielectric (insulator). When there is a potential

    difference (voltage) across the conductors, a static electric field develops

    across the dielectric, causing positive charge to collect on one plate and

    negative charge on the other plate. Energy is stored in the electrostatic field.

    An ideal capacitor is characterized by a single constant value, capacitance,

    measured in farads. This is the ratio of the electric charge on each conductor to

    the potential difference between them.

    http://en.wikipedia.org/wiki/I%E2%80%93V_curvehttp://en.wikipedia.org/wiki/I%E2%80%93V_curvehttp://en.wikipedia.org/wiki/I%E2%80%93V_curvehttp://en.wikipedia.org/wiki/I%E2%80%93V_curvehttp://en.wikipedia.org/wiki/Passivity_(engineering)http://en.wikipedia.org/wiki/Electronic_componenthttp://en.wikipedia.org/wiki/Electrical_conductorhttp://en.wikipedia.org/wiki/Dielectrichttp://en.wikipedia.org/wiki/Potential_differencehttp://en.wikipedia.org/wiki/Potential_differencehttp://en.wikipedia.org/wiki/Electric_fieldhttp://en.wikipedia.org/wiki/Energyhttp://en.wikipedia.org/wiki/Capacitancehttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Capacitancehttp://en.wikipedia.org/wiki/Energyhttp://en.wikipedia.org/wiki/Electric_fieldhttp://en.wikipedia.org/wiki/Potential_differencehttp://en.wikipedia.org/wiki/Potential_differencehttp://en.wikipedia.org/wiki/Dielectrichttp://en.wikipedia.org/wiki/Electrical_conductorhttp://en.wikipedia.org/wiki/Electronic_componenthttp://en.wikipedia.org/wiki/Passivity_(engineering)http://en.wikipedia.org/wiki/I%E2%80%93V_curvehttp://en.wikipedia.org/wiki/I%E2%80%93V_curve
  • 8/3/2019 VBTS Report

    16/40

    Capacitors are widely used in electronic circuits for blocking direct

    current while allowing alternating current to pass, in filter networks, for

    smoothing the output ofpower supplies, in the resonant circuits that tune

    radios to particular frequencies and for many other purposes.

    The capacitance is greatest when there is a narrow separation between large

    areas of conductor. Hence capacitor conductors are often called "plates",

    referring to an early means of construction. In practice the dielectric between

    the plates passes a small amount ofleakage current and also has an electric

    field strength limit, resulting in a breakdown voltage, while the conductors and

    leads introduce an undesired inductance and resistance.

    Fig.: Capacitor

    F. GSM MODEMGSM modem is a highly flexible plug and play modem for direct and easy

    integration with RS232, voltage range for the power supply and audio interface

    make this device perfect solution for system integrators and single user.

    GSM MODEM CHARACTERISTICS

    Quad GSM GPRS modem ( GSM 850 /900/1800 / 1900 )

    Designed for GPRS, data, fax, SMS and voice applications Fully compliant with ETSI GSM Phase 2+ specifications (Normal MS)

    http://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/LC_circuithttp://en.wikipedia.org/wiki/Frequencyhttp://en.wikipedia.org/wiki/Leakage_(electronics)http://en.wikipedia.org/wiki/Breakdown_voltagehttp://en.wikipedia.org/wiki/Lead_(electronics)http://en.wikipedia.org/wiki/Equivalent_series_inductancehttp://en.wikipedia.org/wiki/Equivalent_series_resistancehttp://en.wikipedia.org/wiki/Equivalent_series_resistancehttp://en.wikipedia.org/wiki/Equivalent_series_inductancehttp://en.wikipedia.org/wiki/Lead_(electronics)http://en.wikipedia.org/wiki/Breakdown_voltagehttp://en.wikipedia.org/wiki/Leakage_(electronics)http://en.wikipedia.org/wiki/Frequencyhttp://en.wikipedia.org/wiki/LC_circuithttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Direct_current
  • 8/3/2019 VBTS Report

    17/40

    License free Python interpreter with free of charge programming toolsGSM MODEM INTERFACES

    RS232 through D-TYPE 9 pin connector, RJ11 for I2C, SPI and GPIO

    Power supply through Molex 4 pin connector SMA antenna connector Toggle spring SIM holder Red LED Power on, Green LED status of GSM / GPRS module

    GSM MODEM GENERAL CHARACTERISTICS

    Input voltage: 5V-30V

    Current: 8mA in idle mode, 150mA in communication GSM 900 @ 12V,110mA in GSM 1800 @ 12V

    Temperature range: Operating -30 to +85 degree Celsius; Storage -30 to+85 degree Celsius

    Overall dimensions: 80mm x 62mm x 31mm / Weight: 200g

    Fig.: GSM modem

  • 8/3/2019 VBTS Report

    18/40

    CIRCUIT DIAGRAM

  • 8/3/2019 VBTS Report

    19/40

    CIRCUIT OPERATION

    GPS pin TX is connected to microcontroller via MAX232. GSM pins TX and RX

    are connected to microcontroller serial ports.

    Microcontroller communicates with the help of serial communication. First it

    takes the data from the GPS receiver and then sends the information to the

    owner in the form of SMS with help of GSM modem.

    GPS receiver works on 9600 baud rate is used to receive the data from space

    Segment (from Satellites), the GPS values of different Satellites are sent to

    microcontroller AT89S52, where these are processed and forwarded to GSM.

    At the time of processing GPS receives only $GPRMC values only. From these

    values microcontroller takes only latitude and longitude values excluding time,altitude, name of the satellite, authentication etc. E.g. LAT: 1728:2470 LOG:

    7843.3089 GSM modem with a baud rate 57600.GSM is a Global system for

    mobile communication in this project it acts as a SMS Receiver and SMS

    sender. EEPROM is an Electrically Erasable read only memory which stores is

    used to store the mobile number.

    The power is supplied to components like GSM, GPS and Micro control circuitry

    using a 12V DC supply from breadboard .GSM requires 12v,GPS and

    microcontroller requires 5V with the help of regulators we regulate the powerbetween three components.

  • 8/3/2019 VBTS Report

    20/40

    SOURCE CODE

    #include

    #include

    sfr ldata =0xA0;

    sfr SBUF0= 0x90;

    sfr SBUF1= 0xC1;

    sfr SCONO= 0x98;

    sfr SCON1= 0xC0;

    sbit RIO= 0x98;

    sbit RI1= 0xC0;

    sbit TI1= 0xC1;

    sbit rs = P0^0;

    sbit rw = P0^1;

    sbit en = P0^2;

    char info[32];

    char test[6]={"$GPGLL"};

    char comma_position[10];

    unsigned int check=0,i,j;

    // DELAYED FUNCTION

  • 8/3/2019 VBTS Report

    21/40

    void delay(unsigned int msec)

    {

    int i,j ;

    for(i=0;i

  • 8/3/2019 VBTS Report

    22/40

    {

    ldata=value;

    rs= 1;

    rw=0;

    e=1;

    delay(1);

    e=0;

    return;

    }

    // LCD STRING SENDING FUNCTION

    void lcd_string(unsigned char *str)

    {

    int i=0;

    while(str[i]!='\0')

    {

    lcd_data(str[i]);

    i++;

    delay(10);

    }

    return;

  • 8/3/2019 VBTS Report

    23/40

    }

    // SERIAL PORT 0 SETTING

    void serial_data0()

    {

    TMOD=0x20; //MODE=2

    TH1=0xfa; // 4800 BAUD

    SCON=0x50; // SERIAL MODE 1 ,8- BIT DATA ,1 STOP BIT ,1 START

    BIT , RECEIVING ON

    TR1=1; //TIMER START

    }

    // SERIAL PORT 1 SETTING

    void serial_data1()

    {

    TMOD=0x20; //MODE=2

    TH1=0xfd; // 9600 BAUD

    SCON=0x50; // SERIAL MODE 1 ,8- BIT DATA ,1 STOP BIT ,1 START

    BIT , RECEIVING ON

    TR1=1; //TIMER START

    }

  • 8/3/2019 VBTS Report

    24/40

    // FIND THE COMMA FROM THE GPS DATA

    void find_comma()

    {

    unsigned int i,count=0;

    for(i=0;i

  • 8/3/2019 VBTS Report

    25/40

    if(info[check]!= test[check])

    check=0;

    else

    check++;

    }

    else

    check++;

    RI0=0;

    }

    // RECEIVED DATA FUNCTION FOR GSM MODEM

    void receive_data1()

    {

    while(RI1==0);

    value= SBUF1;

    RI1=0;

    }

    // TO DISPLAY THE NAME OF THE PLACE

    void lcd_place()

    {

  • 8/3/2019 VBTS Report

    26/40

    if(info[32]= "$GPGLL,26o24,N,75o54,E")

    lcd_string("BANASTHALI");

    else

    lcd_string("NOT FOUND");

    }

    // TO DISPLAY LATITUDE OF THE PLACE

    void lcd_latitude()

    {

    unsigned int c3=comma_position[0];

    lcd_cmd(0x01); //Clear LCD display

    lcd_cmd(0x84); //Move cursor to position 6 of line 1

    lcd_string("LATITUDE"); //Showing latitude

    lcd_cmd(0xC0); //Begining of second line

    lcd_data(info[c3+1]);

    lcd_data(info[c3+2]);

    lcd_data(o);

    lcd_data(info[c3+3]);

    lcd_data(info[c3+4]);

    lcd_data(info[c3+5]);

    lcd_data(info[c3+6]);

  • 8/3/2019 VBTS Report

    27/40

    lcd_data(info[c3+7]);

    lcd_data(info[c3+8]);

    lcd_data(info[c3+9]);

    lcd_data(0x27); //ASCII of minute sign(')

    lcd_data(info[c3+10]);

    lcd_data(info[c3+11]);

    delay(250);

    }

    //TO DISPLAY LONGITUDE OF THA PLACE

    void lcd_longitude()

    {

    unsigned int c5=comma_position[2];

    lcd_cmd(0x01); //Clear LCD display

    lcd_cmd(0x84); //Move cursor to position 4 of line 1

    lcd_string("LONGITUDE"); //Showing longitude

    lcd_cmd(0xC0); //Begining of second line

    lcd_data(info[c5+1]);

    lcd_data(info[c5+2]);

    lcd_data(info[c5+3]);

    lcd_data(0);

  • 8/3/2019 VBTS Report

    28/40

    lcd_data(info[c5+4]);

    lcd_data(info[c5+5]);

    lcd_data(info[c5+6]);

    lcd_data(info[c5+7]);

    lcd_data(info[c5+8]);

    lcd_data(info[c5+9]);

    lcd_data(info[c5+10]);

    lcd_data(0x27); //ASCII of minute sign(')

    lcd_data(info[c5+11]);

    lcd_data(info[c5+12]);

    delay(250);

    }

    void compare()

    {

    IE=0x00;

    find_comma();

    lcd_latitude();

    lcd_longitude();

    lcd_place();

    check=0;

  • 8/3/2019 VBTS Report

    29/40

    IE=0x90;

    void GPS()

    {

    serial_data0();

    lcd_cmd(0x38); //2 LINE, 5X7 MATRIX

    lcd_cmd(0x0e); //DISPLAY ON, CURSOR BLINKING

    IE=0x90;

    while(check

  • 8/3/2019 VBTS Report

    30/40

    {

    SBUF1=*chrr;

    TI1=0;

    while(TI1==0);

    chrr++;

    }

    }

    // TRANSMIT A CHARECTER TO GPS MODEM

    void sendchr(unsigned char ch)

    {

    SBUF1=ch;

    TI1=0;

    while(TI1==0);

    }

    // TO INITIALIZE GS MODEM

    void GSM_ini()

    {

    serial_data1();

    unsigned char msg[2];

  • 8/3/2019 VBTS Report

    31/40

    sendstr("AT");

    for(i=0;i

  • 8/3/2019 VBTS Report

    32/40

    sendchr(0x22);

    delay(10);

    sendstr("AT+CMGF=1");

    delay(10);

    sendstr("AT+CMGS=");

    sendchr(0x22);

    sendstr("8058505354");

    sendchr(0x22);

    for(i=0;i

  • 8/3/2019 VBTS Report

    33/40

    for(i=0;i

  • 8/3/2019 VBTS Report

    34/40

    BREAD BOARD RUNNING

    The circuit shown above was implemented on the bread board. The code for

    the microcontroller was written on the standards of 8051 using Embedded C.

    The code was compiled and simulated using Keil (ver. V).

    Voltages applied: 12V dc

    Result: LCD displayed correctly

    PCB DESIGNING

    STEPS INVOLVED:

    1. The required circuit diagram is prepared.2. The components, their sizes etc. are listed.3. It is drafted onto a graph sheet4. All pads are placed and thin tracks finished5. It is traced on the graph sheet6. All parts including screw holes are placed with the help of knife.7. All the tracks are fixed.

  • 8/3/2019 VBTS Report

    35/40

    CONVERSION OF CIRCUIT DIAGRAM:

    1.

    Cutting lines, mounting lines are done2. All the components their length diameter thickness code names etc. arelisted.

    3. All tracks are straight lines4. In between ICs no signal lines should be passed5. Markings of the pin number of IC on the lay out for avoiding dislocations

    are made

    6. The length of the conductor is kept as low as possible7. All the components, resistors, diodes etc. are placed parallel to each

    other.

    PCB LAYOUT:

    Fig. Layout

    First the board outlines and the connectors are marked on a sheet of paper

    followed by sketching of the component outlines with connecting point and

    conductor patterns.

    The layout as viewed from the component side first, so as to avoid any

    confusion is prepared. The layout is developed in the direction of signal flow as

    far as possible

    Among the components the larger ones are filled first and the space between

    is filled with smaller ones. Components, rewiring input, output connections

    came near the connectors.

  • 8/3/2019 VBTS Report

    36/40

    All the components are placed in such a manner that de-soldering of the

    component is not is not necessary, if they have to be re placed. While

    designing the conductors, the minimum spacing requirement for the final

    network should be known.

    TRANSFORMING THE LAYOUT TO COPPER:

    The lay out made on the graph sheet should be redrawn on the copper clad

    using paint or nail polish.

    Fig. Etching Process

    ETCHING:

    The final copper pattern is formed by selective removal of the unwanted

    copper which is not protected by an electric rebist.

    FeCl3 solution is popularly used etching solution. FeCl3 powder is made into a

    solution using water and kept in a plastic tray.

    The marked copper clad is immersed in this solution for twenty or thirty

    minutes. Due to the reaction solution becomes weak and it is not

    recommended for further etching process.

  • 8/3/2019 VBTS Report

    37/40

    The etched sheet is taken out from the tray and dried out in sunlight for an

    hour.

    ETCHANTS:

    Many factors have to be considered to choose the most suitable etchant

    system for a PCB process. Some commonly used etchants are FeCl3, Cupric

    chloride, Chromic acid etc.

    After etching FeCl3 is washed from the board and cleaned dry. Paint is

    removed using suitable from the component insertion.

    Holes are drilled into appropriate position and the components are soldered

    into PCB carefully

    Fig. PCB Fabricated

    PRACTICAL IMPLEMENTATION:

    I. A copper clad of the required dimensions is taken.II. The circuit layout is transferred to the copper clad using cotton paper.

    III. The layout area should be marked with nail polish.IV. The copper clad is put into FeCl3 solution and warmed.V. Stage by stage transformation of the copper clad occurs.

    VI. The solution is warmed intermittently according to the requirement.VII. After about half hour etching is completed.

  • 8/3/2019 VBTS Report

    38/40

    VIII. The board is washed using soap solution to remove the remaining ofFeCl3 solution.

    IX. The nail polish is scraped off and holes are drilled wherever requiredusing appropriate drill bits.

    X. PCB is fabricated.

    RESULT

    The LCD display showed the correct information provided by the controller.

    Depending on the coding-decoding done by the module, the LCD will displaythe latitudes and longitudes.

    FUTURE SCOPE

    The main scopes of this project are:

    1. Military Application: In Military operation ,if the military people are moving

    through a desert they cant identify their own position in the desert. Only the

    guidance with them is the map. By using our system they can identify theirposition. In the LCD display unit it displays the latitude & longitude and by

    noting this information they can clearly identify the position from the map

    which they have.

    2. Navigation: In Navigation same as that of military Application.

    3. Geographical Survey: It is also used for geographical survey.

  • 8/3/2019 VBTS Report

    39/40

    GRAPH

  • 8/3/2019 VBTS Report

    40/40

    BIBLIOGRAPHY

    1. THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEMS by MAIZIDI,MUHAMMAD ALI; JANICE GILLISPIE MAZIDI; AND ROLIN D. MCKINLAY

    2. http://www.electronic-circuits-diagrams.com3. http://www.electroschematics.com4. http://www.radio-electronics.com5. http://www.8051projects.com

    http://www.electronic-circuits-diagrams.com/http://www.electronic-circuits-diagrams.com/http://www.electroschematics.com/http://www.electroschematics.com/http://www.radio-electronics.com/http://www.radio-electronics.com/http://www.8051projects.com/http://www.8051projects.com/http://www.8051projects.com/http://www.radio-electronics.com/http://www.electroschematics.com/http://www.electronic-circuits-diagrams.com/