GPS BASED CAB MONITORING SYSTEM
1. INTRODUCTION
In general, we have no correct mechanism to know the parameters like the route
in which a cab (vehicle) has travelled, where was it at a particular instant of time, with
what speed did it travel at that place and time and did it go to the desired place or not, we
don’t have a option rather than to believe the driver. The problem arises when the driver
doesn’t give us the exact authentic information.
If we want a cab (vehicle) to go to certain place, via certain route, with certain
speed within in certain time, later when we access the information about the journey, we
have to simply depend up on the driver for the information of the cab and the driver may
not give us the exact information about the journey and could use the cab (vehicle) for his
personal use.
The GPS BASED CAB MONITORING SYSTEM answers to all the problems
raised above. We can know the parameters like the distance travelled, time of the
journey, speed of the cab (vehicle), route adopted by the driver with out being dependent
on him.
We make use of a GPS modem, Multimedia card, Micro controller and a wireless
network (RF transceiver) and PC where the map of the route is given through Google
Earth.
Data logging mechanism is used here the data logging is done from GPS receiver
to the Multimedia card by interfacing them with a micro controller. The stored data in the
Multimedia card is sent to the pc through wireless (RF transceiver).The usage of wireless
network may increase the hardware complexity but avoids the usage of the cables which
is an irritating task to connect when the data needed to be transmitted to the pc, which is
used analyze the data graphically, using a software called Google Earth map.
GPS BASED CAB MONITORING SYSTEM
2. PRINCIPLE OF OPERATION
The cab monitoring system deals with the speed, time, latitude and longitude of
cab which is obtained from GPS receiver and storing the data in the memory card and
transmit the data, in MMC to the PC with a wireless network, when ever we want to
access the data. The objective of this project is achieved by the mechanism called data
logging, is done from the GPS to the Multimedia card.
As it involves the identification of the cab it requires a Global Processing System
(GPS) to know the position of the cab. There are 24 satellites revolving around the earth’s
orbit, at least 3 satellites are required for the GPS receiver. When the GPS receiver is
exposed to at least 3 satellites it receives the data from the satellites i.e. latitude,
longitude, distance, speed, time, altitude. The receiver continuously gives the data until it
is switched off. A 5 V external power supply is given to the GPS receiver. The baud rate
of the GPS receiver is 4800 bits/sec
The data received is stored in the Multimedia card. Multimedia card is a device
which stores the data up to certain space. The MMC which we use, in this project is 2
GB. We have an option to format the MMC card. Whenever the data is required, it can be
taken from the MMC and it is valid until we manually delete or unless it is up to its full
capacity then the new data is replaced by the old existing data.
The GPS receiver is interfaced with the MMC by using a Microcontroller (PIC
18F452). The 5 V power supply is needed for the micro controller. The micro controller
in this project works in 2 modes, read and write, it reads the data from the GPS receiver
and writes in to the MMC. The PIC microcontroller supports SPI protocol, which enables
us to store the data in the MMC. The GPS receiver is interfaced with the Microcontroller
using a RS-232 protocol.
The data in the MMC is transferred to the PC using a wireless network i.e. RF
transceiver. There are two RF transceivers, one is connected to PC and other is connected
to Microcontroller. The data is presented in the Google Earth map graphically.
GPS BASED CAB MONITORING SYSTEM
2.1 Block Diagram:
Fig 2.1 G.P.S Based Cab Monitoring System
The Major Building blocks of this Project
G.P.S receiver
MMC(multimedia card)
Microcontroller(18f452)
RF Transceiver
Power supply
Memory card interfacing
R.S 232
2.2 Description:
2.2.1 POWER SUPPLY:
The power supply unit is used to provide a constant 5V supply to different IC’s
this is a standard circuits using external 12VDC adapter and fixed 3-pin voltage regulator.
Diode is added in series to avoid Reverse voltage.
GPS BASED CAB MONITORING SYSTEM
2.2.2 MICRO CONTROLLER:
The PIC 18f452 CMOS FLASH-based 8-bit microcontroller is upward
compatible with the PIC16C73B/74B/76/77, PIC16F873/874/876/877devices. It features
200 ns instruction execution, self programming, an ICD, 2 Comparators, 8 channels of 8-
bit Analog-to-Digital (A/D) converter, 2 capture/compare/PWM functions, a synchronous
serial port that can be configured as either 3-wire SPI or 2-wire I2C bus, a USART, and a
Parallel Slave Port.
2.2.3 G.P.S:
GPS is the only fully functional GNSS in the world. GPS uses the constellation of
between 24 and 32 Medium Earth Orbit satellites that transmit precise microwave sig-
nals, which enable GPS receivers to determine their current location, the time, and their
velocity. Its official name is NAVSTAR GPS.
2.2.4 MultiMedia Memory Card:
The Multimedia Card (MMC) is a flash memory card standard. A memory card or
flash memory card is solid-state electronic flash memory data storage device capable of
storing digital contents. The MMC is the smallest removable flash memory designed
specifically for digital applications, such as MP3 music players, digital video cameras,
mobile phones, voice recorder, video game consoles, and other electronics.
GPS BASED CAB MONITORING SYSTEM
3. POWER SUPPLY
Power supply is the major concern for every electronic device .Since the
controller and other devices used are low power devices there is a need to step down the
voltage and as well as rectify the output to convert the output to a constant dc
Fig 3.1.Block Diagram of Power supply
3.1 Transformer:
Transformer is a device used to increment or decrement the input voltage given as
per the requirement. The transformers are classified into two types depending upon there
functionality
Step up transformer
Step down transformer
Here we use a step down transformer for stepping down the house hold ac power
supply i.e. the 230-240v power supply to 5 v .We use a 5-0-5 v center tapped step down
transformer.
GPS BASED CAB MONITORING SYSTEM
3.2 Rectifier:
The output of the transformer is an ac and should be rectified to a constant dc for
this it is necessary to feed the output of the transformer to a rectifier. The rectifier is
employed to convert the alternating ac to a constant dc.
There are many rectifiers available in the market some of them are:-
Half wave rectifier
Full wave rectifier
Bridge rectifier
The rectification is done by using one or more diodes connected in series or parallel.
If only one diode is used then only first half cycle is rectified and it is termed as
half wave rectification and the rectifier used is termed as half wave rectifier. If two
diodes are employed in parallel then both positive and negative half cycles are rectified
and this is full wave rectification and the rectifier is termed as Full wave rectifier.
If the diodes are arranged in the form of bridge then it is termed as Bridge
rectifier, it acts as a full wave rectifier. These rectifiers are available in the market in the
form of integrated chips (I.Cs)
3.3 Voltage Regulator:
The voltage regulator is used for the voltage regulation purpose. We use IC 7805
voltage regulator. The IC number has a specific significance. The number 78 represents
the series while 05 represent the output voltage generated by the IC
3.4 Light Emitting Diode:
We employ a light emitting diode for testing the functionality of the power supply
circuit. LED’s are also employed in other areas for many purposes. The fallowing are the
advantages of using LED’s.
It helps us while troubleshooting the device i.e. when the device is
malfunctioning it would be easy to detect where the actual problem araised
GPS BASED CAB MONITORING SYSTEM
LED employed with microcontroller verifies whether data is being
transmitted
GPS BASED CAB MONITORING SYSTEM
4. MICROCONTROLLER (PIC 18F452)
The PIC 18f452 CMOS FLASH-based 8-bit microcontroller is upward
compatible with the PIC16C73B/74B/76/77, PIC16F873/874/876/877devices. It features
200 ns instruction execution, self programming, an ICD, 2 Comparators, 8 channels of 8-
bit Analog-to-Digital (A/D) converter, 2 capture/compare/PWM functions, a synchronous
serial port that can be configured as either 3-wire SPI or 2-wire I2C bus, a USART, and a
Parallel Slave Port.
4.1 Features:
Operating frequency -DC-40MHZ
Program memory(Bytes)- 32K
Program memory(instructions)-16384
Data memory(Bytes)-1536
Data EEPROM memory(Bytes)- 256
I/O ports-Ports A,B,C,D,E
Timers-4
Capture/Serial communications –2
Serial communications, Addressable USART
RESETS(and delays)- POR,BOR,RESET instruction, Stack full Stack
Underflow(PRWT,OST)
Instruction set -75 instructions
Packages-44 PLCC,40 pin Dip,44 pin TQFP
GPS BASED CAB MONITORING SYSTEM
4.1.1 Special Features:
100,000 erase/write cycle Enhanced FLASH program memory typical
1,000,000 erase/write cycle Data EEPROM Memory
FLASH/Data EEPROM Retention: > 40 years
Self-reprogrammable under software control
Power-on Reset (POR), Power-up Timer (PWRT) and Oscillator Start-up Timer
(OST)
Watchdog Timer (WDT) with its own On-Chip RC Oscillator for reliable
operation
Programmable code protection
Power saving SLEEP mode
Selectable oscillator options including
Single supply 5V
Low power, high speed FLASH/EEPROM technology
Fully static design
Wide operating voltage range (2.0V to 5.5V)
Industrial and Extended temperature ranges
4.2 Description of Microcontroller (PIC 18f452):
4.2.1 Clock / instruction cycle:
Clock is microcontroller's main starter, and is obtained from an
external component called an "oscillator". If we want to compare a microcontroller with a
time clock, our "clock" would then be a ticking sound we hear from the time clock. In
that case, oscillator could be compared to a spring that is wound so time clock can run.
Also, force used to wind the time clock can be compared to an electrical supply.
Clock from the oscillator enters a microcontroller via OSC1 pin where internal
circuit of a microcontroller divides the clock into four even clocks Q1, Q2, Q3, and Q4
GPS BASED CAB MONITORING SYSTEM
which do not overlap. These four clocks make up one instruction cycle (also called
machine cycle) during which one instruction is executed.
Execution of instruction starts by calling an instruction that is next in string.
Instruction is called from program memory on every Q1 and is written in instruction
register on Q4. Decoding and execution of instruction are done between the next Q1 and
Q4 cycles. On the following diagram we can see the relationship between instruction
cycle and clock of the oscillator (OSC1) as well as that of internal clocks Q1-Q4.
Program counter (PC) holds information about the address of the next instruction.
Fig 4.1 Pin Diagram of PIC Microcontroller 18F452
GPS BASED CAB MONITORING SYSTEM
Pin Description
1 - MCLR/VPP
2 - RA0/AN0
3 - RA1/AN1
4 - RA2/AN2/VREF-
5 - RA3/AN3/VREF+
6 - RA4/T0CKI
7 - RA5/AN4/SS/LVDIN
8 - RE0/RD/AN5
9 - RE1/WR/AN6
10 - RE2/CS/AN7
11 - VDD
12 - VSS
13 - OSC1/CLKIN
14 - OSC2/CLKO/RA6
15 - RC0/T1OSO/T1CKI
16 - RC1/T1OSI/CCP2
17 - RC2/CCP1
18 - RC3/SCK/SCL
19 - RD0/PSP0
20 - RD1/PSP1
21 - RD2/PSP2
22 - RD3/PSP3
23 - RC4/SDI/SDA
24 - RC5/SDO
25 - RC6/TX/CK
26 - RC7/RX/DT
27 - RD4/PSP4
28 - RD5/PSP5
GPS BASED CAB MONITORING SYSTEM
29 - RD6/PSP6
30 - RD7/PSP7
31 - VSS
32 - VDD
33 - RB0/INT0
34 - RB1/INT1
35 - RB2/INT2
36 - RB3/CCP2
37 - RB4
38 - RB5/PGM
39 - RB6/PGC
40 - RB7/PGD
4.3 Ports:
Term "port" refers to a group of pins on a microcontroller which can be accessed
simultaneously, or on which we can set the desired combination of zeros and ones, or read from
them an existing status. Physically, port is a register inside a microcontroller which is connected
by wires to the pins of a microcontroller. Ports represent physical connection of Central
Processing Unit with an outside world. Microcontroller uses them in order to monitor or control
other components or devices. Due to functionality, some pins have twofold roles like
PA4/TOCKI for instance, which is in the same time the fourth bit of port A and an external input
for free-run counter. Selection of one of these two pin functions is done in one of the
configuration registers. An illustration of this is the fifth bit T0CS in OPTION register. By
selecting one of the functions the other one is disabled.
All port pins can be designated as input or output, according to the needs of a device
that's being developed. In order to define a pin as input or output pin, the right combination of
zeros and ones must be written in TRIS register. If the appropriate bit of TRIS register contains
logical "1", then that pin is an input pin, and if the opposite is true, it's an output pin. Every port
has its proper TRIS register. Thus, port A has TRISA, and port B has TRISB. Pin direction can be
changed during the course of work which is particularly fitting for one-line communication where
GPS BASED CAB MONITORING SYSTEM
data flow constantly changes direction. PORTA and PORTB state registers are located in bank 0,
while TRISA and TRISB pin direction registers are located in bank 1.
4.3.1 Port and Tris:
Register defines the corresponding port pin as input, and resetting a bit in TRIS
register PORT has adjoined 8 pins. The appropriate register for data direction is TRIS.
Setting a bit in TRIS defines the corresponding port pin as output.
4.4 Memory Organization:
PIC18F452 has two separate memory blocks, one for data and the other for the
program. EEPROM memory with GPR and SFR registers in RAM memory make up data
block, while FLASH memory makes up the program block.
A) Program Memory:
Program memory has been carried out in FLASH technology which makes it the
possible to program a microcontroller many times before it's installed into a device and
even after its installment if eventual changes in program or process parameters should
occur. The size of program memory is1024 locations w.ith 14 bits width where locations
zero and four are reserved for reset and interrupt vector.
B) Data Memory:
Data memory consists of the EEPROM and RAM memories. EEPROM memory
consists of 256 eight bit locations whose content are not lost during loosing of power
supply. EEPROM is not directly addressable, but is accessed indirectly through EEADR
and EEDATA registers. As EEPROM memory usually serves for storing important
parameters (for example, of a given temperature in temperature regulators), there is a
strict procedure for writing in EEPROM which must be followed in order to avoid
accidental writing. RAM memory for data occupies space on a memory map from
location 0x0C to 0x4F which comes to 68 locations. Locations of RAM memory are also
GPS BASED CAB MONITORING SYSTEM
called GPR registers which is an abbreviation for General Purpose Registers. GPR
registers can be accessed regardless of which bank is selected at the moment.
4.5 Memory Banks:
Beside this 'length' division to the SFR and the GPR registers, memory map is
also divided in 'width' (see preceding map) to two areas called 'banks'. Selecting one of
the banks is done through the RP0 bit in the STATUS register.
4.6 Program Counter:
Program counter is a 13-bit register that contains the address of the instruction
being executed. It is physically carried out as a combination of a 5-bit register PCLATH
for the five higher bits of the address, and the 8-bit register PCL for the lower 8 bits.
4.7 Stack:
PIC18F452 has a 13-bit stack with 8 levels, or in other words, a group of 8
memory locations, 13 bits wide, with special purpose. Its basic role is to keep the value of
program counter after a jump from the main program to an address of a subprogram. In
order for a program to know how to go back to the point where it started from, it has to
return the value of a program counter from a stack.
4.8 Interrupts:
Interrupts are a mechanism of a microcontroller which enables it to respond to
some events at the moment they occur, regardless of what microcontroller is doing at the
time. This is a very important part, because it provides connection between a
microcontroller and environment which surrounds it. Generally, each interrupt changes
the program flow, interrupts it and after executing an interrupt subprogram (interrupt
routine) it continues from that same point on.
GPS BASED CAB MONITORING SYSTEM
Control register of an interrupt is called INTCON and can be accessed regardless
of the bank selected. Its role is to allow or disallowed interrupts, and in case they are not
allowed, it registers single interrupt requests through its own bits.
A) IE (Interrupt Enable):
A single microcontroller can serve several devices. In the interrupt method,
whenever any device needs its service, the device notifies the microcontroller by sending
it can interrupt signal. . The program associated with the interrupt is called the interrupt
service routine (ISR). The advantageous of interrupts is that the microcontroller can
serve many devices based on the priority assigned to it. There are six interrupts in the
micro controller
1. Reset.
2. Two interrupts are set aside for the timers.
3. Two interrupts are set aside for hardware external hardware interrupts.
4. Serial Communications has a single interrupt (receive and transfer).
.
Fig 4.2 Format of Interrupt Enable (IE)
EA disable all interrupts. If EA = 0, now interrupt is acknowledged. If EA = 1, each
interrupt source is individually enabled or disabled by setting or clearing its
enable a lap bit.
---- Not implemented, reserved for future use.
ET2 enables or disables timer 2 overflow or capturer interrupt.
ES enables or disables the serial port interrupt.
ET1 enables or disables timer 1 overflow interrupt.
EX1 enables or disables external interrupt 1.
ET0 enables or disables timer 0 overflow interrupt.
GPS BASED CAB MONITORING SYSTEM
EX0 enables or disables external interrupt 0.
B) IP (Interrupt Priority):
The Interrupt Priority SFR is used to specify the relative priority of each
interrupt. On the 8051, an interrupt may either be of low (0) priority or high (1) priority.
An interrupt may only interrupt interrupts of lower priority.
Fig 4.3 Format of Interrupt Priority (IP)
--- IP.7 Reserved
--- IP.6 Reserved
PT2 IP.5 Timer2 Interrupt Priority bit (for 8052 only)
PS IP.4 Serial Port Interrupt Priority Bit
PT0 IP.1 Timer0 Interrupt Priority Bit
PX0 IP.0 External Interrupt Priority Bit
4.9 PSW (Program Status Word):
The Program Status Word is used to store a number of important bits that are set
and cleared by microcontroller instructions.
.
Fig 4.4 Format of Program Status Word (PSW)
CY Carry-flag.
AC Auxiliary carry-flag.
---- Available to the user for general-purpose.
GPS BASED CAB MONITORING SYSTEM
RS1 register bank selector bit 1.
OV overflow flag.
---- User definable bit.
P Parity flag. It is used in the error detection by adding a bit.
4.10 TIMERS:
The "timer” or "counter "function is selected by control bits C/T in the special
function register TMOD. These two timer/counters have for operating modes, which are
selected by bit-pairs (M1/M0) in TMOD. Modes 0, 1, and 2 are the same for both
timers/counters. Mode 3 is different.
These two SFRs, taken together, represent timer 0. Their exact behavior depends
on how the timer is configured in the TMOD SFR; however, these timers always count
up. What is configurable is how and when they increment in value.
Fig 4.5 Format of Timer Mode Register (TMOD)
GATE: When set, start and stop of timer by hardware
When reset, start and stop of timer by software
C/T: Cleared for timer operation
Set for counter operation
Table 4.1 Modes of TMOD
M1 M0 MODE OPERATING MODE
0 0 0 13-bit timer mode
0 1 1 16-bit timer mode
1 0 2 8-bit auto reload mode
GPS BASED CAB MONITORING SYSTEM
1 1 3 Split timer mode
4.10.1 Timer 1:
These two SFRs, taken together, represent timer 1. Their exact behavior depends
on how the timer is configured in the TMOD SFR; however, these timers always count
up. What is configurable is how and when they increment in value.
Address =88H.
Bit addressable.
Fig 4.6 Format of Timer Control Register (TCON)
TF: Timer overflow flag: Set by hardware when the timer/counter overflows. It is
cleared by hardware, as the processor vectors to the interrupt service routine.
TR: timer run control bit: Set or cleared by software to turn timer or counter on/off.
IE: set by CPU when the external interrupt edge (H-to-L transition) is detected. It is
cleared by CPU when the interrupt is processed.
IT: set/cleared by software to specify falling edge/low-level triggered external
interrupt.
4.10.2 Free-run timer TMR0:
It is an 8-bit register inside a microcontroller that works independently of the
program. On every fourth clock of the oscillator it increments its value until it reaches the
maximum (255), and then it starts counting over again from zero. As we know the exact
GPS BASED CAB MONITORING SYSTEM
timing between each two increments of the timer contents, timer can be used for
measuring time which is very useful with some devices.
4.10.3 TMOD (Timer Mode):
The Timer Mode SFR is used to configure the mode of operation of each of the
two timers. Using this SFR your program may configure each timer to be a 16-bit timer,
an 8-bit auto reload timer, a 13-bit timer, or two separate timers. Additionally, you may
configure the timers to only count when an external pin is activated or to count "events"
that are indicated on an external pin.
4.11 SCON (Serial Control):
The Serial Control SFR is used to configure the behavior of the 8051's on-board
serial port. This SFR controls the baud rate of the serial port, whether the serial port is
activated to receive data, and also contains flags that are set when a byte is successfully
sent or received.
Bit addressable.
8H
Fig 4.7 Format of Serial Control Register (SCON)
REN set or cleared by software to enable or disable reception.
TB 8 not widely used.
RB 8 not widely used.
TI transmits interrupt flag. Set by hardware at the beginning of the stop bit in mode
1. It must be cleared by software.
RI received interrupts flag. Set by hardware halfway through the stop bit time in
mode 1. It must be cleared by software.
GPS BASED CAB MONITORING SYSTEM
Table 4.2 Modes of SCON
SM0 SM1 Mode Of Operation
0 0 Synchronous mode
0 1 8-bit data, 1 start bit, 1 stop bit, variable
baud rate
1 0 9- bit data, 1 start bit, 1 stop bit, fixed
baud rate
1 1 9- bit data, 1 start bit, 1 stop bit, variable
baud rate
4.12 Applications:
PIC18F452 perfectly fits many uses, from automotive industries and controlling
home appliances to industrial instruments, remote sensors, electrical door locks and
safety devices. It is also ideal for smart cards as well as for battery supplied devices
because of its low consumption.
EEPROM memory makes it easier to apply microcontrollers to devices where
permanent storage of various parameters is needed (codes for transmitters, motor speed,
receiver frequencies, etc.). Low cost, low consumption, easy handling and flexibility
make PIC18F452 applicable even in areas where microcontrollers had not previously
been considered (example: timer functions, interface replacement in larger systems,
coprocessor applications, etc.).
In System Programmability of this chip (along with using only two pins in data
transfer) makes possible the flexibility of a product, after assembling and testing have
GPS BASED CAB MONITORING SYSTEM
been completed. This capability can be used to create assembly-line production, to store
calibration data available only after final testing, or it can be used to improve programs
on finished products.
5. GLOBAL POSITIONING SYSTEM
5.1 Introduction:
The Global Positioning System (GPS) is a burgeoning technology, which
provides unequalled accuracy and flexibility of positioning for navigation, surveying and
GIS data capture. The GPS NAVSTAR (Navigation Satellite timing and Ranging Global
Positioning System) is a satellite-based navigation, timing and positioning system. The
GPS provides continuous three-dimensional positioning 24 hrs a day throughout the
world. The technology seems to be beneficiary to the GPS user community in terms of
obtaining accurate data up to about100 meters for navigation, meter-level for mapping,
and down to millimeter level for geodetic positioning. The GPS technology has
tremendous amount of applications in GIS data collection, surveying, and mapping.
The Global Positioning System (GPS) is a U.S. space-based radio navigation
system that provides reliable positioning, navigation, and timing services to civilian users
on a continuous worldwide basis -- freely available to all. For anyone with a GPS
receiver, the system will provide location with time. GPS provides accurate location and
time information for an unlimited number of people in all weather, day and night,
anywhere in the world.
The Global Positioning System (GPS) is a satellite-based navigation system made
up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. GPS
was originally intended for military applications, but in the 1980s, the government made
GPS BASED CAB MONITORING SYSTEM
the system available for civilian use. GPS works in any weather conditions, anywhere in
the world, 24 hours a day. There are no subscription fees or setup charges to use GPS.
The GPS is made up of three parts: satellites orbiting the Earth; control and
monitoring stations on Earth; and 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 three-dimensional location (latitude, longitude, and altitude)
plus the time.
5.2 Geo positioning -- Basic Concepts:
By positioning we can understand the determination of stationary or moving
objects. These can be determined as follows:
1. In relation to a well-defined coordinate system, usually by three coordinate values
and
2. In relation to other point, taking one point as the origin of a local coordinate
system.
The first mode of positioning is known as point positioning, the second as relative
positioning. If the object to be positioned is stationary, we can term it as static
positioning. When the object is moving, we call it kinematics positioning. Usually, the
static positioning is used in surveying and the kinematics position in navigation.
5.2.1 GPS Basic Facts:
The GPS uses satellites and computers to compute positions anywhere on earth.
The GPS is based on satellite ranging. That means the position on the earth is determined
by measuring the distance from a group of satellites in space. The basic principles behind
GPS are really simple, even though the system employs some of the high-techest
equipment ever developed. In order to understand GPS basics, the system can be
categorized into 5 Logical steps.
GPS BASED CAB MONITORING SYSTEM
They are listed below:
1. Triangulation from the satellite is the basis of the system.
2. To triangulate, the GPS measures the distance using the travel time of the radio
message.
3. To measure travel time, the GPS need a very accurate clock.
4. Once the distance to a satellite is known, then we need to know where the satellite
is in space.
5. As the GPS signal travels through the ionosphere and the earth's atmosphere, the
signal is delayed.
6. To compute a position in the three dimensions, we need to have four satellite
measurements. The GPS uses a trigonometric approach to calculate the positions,
The GPS satellites are so high up that their orbits are very predictable and each of
the satellites is equipped with a very accurate atomic clock.
5.3 Components of a GPS:
The GPS is divided into three major components
GPS BASED CAB MONITORING SYSTEM
Fig 5.1 different components of GPS
A) The Control Segment:
The DOD monitoring stations track all GPS signals for use in controlling the
satellites and predicting their orbits. Meteorological data also are collected at the
monitoring stations, permitting the most accurate evaluation of tropospheric delays of
GPS signals. Satellite tracking data from the monitoring stations are transmitted to the
master control station for processing. This processing involves the computation of
satellite ephemerides and satellite clock corrections. The master station controls orbital
corrections, when any satellite strays too far from its assigned position, and necessary
repositioning to compensate for unhealthy (not fully functioning) satellites.
B) The Space Segment:
GPS BASED CAB MONITORING SYSTEM
The Space Segment consists of the Constellation of NAVASTAR earth orbiting
satellites. The current Defense Department plan calls for a full constellation of 24 Block
II satellites (21 operational and 3 in-orbit spares). The satellites are arrayed in 6 orbital
planes, inclined 55 degrees to the equator. They orbit at altitudes of about 12000, miles
each, with orbital periods of 12 sidereal hours (i.e., determined by or from the stars), or
approximately one half of the earth's periods, approximately 12 hours of 3-D position
fixes. The next block of satellites is called Block IIR, and they will provide improved
reliability and have a capacity of ranging between satellites, which will increase the
orbital accuracy. Each satellite contains four precise atomic clocks (Rubidium and
Cesium standards) and has a microprocessor on board for limited self-monitoring and
data processing. The satellites are equipped with thrusters which can be used to maintain
or modify their orbits.
.
C) The User Segment:
The user segment is a total user and supplier community, both civilian and
military. The User Segment consists of all earth-based GPS receivers. Receivers vary
greatly in size and complexity, though the basic design is rather simple. The typical
receiver is composed of an antenna and preamplifier, radio signal microprocessor, control
and display device, data recording unit, and power supply. The GPS receiver decodes the
timing signals from the 'visible' satellites (four or more) and, having calculated their
distances, computes its own latitude, longitude, elevation, and time. This is a continuous
process and generally the position is updated on a second-by-second basis, output to the
receiver display device and, if the receiver display device and, if the receiver provides
data capture capabilities, stored by the receiver-logging unit.
5.4 How it works:
GPS satellites circle the earth twice a day in a very precise orbit and transmit
signal information to earth. GPS receivers take this information and use triangulation to
calculate the user's exact location. Essentially, the GPS receiver compares the time a
GPS BASED CAB MONITORING SYSTEM
signal was transmitted by a satellite with the time it was received. The time difference
tells the GPS receiver how far away the satellite is. Now, with distance measurements
from a few more satellites, the receiver can determine the user's position and display it on
the unit's electronic map.
GPS receiver must be locked on to the signal of at least three satellites to calculate
a 2D position (latitude and longitude) and track movement. With four or more satellites
in view, the receiver can determine the user's 3D position (latitude, longitude and
altitude). Once the user's position has been determined, the GPS unit can calculate other
information, such as speed, bearing, track, trip distance, distance to destination, sunrise
and sunset time and more.
Fig 5.2 G.P.S receiver communicating with the satellite and sending information
through the wireless mobile phone
5.5 GPS Radio Signals:
GPS satellites transmit two types of radio signals: C/A-code and P-code. Briefly,
here are the uses and differences of these two types of signals.
A) Coarse Acquisition (C/A-code):
GPS BASED CAB MONITORING SYSTEM
Coarse Acquisition (C/A-code) is the type of signal that consumer GPS units
receive. C/A-code is sent on the L1 band at a frequency of 1575.42 MHz C/A broadcasts
are known as the Standard Positioning Service (SPS). C/A-code is less accurate than P-
code.
The advantage of C/A-code is that it’s quicker to use for acquiring satellites and
getting an initial position fix. Some military P-code receivers first track on the C/A-code
and then switch over to P-code.
B) Precision (P-code):
P-code provides highly precise location information. P-code is difficult to jam and
spoof. The U.S. military is the primary user of P-code transmissions, and it uses an
encrypted form of the data (Y-code) so only special receivers can access the information.
The P-code signal is broadcast on the L2 band at 1227.6 MHz P-code broadcasts are
known as the Precise Positioning Service (PPS).
5.6 Sources of GPS Signal Errors:
Factors that can degrade the GPS signal and thus affect accuracy include the following:
Ionosphere and troposphere delays — the satellite signal slows as it passes
through the atmosphere. The GPS system uses a built-in model that calculates an
average amount of delay to partially correct for this type of error.
Signal multipath — this occurs when the GPS signal is reflected off objects such
as tall buildings or large rock surfaces before it reaches the receiver. This
increases the travel time of the signal, thereby causing errors.
GPS BASED CAB MONITORING SYSTEM
Receiver clock errors — a receiver's built-in clock is not as accurate as the atomic
clocks onboard the GPS satellites. Therefore, it may have very slight timing
errors.
Number of satellites visible — the more satellites a GPS receiver can "see," the
better the accuracy. Buildings, terrain, electronic interference, or sometimes even
dense foliage can block signal reception, causing position errors or possibly no
position reading at all. GPS units typically will not work indoors, underwater or
underground.
Fig 5.3 GPS modem device
5.7 Features:
Low cost
Compact (74x74x19mm)
12 Channel Receiver
Built-in Antenna
GPS BASED CAB MONITORING SYSTEM
Standard NMEA protocol USB or Serial
5.8 Receiver types:
A) Mapping/resource models:
These portable receivers collect location points and line and area data that can be
input into a Geographic Information System (GIS). They are more precise than consumer
models, can store more data, and are much more expensive.
B) Survey models:
These are used mostly for surveying land, where you may need accuracy down to
the centimeter for legal or practical purposes. These units are extremely precise and store
a large amount of data. They tend to be large, complex to use, and very expensive.
C) Commercial transportation models:
These GPS receivers, not designed to be handheld, are installed in aircraft, ships,
boats, trucks, and cars. They provide navigation information appropriate to the mode of
transportation. These receivers may be part of an Automated Position Reporting System
(APRS) that sends the vehicle’s location to a monitoring facility
5.9 Information from GPS Receivers:
GPS receivers provide our location and other useful information:
a. Time: A GPS receiver receives time information from atomic clocks, so it’s much
more accurate than your wristwatch.
b. Location: GPS provides your location in three dimensions. Latitude (x
coordinate)
Longitude (y coordinate) and Elevation.
GPS BASED CAB MONITORING SYSTEM
c. Speed: When we are moving, a GPS receiver displays your speed.
d. Direction of travel: A GPS receiver can display our direction of travel if we are
moving. If we are stationary, the unit can’t use satellite signals to determine
which direction we are facing.
e. Stored locations: we can store locations where we’ve been or want to go with a
GPS receiver. These location positions are waypoints. Waypoints are important
because a GPS unit can supply us with directions and information on how to get
to a waypoint. A collection of waypoints that plots a course of travel is a route,
which can also be stored. GPS receivers also store tracks (which are like an
electronic collection of breadcrumb trails that show where we’re been).
f. Cumulative data: A GPS receiver can also keep track of information such as the
total distance traveled, average speed, maximum speed, minimum speed, elapsed
time, and time to arrival at a specified location.
5.10 GPS Positioning Types:
There are two types of GPS positioning system
A) Absolute positioning:
The mode of positioning relies upon a single receiver station. It is also referred to
as 'stand-alone' GPS, because, unlike differential positioning, ranging is carried out
strictly between the satellite and the receiver station, not on a ground-based reference
station that assists with the computation of error corrections. As a result, the positions
derived in absolute mode are subject to the unmitigated errors inherent in satellite
positioning. Overall accuracy of absolute positioning is considered to be no greater than
50 meters at best by Ackroyd and Lorimer and to be + 100 meter accuracy by the U.S.
B) Differential Positioning:
GPS BASED CAB MONITORING SYSTEM
Relative or Differential GPS carries the triangulation principles one step further,
with a second receiver at a known reference point. To further facilitate determination of a
point's position, relative to the known earth surface point, this configuration demands
collection of an error-correcting message from the reference receiver.
Differential-mode positioning relies upon an established control point. The reference
station is placed on the control point, a triangulated position, the control point coordinate.
This allows for a correction factor to be calculated and applied to other roving GPS units
used in the same area and in the same time series. This error correction allows for a
considerable amount of error of error to be negated, potentially as much as 90 percent.
Fig 5.4 GPS setup
5.11 Two Common Sources of More Accurate Location Data:
Differential GPS (DGPS)
Wide Area Augmentation System (WAAS)
A) Differential GPS:
GPS BASED CAB MONITORING SYSTEM
Surveying and other work that demands a high level of precision use Differential
GPS (DGPS) to increase the position accuracy of a GPS receiver. A stationary receiver
measures GPS timing errors and broadcasts correction information to other GPS units
that are capable of receiving the DGPS signals. Consumer GPS receivers that support
DGPS require a separate beacon receiver that connects to the GPS unit. Consumers can
receive DGPS signals from free or commercial sources.
B) WAAS:
Wide Area Augmentation System (WAAS) combines satellites and ground
stations for position accuracy of better than three meters. Vertical accuracy is also
improved to three to seven meters. WAAS is only available in North America. Other
governments are establishing similar systems that use the same format radio signals such
as
European Euro Geostationary Navigation Overlay Service (EGNOS)
Japanese Multi-Functional Satellite Augmentation System (MSAS)
5.12 GPS Accuracy:
Table 5.1 describing of GPS accuracy:
GPS Mode Distance in Feet Distance in Meters
GPS without SA 49 15
GPS with DGPS 10–16 3–5
GPS with WAAS 10 3
5.13 Need of Reference Station:
For any level, except autonomous (which can have a large amount of error in it),
we must have a reference receiver, which is stationary, and a rover.
GPS BASED CAB MONITORING SYSTEM
The coordinates of this station must be known before we can begin using GPS on
any of our machines. First a proper site for the reference station is to be selected, and then
a GPS survey is performed to obtain the known coordinates. Once it is installed, the GPS
reference station can perform two functions simultaneously.
Receive data from the satellites
Broadcast GPS data to the rovers in the mine
5.13.1 Selecting the Reference Station:
Proximity to our Working Areas: This is both a GPS issue and a radio issue.
Remember, RTK is generally limited to about 10-15 Km (6-9 miles).
Absence of RF Interference: Try to place the reference station away from sources
of radio interference, which arise from radio towers, transmitters, television
Minimal Sources of Multipath: Multipath at our reference site can cause
inaccurate answers or interfere with our rover's ability to initialize.
Continuous AC / DC Power Source
Stable Documentation: One should have a stable survey monument or other
similarly well-defined physical point at the reference station
Stable Antennae Mount Not only the monument should be stable, but also the
GPS antennae itself should be secure and stable to minimize the movement.
5.13.2 Reference Station Equipment:
GPS receiver
GPS antenna
Radio and antenna, Power supply, & Cables
1) Radios:
We have seen that each GPS rover must receive information from the reference
station to achieve accurate positions. To maintain constant communication between our
reference station and rover, we need
GPS BASED CAB MONITORING SYSTEM
Radio
Radio Antenna
Cables
The radios are cabled directly into the GPS receiver. Power may be provided to
the radio through the GPS receiver. At the reference site, the GPS data is broadcast
through the radio. At the rover site, the reference GPS data is received by the radio and
are routed into the rover receiver, where it is processed together with rover's the GPS
data.
2) Repeater Radios:
If, for any reason, the reference station transmission cannot reach our rovers, then
we must use one or more repeaters. A repeater relays the data from our reference or
another repeater. The maximum number of repeaters we can use depends on our type of
radio. Repeaters differ from our reference and rover radios in two important ways: they
must have their own source of power, and they can be moved as the needs change. Radios
draw very low power, but they require uninterrupted power. Because repeaters may need
to be moved to accommodate our needs, batteries or compact solar power units are used.
Frequency and Bandwidth: Most radios used in GPS fall within one of the
following frequency ranges:
150-174 MHz (VHF)
406-512 MHz (UHF)
902-928 MHz (spread spectrum)
The lower-frequency radios (150-174 MHZ) tend to have more power, due to
design and legal issues (not Physics), However, the bandwidth, which determines the
amount of data we can transmit, is narrower in these lower ranges (also due to design, not
physics). In the nominal 450 MHz and 900 MHz ranges, the bandwidth is wider.
GPS BASED CAB MONITORING SYSTEM
3) Radio Range:
To guarantee steady, uninterrupted transmission over the radio, one should be
aware of some of the factors that affect the radio's effective range.
Antenna Height: raising the radio antenna is the easiest and most effective way to
increase range.
Antenna design: radiating patterns vary, depending on the antenna design.
Cable length and type: radio signals suffer loss in cables, so keep the length to a
minimum. If we must use long cables, use low-loss cables.
Output power: doubling output power does not double our effective range.
Obstructions: Buildings, walls and even the machines can block or interrupt radio
transmission.
Grounding: The radio antenna may be a target for lightning.
5.14 GPS Has Internal And External Memories:
5.14.1 Internal Memory:
A receiver’s internal memory holds such data as waypoints, track logs, routes, and
up loadable digital maps (if the model supports them). The more memory the receiver
has, the more data we can store in it. All the data that’s been stored in the GPS receiver is
retained when the device is turned off.GPS receivers have different amounts of memory.
Unlike personal computers, we can’t add memory chips to a GPS unit to expand its
internal memory.
5.14.2 External Storage:
Some GPS receivers aren’t limited to internal memory for storage, using support
memory cards that can be plugged into the receiver to store data. External memory can be
either Manufacturer proprietary data cards or Generic (and less expensive) storage, such
as
Multi Media Card (MMC)
GPS BASED CAB MONITORING SYSTEM
Secure Digital (SD)
5.15 NMEA Format:
GPS gives the output in NMEA format which means national marine electronics
association. This GPS output contains six to seven lines of data out of that only two lines
are sufficient for us to trace the complete path journey of any vehicle or moving objects.
Those two lines are GPGGA which gives time, position and fix type data and GPRMC
(Recommended minimum sentence) which gives time, date, position, course and speed
data.
GPGGA: $GPGGA,161229.487,3723.2475,N,12158.3416,E,1,07,1.0,9.0,M, , , ,0000*18
GPRMC: $GPRMC,161229.487,A,3723.2475,N,12158.3416,E,0.13,309.62,120598, ,*10
NMEA output messages are:
Option Description
GGA Time, position and fix type data
RMC Time, data, position, course and speed data
In this format every line starts with $ symbol and ends with * indicating starting
and ending of lines, after this 161229 indicates the time at that instant 16hrs 12min 29
sec, next latitude of 37 degrees 23.2475’ N, longitude of 121 degrees 58.3416’E. ‘A’
indicates the active data.*18 indicate the checksum data. By using longitudes and
latitudes we can locate the position of a particular location. This NMEA format is
converted using ccs compiler and opened on Google Earth computerized map then we
have the complete path journey of any vehicle or moving objects.
GPS BASED CAB MONITORING SYSTEM
5.16 GPRMC Data Format:
RMC (Recommended Minimum Navigation Information):
1 2 3 4 5 6 7 8 9 10 11 12
| | | | | | | | | | | |
$--RMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,xxxx,x.x,a*hh
1 Time (UTC)
2 Status, V = Navigation receiver warning
3 Latitude
4 N or S
5 Longitude
6 E or W
7 Speed over ground, knots
8 Track made good, degrees true
9 Date, dd-mm-yy
10 Magnetic Variation, degrees
GPS BASED CAB MONITORING SYSTEM
11 E or W
12 Checksum
5.17 GPS Applications:
One of most significant and unique features of the Global Positioning Systems is
the fact that the positioning signal is available to users in any position worldwide at any
time. With a fully operational GPS system, it can be generated to a large community of
likely to grow as there are multiple applications, ranging from surveying, mapping,and
navigation to GIS data capture.GPS will soon be a part of the overall utility oftechnology.
There are countless GPs applications, a few important ones are covered in the following
passage.
Science:
Archaeology
Environmental
Transportation:
Aviation
Space
Military:
Intelligence and Target Location
Navigation
Weapon aiming and Guidance
Industry:
Mapping
GPS BASED CAB MONITORING SYSTEM
Public safety
Surveying
Telecommunications
6. MULTIMEDIA CARD
6.1 Introduction:
The Multimedia Card (MMC) is a flash memory card standard. A memory card or
flash memory card is solid-state electronic flash memory data storage device capable of
storing digital contents.
The MMC is the smallest removable flash memory designed specifically for
digital applications, such as MP3 music players, digital video cameras, mobile phones,
voice recorder, video game consoles, and other electronics. The Multi Media Card has a
wide variety of uses in some of the most exciting products on the market today.
A MMC is used as storage media for a portable device, in a form that can easily
be removed for access by a PC. For example, a digital camera would use an MMC for
storing image files.
MMCs are currently available in sizes up to and including 32 GB. They are used
in almost every context in which memory cards are used, like cellular phones, digital
audio players and digital cameras. Since the introduction of Secure Digital card few
companies build MMC slots into their devices (an exception is some mobile devices like
the Nokia 9300 communicator, where the smaller size of the MMC is a benefit), but the
slightly thinner, pin-compatible MMCs can be used in almost any device that supports
SD cards if the software/firmware on the devices support them.
6.2Types of MMC:
A) An RS-MMC with adapter:
GPS BASED CAB MONITORING SYSTEM
The RS-MMC card is approximately half the size of the full Multimedia Card.
Having the same width and thickness; RS-MMC measures 18mm from top to bottom
instead of 32mm. With capacities of 1GB as of 2005, RS-MMC cards can be pushed into
an adapter and plugged into full-size MMC slots.
B) Dual-Voltage Multimedia Card (DV-MMC):
One of the first substantial changes in MMC was the introduction of dual-voltage
cards that support operations at 1.8 V in addition to 3.3 V. Running at lower voltages
reduces the card's power consumption, which is important in mobile devices. However,
simple dual-voltage parts quickly went out of production in favor of MMC plus and
MMC mobile, which offer additional capabilities on top of dual-voltage support.
C) MMC micro:
MMC micro is a micro-size version of MMC. With dimensions of 14 mm ×
12 mm × 1.1 mm, it is even smaller and thinner than RS-MMC. Like MMC mobile,
MMC micro supports dual voltage, is backward compatible with MMC, and can be used
in full-size MMC and SD slots with a mechanical adapter. MMC micro cards support the
high-speed and 4 bit bus features of the 4.x spec, but not the 8-bit bus, due to the absence
of the extra pins. An MMC micro card appears very similar to micro SD but the two
formats are not physically compatible and have incompatible pin outs.
6.3 Design and Implementation:
SD cards are based on the older Multimedia Card (MMC) format, but have a
number of differences:
The SD card is asymmetrically shaped in order not to be inserted upside down,
while an MMC would go in most of the way but not make contact if inverted.
GPS BASED CAB MONITORING SYSTEM
Fig 6.1 SD card, mini SD card, and micro SD card from top to bottom.
Most SD cards are physically thicker than MMCs. SD cards generally measure
32 mm × 24 mm × 2.1 mm, but as with MMCs can be as thin as 1.4 mm if they
lack a write-protect switch; such cards, called "Thin SD", are described in the SD
specification, but they are non-existent or rare in the market as devices that would
require a thinner card are usually utilizing the smaller (and thinner) versions of
SD: miniSD or microSD.
The card's electrical contacts are recessed beneath the surface of the card,
protecting them from contact with a user's fingers.
SD cards typically have transfer rates in the range of 10-20 MB/s, but this number
is subject to change, due to recent improvements to the MMC standard.
GPS BASED CAB MONITORING SYSTEM
Devices with SD slots can use the thinner MMCs, but standard SD cards will not
fit into the thinner MMC slots. MiniSD cards can be used directly in SD slots with
a simple passive adapter, since the cards differ in size and shape but not electrical
interface. With an active electronic adapter, SD cards can be used in Compact
Flash or PC card slots. Some SD cards include a USB connector for compatibility
with desktop and laptop computers, and card readers allow SD cards to be
accessed via connectivity ports such as USB, FireWire, and the parallel printer
port. SD cards can also be accessed via a floppy disk drive with a Flash Path
adapter
6.4 Working of MMC:
MMC (Multi Media Card) is a device which can be used to store the data within it in
the form of files.
MMC card can be interfaced with Microcontroller using SPI (Serial Peripheral
Interface) protocol.
We are using this MMC card to store the logged GPS data.
The logged GPS data can be copied onto a computer and then can be displayed on
Google Earth computerized map
We are using 64MB MMC card.
6.5 SD/MMC Mini Board:
Our new SD/MMC Mini Board is a great way to interface to a standard SD or
MMC memory card. This board features a standard SD/MMC connector for easy
GPS BASED CAB MONITORING SYSTEM
connection of your memory card. Data can be easily downloaded or read from the card
using standard SD or SPI communication.
Fig 6.2 Mini board of MMC
GPS BASED CAB MONITORING SYSTEM
This board incorporates standard TTL connectors for easy connection. A Card
Detect signal and LED, together with a Red Power LED. The connector is a high-quality
AVX card connector, for reliable and long-life performance. This board can be easily
configured to work with our MP3 Mini-Board, as a simple MP3 Player. Ideal also as a
data storage board for real-time data and program storage.
The new SD/MMC Mini Board is ideal for a wide range of data storage and
programming applications. The board connects easily using a standard SPI interface and
programs can be quickly developed to utilize standard memory cards.
6.6 Features of Mini Board:
It can be used with SD and MMC Cards.
High-Quality AVX Card Socket.
LED Indication for Card Presence.
Standard Communications interfaces for Data Read and Write.
Easily Connects to most microcontrollers.
Ideal for use as an easily removable Data-Storage Device.
Board Dimensions: 45 x 55 mm.
6.7 Features of MMC:
Universal low cost data storage and communication media.
The MMC communication is based on 7 pin serial bus
Operate in a low voltage range of 2.0 to 3.6V
GPS BASED CAB MONITORING SYSTEM
Targeted for portable and stationary applications
Noted for high date rate of 52Mbps
Secure Versions of card is available.
MMC uses flash memory for read/write application or ROM chip for static
application
6.8 Secure Versions:
Two secure versions of the Multimedia Card are offered. Secure MMC for
Content Protection is used for copyrighted material. It contains encrypted content in
readable flash memory and licensing information in a hardware-protected, tamper proof
part of the card. Secure MMC for M-Commerce is a high-level security card for e-
commerce.
6.9 MMC and SD Cards:
Multimedia Cards and SD Memory Cards share the same footprint, but MMCs are
thinner and have only seven pins compared to nine. MMC cards can be read in SD Card
readers, but SD Cards cannot be read in readers designed for MMC only.
GPS BASED CAB MONITORING SYSTEM
Fig 6.3 Multimedia card
6.10 Advantages:
Universal low cost data storage and communication media.
High performance at a low cost price.
Low power consumption.
High data through at a memory card interface.
MMC Communication is based on an advanced 7-pin serial bus designed to
operate in a low voltage range.
Reduced-Size Multimedia Card (RS-MMC):
6.11 Applications of MMC:
1) It is used for digital applications such as MP3 music players, digital video cameras,
mobile phones, voice recorders.
2) The RS-MMC is aimed primarily at mobile phone and digital camera
GPS BASED CAB MONITORING SYSTEM
7. SERIAL AND WIRELESS COMMUNICATION
7.1 Serial Communication:
Serial communication is used for transferring data between two systems located at
distances of hundreds of feet to millions of miles apart.
Serial data communication uses two methods, a synchronous and asynchronous.
The synchronous method transfers a block of data at a time while the synchronous
transfers a single byte at a time. For this reason, there are special IC chips made by many
manufacturers for serial data communications. These chips are commonly referred to as
UART and USART.
7.1.1 ASYNCHRONOUS SERIAL COMMUNICATION:
In the asynchronous method, each character is placed in between start and stop
bits. This is the called framing. In data framing for asynchronous communications, the
data, such as ASCII characters, are packed in between a start bit and a stop bits. The start
bit is always one-bit but the stop bit can be one or two bits. If the transmitter and receiver
GPS BASED CAB MONITORING SYSTEM
are using different speeds, stop bit will not be received at the expected time problem is
called framing error. The start bit is always a 0 and the stop bit is 1.
A) PARITY BIT:
In some systems in order to maintain data integrity, the parity bit of the character
byte is included in the data frame. The parity bit is odd or even. In case of an odd parity
bit the number of data bits of a book of including the parity bit, is even.
B) DATA TRANSFER RATE:
The rate of data transfer in serial data communication is stated in bps. Another
widely used terminology for bps is baud rate. Baud rate is defined as the number of
signal changes per second.
7.2 RS232 STANDARDS:
Two allow compatibility among the data communication equipment made by
various manufacturers; an interfacing standard called RS232, was set by the electronics
industries association (EIA) in 1960. RS 232 is the standard defined for the connection
of "Data Terminal Equipment" (DTE) to "Data Communications Equipment" (DCE).
DTE is a generic term for an item which forms part of the "information
processing" portions of a system. Examples are: computer, printer, and terminal. DCE is
a device, which provides an interface between a DTE and a communications link.
In RS 232, a 1 is represented by -3 to -25V which is called Mark, while a 0 bit is
+ 3 to + 25V which is called Space. To connect any RS 232 to a µc system, voltage
converters such as Max 232are used. Max 232 IC chips are commonly referred to as line
GPS BASED CAB MONITORING SYSTEM
drivers.8.3. MAX 232. The RS 232 is not compatible with micro controllers, so a line
driver converts the RS 232's signals to TTL voltage levels.
7.3 Wireless Communication:
7.3.1 Introduction:
Radio frequency (RF) transmitters are widely used in radio frequency
communications systems. With the increasing availability of efficient, low cost
electronic.
The transmitting baseband signal is subjected to a predetermined signal process,
input to a modulator, which modulates a carrier wave signal. The modulated carrier wave
signal is converted into a radio frequency by a transmitting radio-frequency circuit and
amplified to a predetermined transmitting power, and transmitted to the base station from
the antenna via the duplexer. Communication systems are known to support wireless and
wire lined communications between wireless and/or wire lined communication devices.
Such communication systems range from national and/or international cellular telephone
systems to the Internet to point-to-point in-home wireless networks. Depending on the
type of wireless communication system, a wireless communication device, such as a
cellular telephone, two-way radio, personal digital assistant (PDA), personal computer
(PC), laptop computer, home entertainment equipment, etc., communicates directly or
indirectly with other wireless communication devices.
7.3.2 Transmitter in RF Transceiver:
The base stations and subscriber units include radio frequency transmitters and
RF receivers, together they're called "RF transceivers." RF transceivers service the
wireless links between the base stations and subscriber units.
The RF transmitter receives a base band signal from a base band processor,
converts the base band signal to an RF signal, and couples the RF signal to an antenna for
transmission. In most RF transmitters, the base band signal is first converted to an
intermediate frequency (IF) signal and then the IF signal is converted to the RF signal.
GPS BASED CAB MONITORING SYSTEM
The data modulation stage converts raw data into base band signals in accordance with
the particular wireless communication standard. The one or more intermediate frequency
stages mix the base band signals with one or more local oscillations to produce RF
signals. The power amplifier amplifies the RF signals prior to transmission via an
antenna.
7.3.3 Receiver in RF Transceiver:
The function of the receiver is to detect signals in the presence of noise and
interference, and provide amplification, down conversion and demodulation of the
detected the signal such that it can be displayed or used in a data processor. The RF
receiver receives an RF signal, converts the RF signal to an IF signal, and then converts
the IF signal to a base band signal, which it then provides to the base band processor. As
is also known, RF transceivers typically include sensitive components susceptible to
noise and interference with one another and with external sources. The RF receiver is
coupled to the antenna and includes a low noise amplifier, one or more intermediate
frequency stages, a filtering stage, and a data recovery stage.
The low noise amplifier receives an inbound RF signal via the antenna and
amplifies it. The one or more intermediate frequency stages mix the amplified RF signal
with one or more local oscillations to convert the amplified RF signal into a baseband
signal or an intermediate frequency (IF) signal. Typical transmit circuitry includes a
feedback loop (often a phase-locked loop, or PLL) that has a voltage-controlled oscillator
(VCO) and a loop filter circuitry. Phase locked loops (PLLs) are becoming increasingly
popular in integrated wireless transceivers as components for frequency generation and
modulation. PLLs are typically used for one of a variety of functions, including
frequency translation to up-convert a baseband (BB) signal to an intermediate frequency
(IF) or to up-convert a baseband or IF signal to RF prior to amplification by a power
amplifier and transmission. Inductive/capacitive (LC) oscillators are important elements
of RF transmitters, where the LC oscillators are used as master oscillators.
GPS BASED CAB MONITORING SYSTEM
7.3.4 Design of RF Transceiver:
Transmitters and receivers for communication systems generally are designed
such that they are tuned to transmit and receive one of a multiplicity of signals having
widely varying bandwidths and which may fall within a particular frequency range.
In an RF receiver, an incoming RF signal is first passed through an RF band pass
filter to remove signal components outside of the frequency range of the desired signal.
The resulting filtered signal is then usually amplified by a low noise amplifier. A radio
frequency receiver includes a frequency converter for converting a received radio
frequency signal to an intermediate frequency (IF) signal. An IF filter is coupled to the
frequency converter for limiting the IF signal to the bandwidth of a communication
channel.
The band -limited signal is applied to a demodulator where the signal is processed
to recover the original baseband frequency signal. A low power RF receiver circuit
comprises a low noise preamplifier and double-balanced mixer, using novel monolithic
micro strip inductors and transformers for radio frequency IC (integrated circuit)
applications using submicron bipolar CMOS process technology.
A direct-conversion receiver in a radio communication system is configured to
have a varying gain in order to track the varying signal strength of the received RF signal.
Radio frequency (RF) receivers for cellular phone base stations must provide high
degrees of both selectivity and sensitivity. An important measure of a receiver's
performance is its sensitivity and one means for measuring this sensitivity is to compare
the measured bit error rate (BER) of a received signal with the signal to noise ratio.
Antennas are provided as accessories of RF receivers in order to provide the receivers
with the capability of receiving RF signals that are transmitted over the air.
7.4 SPI Protocol:
GPS BASED CAB MONITORING SYSTEM
SPI stands for serial peripheral interface
Fig 7.1 SPI protocol
It has four pins, they are, spi_cs, spi_clk, spi_SDI, spi_SD0.
Spi_cs pin is used to select the chip among the available chips. Spi_clk gives the
data rate of the transferring data.
This protocol is used to interface the MMC to the Microcontroller.
GPS BASED CAB MONITORING SYSTEM
8. GOOGLE EARTH
Google Earth displays satellite images of varying resolution of the Earth’s
surface, allowing users to see things like cities and houses looking perpendicularly down
or at an oblique angle, with perspective (see also bird’s eye view). The degree of
resolution available is based some what on the points of interest and popularity, but most
land(except for islands) is covered in at least 15 meters of resolution.
Google Earth allows users to search for addresses for some countries, enter co-
ordinates, or simply use the mouse to browse to a location.
For large parts of the surface of the earth only 2D images are available, from
almost vertical photography. Viewing this from oblique angle, there is perspective in the
sense that objects which are horizontally far away are seen smaller, but of course it is
viewing a large photograph, not quite like a 3D view.
For other parts of the surface of the Earth 3D images of terrain and buildings are
available. Many people use the applications to add their own data, making them available
through various sources. Google earth is able to show all kinds of images overlaid on the
surface of the earth and is also a Web Map Service client. Google Earth supports
managing three-dimensional Geo-spatial data.
Recently, Google added a feature that allows users to monitor traffic speeds at
loops located every 200 yards in real-time. The ‘Westport3D’ model was created by 3D
imaging firm AM3TD using long distance laser scanning technology and digital
photography and is the first such model of an Irish town to be created. Google Earth can
be used to view areas subjected to wide spread disasters, if Google supplies up to date
images. For example after the 12 January 2010 Haiti earthquake images of Haiti were
made available on 17 January.
GPS BASED CAB MONITORING SYSTEM
Fig: 8.1 top view of the ground from Google earth map
GPS BASED CAB MONITORING SYSTEM
9. SOFTWARE DESCRIPTION
In our project we use two software’s. One is CCS Compiler micro vision for the
simulation of the program.
9.1 CCS Compiler Software:
CCS Compiler development tools for the Micro chip Microcontroller Architecture
support every level of software developer from the professional applications engineer to
the student just learning about embedded software.
The industry-standard CCS Compiler, Macro Assemblers, Debuggers, Real-time
Kernels, Single-board Computers, and Emulators support all 8051 derivatives and help
you get your projects completed on schedule.
9.1.1 Simulation:
The Simulator allows you to debug programs using only your PC using simulation
drivers provided by CCS Compiler and various third-party developers. A good simulation
environment, does much more than simply simulate the instruction set of a
microcontroller — it simulates your entire target system including interrupts, startup
code, on-chip peripherals, external signals, and I/O.
9.1.2 Use of Software for Execution of Microcontroller Programs:
CCS Compiler development tools for the MC architecture support every level of
software developer from the professional applications engineer to the student just
learning about embedded software development.
The industry-standard CCS Compiler, macro assemblers, debuggers, real, time
Kernels, Single-board computers and emulators support all microcontroller derivatives
GPS BASED CAB MONITORING SYSTEM
and help you to get more projects completed on schedule. The CCS Compiler software
development tools are designed to solve the complex Problems facing embedded
software developers. Those are listed below.
9.1.3 Problems Facing Embedded Software Developers:
When starting a new project, simply select the microcontroller you the
device database and the µvision IDE sets all compiler, assembler, linker,
and memory options for you.
The CCS Compiler µ Vision debugger accurately simulates on-chip
peripherals (PC, CAN, UART, SPI, Interrupts, I/O ports, A/D converter,
D/A converter and PWM modules)of your aver device.
Simulation helps you understand h/w configurations and avoids time
wasted on setup problems. Additionally, with simulation, you can write
and test applications before target h/w is available.
When you are ready to begin testing your s/w application with target h/w,
use the MON51, MON390, MONADI, or flash MON51 target monitors,
the ISD51 In-System Debugger, or the ULINK USB-JTAG adapter to
download and test program code on your target system.
9.1.4 Creating a Project:
Select Project - New Project.
Select a directory and enter the name of the project file.
Select Project - Select Device and select an 8051, 251, or C16x/ST10
device from the Device
Create source files to add to the project.
GPS BASED CAB MONITORING SYSTEM
Select Project - Targets, Groups, Files. Add/Files, select Source Group1,
and add the source files to the project.
Select Project - Options and set the tool options. Note when you select the
target device from the Device Database™ all-special options are set
automatically. You typically only need to configure the memory map of
your target hardware. Default memory model settings are optimal for most
9.1.5 Evaluation Software Limitations:
The compiler, assembler, linker, and debugger are limited to 2 Kbytes of object
code but source code may be any size. Programs that generate more than 2 Kbytes of
object code will not compile, assemble, or link.
9.2 Program Dumping Process:
The program must be dumped in the Microcontroller to run and given the output
of the project. We use the universal programmer for the dumping processes. The
programmer can be written the program in different types like ASM or C language. That
may be cannot directly dumped in Microcontroller. The written program can converted in
below types of format.
1. Hexa decimal code
2. Binary code
3. Intel
4. Motorola
In our project we write the program in C language and that may be converted into
Hexa decimal code then dumped in to Microcontroller using the CCS Compiler software.
GPS BASED CAB MONITORING SYSTEM
9.3 coding:
#include <18F452.h> //For Microcontroller
#include <mmcsd.c> //For Memory Card
#include <fat.c> //For Fat file system inside Memory Card
#use delay(clock=20M)
#use rs232 (baud = 9600, xmit=PIN_C6,rcv=PIN_C7,stream=PC)
#use rs232 (baud = 4800, xmit=PIN_A1,rcv=PIN_A0,stream=GPS)
char data[120];
char gprmc[] = {"GPRMC"};
void get_GPS_GPRMC_data()
{
while(1)
{
fgets(data,GPS); //Gets the Serial Port Data from GPS Receiver
if(strstr(data,gprmc); //search for GPRMC in data
break;
}
GPS BASED CAB MONITORING SYSTEM
}
void main(void)
{
char filename[20] = "myfile.txt"; //KSP '/' required before fname
char buffer[155];
char opt_buffer[100];
char valid_data[] = { ",A," };
char invalid_data[] = { ",V," };
int i; // pointer to the buffer
char f;
i = fat_init(); //Initialise FAT file system
if (i) //If init fails
{
fprintf(PC,"\r\n\nERROR INITIALIZING FAT\r\n\n");
}
else //OK
GPS BASED CAB MONITORING SYSTEM
{
fprintf(PC,"Init done \r\n");
}
if (!input(PIN_D1)) //If D1 push button is pressed then Format the memory card
{
delay_ms(1000);
if(!input(PIN_D1))
{
FormatMedia("1048576"); //Format 1GB Card
delay_ms(5000); //It may take max of 5 seconds for formatting
GPS BASED CAB MONITORING SYSTEM
fprintf(PC,"\r\nDeleted Old Data. Restart\r\n");
while(1); //wait indefinitely (restart the microcontroller)
}
}
output_high(PIN_D2); //Microcontroller Health Check Indicator
output_high(PIN_D3);
delay_ms(1000);
output_low(PIN_D3);
output_low(PIN_D2);
delay_ms(1000);
output_high(PIN_D3);
output_high(PIN_D2);
delay_ms(1000);
output_low(PIN_D3);
output_low(PIN_D2); //END
if(!input(PIN_B0)) //IF B0 push button is pressed then copy data to PC
GPS BASED CAB MONITORING SYSTEM
{
if(!input(PIN_B0))
{
fprintf(PC,"\r\n*******Start GPS Data*******\r\n");
f = fopen(filename,'r'); //Open file in read mode
while(feof(f)) //while end of file
{
fgetstring(data,f); //copy
fputs(data,PC); //send data to PC
}
fclose(f); //close file
fprintf(PC,"\r\n*********END GPS Data*********\r\n");
fprintf(PC,"\r\nRestart and use Delete button for deleting this data.\r\n");
while(1); //wait indefinitely
GPS BASED CAB MONITORING SYSTEM
}
}
f = fopen(filename,'a'); //Open/create file append mode
while(1)
{
get_GPS_GPRMC_data(); //Get data from GPS receiver
if(strstr(data,valid_data)) //Check for valid data.If the gps data contains ",A," then it's a
valid data
{
output_low(PIN_D3); //RED LED OFF
fputstring(data,f); //copy data to file (append)
output_high(PIN_D2); //Green LED ON indicating valid data
}
if(strstr(data,invalid_data)) //If the gps data contains ",V," then its invalid data
GPS BASED CAB MONITORING SYSTEM
{
output_high(PIN_D3); //RED LED On indicating invalid data
output_low(PIN_D2); //Green LED OFF
}
output_low(PIN_D2); //LED OFF
output_low(PIN_D3); // LED OFF
fclose(f);
}
}
GPS BASED CAB MONITORING SYSTEM
10.RESULT
10.1 The result from the GPS receiver:
The data from the GPS receiver which is stored in the MMC is in the NMEA
format.
The parameters such as Time, active (working), latitude, north, longitude, east,
speed, altitude and date and active (working) are given below.
$GPRMC,103049.000,A,1721.1071,N,07830.4403,E,0.17,96.65,160310,,,A
$GPRMC,103051.000,A,1721.1070,N,07830.4409,E,0.28,70.94,160310,,,A
$GPRMC,103053.000,A,1721.1071,N,07830.4412,E,0.45,48.30,160310,,,A
$GPRMC,103055.000,A,1721.1068,N,07830.4416,E,0.40,54.27,160310,,,A
$GPRMC,103057.000,A,1721.1065,N,07830.4423,E,0.34,70.40,160310,,,A
$GPRMC,103059.000,A,1721.1066,N,07830.4420,E,0.31,63.81,160310,,,A
$GPRMC,103101.000,A,1721.1067,N,07830.4421,E,0.32,58.63,160310,,,A
$GPRMC,103103.000,A,1721.1062,N,07830.4417,E,0.20,75.46,160310,,,A
$GPRMC,103105.000,A,1721.1062,N,07830.4417,E,0.30,71.81,160310,,,A
$GPRMC,103107.000,A,1721.1063,N,07830.4418,E,0.21,65.26,160310,,,A
$GPRMC,103109.000,A,1721.1063,N,07830.4419,E,0.14,65.26,160310,,,A
$GPRMC,103111.000,A,1721.1063,N,07830.4420,E,0.26,68.88,160310,,,A
$GPRMC,103113.000,A,1721.1064,N,07830.4421,E,0.33,55.95,160310,,,A
GPS BASED CAB MONITORING SYSTEM
10.2 The result in the PC:
The data given by the GPS receiver which is stored in the MMC is transmitted the
PC with the help of the RF transceiver. In the PC the NMEA format data is converted to
the KMZ format and then when put in the GOOGLE Earth we get a map which is shown
below.
Fig.10.1 showing the route and lat, long, speed and alt from the Google Earth
The distance travelled is connected with a help of the line and the parameters such
as time, date, speed, altitude are shown.
GPS BASED CAB MONITORING SYSTEM
11. APPLICATIONS AND ADVANTAGES
11.1 Applications:
• Latitude and longitude displayed can be used for location identification.
• Vehicle travel record management.
• Wild life researches.
• In every field to monitoring easily.
11.2 Advantages:
Usage of MMC card helps to store more data
Low cost
Since there is no requirement for a GSM modem it does not involve any data
transfer charges
Finds applications in different areas like Tourism, Navigation etc.
GPS BASED CAB MONITORING SYSTEM
12. CONCULSION
Thus cab (vehicle) position logging system using GPS and MMC (Multimedia
Card) is constructed.
Firstly, integrating features of all the hardware components used. Presence of
every module has been reasoned out and placed carefully thus contributing to the best
working of the unit.
Secondly, using advanced components such as GPS and wireless network with the
help of the growing technology, the project has been successfully implemented.
In this project an effort has been made to study monitoring of the cab (vehicle)
and to implement it.
12.1 Future Scope:
With the use of high end micro controllers and graphical LCD displays we can
expect the data of the micro controller to be used dynamically during the journey it self to
find our position instead of positioning in the Google earths map after bringing the
memory card available to the PC.
GPS BASED CAB MONITORING SYSTEM
13. APPENDIX
13.1 Schematic Diagram:
Fig 13.1 schematic diagram
GPS BASED CAB MONITORING SYSTEM
13.2 Hardware Snapshot:
Fig 13.2 Snap Shot
GPS BASED CAB MONITORING SYSTEM
13.3 Abbreviations:
AUC Authentication Center
BTS Base Transceiver Station
BSC Base Station Controller
CEPT Conference of European Posts and Telegraphs
EIR Equipment Identity Register.
ETSI European Telecommunication Standards Institute
HLR Home Location Register
IMEI International Mobile Equipment Identity
ITU International Telecommunication Union
IMSI International Mobile Subscriber Identity
LA Last known Location Area
MSISDN Mobile Subscriber ISDN
MSC Mobile service Switching Center
MAP Mobile Application Part
MSRN Mobile Station Roaming Number
MS Mobile station
MM Mobility Management layer
POTS Plain Old Telephone Service
PSTN Public switched telephone network
PSPDN packet switched public data network
PLMN Public land mobile network
Radio Resources management (RR)
RBS Remote Base station
SIM Subscriber Identity Module
TCU Transcoding Unit
TRAU Transcoding Rate and Adaptation Unit
VLR Visitor Location Register
GPS BASED CAB MONITORING SYSTEM
14. BIBLIOGRAPHY
REFERENCES:
1. Global positioning systems inertial navigation, and integration Mohinders, Grewal,
Lawrence, R Weil, Angus p Andrews
2. GPS for DUMMIES BY Joel Mc Namara
3. National Marine Electronics Association: http://www.nmea.org
4. Torsten Baumbach's web site: http://pandora.inf.uni-jena.de/ttbb/
Web References:
http://en.wikipedia.org/wiki/GPS128*64
http://en.wikipedia.org/wiki/Category:MMC
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en01026
http://www.howstuffworks.com
http://www.8051projects.com
Top Related