Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 70

GPS Integrated Moving Vehicle for Reconnaissance

Chapter 1

INTRODUCTION

The development of GPS based systems play an important role in the building of automatic navigational vehicle. Since it can provide the required positioning and navigational information quickly, with great accuracy and at a low cost, waypoint navigation becomes very efficient to implement. We have built our project around the above principles. We have constructed an automatic (unmanned) navigational vehicle, which uses the co-ordinates obtained from the GPS receiver (using the GPS satellites), and travels to the desired locations. The data from the GPS receiver is obtained in the form of NMEA (National Marine Electronics Association) codes. These codes give the latitude, longitude, time, date, almanac data etc. Due to this, finding the path becomes much simpler as we can program the vehicle to move either in the north-south direction or east-west direction, as required. As we have also interfaced the vehicle with a wireless video camera, the area in which the vehicle is moving can be surveyed by transmitting the real time images to the base station instantly. Thus, the base station receives a continuous stream of data of two varieties. Firstly, this decoded data from the GPS receiver. Secondly, the continuous live video feed from the wireless camera on the vehicle. This system is developed for reconnaissance of a given area where, for some reason, human presence is unwelcome. Thus, this would be very useful for surveying and analysing such areas with remote accessibility.

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

1.1 BLOCK DIAGRAM

Wireless Receiver

Base Station [PC]

GPS Satellite Constellation

Video Feed Receiver

Wireless Transmitter

Wireless Video Camera

Antenna

Microcontrolle r

Motors with driver circuitry

Fig. 1.1

Block Diagram
2

Dept. of Electronics and Communication, Sir M. VIT

Moving Vehicle

GPS Receiver

GPS Integrated Moving Vehicle for Reconnaissance

1.2 SYSTEM OPERATION


Our entire system is built around a microcontroller P89v51RD2 which we have used at an operating frequency of 11.0592MHz. Here the data from the GPS (Global Positioning System) is received in the form of NMEA code using the GPS receiver which is mounted on the vehicle and this is fed to the microcontroller through the serial port (DB 9). This data from the GPS is RS-232 compatible, so it cannot be directly given to the microcontroller as it is TTL compatible. Hence we use MAX-232 circuit which will convert this RS-232 compatible data to TTL compatible data (-3V to +3V) which can be accessed by the microcontroller. The microcontroller then processes this information. The processed data is then used in two stages:1. The data will be utilized by the microcontroller to reach the desired destination (by controlling the movement of the vehicle). 2. The data will also be transmitted to the base station using XBee for display. The DC motor will be driven in one direction when the voltage is supplied and in the opposite direction when the voltage is reversed. This DC motor cannot be directly connected to the microcontroller as the current drawn by the motor is high and it may damage the microcontroller. Hence, we used the motor driver (L293D) which can support from 5 to 36 volts. Also, by varying this voltage results in an increase in speed and torque. The microcontroller constantly receives data from the GPS receiver and keeps comparing this GPS data with the preset destination value and thus controls the movement of the vehicle. This entire set-up is placed on the platform which is interfaced to a video camera which can transmit the real time images of the area

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

under survey instantly to the base station where they can be analysed or stored for future use.

Chapter 2

HARDWARE CIRCUIT DIAGRAM

Fig. 2.1

Hardware Circuit Diagram

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

Chapter 3

GLOBAL POSITIONING SYSTEM (GPS)


Global positioning system is a satellite communication system. It is actually a constellation of 27 Earth-orbiting satellites (24 in operation and three extras in case of any one fails). The US military developed and implemented this satellite network as a military navigation system.

3.1 BRIEF HISTORY OF GPS


The first satellite navigation system, Transit, used by the United States Navy, was first successfully tested in 1960. Using a constellation of five satellites, it could provide a navigational fix approximately once per hour. In 1967, the U.S. Navy developed the Timation satellite which proved the ability to place accurate clocks in space, a technology that GPS relies upon. In the 1970s, the ground-based Omega Navigation System, based on signal phase comparison, became the first worldwide radio navigation system. The design of GPS is based partly on similar ground-based radio navigation systems, such as LORAN and the Decca Navigator developed in the early 1940s, and used during World War II. Additional inspiration for the GPS came when the Soviet Union launched the first man-made satellite, Sputnik in 1957. A team of U.S. scientists led by Dr. Richard B. Kershner were monitoring Sputnik's radio transmissions. They discovered that, because of the Doppler Effect, the frequency of the signal being transmitted by Sputnik was higher as the satellite approached, and lower as it continued away from them. They realized that since they knew their exact location on the globe, they could pinpoint where the satellite was along its orbit by measuring the Doppler distortion.
Dept. of Electronics and Communication, Sir M. VIT 5

GPS Integrated Moving Vehicle for Reconnaissance

This led to the development of Global Positioning System; initially the highest quality signal was reserved for military use, while the signal available for civilian use was intentionally degraded ("Selective Availability", SA). After Korean Air Lines Flight 007 was shot down in 1983 after straying into the USSR's prohibited airspace, President Ronald Reagan issued a directive making GPS freely available for civilian use as a common good. Selective Availability was ended in 2000, improving the precision of civilian GPS from about 100m to about 20m.

3.2 GPS SEGMENTS


The GPS system is divided into three segments:

Space segment - satellites orbiting the Earth; Control segment - Control and monitoring stations on Earth; and User segment - The GPS receivers owned by users

GPS satellites broadcast signals from space that are picked up and identified by GPS receivers. Each GPS receiver then provides threedimensional location (latitude, longitude, and altitude) plus the time.

3.3 HOW GPS WORKS


The GPS works in five logical steps: 1. Triangulation from satellites 2. To triangulate, the GPS receiver measures distance using the travel time of radio signals 3. To measure time, GPS needs very accurate timing which is provided by the atomic clock fixed in the satellite

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

4. Along with the distance, the accurate location of the satellite in

space as to be known 5. The last step is the correction of errors and delays the signal undergoes as it travels through the atmosphere

3.3.1

TRIANGULATING FROM SATELLITES

In order to explain the principle of triangulation, we take the following example of how GPS satellites fix the location of a given point. There are three basic steps in this method: Step 1:

Fig. 3.1

Triangulation Step 1

Knowing distance from one satellite places you somewhere on a spherical surface that's centered around the satellite. Here, let us assume this distance to be 11,000 miles. Step 2:

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 3.2

Triangulation Step 2

Knowing distances from two satellites places you somewhere along a circle that's between the two satellites (defined by the intersection of their "distance spheres")

Step 3:

Fig.3.3

Triangulation Step 3

Distances from three satellites usually intersect at two points, and if we take the Earth's surface as the fourth sphere, this narrows it down to a single point. This process works by finding the intersection of your distances from three or more satellites. Thus, describing it as "trilateration" is actually better than "triangulation", but neither term seems precisely correct from a technical standpoint.

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

3.4 GPS SATELLITE SIGNALS


