Académique Documents
Professionnel Documents
Culture Documents
GSM
CHAPTER 1
INTRODUCTION
In
the
world
of
advanced
electronics ,
every
product
should
be
secured
to make the life of human beings simpler. Hence to make the life of human beings simpler
and convenient, we have made THEFT ALERTING AND NOTIFICATION SYSTEM
USING GSM AND GPS .
This
security system
millians of
vehicles secured.This model uses GPS and GSM modems with microcontroller to intimate
the status of GSM and to find out the exact location of the vehicle after the vehicle is theft.
This project consists of microcontroller, GPS modem, GSM and Security switch.Security
switch connected to microcontroller with positive logic. This project fixed inside the vehicle.
Press security switch after parking the vehicle. Then microcontroller locks the coordinates
(latitude, longitude and altitude) of that particular place. If anybody move the vehicle from
that place microcontroller can detect and sends SMS to the user or vehicle owner. After
moving vehicle from fixed coordinates microcontroller sends coordinates to user
continuously. With the help of this project we can easily find out the vehicle position
through coordinates.
system
can
be defined
focused job. Appliances such as the air-conditioner, VCD player, DVD player,
printer, fax machine, mobile phone etc. are examples of embedded systems. Each of these
appliances will have a processor and special hardware to meet the specific requirement
of the
application along with the embedded software that is executed by the processor
The operating system runs above the hardware, and the application software runs
above the operating system. The same architecture is applicable to any computer
including a desktop computer. However, there are significant differences. It is not
compulsory to have an operating system in every embedded system. For small
appliances such as remote control units, air conditioners, toys etc., there is no need for
an operating system and you can write only the software specific to that application.
For applications involving complex processing, it is advisable to have an operating
system.
In
software
with
such
case,
you
need
to
integrate
the
application
the operating system and then transfer the entire software on to the
memory chip. Once the software is transferred to the memory chip, the software will
continue to run for a long time you dont need to reload new software.
Memory:
The memory
Read Only
is
categorized
as
Random Access
11emory
(RAM)
and
Memory (ROM). The contents of the RAM will be erased if power is switched off to
the chip, whereas ROM retains the contents even if the power is switched off. So, the
firmware is stored in the ROM. When power is switched on, the processor reads the
ROM; the program is program is executed.
Input devices:
Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the
embedded
have
system
is
no
easy
task.
Many
embedded
systems
will
small keypad-you press one key to give a specific command. A keypad may
be used to input only the digits. Many embedded systems used in process control do
not have any input device for user interaction; they take inputs from sensors or
transducers 1fnd produce electrical signals that are in turn fed to other systems.
Output devices:
The output devices of the embedded systems also have very limited capability. Some
embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the
health status of the system modules, or for visual indication of alarms. A small Liquid
Crystal Display (LCD) may also be used to display some important parameters.
CHAPTER 2
LITERATURE REVIEW
The existing car anti theft system are Car alarm, , flashing light techniques which
makes use of different type of sensors which can be pressure, tilt and shock & door sensors,
but the drawbacks are cost and it only prevents the vehicles from theft but cant be used to
trace the thief. In 1997 B Webb introduce wheel and steering lock system, to prevent car
from theft, but they are visible from outside the car and prevent the wheel from being turned
more than a few degrees.[1] . The next system was proposed on Security Module for Car
Appliances by Pang- Chieh Wang,ET.AL. This system prevents car appliances from stealing
and illegal use on other cars. If illegal moving and use a car appliance with the security
module without permission occur that will lead the appliance to useless. But it does not
prevent vehicle from theft [4]. In 2008 Lili Wan, ET.AL. implemented new system based on
GSM in which owner can receive the alarm message quickly and if necessary, also it can
monitor the car by phone [6].The next system was a sensor network based vehicle anti theft
System (SVATS). In this system, first step is to form a sensor network by using the sensors
in the vehicles that are parked within the same parking area, then monitor and identify
possible vehicle thefts by detecting unauthorized vehicle movement. An alert will be
reported to a base station in the parking area if an unauthorized movement is detected. As the
sensor cannot communicate with the base station directly in the extreme case, vehicle cannot
receive any protection when no neighbors can be found even if a sensor has tried its
maximum power level [5]. In [7] authors define an automotive security system to disable an
automobile and its key auto systems through remote control when it is stolen. But it does not
help to recognize the theft. An efficient automotive security system is implemented for
anti-theft using an embedded system occupied with a Global Positioning System (GPS) and
a Global System of mobile (GSM) by Montaser N. Ramadan ET.AL. to track and monitor
vehicles that are used by certain party for particular purposes, also to stop the vehicle if
stolen and to track it online for retrieval[8]. The next system was proposed in 2013 on real
time vehicle theft identity and control system based on ARM 9. It performs the real time
user authentication using face recognition, using the Principle Component Analysis
(PCA)
algorithm if the result is not authentic then ARM produces the signal to block the car access
and the car owner will informed about the unauthorized access with the help Short Message
Services (SMS) by using of GSM modem . But in this method the camera captures owners
image only. If the owners relatives or friends want to start the vehicle it will not start [11].
Recently new system proposed on vehicle anti-theft system based on an embedded platform
consists of multiple layers of protection .The first layer of protection in the system is a
fingerprint recognition, based on which the doors are opened. Also to prevent thieves from
breaking the glass and getting inside the vehicle, vibration sensors are used in all the
windows with a threshold level to prevent false alarms. the vehicle is turned on only with the
mechanical keys along with correct key number entry on the combination keypad present,
failing to do so for three successive times will result in vehicle getting immobilized by
cutting the fuel supply and an alert message is sent to the mobile number of the owner.
Further to prevent the seizure of the vehicle, Tyre pressure sensor is also being used which
also alerts the owner through a mobile message.[12]
Our Project is the proposed version of the existing system for bikes as well as for
cars.In our project we have added the GPS system along with the GSM module,not only to
send SMS to the respective owner but also to send the two dimensional values of the satellite
to know the exact location of the vehicle.
CHAPTER 3
BLOCK DIAGRAM
The block diagram of the system consists of a micro controller, GPS and
GSM modem,max 232 and a security switch.
3.1 DESCRIPTION:
This project is designed with AT89S52 micro controller. The
AT89S52 is used because of its low-power; high-performance CMOS 8-bit micro
controller with 8Kilo bytes of In-system programmable Flash memory. The operating
voltage range of micro controller is 4V to 5.5V DC.
The power supplies are designed to convert high voltage AC mains electricity to a
suitable low voltage supply for electronic circuits and other devices. Power supply is
connected to micro controller by series of blocks, each of which performs a particular
function.
A DC power supply which maintains the output voltage constant irrespective of AC
mains fluctuations or load variations is known as Regulated D.C Power Supply.
Power supply is connected to micro controller to supply the operating voltage of
micro controller i.e.5V DC.
This project fixed inside the vehicle. Press security switch after
parking the vehicle. Then micro controller locks the coordinates
(latitude, longitude and altitude) of that particular place. If anybody
move the vehicle from that place micro controller can detect and
sends SMS to the user or vehicle owner. After moving vehicle from
fixed coordinates micro controller sends coordinates to user
continuously. With the help of this project we can easily find out the
vehicle position through coordinates.
3.2:SCHEMATIC DIAGRAM:
CHAPTER 4
HARDWARE COMPONENTS
61 9
Features of AT89S52:
Watchdog timer.
Power-off flag.
Description:
The AT89s52 is a low-voltage, high-performance CMOS 8-bit microcomputer
with
8K bytes of Flash programmable memory. The device is manufactured using Atmels high
density
nonvolatile
memory
technology and
is
compatible
with
the
industry-standard MCS-51 instruction set. The on chip flash allows the program memory to be
reprogrammed in system or by a conventional non volatile memory programmer.
10
Pin 40 provides supply voltage to the chip. The voltage source is +5V.
Port 0
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs.
Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses
to external program and data memory. In this mode, P0 has internal pull-ups.
Port 0 also receives the code bytes during Flash programming and outputs the code bytes
during Program verification. External pull-ups are required during program verification.
Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being
pulled low will source current (IIL) because of the internal pull-ups. In addition, P1.0 and
P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the
timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the following table.
Table 4.1: Port pins and its functions
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the
internal pull-ups and can be used as inputs.
Port
emits
the
high-order
address
byte
during
fetches
from
external
program memory and during accesses to external data memory that uses 16-bit addresses
(MOVX @ DPTR).
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can
sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being
pulled low will source current (IIL) because of the pull-ups.
Port 3 also serves the functions of various special features of the AT89S52, as shown in the
following table 4.2.
Table 4.2:Port pins and its functions
ALE/PROG
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG) during
Flash programming.
PSEN
Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external
data memory.
EA/VPP
External Access Enable EA must be strapped to GND in order to enable the device to fetch
code from external program memory locations starting at 0000H up to FFFFH. Note, however,
that if lock bit 1 is programmed, EA will be internally latched on reset.
UART
The Atmel 8051 Microcontrollers implement three general purpose, 16-bit timers/ counters.
They
are
identified
as
Timer
0,
Timer
and
Timer
and
can
be
Since it takes 2 cycles (12 peripheral clock periods) to recognize a negative transition, the
maximum count rate is FPER / 12, i.e. FOSC / 24 in standard mode or FOSC / 12 in X2 mode.
In addition to the timer or counter selection, Timer 0 and Timer 1 have four operating
modes from which to select which are selected by bit-pairs (M1, M0) in TMOD. Modes 0,
1and 2 are the same for both timer/counters. Mode 3 is different.
The four operating modes are described below. Timer 2, has three modes of
operation:
capture, auto-reload and baud rate generator.
Timer 0
Timer 0 functions as either a timer or event counter in four modes of operation. Timer
0 is controlled by the four lower bits of the TMOD register and bits 0, 1, 4 and 5 of the
TCON register. TMOD register selects the method of timer gating (GATE0), timer or counter
operation (T/C0#) and mode of operation (M10 and M00).
Interrupts
The AT89S52 has a total of six interrupt vectors: two external interrupts (INT0 and INT1),
three timer interrupts (Timers 0, 1, and 2) and the serial port interrupt. These interrupts are all
shown in the below figure.Timer 2 interrupt is generated by the logical OR of bits TF2 and
EXF2 in register T2CON.
The Timer 0 and Timer 1 flags, TF0 and TF1, are set at S5P2 of the cycle in which the timers
overflow.
The
values
are
then
polled
by
the
circuitry
in
the
next
cycle.
However, the Timer 2 flag, TF2, is set at S2P2 and is polled in the same cycle in which
the timer overflows.
Serial Communication:
The main requirements for serial communication are:
1. Microcontroller
2. PC
3. RS 232 cable
4. MAX 232 IC
5. HyperTerminal
When the pins P3.0 and P3.1 of microcontroller are set, UART which is inbuilt in the
microcontroller will be enabled to start the serial communication.
RS232 CABLE:
To allow compatibility among data communication equipment, an interfacing standard called
RS232 is used. Since the standard was set long before the advent of the TTL logic family, its
input and output voltage levels are not TTL compatible. For this reason, to connect any RS232
to a microcontroller system, voltage converters such as MAX232 are used to convert the TTL
logic levels to the RS232 voltage levels and vice versa.
MAX 232:
Max232 IC is a specialized circuit which makes standard voltages as required by RS232
standards. This
IC
provides
best
noise rejection
and
very
reliable
against
discharges and short circuits. MAX232 IC chips are commonly referred to as line drivers.
To ensure data transfer between PC and microcontroller, the baud rate and voltage levels
of
Microcontroller and PC should be the same. The voltage levels of
microcontroller are logic1 and logic 0 i.e., logic 1 is +5V and logic 0 is 0V. But for PC, RS232
voltage levels are considered and they are: logic 1 is taken as -3V to -25V and logic 0 as +3V
to +25V. So, in order to equal these voltage levels, MAX232 IC is used. Thus this IC converts
RS232 voltage levels to microcontroller voltage levels and vice versa.
SM0
specifier
SCON.7
SM1
specifier
SCON.6
SM2
communication
SCON.5
REN
reception
SCON.4
TB8
used
SCON.3
Not widely
RB8
used
SCON.2
Not widely
TI
SCON.1
SCON.0
SM1
0
Mode 0
Serial
0
start bit
1
Mode 2
Serial
1
Mode 3
Serial
Of the four serial modes, only mode 1 is widely used. In the SCON register, when serial mode
1 is chosen, the data framing is 8 bits, 1 stop bit and 1 start bit, which makes it compatible
with the COM port of IBM/ compatible PCs. And the most important is serial mode 1 allows
the baud rate to be variable and is set by Timer 1 of
the 8051. In serial mode 1, for each character a total of 10 bits are transferred, where the first
bit is the start bit, followed by 8 bits of data and finally 1 stop bit.
RELAYS:
Operation:
When current flows through the coil, a magnetic field is created around the coil i.e.,
the coil is energized. This causes the armature to be attracted to the coil. The
armatures contact acts like a switch and closes or opens the circuit. When the coil is not
energized, a spring pulls the armature to its normal state of open or closed. There are all types
of relays for all kinds of applications.
GSM Technology:
Definition of GSM:
GSM (Global System for Mobile communications) is an open, digital cellular technology used
for transmitting mobile voice and data services.
GSM
(Global
System
for
Mobile
communication)
is
digital
mobile
telephone system that is widely used in Europe and other parts of the world. GSM uses a
variation of Time Division Multiple Access (TDMA) and is the most widely used of the three
digital wireless telephone technologies (TDMA, GSM, and CDMA). GSM digitizes and
compresses data, then sends it down a channel with two other streams of user data, each in its
own time slot. It operates at either the 900 MHz or 1,800 MHz frequency band. It supports
voice calls and data transfer speeds of up to 9.6 kbit/s, together with the transmission of SMS
(Short Message Service).
GSM Frequencies
GSM networks operate in a number of different frequency ranges (separated into GSM
frequency ranges for 2G and UMTS frequency bands for 3G). Most 2G GSM networks
operate
in
the
900
MHz
or
1800
MHz
bands.
Some
countries
in
the
Americas (including Canada and the United States) use the 850 MHz and 1900 MHz bands
because the 900 and 1800 MHz frequency bands were already allocated. Most
3G GSM networks in Europe operate in the 2100 MHz frequency band.
GSM-900 uses 890915 MHz to send information from the mobile station to the base station
(uplink) and 935960 MHz for the other direction (downlink), providing 124
1G
The first generation of mobile telephony (written 1G) operated using analogue
communications and portable devices that were relatively large. It used primarily the following
standards:
AMPS (Advanced Mobile Phone System), which appeared in 1976 in the United
States, was the first cellular network standard. It was used primarily in the Americas, Russia
and Asia. This first-generation analogue network had weak security mechanisms which allowed
hacking of telephones lines.
TACS (Total Access Communication System) is the European version of the AMPS
model. Using the 900 MHz frequency band, this system was largely used in England
and then in Asia (Hong-Kong and Japan).
ETACS
(Extended
Total Access
Communication
System)
is
an
improved version of the TACS standard developed in the United Kingdom that uses a
larger number of communication channels.
GSM (Global System for Mobile communications) is the most commonly used
standard in Europe at the end of the 20th century and supported in the United States.
This standard uses the 900 MHz and 1800 MHz frequency bands in Europe. In the
United States, however, the frequency band used is the 1900
MHz band. Portable telephones that are able to operate in Europe and the
United States are therefore called tri-band.
CDMA (Code Division Multiple Access) uses a spread spectrum technique that
allows a radio signal to be broadcast over a large frequency range.
With the 2G networks, it is possible to transmit voice and low volume digital data, for example
text messages (SMS, for Short Message Service) or multimedia messages (MMS, for
Multimedia Message Service). The GSM standard allows a maximum data rate of 9.6 kbps.
3G
The IMT-2000 (International Mobile Telecommunications for the year 2000)
specifications from the International Telecommunications Union (ITU) defined the
characteristics of 3G
(third generation of mobile telephony). The most important of these characteristics are:
1.
2.
3.
4.
5.
Compatibility
of
3rd
generation
mobile
services
with
second
generation networks.
3G
offers
access
data
to multimedia
high-speed internet
the
rates
of
uses
access.
more
such
3G
than
as
144
video
networks
use
Kbit/s,
thereby
transmission,
different
allowing
video-conferencing
frequency
bands
the
or
than
maximum
throughput
of
9.6
kbps
which
GSM
standard
allows transmission of
voice and low-volume digital data like text messages (SMS, for Short Message Service) or
multimedia messages (MMS, for Multimedia Message Service).
GSM Standards:
GSM uses narrowband TDMA, which allows eight simultaneous calls on the same radio
frequency.
There are three basic principles in multiple access, FDMA (Frequency Division Multiple
Access), TDMA (Time Division Multiple Access), and CDMA (Code Division Multiple
Access). All three principles allow multiple users to share the same physical c hannel. But
the two competing technologies differ in the way user sharing the common resource.
TDMA allows the users to share the same frequency channel by dividing the signal into
different time slots. Each user takes turn in a round robin fashion for transmitting and receiving
over the channel. Here, users can only transmit in their respective time slot.
CDMA uses a spread spectrum technology that is it spreads the information contained
in a particular signal of interest over a much greater bandwidth than the original signal. Unlike
TDMA, in CDMA several users can transmit over the channel at the same time.
The concept of cellular network
Mobile telephone networks are based on the concept of cells, circular zones that overlap to
cover a geographical area.
practice, two cells using the same frequency range must be separated by a distance of two to
three times the diameter of the cell.
Architecture of the GSM Network
In a GSM network, the user terminal is called a mobile station. A mobile station is made up
of a SIM (Subscriber Identity Module) card allowing the user to be uniquely identified and a
mobile terminal.
The terminals
(devices)
are
identified
by
unique 15-digit
identification
number called IMEI (International Mobile Equipment Identity). Each SIM card also has a
unique (and secret) identification number called IMSI (International Mobile Subscriber
Identity). This code can be protected using a 4-digit key called a PIN code. The
therefore
allows
each
user
to
be
identified
independently
of
SIM
card
during communication with a base station. Communications occur through a radio link (air
interface) between a mobile station and a base station.
All the base stations of a cellular network are connected to a base station controller
(BSC) which is responsible for managing distribution of the resources. The system consisting
of the base station controller and its connected base stations is called the Base Station
Subsystem (BSS).
Finally, the base station controllers are themselves physically connected to the Mobile
Switching Centre (MSC), managed by the telephone network operator, which connects them
to the public telephone network and the Internet. The MSC belongs to a Network Station
Subsystem (NSS), which is responsible for managing user identities, their location and
establishment of communications with other subscribers.
GSM Modem:
A GSM modem is a wireless modem that works with a GSM wireless network. A wireless
modem behaves like a dial-up modem. The main difference between them is that a dial-up
modem sends and receives data through a fixed telephone line while a wireless modem sends
and receives data through radio waves.
GSM
modems
support
an
extended
set
of AT commands.
These extended AT commands are defined in the GSM standards. With the extended
AT
commands, the following operations can be performed:
Introduction to AT Commands
AT commands are instructions used to control a modem. AT is the abbreviation of ATtention.
Every command line starts with "AT" or "at". That's the reason, modem commands are
called AT commands. Many of the commands that are used to control wired dial-up modems,
such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data
state) are also supported by GSM modems and mobile phones.
Besides this common AT command set, GSM modems and mobile phones support an AT
command set that is specific to the GSM technology, which includes SMS-related commands
like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage),
AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages).
I t should be noted that the starting "AT" is the prefix that informs the modem about
the
start of a command line. For example, D is the actual AT command name in ATD and +CMGS is
the actual AT command name in AT+CMGS.
Some of the tasks that can be done using AT commands with a GSM modem or mobile
phone are listed below:
Get basic information about the mobile phone or GSM modem. For example, name of
manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International
Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).
Get
the
For example,
current
status
mobile
network registration
status
of
phone
the
mobile
activity
(AT+CREG),
phone
or
status
radio
signal
GSM/GPRS
(AT+CPAS),
strength
modem.
mobile
(AT+CSQ),
Read
(AT+CPBR),
write
(AT+CPBW)
or
search
(AT+CPBF)
phonebook entries.
GPS:
Global Positioning System (GPS) is a Global Navigation Satellite System (GNSS) developed
by the United States Department of Defense. It is the only fully functional GNSS in the world.
It uses a constellation of between 24 and 32 Medium Earth Orbit
satellites that transmit precise microwave
determine their current location,
signals, which
their velocity.
Its
to
official name is
NAVSTAR GPS.
Each
satellite
continually
transmits
precise orbital information (the ephemeris), and the general system health and rough orbits of
all GPS satellites (the almanac). The receiver measures the transit time of each message and
computes the distance to each satellite. Geometric trilateration is used to combine these
distances with the location of the satellites to determine the receiver's location. The position is
displayed, perhaps with a moving map display or latitude and longitude; elevation information
may be included.
What is GPS?
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 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.
system consists of a network of towers that receive GPS signals and transmit a corrected
signal by beacon transmitters. In order to get the corrected signal, users must have a differential
beacon receiver and beacon antenna in addition to their GPS.
The 24 satellites that make up the GPS space segment are orbiting the earth about
12,000 miles above us. They are constantly moving, making two complete orbits in less than
24 hours. These satellites are travelling at speeds of roughly 7,000 miles an hour.
GPS satellites are powered by solar energy. They have backup batteries
onboard to keep them running in the event of a solar eclipse, when there's no solar power.
Small rocket boosters on each satellite keep them flying in the correct path.
o
GPS satellites transmit two low power radio signals, designated L1 and L2. Civilian GPS
uses the L1 frequency of 1575.42 MHz in the UHF band. The signals travel by line of sight,
meaning they will pass through clouds, glass and plastic but will not go through most solid
objects such as buildings and mountains.
Factors
that
can
include
the following:
degrade
the
GPS
signal
and
thus
affect
accuracy
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.
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.
Applications:
GPS has a variety of applications on land, at sea and in the air. Basically, GPS is usable
everywhere except where it's impossible to receive the signal such as inside most buildings,
in caves and other subterranean locations, and underwater. The most common airborne
applications are for navigation by general aviation and commercial aircraft. At sea, GPS is
also typically used for navigation by recreational boaters, commercial fishermen, and
professional mariners. Land-based applications are more diverse. The scientific community
uses GPS for its precision timing capability and position information.
A model described here is for its low price and great possibilities most frequently used in practice. It
is based on the HD44780 microcontroller (Hitachi) and can display messages in two lines with 16
characters each. It displays all the alphabets, Greek letters, punctuation marks, mathematical symbols
etc. In addition, it is possible to display symbols that user makes up on its own.
Automatic shifting message on display (shift left and right), appearance of the pointer, backlight etc.
are considered as useful characteristics.
Pins Functions
There are pins along one side of the small printed board used for connection to the microcontroller.
There are total of 14 pins marked with numbers (16 in case the background light is built in). Their
function is described in the table below:
Table 4.4:Pin functions of LCD
Function
Ground
Vss
0V
Power supply
Vdd
+5V
Contrast
Vee
0 Vdd
Control of operating 4
RS
RS
R/W
Control of operating
Normal operating
Data / commands
D0
0/1
Bit 0 LSB
D1
0/1
Bit 1
D2
0/1
Bit 2
10
11
D3
D4
0/1
0/1
Bit 3
Bit 4
12
D5
0/1
Bit 5
13
D6
0/1
Bit 6
14
D7
0/1
Bit 7 MSB
LCD screen:
LCD screen consists of two lines with 16 characters each. Each character consists of 5x7 dot matrix.
Contrast on display depends on the power supply voltage and whether messages are displayed in one
or two lines. For that reason, variable voltage 0-Vdd is applied on pin marked as Vee. Trimmer
potentiometer is usually used for that purpose. Some versions of displays have built in backlight
(blue or green diodes). When used during operating, a resistor for current limitation should be used
(like with any LE diode).
RS RW D7 D6 D5 D4 D3 D2 D1 D0 Execution Time
Clear display
1.64Ms
Cursor home
1.64mS
I/D S
40uS
40uS
Cursor/Display Shift
D/C R/L x
40uS
Function set
DL N
40uS
CGRAM address
DDRAM address
BF DDRAM address
D7 D6 D5 D4 D3 D2 D1 D0 40uS
D7 D6 D5 D4 D3 D2 D1 D0 40uS
40uS
40uS
-
D 1 = Display on
0 = Display off
U 1 = Cursor on
0 = Cursor off
B 1 = Cursor blink on
0 = Cursor shift
LCD Connection
Depending on how many lines are used for connection to the microcontroller, there are 8-bit and
4-bit LCD modes. The appropriate mode is determined at the beginning of the process in a phase
called initialization. In the first case, the data are transferred through outputs D0-D7 as it has been
already explained. In case of 4-bit LED mode, for the sake of saving valuable I/O pins of the
microcontroller, there are only 4 higher bits (D4-D7) used for communication, while other may be
left unconnected.
Consequently, each data is sent to LCD in two steps: four higher bits are sent first (that normally
would be sent through lines D4-D7), four lower bits are sent afterwards. With the help of
initialization, LCD will correctly connect and interpret each data received. Besides, with regards to
the fact that data are rarely read from LCD (data mainly are transferred from microcontroller to LCD)
one more I/O pin may be saved by simple connecting R/W pin to the Ground. Such saving has its
price.
Even though message displaying will be normally performed, it will not be possible to read from
busy flag since it is not possible to read from display.
LCD Initialization
Once the power supply is turned on, LCD is automatically cleared. This process lasts for
approximately 15mS. After that, display is ready to operate. The mode of operating is set by default.
This means that:
1. Display is cleared
2. Mode
DL = 1 Communication through 8-bit interface
N = 0 Messages are displayed in one line
F = 0 Character font 5 x 8 dots
3. Display/Cursor on/off
D = 0 Display off
U = 0 Cursor off
B = 0 Cursor blink off
4. Character entry
ID = 1 Addresses on display are automatically incremented by 1
S = 0 Display shift off
Automatic reset is mainly performed without any problems. If for any reason power supply voltage
does not reach full value in the course of 10mS, display will start perform completely unpredictably.
If voltage supply unit cannot meet this condition or if it is needed to provide completely safe
operating, the process of initialization by which a new reset enabling display to operate normally
must be applied.
Algorithm according to the initialization is being performed depends on whether connection to the
microcontroller is through 4- or 8-bit interface. All left over to be done after that is to give basic
commands and of course- to display messages.
Contrast control:
To have a clear view of the characters on the LCD, contrast should be adjusted. To adjust the
contrast, the voltage should be varied. For this, a preset is used which can behave like a variable
voltage device. As the voltage of this preset is varied, the contrast of the LCD can be adjusted.
Potentiometer
Variable resistors used as potentiometers have all three terminals connected. This arrangement is
normally used to vary voltage, for example to set the switching point of a circuit with a sensor, or
control the volume (loudness) in an amplifier circuit. If the terminals at the ends of the track are
connected across the power supply, then the wiper terminal will provide a voltage which can be
varied from zero up to the maximum of the supply.
Multiturn presets are used where very precise adjustments must be made. The screw must be turned
many times (10+) to move the slider from one end of the track to the other, giving very fine control.
CHAPTER 5
SOFTWARE REQUIREMENTS
The softwares are used to develop the system are given below.
Keil compiler
Proteus
Prog ISP
level of software developer from the professional applications engineer to the student just
learning about embedded software development. The industry-standard keil C compilers,
macro assemblers, debuggers, real, time Kernels, Single-board computers and emulators
support all microcontroller derivatives and help you to get more projects completed on
schedule.
The Keil software development tools are designed to solve the complex Problems facing
embedded software developers.
When starting a new project, simply select the microcontroller you
and the
all compiler,
the device
database
Numerous example programs are included to help you get started with the most popular
embedded AVR devices. The keil 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 AVR 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, we can use any one
of 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.
will appear
and
for
5.2 PROTEUS:
Proteus is best simulation software for various designs with microcontroller. It is mainly popular
because of availability of almost all microcontrollers in it. So it is a handy tool to test programs and
embedded designs for electronics hobbyist. You can simulate your programming of microcontroller
in Proteus Simulation Software. After simulating your circuit in Proteus Software you can directly
make PCB design with it so it could be an all in one package for students and hobbyists.
To design the layout we use Proteus software.
1. Click on ISIS professional. Then the following fig 5.17 will appear.
4. Connect the power supply,crystal oscillator and reset circuit to the micro controller.
Once the HEX file is loaded, click on AUTO button to perform the tasks youve enabled. The
following fig 5.31 shows the performance of the task enabled
CHAPTER 6
RESULT
64
CHAPTER 7
CONCLUSION AND FUTURE SCOPE
CONCLUSION:
The implementation of Theft Alerting and Notification System Using GSM and GPS is
done successfully. The communication is properly done without any interference between different
modules in the design. Design is done to meet all the specifications and requirements. Software tools
like Keil U vision Simulator, Prog-isp to dump the source code into the micro controller, Proteus for
the schematic diagram have been used to develop the software code before realizing the hardware.
Circuit is implemented in Proteus and implemented on the micro controller board. The
performance has been verified both in software simulator and hardware design. The total circuit is
completely verified functionally and is following the application software.
It can be concluded that the design implemented in the present work provide portability,
flexibility and the data transmission is also done with low power consumption.
FUTURE SCOPE:
1.We can monitor some parameters of vehicle like overheat or LPG gas leakage.
2.We can dial an emergency call if the vehicle goes out of a certain track.
3.We can use our kit for detection of bomb by connecting to the bomb detector.
65
APPENDIX
#include<reg52.h>
individually.
#include<string.h>
#define lcd_data P2
sbit lcd_rs
= P2^0;
sbit lcd_en
= P2^1;
sbit relay
= P1^0;
sbit sw
= P1^6;
sbit therm
= P1^4;
// LCD COMMAND
delay(3);
lcd_en=0;
lcd_data=((value<<4)&(0xf0)); //send lsb 4 bits
lcd_rs=0; //select command register
lcd_en=1;
delay(3);
lcd_en=0;
}
void lcd_init(void)
{
lcdcmd(0x02);
lcdcmd(0x02);
lcdcmd(0x28); //intialise the lcd in 4 bit mode*/
lcdcmd(0x28); //intialise the lcd in 4 bit mode*/
}
void lcddata(unsigned char value)
lcd_en=1;
delay(3);
lcd_en=0;
lcd_data=((value<<4)&(0xf0)); //send lsb 4 bits
lcd_rs=1;
lcd_en=1;
delay(3);
lcd_en=0;
delay(3);
}
if(s==32)
{ lcdcmd(1
); count=0;
}
lcddata(b[s]);
}
}
unsigned char v;
for(;*tx != '\0';tx++)
{
SBUF=*tx;
while(TI == 0);
TI=0;
//v= receive();
//delay(2);
}
}
unsigned char v;
SBUF=tx;
while(TI == 0);
TI=0;
// v= receive();
//
delay(2);
void okcheck()
{
void sie()
{
// ET0 = 0;
ES
= 1;
EA
= 1;
void sid()
{
// ET0 = 1;
ES
= 0;
EA
= 0;
void slow()
{
relay2=0;relay3=0;delay(450);
}
void speed()
{
relay2=1;relay3=0;delay(450);
}
void stop()
{
relay2=1;relay3=1;delay(450);
}
void gsmmode()
{
relay=0;delay(500);
}
void gpsmode()
{
relay=1;delay(500);
}
void lcdbasic()
{
lcdcmd(1);msgdisplay("Vib: OFF");
}
void main(void)
{
unsigned char sws='x';
relay=0;
sw=1; therm=1;
voice=1;
relay1=relay2=relay3=0;
P2=0xff;
lcd_init();
//VEHICLE MONITORING AND TRACKING SYSTEM USING GPS
AND GSM
msgdisplay("Vehicle Monitoring"); //83
lcdcmd(0xc0);
msgdisplay("Tracking GSM-GPS");
stop();relay1=0;
TMOD=0x20;
TH1=0xfd; //9600
SCON=0x50;
TR1=1;
tx("AT\r\n");okcheck();
tx("ATE0\r\n");okcheck();
tx("AT+CMGF=1\r\n");okcheck();
tx("AT+CNMI=1,2,0,0\r\n");okcheck();
lcdcmd(0x01);
msgdisplay("SEND A MSG TO
do{
rcg=receive();
}while(rcg != '+');
for(count=0;count<9;count++)
{
rcg=receive();
}
for(count=0;count<10;count++)
{
pastnumber[count]=receive();
} lcdcmd(0x01);
msgdisplay(pastnumber);
tx("AT+CMGS=\"");
tx(pastnumber);
tx("\"\r\n");
do{
rcg = receive();
}while(rcg != '>');
tx("Mobile no. registered\r\n");
tx1(0x1A);
okcheck();
lcdcmd(0x01);
msgdisplay("MOBILE NUMBER REGISTERED");
delay(3000);
//
loop:
//lcdbasic();
//
lcdcmd(1);msgdisplay("Emergency:");//085,8,9
gpsmode();
while(1)
{
if(sw == 0)
{
sws='s';
speed();
relay2=1;
lcdcmd(1);
msgdisplay("Loacked coordinators");
gpssignalgain();
delay(600);
strcpy(msga,msg1);
strcpy(msgb,msg2);
lcdcmd(1);
msgdisplay(msga);
lcdcmd(0xc0);msgdisplay(msgb);
delay(600); //while(1);
}
if(sws == 's')
{
//
slow();
relay2=0;
gpssignalgain();
lcdcmd(1);msgdisplay(msg1);
lcdcmd(0xc0);msgdisplay(msg2);
delay(600);
if((msg1[5] != msga[5]) ||msg1[6] != msga[6] || (msg2[6] != msgb[6]) ||msg2[7] !=
msgb[7])
{
lcdcmd(1);msgdisplay("Coordinates Varying");
slow();
relay1=0;
relay2=1;
tx("AT+CMGS=\"");
tx(pastnumber);
tx("\"\r\n"); delay(450);
tx("Vehicle Theft@");tx(msg1);tx(" long:");tx(msg2);
tx1(0x1A); delay(1000);
tx("AT+CMGS=\"");
tx(pastnumber);
tx("\"\r\n"); delay(450);
tx("School Zone@");tx(msg1);tx(" long:");tx(msg2);
tx1(0x1A); delay(700);
voice1=0;delay(900);voice1=1;
}
}
if(therm == 0)
{
lcdcmd(1);msgdisplay("High Temp");
voice=0;delay(900);//voice=1;
tx("AT+CMGS=\"");
tx(pastnumber);
tx("\"\r\n"); delay(450);
tx("High temp@");tx(msg1);tx(" long:");tx(msg2);
tx1(0x1A); delay(500);
}
/* lcdcmd(0xc0);msgdisplay("ON ");
gpsmode();gpssignalgain();gsmmode();
lcdcmd(1);msgdisplay(msg1);lcdcmd(0xc0);msgdisplay(msg2);
tx("AT+CMGS=\"");
tx(pastnumber);
tx("\"\r\n");
do{
rcg = receive();
}while(rcg != '>');
tx("Emergency Alert @ lat:");tx(msg1);tx(" long:");tx(msg2);
tx1(0x1A);
okcheck();
}
// else
if(sw == 1)
{
//lcdcmd(0x85);msgdisplay("OFF");
lcdcmd(0xc0);msgdisplay("OFF
while(sw == 1);
}
*/
}
}
a=value/10000;
b=value%10000;
c=b/1000; d=b
%1000; e=d/100;
f=d%100;
g=f/10;
h=f%10;
a=a|0x30;
c=c|0x30;
e=e|0x30;
g=g|0x30;
h=h|0x30;
");
lcddata(a);
lcddata(c);
lcddata(e); lcddata(g);lcddata(h);//lcddata(' ');lcddata(' ');
return 1;
}
a=value/10000;
b=value%10000;
c=b/1000; d=b
%1000; e=d/100;
f=d%100;
g=f/10;
h=f%10;
a=a|0x30;
c=c|0x30;
e=e|0x30;
g=g|0x30;
h=h|0x30;
tx1(a);
tx1(c);
tx1(e); tx1(g);tx1(h);//lcddata(' ');lcddata(' ');
return 1;
}
void gpssignalgain()
{
ag:
for(q=0;q<10;q++)
msg1[q] = '\0';
for(q=0;q<11;q++)
msg2[q] = '\0';
do{
rcv=receive();
}while(rcv != '$');
rcv1=receive();
rcv2=receive();
rcv3=receive();
rcv4=receive();
rcv5=receive();
if((rcv1 == 'G') && (rcv2 == 'P') && (rcv3 == 'G') && (rcv4 == 'G') && (rcv5 == 'A'))
{
for(r=0;r<12;r++)
//14
{
rcv=receive();
}
for(r=0;r<9;r++)
{
msg1[r]=receive();
//lat
}
rcv=receive(); rcv=receive(); rcv=receive();
for(r=0;r<10;r++)
{
msg2[r]=receive();
//long
}
rcv=receive(); rcv=receive(); rcv=receive();
ql=receive();
for(r=0;r<8;r++)
{
rcv=receive();
}
}
else
{
goto ag;
}
if (RI == 1)
{
chr = SBUF;
RI = 0;
if(chr == '+')
{
for(count=0;count<9;count++)
{
rcg=receive();
}
for(count=0;count<10;count++)
{
pastnumber1[count]=receive();
}
for(count=0;count<29;count++)
{
rcg=receive();
}
chr1 = receive();
}
}
}
REFERENCES
1. B Webb Steering Column Locks and Motor Vehicle Theft: Evaluations From Three Countries
Situational crime prevention: Successful case studies, 1997
3. Jian Yang, David Zhang, Alejandro F. Frangi, and Jing-yu Yang Two-Dimensional PCA: A New
Approach to Appearance-Based Face Representation and RecognitionIEEE Transactions on Pattern
Analysis and Machine Intelligence, Vol. 26, no. 1, January 2004
4. Pang-Chieh Wang, Ting-Wei Hou, Jung-Hsuan Wu, and Bo-Chiuan Chen A Security Module
for Car Appliances International Journal of Aerospace and Mechanical Engineering 2007
5. H Song, S Zhu, G Cao SVATS: A Sensor network based Vehicle INFOCOM The 27th
Conference on Computer Communications. 2008
6. Lili Wan, Tiejun Chen Automobile Anti-theft System Design based on GSM International
Conference on Advanced Computer Control 2008
7. H Guo, HS Cheng, YD Wu, JJ Ang An Automotive Security System for Anti-Theft "
International Conference on networks 2009
9. Varsha Goud, V.Padmaja, Vehicle Accident Automatic Detection and Remote Alarm Device
International Journal of Reconfigurable and Embedded Systems (IJRES ) Vol. 1, No. 2, July 2012
10. Faizan Ahmad, Aaima Najam and Zeeshan Ahmed Image-based Face Detection and
Recognition State of the Art IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 6,
No 1, November 2012
11. D.Narendar Singh, K.Tejaswi, Real Time Vehicle Theft Identity and Control System Based on
ARM 9 International Journal of Latest Trends in Engineering an Technology (IJLTET),Vol. 2 ,Issue
1, January 2013
12. Arun Sasi, Lakshmi Nair Vehicle Anti-theft System Based on an Embedded Platform IJRET
Volume: 02 Issue: 09 Sep-2013
13. Maminul Islam, Rabiul Hasan, Imran Chowdhury, Towhid Chowdhury Internet of Car:
Accident Sensing, Indication and Safety with Alert system American Journal of Engineering
Research (AJER) Volume-02, 2013