The satellites transmit two microwave carrier signals. The L1 frequency (1575.42 MHz) carries the navigation message and the standard positioning service (SPS) code signals. The L2 frequency (1227.60 MHz) is used to measure the ionospheric delay by precise positioning service (PPS) equipped receivers. There are three binary codes that shift the L1 and/or L2 carrier phase:The C/A Code (Coarse Acquisition) modulates the L1 carrier phase. The C/A code is a repeating 1 MHz Pseudo Random Noise (PRN) Code. This noise-like code modulates the L1 carrier signal, "spreading" the spectrum over a 1 MHz bandwidth. The C/A code repeats every 1023 bits (one millisecond). There is a different C/A code PRN for each satellite. GPS satellites are often identified by their PRN number, the unique identifier for each pseudo-random-noise code. The C/A code that modulates the L1 carrier is the basis for the civil SPS. The P-Code (Precise) modulates both the L1 and L2 carrier phases. The P-Code is a very long (seven days) 10 MHz PRN code. In the AntiSpoofing (AS) mode of operation, the P-Code is encrypted into the YCode. The encrypted Y-Code requires a classified AS Module for each receiver channel and is for use only by authorized users with cryptographic keys. The P (Y)-Code is the basis for the PPS. The Navigation Message also modulates the L1-C/A code signal. The Navigation Message is a 50 Hz signal consisting of data bits that describe the GPS satellite orbits, clock corrections, and other system parameters.

3.5 GPS DATA


The GPS Navigation Message consists of time-tagged data bits marking the time of transmission of each subframe at the time they are
Dept. of Electronics and Communication, Sir M. VIT 9

GPS Integrated Moving Vehicle for Reconnaissance

transmitted by the satellite. A data bit frame consists of 1500 bits divided into five 300-bit subframes. A data frame is transmitted every thirty seconds. Three six-second subframes contain orbital and clock data. Satellite vehicle (SV) Clock corrections are sent in subframe one and precise SV orbital data sets (ephemeris data parameters) for the transmitting SV are sent in subframes two and three. Subframes four and five are used to transmit different pages of system data. An entire set of twenty-five frames (125 subframes) makes up the complete Navigation Message that is sent over a 12.5 minute period. Data frames (1500 bits) are sent every thirty seconds. Each frame consists of five subframes. Data bit subframes (300 bits transmitted over six seconds) contain parity bits that allow for data checking and limited error correction. Clock data parameters describe the satellite clock and its relationship to GPS time. Ephemeris data parameters describe satellite orbits for short sections of the satellite orbits. Normally, a receiver gathers new ephemeris data each hour, but can use old data for up to four hours without much error. The ephemeris parameters are used with an algorithm that computes the satellite position for any time within the period of the orbit described by the ephemeris parameter set. Almanacs are approximate orbital data parameters for all Satellites. The ten-parameter almanacs describe satellite orbits over extended periods of time (useful for months in some cases) and a set for all satellites is sent by each satellite over a period of 12.5 minutes (at least). Signal acquisition time on receiver start-up can be significantly aided by the availability of current almanacs. The approximate orbital data is used to preset the receiver with the approximate position and carrier Doppler frequency (the frequency shift caused by the rate of change in range to the moving satellite) of each satellite in the constellation.
Dept. of Electronics and Communication, Sir M. VIT 10

GPS Integrated Moving Vehicle for Reconnaissance

Each complete satellite data set includes an ionospheric model that is used in the receiver to approximate the phase delay through the ionosphere at any location and time. Each satellite sends the amount of data to which GPS Time is offset from Universal Coordinated Time (UTC). This correction can be used by the receiver to set UTC to within 100 ns. Other system parameters and flags are also sent, that characterize details of the system.

3.6 HOW RECEIVER

DATA

IS

RECEIVED

IN

THE

GPS

The GPS data is received in the NMEA code format. A few examples of NMEA code format are discussed below. E.g.: 1 $GPGLL Geographic Position, Latitude / Longitude and time. eg1. $GPGLL,3751.65,S,14507.36,E*77 eg2. $GPGLL,4916.45,N,12311.12,W,225444,A

4916.46,N

Latitude 49 deg. 16.45 min. North

12311.12,W Longitude 123 deg. 11.12 min. West 225444 A Fix taken at 22:54:44 UTC Data valid

eg3. $GPGLL,5133.81,N,00042.25,W*75
Dept. of Electronics and Communication, Sir M. VIT 11

GPS Integrated Moving Vehicle for Reconnaissance

1 1 2 3 4 5

4 5

5133.81 Current latitude N North/South

00042.25 Current longitude W *75 East/West checksum

$--GLL,lll.ll,a,yyyyy.yy,a,hhmmss.ss,A llll.ll = Latitude of position a = N or S yyyyy.yy = Longitude of position a = E or W hhmmss.ss = UTC of position A = status: A = valid data E.g. :2 $GPGSV GPS Satellites in view e.g. $GPGSV,3,1,11,03,03,111,00,04,15,270,00,06,01,010,00,13,06,292,00* 74 $GPGSV,3,2,11,14,25,170,00,16,57,208,39,18,67,296,40,19,40,246, 00*74 $GPGSV,3,3,11,22,42,067,42,24,14,311,43,27,05,244,00,,,,*4D $GPGSV,1,1,13,02,02,213,,03,-3,000,,11,00,121,,14,13,172,05*67 1 2 = Total number of messages of this type in this cycle = Message number
12

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

3 4 5 6 7

= Total number of SVs in view = SV PRN number = Elevation in degrees, 90 maximum = Azimuth, degrees from true north, 000 to 359 = SNR, 00-99 dB (null when not tracking)

8-11 = Information about second SV, same as field 4-7 12-15= Information about third SV, same as field 4-7 16-19= Information about fourth SV, same as field 4-7

3.7 FACTORS THAT AFFECT GPS


There are a number of potential error sources that affect either the GPS signal directly or your ability to produce optimal results: 1. Number of satellites - minimum number required: You must track atleast four common satellites - the same four satellites - at both the reference receiver and rover for either DGPS. Also to achieve centimetre -level accuracy, remember you must have a fifth satellite. This extra satellite adds a check on the internal calculation. 2. Multipath - reflection of GPS signals near the antennae: Multipath is simply reflection of signals similar to the phenomenon of ghosting on our television screen. GPS signals may be reflected by surfaces near the antennae, causing error in the travel time and therefore error in the GPS positions. 3. Ionosphere - change in the travel time of the signal:

Dept. of Electronics and Communication, Sir M. VIT

13

GPS Integrated Moving Vehicle for Reconnaissance

Before GPS signals reach your antenna on the earth, they pass through a zone of charged particles called the ionosphere, which changes the speed of the signal. If your reference and rover receivers are relatively close together, the effect of ionosphere tends to be minimal. And if you are working with the lower range of GPS precisions, the ionosphere is not a major consideration. 4. Troposphere - change in the travel time of the signal: Troposphere is essentially the weather zone of our atmosphere, and droplets of water vapour in it can affect the speed of the signals. The vertical component of your GPS answer (your elevation) is particularly sensitive to the troposphere. 5. Satellite Geometry - general distribution of the satellites: Satellite Geometry - or the distribution of satellites in the sky - effects the computation of your position. This is often referred to as Position Dilution of Precision (PDOP). PDOP is expressed as a number, where lower numbers are preferable to higher numbers. The best results are obtained when PDOP is less than about 7. PDOP is determined by your geographic location, the time of day you are working, and any site obstruction, which might block satellites. 6. Satellite Health - Availability of Signal: While the satellite system is robust and dependable, it is possible for the satellites to occasionally be unhealthy. A satellite broadcasts its health status, based on information from the U.S. Department of Defence. Your receivers have safeguards to protect against using data from unhealthy satellites. 7. Signal Strength - Quality of Signal : The strength of the satellite signal depends on obstructions and the elevation of the satellites above the horizon. To the extent it is possible, obstructions between your GPS antennae and the sky should
Dept. of Electronics and Communication, Sir M. VIT 14

GPS Integrated Moving Vehicle for Reconnaissance

be avoided. The satellites which are close to the horizon have weaker signals. 8. Radio Frequency (RF) Interference: RF interference may sometimes be a problem both for your GPS reception and your radio system. Some sources of RF interference include: Radio towers Transmitters Satellite dishes Generators

One should be particularly careful of sources which transmit either near the GPS frequencies (1227 and 1575 MHz) or near harmonics (multiples) of these frequencies. 9. Loss of Radio Transmission from Base: If, for any reason, there is an interruption in the radio link between a reference receiver and a rover, then your rover is left with an autonomous position. It is very important to set up a network of radios and repeaters, which can provide the uninterrupted radio link needed for the best GPS results.

3.8 APPLICATIONS OF GPS


Avionic navigation, including precision landings The aerial application of fertiliser & pesticides Land and hydro graphic surveying, including topological surveys, seismic surveys and rig positioning

Dept. of Electronics and Communication, Sir M. VIT

15

GPS Integrated Moving Vehicle for Reconnaissance

Agriculture, including crop mapping and the controlling of harvesting machinery

Vehicle tracking, including in-car navigation, fleet tracking and public safety applications

Precise positioning, including bridge sections, mining machinery, construction and the general area of 'outdoor robotics

Mapping and GIS data capture, including in-field mapping, GIS data collection and GIS data update

Photogrammetry-is the first remote sensing technology ever developed, in which geometric properties about objects are determined from photographic images.

Dept. of Electronics and Communication, Sir M. VIT

16

GPS Integrated Moving Vehicle for Reconnaissance

Chapter 4

P89v51RD2 MICROCONTROLLER
The P89v51RD2 is an 8bit, 80c51 compatible, 5v, low power microcontroller with 64kb flash and 1024bytes of data RAM. Its key features are ISP and X2 mode option. The user can choose to run the application either using conventional 80c51 clock rate (12 clocks per machine cycle) or X2 mode(6 clocks per machine cycle). By using X2 mode we can achieve twice the same throughput at the same clock frequency. Flash memory supports both parallel and in serial in-system programming (ISP). Parallel programming mode offers gangprogramming at high speeds, thereby reducing programming costs and time to market. Whereas, ISP on the other hand, allows a device to be reprogrammed in the end product under software control. It is also In-Application Programmable (IAP), allowing flash program memory to be reconfigured even while the application is running.

4.1 Features

80c51 central processing unit 5v operating voltage from 0 to 40Mhz 64 Kb of on-chip Flash program memory with ISP (InSystem Programming) and IAP (In-Application Programming)

SPI (Serial Peripheral Interface) and enhanced UART PCA (Programmable Counter Array) with PWM and

Capture/Compare functions
Dept. of Electronics and Communication, Sir M. VIT 17

GPS Integrated Moving Vehicle for Reconnaissance

Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each)

Three 16-bit timers/counters Programmable Watchdog timer (WDT) Eight interrupt sources with four priority levels Second DPTR register TTL- and CMOS-compatible logic levels Low power modes Idle mode

Fig. 4.1

P89v51RD2 Block Diagram


18

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

4.2 PIN DETAILS

Dept. of Electronics and Communication, Sir M. VIT

Fig. 4.2

Pin Diagram

19

GPS Integrated Moving Vehicle for Reconnaissance

4.3 PORT DETAILS


RD2 has four ports namely port0, port1, port2 and port3. PORT0: It is an 8-bit open drain bi-directional I/O port, without internal pull-up resistors. If the pins have 1 then it can be used as high impedance inputs. It is multiplexed low-order address and data bus during access to external code and data memory. It uses strong internal pull-ups when transitioning to 1s and external pull-ups during programming verification. PORT1: It is an 8-bit bi-directional I/O port with internal pull-ups. They are pulled high when 1s are written to them and can be used as inputs. They receive low-order address bytes during external mode programming. PORT2: It is an 8-bit bi-directional I/O port with internal pull-ups. They are pulled high when 1s are written to them and can be used as inputs. It sends high-order address byte during fetches from external program memory and during access to external data memory that use 16-bit address. PORT3: It is an 8-bit bi-directional I/O port with internal pull-ups. They are pulled high when 1s are written to them and can be used as inputs. It sends high-order address byte during fetches from external program memory and during access to external data memory that use 16-bit address.

Dept. of Electronics and Communication, Sir M. VIT

20

GPS Integrated Moving Vehicle for Reconnaissance

4.4 SERIAL

PROGRAMMING

OF

THE

MICROCONTROLLER
In this section we discuss the serial communication registers of the P89v51RD2 and also show how to program them to transfer and receive data serially. To allow data transfer between the PC and the microcontroller without any error, we must make sure that the baud rate of the microcontroller system matches the baud rate of the PCs com port (baud rate is defined as the number of signal changes per second). In this project, we use the Rx pin of the microcontroller to receive data from the GPS Rx, and we use the Tx pin of the microcontroller to transmit data through the XBee module. SBUF Register It is an 8-bit register used solely for serial communication in the microcontroller. For a byte of data to be transferred via the TxD line, it must be placed in the SBUF register. Similarly, SBUF holds the byte of data when it is received by the microcontrollers RxD line. SCON Register The SCON is an 8-bit register used to program the start bit, stop bit and data bits of data framing, among other things.

Dept. of Electronics and Communication, Sir M. VIT

21

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 4.3

SCON Register Details

4.4.1

PROGRAMMING THE MICROCONTROLLER TO

TRANSFER DATA SERIALLY (ALGORITHM):


The TMOD register is loaded with the value 20H, indicating the use of Timer1 in mode (8-bit auto-reload) to set the baud rate. The TH1 is loaded with the baud rate (assuming

XTAL=11.0592MHz)

Dept. of Electronics and Communication, Sir M. VIT

22

GPS Integrated Moving Vehicle for Reconnaissance

The SCON register is loaded with the value 50H, indicating serial mode1, where an 8-bit data is framed with the start and stop bits.

TR1 is set to start the Timer1. For receiving the data serially RI flag is cleared and the RI flag is monitored continuously to see if an entire character has been received yet. When the RI is raised, SBUF has the byte.

For transferring the data serially TI flag is cleared and the character byte to be transferred is written into the SBUF register. The TI flag is monitored to see if the character has been transferred completely.

To transmit/receive the next character, repeat the procedure.

4.5 TIMERS/COUNTERS 0 AND 1


The P89v51rd2 has three timers. They are timer0, timer1 and timer2. They can be used as either timers or event counters. TMOD REGISTER Both timer0 and timer1 use the same register, called TMOD, to set the various timer operation modes. TMOD is an 8-bit register in which the lower 4 bits are set aside for timer0 and the upper 4 bits for timer1. In each case the lower 2 bits are used to set the timer mode and the upper 2 bits to specify the operation.

Dept. of Electronics and Communication, Sir M. VIT

23

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 4.4

TMOD Register Details

TCON register It is a bit-addressable register. The TR0 and TR1 flags which are used to turn on or off the timers are part of a register called TCON (timer control). This register is an 8-bit register. As shown in table the upper four bits are used to store the TF and TR bits of both Timer0 and Timer1. The lower four bits are set aside for controlling the interrupt bits.

Dept. of Electronics and Communication, Sir M. VIT

24

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 4.5

TCON Register Details

4.6 TIMER 2
Timer 2 is a 16-bit Timer/Counter which can operate as either an event timer or an event counter, as selected by C/T2 in the special function register T2CON.

Dept. of Electronics and Communication, Sir M. VIT

25

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 4.6

T2CON Register Details

4.7

GENERATION OF TIME DELAY USING A

TIMER (ALGORITHM)

Load the TMOD register with a value indicating which timer (Timer0 or Timer1) is to be used and which timer mode (0 3) is selected.

Load registers TL and TH with initial count values. Start the timer. Keep monitoring the timer flag to see if it is raised. Get out of the loop when TF becomes high.

Stop the timer.

Dept. of Electronics and Communication, Sir M. VIT

26

GPS Integrated Moving Vehicle for Reconnaissance

Clear the TF flag for the next round. Go back to step2 to load TH and TL again.

4.8 RESET
A system reset initializes the Microcontroller and begins program execution at program memory location 0000H. The reset input for the device is the RST pin (pin 9). In order to reset the device, a logic level high must be applied to the RST pin for at least two machine cycles (24 clocks), after the oscillator becomes stable. At initial power up, the port pins will be in a random state until the oscillator has started and the internal reset algorithm has weakly pulled all pins HIGH. Powering up the device without a valid reset could cause the MCU to start executing instructions from an indeterminate location. Such undefined states may inadvertently corrupt the code in the flash.

Fig. 4.7 Power-on Reset Circuit When power is applied to the device, the RST pin must be held HIGH long enough for the oscillator to start up (usually several milliseconds for a low frequency crystal), in addition to two machine cycles for a
Dept. of Electronics and Communication, Sir M. VIT 27

GPS Integrated Moving Vehicle for Reconnaissance

valid power-on reset. An example of a method to extend the RST signal is to implement a RC circuit by connecting the RST pin to VDD through a 10 F capacitor and to VSS through an 8.2 kresistor as shown in figure. Note that if an RC circuit is being used, provisions should be made to ensure the VDD rise time does not exceed 1 millisecond and the oscillator start-up time does not exceed 10 milliseconds. For a low frequency oscillator with slow start-up time the reset signal must be extended in order to account for the slow start-up time. This method maintains the necessary relationship between VDD and RST to avoid programming at an indeterminate location, which may cause corruption in the code of the flash.

4.9 GENERATION OF PWM


RD2 has a Programmable Counter Array (PCA),a16-bit timer which has 5 16-bit compare/capture capture/compare modules associated with it. Each of the modules can be programmed to operate in one of the 4 modes :rising and/falling edge capture, software timer, high speed output or pulse width modulator, wherein each of the modules is associated with a pin in port 1. All modules share a common interrupt vector called the PCA interrupt system. Each module has a special function register associated with it. These registers are: CCAPM0 for module 0, CCAPM1 for module 1 etc. These registers contain the bits that control the mode in which the module operates. The ECCF bit (from CCAPMn=0, 1, 2, 3 or 4 depending on the module) enables the CCFn flag in the CCON SFR to generate an interrupt when a match or compare occurs in the associated module.

Dept. of Electronics and Communication, Sir M. VIT

28

GPS Integrated Moving Vehicle for Reconnaissance

PWM (CCAPM.1) enables the pulse width modulation mode. Enabling this we generate PWM signal which is of 2 kHz. All of the PCA modules can be used as PWM outputs (fig 4.4). Output frequency depends on the source for the PCA timer. All of the modules will have the same frequency of output because they all share one and only PCA timer. The duty cycle of each module is independently variable using the modules capture register CCAPnL.When the value of the PCA CL SFR is less than the value in the modules CCAPnL SFR the output will be low, when it is equal to or greater than the output will be high. When CL overflows from FF to 00, CCAPnL is reloaded with the value in CCAPnH. This allows updating the PWM without glitches. The PWM and ECOM bits in the modules CCAPMn register must be set to enable the PWM mode.

Fig. 4.8

PCA PWM mode

4.10

IN-SYSTEM PROGRAMMING (ISP)

Dept. of Electronics and Communication, Sir M. VIT

29

GPS Integrated Moving Vehicle for Reconnaissance

This is the ability of some programmable logic devices (PLDs), microcontrollers and other programmable electronic chips to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system. The primary advantage of this feature is that it allows manufacturers of electronic devices to integrate programming and testing into a single production phase, rather than requiring a separate programming stage prior to assembling the system. This ISP facility consists of a series of internal hardware resources coupled with internal firmware to facilitate remote programming of RD2 through the serial port. The ISP function uses five pins (Vdd, Vss, TxD, RxD, and RST). Only a small connector needs to be available to interface your application to an external circuit in order to use this application.

4.10.1

ISP TOOL (FLASH MAGIC)

Fig. 4.9

Snap-shot of ISP tool

Dept. of Electronics and Communication, Sir M. VIT

30

GPS Integrated Moving Vehicle for Reconnaissance

4.10.2

FEATURES

Flash Magic is a Windows compatible software from the Embedded Systems Academy that allows easy access to all the ISP features provided by the NXP devices. These features include: Erasing the Flash memory (individual blocks or the whole device) Programming the Flash memory Modifying the Boot Vector and Status Byte Reading Flash memory Performing a blank check on a section of Flash memory Reading the signature bytes Reading and writing the security bits Direct load of a new baud rate (high speed

communications)

Sending commands to place device in Boot loader mode

Flash Magic provides a clear and simple user interface to these features and more.

4.10.3

FLASH MAGIC PROGRAMMING PROCEDURE

Five Step Programming: 1. Connection Settings


Dept. of Electronics and Communication, Sir M. VIT 31

GPS Integrated Moving Vehicle for Reconnaissance

Select the desired COM port from the drop down list. Then select the required baud rate, device, interfacing mode and its operating frequency.

2. Erasing Select each Flash block that is to be erased by clicking on its name. If you wish to erase all the Flash then check that option. Otherwise, programs might overlap and output may not be right. If you wish to erase only the Flash blocks used by the hex file you are going to select, then check that option. 3. Selecting the HEX file You can either enter a path name in the text box or click on the Browse button to select a Hex File by browsing to it. Also you can choose Open from the File menu.

4. Options This section is optional, however Verify After Programming, Fill Unused Flash and Gen Block Checksums may only be used if a Hex File is selected (and therefore being programmed), as they all need to know either the Hex File contents or memory locations used by the Hex File. 5. Performing the operations Clicking the Start button will result in all the selected operations in the main window taking place. They will be in order: Erasing Flash Programming the Hex File Verifying the Hex File Filling Unused Flash Generating Checksums
32

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

Programming the clocks bit Programming the Security Bits Executing the firmware

Dept. of Electronics and Communication, Sir M. VIT

33

GPS Integrated Moving Vehicle for Reconnaissance

Chapter 5

SERIAL COMMUNICATION
Serial communication is the process of sending data one bit at a time, sequentially over a communication channel or computer bus. Serial communication is used for all long-haul communication and most computer networks. There are two pins in the microcontroller which are used specifically for transferring and receiving data serially. These pins are called TxD and RxD and they form a part of port3 of microcontroller. They are TTL compatible. In our project, the GPS data from the receiver is given to the microcontroller serially to make the process easier and cheaper. This is done by using RS232 (also called DB connector), which is an interfacing standard set by the Electronics Industries Association. This RS232 mainly provides compatibility between the two communicating devices. As this standard was set before the advent of TTL logic family, its input and output voltage levels are not TTL compatible. In RS232, a 1 is represented by -3 to -25v, while a 0 bit is +3 to +25v, making -3 to +3v undefined. For this reason to connect any RS232 to a microcontroller system we must use voltage regulators such as MAX232 (line drivers) to convert TTL logic to RS232 voltage levels, and vice versa.

5.1 RS232
RS232 mainly provides compatibility between the two communicating devices. To ensure fast and reliable data transmission between two devices, data transfer must be coordinated. Many of the pins are used for handshaking signals.

Dept. of Electronics and Communication, Sir M. VIT

34

GPS Integrated Moving Vehicle for Reconnaissance

FIG.5.1

Pin Details of a) DB-25 Connector (top) b) DB-9 Connector (bottom)

Dept. of Electronics and Communication, Sir M. VIT

35

GPS Integrated Moving Vehicle for Reconnaissance

5.1.1

PIN DESCRIPTION

DTR (data terminal ready): when the terminal is on (Or a PC COM port), then it will undergo self-test and then it will send DTR signal indicating that it is ready for communication. If there is something wrong then the signal will not be activated. Is an active-low signal which is used to inform the modem that the computer is working.

DSR (data set ready): When the modem is on and has gone through self-test then it asserts DSR indicating that it is ready for communication. It is an active-low signal. By chance the modem is unable to get connected to the telephone then this signal remains inactive indicating that it cannot accept or send data.

RTS (request to send): This is an active-low output signal sent by the comp when it wants to transmit data to the modem.

CTS (clear to send): This is a response to RTS sent by the modem when it has space for storing the data it is to receive requested, indicating that it can receive.

DCD (data carrier detect): the modem asserts this signal to inform the comp that a valid carrier has been detected and that contact between it and the other modem has been established.

RI (ring indicator): This signal indicates that telephone is ringing. It goes on and off in synchronization with the ringing sound. This the least used handshaking signal.

Dept. of Electronics and Communication, Sir M. VIT

36

GPS Integrated Moving Vehicle for Reconnaissance

5.2 MAX232 (VOLTAGE CONVERTER)


MAX232 is a line driver (voltage converter) which converts RS232s signal to TTL logic(and vice versa) which is acceptable by the microcontrollers TXD and RXD, thereby making it compatible with the RD2 which otherwise is not compatible.

5.2.1

FEATURES

Operates From a Single 5-V Power Supply,With 1.0-mF ChargePump Capacitors

Operates Up To 120 kbit/s Two Drivers and Two Receivers 30-V Input Levels Low Supply Current . . . 8 mA Typical MAX232 has two sets of line drivers for transferring and receiving

data, as shown in figure below.

Dept. of Electronics and Communication, Sir M. VIT

37

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 5.2

MAX232 Pin Detail and Internal Circuitry

There are two sets of line drivers for transferring data (T1 and T2) and that for receiving data (R1 and R2). In most of the applications only one of each line driver is used. For example, say T1 and R1 are used together for TxD and RxD of the microcontroller and the other two pins T2 and R2 are left unused. Here the T1 line driver has the designation of T1in and T1out on pin numbers 11 and 14 respectively, the T1in pin is the TTL side and is connected to the TxD of microcontroller while T1out is the RS232 side i.e. connected to the RxD pin of RS232 DB connector. The R1 line driver has the designation of R1in and R1out on pin numbers 13 and 12 respectively. R1in is the RS232 side connected to the TxD of RS232 DB connector, and R1out is the TTL side that is connected to the RxD pin of microcontroller.

Dept. of Electronics and Communication, Sir M. VIT

38

GPS Integrated Moving Vehicle for Reconnaissance

Table 5.1

Function Tables

5.2.2

ADVANTAGES

The main advantage of using the MAX232 is that it uses the +5V power source which is the same as the source voltage for the microcontroller. i.e. with the single +5V of power supply we can power both RD2 and MAX232.

5.2.3

APPLICATIONS

TIA/EIA-232-F, Battery-Powered Systems, Terminals, Modems, and Computers

Chapter 6

XBee RF MODULES
The XBee/XBee-PRO ZB OEM RF Modules are designed to operate within the ZigBee protocol and support the unique needs of low-cost,

Dept. of Electronics and Communication, Sir M. VIT

39

GPS Integrated Moving Vehicle for Reconnaissance

low-power wireless sensor networks. The modules require minimal power and provide reliable delivery of data between remote devices. Fig. 6.1 XBee Chip

The modules operate within the ISM 2.4 GHz frequency band

6.1 FEATURES

High Performance, Low Cost Indoor/Urban: up to 300 (100 m) Outdoor line-of-sight: up to 1 mile (1.6 km), with high-gain antenna

Transmit Power Output: 100 mW (20 dBm) EIRP Receiver Sensitivity: -102 dBmRF Data Rate: 250,000 bps Low Power XBee-PRO TX Current: 295 mA (@3.3 V) RX Current: 45 mA (@3.3 V) Power-down Current: < 1 A @ 25oC

The normal version has a range of 100 feet indoors, and 300 feet outdoors (clear line of sight). The Pro version has a range of 300 feet indoors, and 1 mile outdoors (clear line of sight). The Pro version also consumes a bit more power than the normal version.

6.2 MODES OF OPERATION


The XBee modules have two modes of operation:
1. Transparent serial port mode. This mode is the simplest -

you send data over a Make Controller's serial port to an XBee


Dept. of Electronics and Communication, Sir M. VIT 40

GPS Integrated Moving Vehicle for Reconnaissance

module which sends that data wirelessly to another XBee module, also presumably connected to a Make Controller, which can then read the data from the serial port. So, it's like a big, wireless serial connection between the two Make Controllers, hence the name. Clever, eh?
2. Packet mode. If you want to actually send messages to the

XBee module itself, however, you need a way to distinguish that from data that should be sent transparently. There are a few different kinds of packets, but we'll most concern ourselves here with IO packets and command packets. IO packets are what an XBee module sends when it has sampled its inputs. Command packets are used to set some configuration option for the module itself. Packet mode is nice because then we get to see a bunch of important information about each packet - who it came from, the signal strength, and things like that.

6.3 SERIAL COMMUNICATIONS


The XBee OEM RF Modules interface to a host device through a logiclevel asynchronous serial port. Through its serial port, the module can communicate with any logic and voltage compatible UART; or through a level translator to any serial device (For example: Through a Digi proprietary RS-232 or USB interface board). Devices that have a UART interface can connect directly to the pins of the RF module as shown in figure 6.2.

Dept. of Electronics and Communication, Sir M. VIT

41

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 6.2

Data Transfer Block Diagram

6.3.1

SERIAL DATA

Data enters the module UART through the DIN (pin 3) as an asynchronous serial signal. The signal should idle high when no data is being transmitted. Each data byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit (high). The following figure illustrates the serial bit pattern of data passing through the module.

Fig. 6.3

UART data packet 0x1F (decimal number 31) as

transmitted through the RF module: Example Data Format is 8 N1 (bits parity # of stop bits)

The module UART performs tasks, such as timing and parity checking, that are needed for data communications. Serial communications depend on the two UARTs to be configured with compatible settings (baud rate, parity, start bits, stop bits, data bits)

6.4 ZIGBEE PROTOCOL


The XBee modules operate using the ZigBee Protocol that was established by the IEEE. ZigBee is a specification for a suite of high level communication protocols using small, low-power digital radios
Dept. of Electronics and Communication, Sir M. VIT 42

GPS Integrated Moving Vehicle for Reconnaissance

based on the IEEE 802.15.4-2003 standard for wireless personal area networks (WPANs), such as wireless headphones connecting with cell phones via short-range radio. The technology defined by the ZigBee specification is intended to be simpler and less expensive than other WPANs, such as Bluetooth. ZigBee is targeted at radio-frequency (RF) applications that require a low data rate, long battery life, and secure networking. The ZigBee Alliance is a group of companies which maintain and publish the ZigBee standard. These protocols are built on recent algorithmic research (Ad-hoc Ondemand Distance Vector, neuRFon) to automatically construct a lowspeed ad-hoc network of nodes. In most large network instances, the network will be a cluster of clusters. It can also form a mesh or a single cluster. The current profiles derived from the ZigBee protocols support beacon and non-beacon enabled networks. In non-beacon-enabled networks, an unslotted CSMA/CA channel access mechanism is used. In this type of network, ZigBee Routers typically have their receivers continuously active, requiring a more robust power supply. In beacon-enabled networks, the special network nodes called ZigBee Routers transmit periodic beacons to confirm their presence to other network nodes. Nodes may sleep between beacons, thus lowering their duty cycle and extending their battery life In general, the ZigBee protocols minimize the time so as to reduce power use. In beaconing networks, nodes only need to be active while a beacon is being transmitted. In non-beacon-enabled networks, power consumption is decidedly asymmetrical: some devices are always active, while others spend most of their time sleeping. They direct-sequence spread spectrum coding, which is managed by the digital stream into the modulator. BPSK is used in the 868 and
Dept. of Electronics and Communication, Sir M. VIT 43

GPS Integrated Moving Vehicle for Reconnaissance

915 MHz bands, and orthogonal QPSK that transmits two bits per symbol is used in the 2.4 GHz band. The raw, over-the-air data rate is 250 Kbit/s per channel in the 2.4 GHz band, 40 Kbit/s per channel in the 915 MHz band, and 20 Kbit/s in the 868 MHz band. Transmission range is between 10 and 75 (up to 1500 meters for ZigBee pro.) meters (33 and 246 feet), although it is heavily dependent on the particular environment. The maximum output power of the radios is generally 0 dBm (1 mW)

Dept. of Electronics and Communication, Sir M. VIT

44

GPS Integrated Moving Vehicle for Reconnaissance

Chapter 7

DC MOTOR
The operation is based on simple electromagnetism. A current carrying conductor generates a magnetic field, when this is placed in an external magnetic field it will experiences a force proportional to the current in the conductor. The internal configuration of a DC motor is designed to harness the magnetic interaction between a currentcarrying conductor and an external magnetic field to generate rotational motion. The DC motor will rotate in one direction when the voltage is given and will rotate in the opposite direction when the voltage is reversed. This DC motor cannot be directly connected to the microcontroller as its current consumption is high, which may damage the circuit. It also does
not provide variable voltage capacity to run the motor with varying speed. Thus a motor driver circuit is used.

7.1 MOTOR DRIVER


The motor driver or motor controller or H-bridge is a bunch of electronics in between the DC motor and microcontroller used to avoid blowing up of microcontroller. The microcontroller works at 5 volts and small current (mille amps). This is sufficient to drive other integrated circuit but it is not sufficient to move DC motors as it requires high voltage, high current and lot of power. The purpose of motor driver is to convert this small powered signal from the microcontroller into more powerful signal that can drive motors. Given that P=VI, since V is fixed the power is directly proportional to the current required. Thus, more current means more

Dept. of Electronics and Communication, Sir M. VIT

45

GPS Integrated Moving Vehicle for Reconnaissance

power. But power generates heat and since the microcontroller has no heat sink it will melt. The motor driver is used to avoid this. Examples: L293d, L298, SN754410.

7.1.1

L293D

The Device is a monolithic integrated high voltage, high current four channel motor driver designed to accept standard DTL (DiodeTransistor Logic) or TTL logic levels and drive inductive loads (such as DC motors) and switching power transistors.

7.1.1.1

FEATURES

600 mA output current capability per channel 1.2A peak output current (non repetitive) per channel Enable facility Logical 0 input voltage up to 1.5V (high noise immunity) Internal clamp diodes

7.1.1.2

INTERNAL CIRCUITRY

Dept. of Electronics and Communication, Sir M. VIT

46

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 7.1

Internal Circuitry

The block diagram of the motor driver is as shown in the figure. It has four channel drivers. Each pair of channels is equipped with an enable input. It includes internal clamp diodes which mean less additional components are required to implement the circuit.

7.1.1.3

PIN DETAILS

The L293D is assembled in a 16 lead plastic package which has 4 center pins connected together and used for heat sinking.

Dept. of Electronics and Communication, Sir M. VIT

47

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 7.2

Pin Diagram

7.1.1.4

PRINCIPLE OF OPERATION

The L293d is a four channel driver and each pair of channels are equiped with an enable input. Thus to select either of channel one or two enable1 should be set and enable2 should be reset and to select either of channel three or four enable1 should be reset and enable2 should be set respectively. Each pair of channel is given to a DC motor and thus one L293d is needed for every two motors. A operating voltage of 4.5V-36V can be given to the motor driver circuit. The normal operating voltage at an ambient temperature of 25

Dept. of Electronics and Communication, Sir M. VIT

48

GPS Integrated Moving Vehicle for Reconnaissance

degrees celsius is Vs=24V (supply voltage) and Vss=5V (logic supply voltage). The truth table below gives the output possibilities for the different

input values.

Table 7.1 Truth Table Where H logic high L logic low Z high output impedance ( * ) relative to considered channel. The microcontroller sets and resets the respective enable and the input pins of the L293d and thus controls the rotation of the DC motor.

Chapter 8

WIRELESS VIDEO CAMERA


Wireless video and audio transition is made possible with use of video transmitters and receivers. Most wireless cameras come with a built in video transmitter and a separate video receiver. Once installed the video signal is sent wirelessly through a specific frequency to the
Dept. of Electronics and Communication, Sir M. VIT 49

GPS Integrated Moving Vehicle for Reconnaissance

receiver which is connected directly to a monitor, recorder or the other components of the receiving station. Though called wireless, these cameras are not totally wireless. Their name is slightly deceiving because it only refers to the video signal. Even though no video cable is needed for the wireless camera, it still requires power, which means another cable from the camera to the closest outlet. The transmission range of a Wireless Camera is usually rated by use the Line-of-Sight (LOS). Standard Wireless Video Cameras have a range of about 700 feet LOS. The signal can be transmitted through most solid objects including glass, plastic, wood, fiberglass, and some metals, but the signal is attenuated.

Fig 8.1 309as)

Wireless Video Camera and Receiver Unit (WS-

8.1 TECHNICAL TRANSMITTING UNIT

PARAMETERS

OF

Video Camera Parts: 1/3" 1/4" Image Sensors

Dept. of Electronics and Communication, Sir M. VIT

50

GPS Integrated Moving Vehicle for Reconnaissance

System: PAL/CCIR NTSC/EIA Effective Pixel: PAL: 628X582 NTSC: 510X492 Image Area:PAL: 5.78X4.19mmNTSC: 4.69X3.45mm Horizontal Definition: 380 TV Lines Scanning Frequency: PAL/CCIR: 50HZNTSC/EIA: 60HZ Minimum Illumination: 3LUX Sensitivity: +18DB-AGL ON-OFF Output Electrical Level: 50MW Output Frequency: 1.2G/2.4G Transmission Signal: Video, Audio Linear Transmission Distance: 50-100M Voltage: DC+9V Current: 300mA Power Dissipation:<=640MW

8.2 TECHNICAL UNIT


PARAMETERS

OF

RECEIVING

Wireless Audio Receiver Receiving Method:Electronic Frequency Modulation Reception Sensitivity: +18DB Receiving Frequency: 1.2G/2.4G Receiving Signal: Video, Audio Voltage: DC 12V
51

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

Current: 500mA

8.3 TV TUNER CARD


A TV tuner card is a computer component that allows television signals to be received by a computer. Most TV tuners also function as video capture cards, allowing them to record television programs onto a hard disk. Here, we use a TV Tuner card that interfaces with the computer via the USB port. To it is connected a tuneable receiver, in order to adjust the reception frequency to that of the camera. There is also an antenna attached to the receiver.

Dept. of Electronics and Communication, Sir M. VIT

52

GPS Integrated Moving Vehicle for Reconnaissance

Chapter 9

POWER SUPPLY
As it is customary to design and fabricate the complete power supply unit required for the project in order to make it sufficient. An ideal regulated power supply is an electronic circuit designed to provide pre-determined DC voltage +Vcc and Vcc i.e independent of current drawn from the Vcc, temperature causes variation in the line voltage. In our hardware we have made provision for both alternating current (AC) and direct current (DC). The AC is coverted to DC power supply using a bridge rectifier circuit. The volatge from the mains(230V) is converted into either a 12v AC or DC voltage using a adaptor and this 12V supply is inturn regulated in the hardware using 7809 and then 7805 regulator. This can be further varied using the LM317 variable voltage regulator. Thus the required voltages for the operation of the integrated chips are supplied. Ideally the microcontroller, MAX232(serial communication) and the motor driver should receive +5V supply for its normal operation while the XBee(wireless communication) requires +3.2V supply for its working. However a supply of 12V is required for the GPS receiver working.

9.1

REGULATORS
There are many designed possibilities for the regulator. Many

conventional regulators are best suited for constant voltage supply, but the number of discreet components and the circuit designed makes it not much attractive for dual power supply. Fixed voltage regulators that are effective and economical are available as three terminal regulator chips. These chips need no external components and operate well even under worst situations of the line or load. The 78xx series are the positive fixed voltage regulators with the output voltage specified
Dept. of Electronics and Communication, Sir M. VIT 53

GPS Integrated Moving Vehicle for Reconnaissance

by the last two digits and LM317 is a variable voltage regulator. To achieve the desired supplies national semiconductor, LM7809 (typically +9V) and LM7805 (typically +5V) regulators were used.

9.1.1

FEATURES OF 78XX REGULATORS


Output current up to 1A Fixed output voltage of 3.3V,4.7V,5V, 6V, 7V, 8V, 9V, 10V, 12V,15V, 18V and 24V available Thermal overload shutdown protection Short circuit current limiting

Output transistor safe operating area protection

9.1.2 FEATURES OF LM317 REGULATORS


Output current in excess of 1. 5a Output adjustable between 1. 2v and 37v Internal thermal overload protection Internal short circuit current limiting Output transistor safe operating area compensation These regulators were chosen because they were inexpensive,readily available and required few external components.The devices are also low voltage regulator which make them particularly suitable for low noise,low power applications such as the one in our project.

Dept. of Electronics and Communication, Sir M. VIT

54

GPS Integrated Moving Vehicle for Reconnaissance

Chapter 10

EXPERIMENTS AND OBSERVATIONS


Numerous experiments were conducted in order to test the working of the project. Two of the basic experiments were that the vehicle was programmed to move in a straight line and in a rectangular path.

10.1

EXPERIMENT 1:

In the straight line path experiment, there were two latitude values given as input to the program. The vehicle moved to the 1st point (1300.9000 N) and then came back to the 2nd point (1300.9100 N). The flowchart for this program is given below.

START

INITIALIZE TIMER AND VARIABLES

RECEIVE DATA SERIALLY FROM GPS

Dept. of Electronics and Communication, Sir M. VIT

55

GPS Integrated Moving Vehicle for Reconnaissance

N A

CHECK FOR REQUIRED CODE STREAM

STORE IN STRING

DISPLAY RELEVANT DATA: DATE, TIME, LATITUDE, LONGITUDE

IS 1ST POINT REACHE D

MOVE ACCORDINGLY

IS 2ND POINT REACHE D Y

STOP

Fig. 10.1

Flowchart for Straight Line Path

Dept. of Electronics and Communication, Sir M. VIT

56

GPS Integrated Moving Vehicle for Reconnaissance

The readings recorded during this experiment were tabulated and a graph plotted, as shown below. This shows the co-ordinates of the actual path taken by the vehicle, as compared to the desired coordinate path shown.

Fig. 10.2 longitude)

Straight

Line

Experiment

Graph

(latitude

vs

10.2

EXPERIMENT 2:

In the rectangular path experiment, there were two latitude values and 2 longitude values given as input to the program. The vehicle moved to the 1st point (1300.9070 N), then to the 2nd point (07733.7300 E), then the 3rd point (1300.9090 N) and finally to the 4th point (07733.6900). It then stops, thereby completing a rectangular path. The flowchart for this program is given below.
Dept. of Electronics and Communication, Sir M. VIT 57

GPS Integrated Moving Vehicle for Reconnaissance

START

INITIALIZE TIMER AND VARIABLES

RECEIVE DATA SERIALLY FROM GPS

CHECK FOR REQUIRED CODE STREAM

STORE IN STRING

DISPLAY RELEVANT DATA: DATE, TIME, LATITUDE, LONGITUDE

Dept. of Electronics and Communication, Sir M. VIT

58

GPS Integrated Moving Vehicle for Reconnaissance

IS 1ST POINT REACHE D

A N IS 2ND POINT REACHE D Y MOVE ACCORDINGLY

IS 3RD POINT REACHE D Y

IS 4TH POINT REACHE D Y STOP

Fig. 10.3

Flowchart for Rectangular Path

Dept. of Electronics and Communication, Sir M. VIT

59

GPS Integrated Moving Vehicle for Reconnaissance

The readings recorded during this experiment were tabulated and a graph plotted, as shown below. This shows the co-ordinates of the actual path taken by the vehicle, as compared to the desired coordinate path shown.

Fig. 10.4

Rectangular Path Experiment Graph (Latitude vs.

Longitude)

10.2.1

SCHEMATIC REPRESENTATION

The schematic representation of the area where the rectangular path experiment was conducted is shown in fig 10.5

Dept. of Electronics and Communication, Sir M. VIT

60

GPS Integrated Moving Vehicle for Reconnaissance

Perim eter of the experim area ent Actual latitude and longitude lines Chosen longitude range Chosen latitude range

Fig. 10.5

Schematic Representation
61

Dept. of Electronics and Communication, Sir M. VIT

GPS Integrated Moving Vehicle for Reconnaissance

Chapter 11

CONCLUSION and SCOPE FOR IMPROVEMENT

11.1

CONCLUSION

This project has been a great learning experience for us. We have done extensive research and a lot of effort has been put into the implementation of the original idea that was given to us in Indian Institute of Science. This has increased our awareness of the importance of surveillance and navigation in todays world. The project has scope for usage in security systems, navigation and military applications. We live in a world where easy access to remote areas may not always be possible, whereas it may be important to have that access. This project is an endeavor to bring down limitations of this kind and allow areas to be surveyed without endangering human beings. The integrated GPS receiver ensures that the location of the area in question is accurate. The simple display ensures proper understanding of required data. The continuous video feed gives the option to either view the surroundings live, or to record it for future use. The automatic nature of the vehicle removes any need for remote assistance or control by the base station. Thus, this is a self-sufficient system which requires only a simple initial input from the user. In a world where one has to put together many parts in order to get a system to work, to get an integrated system is a big advantage. A lot of work has gone into this project to ensure that this is one such system. The testing has been extensive and the results satisfactory. More importantly, it has been enriching experience for us.
Dept. of Electronics and Communication, Sir M. VIT 62

GPS Integrated Moving Vehicle for Reconnaissance

11.1.1

APPLICATIONS

Military applications Surveillance and reconnaissance Accessing remote areas Accessing hostile regions where humans face danger

11.2

SCOPE

FOR

FURTHER

DEVELOPMENT
At present the terrain of working is assumed to be free of obstacles. This forms a major drawback as this is the complete opposite of the real world scenario. Thus a need arises to build the setup with an obstacle avoidance circuit. We have started our work on building an obstacle avoidance system. Initially we considered infrared sensors but this is a short range sensor and its output varies with the ambient light at the time of reading. This makes the obstacle avoidance circuit less efficient. Thus they were replaced by infrared proximity sensors. Although it has a longer range when compared to the infrared sensors, it is not efficient enough for high speed moving vehicles.

Dept. of Electronics and Communication, Sir M. VIT

63

GPS Integrated Moving Vehicle for Reconnaissance

Fig. 11.1

IR Object Detection

The above figure illustrates the detection principle of the proximity sensors. Due to the listed disadvantages in using the IR range of sensors, we have started research on using ultrasonic sensors. These are much more efficient as compared to IR sensors. They have a higher range and are more accurate. They also do not get easily affected by the surroundings. The only condition is that the object in question has to be perpendicular to the sensor for effective detection. The only disadvantage of this sensor is that it is extremely expensive. It is not available in India, as a result of which the cost is very high. Thus, this limits its usage in our application.

Dept. of Electronics and Communication, Sir M. VIT

64

GPS Integrated Moving Vehicle for Reconnaissance

LITERATURE SURVEY
This literature survey is a comprehensive documentation of the methodologies involved in researching this project. We began with the study of GPS and its operation. The first book we turned to for this was Satellite Communications, by Timothy Pratt, Charles Bostian and Jeremy Alnutt, John Wiley & Sons, Inc., 2 Edition, 2003. In this we learnt about the operation of the GPS. To gather more information on this topic we referred to many websites. Of these, the most useful was http://www.trimble.com/gps. Now that we learnt the working of the GPS, we needed to analyse the format of the data that was being received from the GPS receiver. For this purpose, we used the website of the leading GPS receiver manufacturer, GARMIN (http://www.garmin.com) to get the required manuals. We learnt that the data was obtained in the form of NMEA (National Marine Electronic Association) codes. The website, http://www.nmea.org, was helpful in parsing this code. Our project was initially intended to be built around the microcontroller 8051. But since we required In-System Programming, we used the P89v51RD2 microcontroller. This is based on the 8051 architecture and has similar functionalities but with extended memory and added features. To learn about its functions, we used The 8051 Microcontroller and Embedded Systems: Using Assembly and C, by M. A. Mazidi, Janice G. Mazidi and Rolin D. McKinlay, Pearson Education, Inc., 2 Edition, 2006. This microcontroller has flash memory which can be programmed using the In-System Programming (ISP) method when it is embedded in the circuitry. To learn about this, we used the software available at http://www.flashmagictool.com from NXP.

Dept. of Electronics and Communication, Sir M. VIT

65

GPS Integrated Moving Vehicle for Reconnaissance

The GPS data which is received serially is incompatible with the microcontroller. To overcome this, we used a line driver: MAX232. Our research revealed that the microcontroller cannot provide

sufficient current to drive the DC motors that we used for the vehicle. Thus, we interfaced the microcontroller with the motor driver- L293D.

The operation, pin-details, functions and features of the required ICs were studied from their respective datasheets. These were sourced from http://www.digchip.com, http://www.vishay.com, and http://www.datasheetarchive.com. In order to make wireless transmission of data from the moving vehicle to the base station possible, we used the XBee modules. These are radio frequency transmitter-receiver modules. The necessary circuitry and other information was resourced from http://www.digi.com/products/wireless/zigbee-mesh/. Finally, to improve the functionality of the project as a whole, we referred numerous websites which furnished information about related projects which were done previously. A few of these websites are http://www.societyofrobots.com/, http://www.electronicsforu.com, and http://www.8051projects.info/forum/.

Dept. of Electronics and Communication, Sir M. VIT

66

GPS Integrated Moving Vehicle for Reconnaissance

Dept. of Electronics and Communication, Sir M. VIT

67

GPS Integrated Moving Vehicle for Reconnaissance

REFERENCES
Bibliography
M. A. Mazidi, Janice G. Mazidi and Rolin D. McKinlay, The 8051 Microcontroller and Embedded Systems: Using Assembly and C,Pearson Education, Inc., 2 Edition, 2006 Timothy Pratt, Charles Bostian and Jeremy Alnutt, Satellite

Communications, John Wiley & Sons, Inc., 2 Edition, 2003

Websites
http://www.trimble.com/gps http://en.wikipedia.org/wiki http://www.garmin.com http://www.nmea.org http://www.flashmagictool.com http://www.digi.com/products/wireless/zigbee-mesh http://www.electronicsforu.com http://www.keil.com

Datasheets:
http://www.digchip.com http://www.vishay.com http://www.datasheetarchive.com

Software

Dept. of Electronics and Communication, Sir M. VIT

68

GPS Integrated Moving Vehicle for Reconnaissance

Orcad and Schematics (to design circuit diagram and PCB) Keil Vision 3 (to write, execute and test programs) Flash Magic (to perform ISP) Hyper-terminal (to view serial data) Windmill comDebug Serial Instrumet Setup Utility (to view serial data) X-CTU (for XBee configuration)

Dept. of Electronics and Communication, Sir M. VIT

69

GPS Integrated Moving Vehicle for Reconnaissance

APPENDIX

Dept. of Electronics and Communication, Sir M. VIT

70

You might also like