Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 62

VEHICLE TRACKING SYSTEM USING GPS AND GSM

CHAPTER - 1

1.1 Introduction

Vehicle Tracking System (VTS) is the technology used to determine the


location of a vehicle using different methods like GPS and other radio navigation
systems operating through satellites and ground based stations. By following
triangulation or trilateration methods the tracking system enables to calculate easy
and accurate location of the vehicle. Vehicle information like location details,
speed, distance traveled etc. can be viewed on a digital mapping with the help of a
software via Internet. Even data can be stored and downloaded to a computer from
the GPS unit at a base station and that can later be used for analysis. This system is
an important tool for tracking each vehicle at a given period of time and now it is
becoming increasingly popular for people having expensive cars and hence as a
theft prevention and retrieval device.
i. The system consists of modern hardware and software components enabling
one to track their vehicle online or offline. Any vehicle tracking system
consists of mainly three parts mobile vehicle unit, fixed based station and,
database and software system.
ii. Vehicle Unit: It is the hardware component attached to the vehicle having
either a GPS/GSM modem. The unit is configured around a primary modem
that functions with the tracking software by receiving signals from GPS
satellites or radio station points with the help of antenna. The controller
modem converts the data and sends the vehicle location data to the server.

1
iii. Fixed Based Station: Consists of a wireless network to receive and forward
the data to the data center. Base stations are equipped with tracking software
and geographic map useful for determining the vehicle location. Maps of
every city and landmarks are available in the based station that has an in-
built Web Server.
iv. Database and Software: The position information or the coordinates of
each visiting points are stored in a database, which later can be viewed in a
display screen using digital maps. However, the users have to connect
themselves to the web server with the respective vehicle ID stored in the
database and only then s/he can view the location of vehicle traveled.

1.2 Vehicle Security using VTS

Vehicle Security is a primary concern for all vehicle owners. Owners


as well as researchers are always on the lookout for new and improved
security systems for their vehicles. One has to be thankful for the upcoming
technologies, like GPS systems, which enables the owner to closely monitor
and track his vehicle in real-time and also check the history of vehicles
movements. This new technology, popularly called Vehicle Tracking
Systems has done wonders in maintaining the security of the vehicle
tracking system is one of the biggest technological advancements to track
the activities of the vehicle. The security system uses Global Positioning
System GPS, to find the location of the monitored or tracked vehicle and
then uses satellite or radio systems to send to send the coordinates and the
location data to the monitoring center. At monitoring center various
softwares are used to plot the Vehicle on a map. In this way the Vehicle
owners are able to track their vehicle on a real-time basis. Due to real-time

2
tracking facility, vehicle tracking systems are becoming increasingly popular
among owners of expensive vehicles

Figure 1.1 Vehicle tracking system


The vehicle tracking hardware is fitted on to the vehicle. It is fitted in such a
manner that it is not visible to anyone who is outside the vehicle. Thus it operates
as a covert unit which continuously sends the location data to the monitoring unit.

When the vehicle is stolen, the location data sent by tracking unit can be used
to find the location and coordinates can be sent to police for further action. Some
Vehicle tracking System can even detect unauthorized movements of the vehicle
and then alert the owner. This gives an edge over other pieces of technology for the
same purpose
Monitoring center Software helps the vehicle owner with a view of the
location at which the vehicle stands. Browsing is easy and the owners can make
use of any browser and connect to the monitoring center software, to find and track
his vehicle. This in turn saves a lot of effort to find the vehicle's position by
replacing the manual call to the driver.
3
As we have seen the vehicle tracking system is an exciting piece of
technology for vehicle security. It enables the owner to virtually keep an eye on his
vehicle any time and from anywhere in the world.

A computer software GPS GLONASS automatic vehicle location vehicle


tracking system combines the installation of an electronic device in a vehicle, or
fleet of vehicles, with purpose-designed at least at one operational base to enable
the owner or a third party to track the vehicle's location, collecting data in the
process from the field and deliver it to the base of operation. Modern vehicle
tracking systems commonly use or technology for locating the vehicle, but other
types of technology can also be used. Vehicle information can be viewed on
electronic maps via the Internet or specialized software. Urban public transit
authorities are an increasingly common user of vehicle tracking systems,
particularly in large cities.

Vehicle tracking systems are commonly used by fleet operators for fleet
management fleet trackingtransit schedule adherence destination sign American
Public Transportation Association visually impaired tramreal-time information
functions such as , routing, dispatch, on-board information and security. Along
with commercial fleet operators, urban agencies use the technology for a number
of purposes, including monitoring of buses in service, triggering changes of buses'
displays at the end of the line (or other set location along a bus route), and
triggering pre-recorded announcements for passengers. The estimated that, at the
beginning of 2009, around half of all transit buses in the United States were
already using a GPS-based vehicle tracking system to trigger automated stop
announcements. This can refer to external announcements (triggered by the
4
opening of the bus's door) at a bus stop, announcing the vehicle's route number and
destination, primarily for the benefit of customers, or to internal announcements (to
passengers already on board) identifying the next stop, as the bus (or ) approaches
a stop, or both. Data collected as a transit vehicle follows its route is often
continuously fed into a computer program which compares the vehicle's actual
location and time with its schedule, and in turn produces a frequently updating
display for the driver, telling him/her how early or late he/she is at any given time,
potentially making it easier to adhere more closely to the published schedule. Such
programs are also used to provide customers with as to the waiting time until
arrival of the next bus or tram/streetcar at a given stop, based on the nearest
vehicles' actual progress at the time, rather than merely giving information as to the

Other applications include monitoring driving behavior, such as an employer


of an employee, or a parent with a teen driver.

Vehicle tracking systems are also popular in consumer vehicles as a theft


prevention and retrieval device. Police can simply follow the signal emitted by the
tracking system and locate the stolen vehicle. When used as a security system, a
Vehicle Tracking System may serve as either an addition to or replacement for a
traditional car alarm. Some vehicle tracking systems make it possible to control
vehicle remotely, including block doors or engine in case of emergency. The
existence of vehicle tracking device then can be used to reduce the insurance cost,
because the loss-risk of the vehicle drops significantly.
Vehicle tracking systems are an integrated part of the "layered approach" to
vehicle protection, recommended by the National Insurance Crime Bureau motor
vehicle theft(NICB) to prevent . This approach recommends four layers of security
based on the risk factors pertaining to a specific vehicle. Vehicle Tracking Systems
5
are one such layer, and are described by the NICB as very effective in helping
police recover stolen vehicles.
Some vehicle tracking systems integrate several security systems, for example
by sending an automatic alert to a phone or email if an alarm is triggered or the
vehicle is moved without authorization, or when it leaves or enters a geofence.

1.3 Active versus Passive Tracking


Several types of vehicle tracking devices exist. Typically they are classified as
"passive" and "active". "Passive" devices store GPS location, speed, heading and
sometimes a trigger event such as key on/off, door open/closed. Once the vehicle
returns to a predetermined point, the device is removed and the data downloaded to
a computer for evaluation. Passive systems include auto download type that
transfer data via wireless download. "Active" devices also collect the same
information but usually transmit the data in real-time via cellular or satellite
networks to a computer or data center for evaluation.
Many modern vehicle tracking devices combine both active and passive
tracking abilities: when a cellular network is available and a tracking device is
connected it transmits data to a server; when a network is not available the device
stores data in internal memory and will transmit stored data to the server later
when the network becomes available again.
Historically vehicle tracking has been accomplished by installing a box into
the vehicle, either self-powered with a battery or wired into the vehicle's power
system. For detailed vehicle locating and tracking this is still the predominant
method; however, many companies are increasingly interested in the emerging cell
phone technologies that provide tracking of multiple entities, such as both a

6
salesperson and their vehicle. These systems also offer tracking of calls, texts, and
Web use and generally provide a wider range of options.

1.4 Types of GPS Vehicle Tracking


There are three main types of GPS vehicle tracking, tracking based mobile,
wireless passive tracking and satellite in real-time GPS tracking. This article
discusses the advantages and disadvantages to all three types of GPS vehicle
tracking circumference.

i) Mobile phone based tracking


The initial cost for the construction of the system is slightly lower than the
other two options. With a mobile phone-based tracking average price is about $
500. A cell-based monitoring system sends information about when a vehicle is
every five minutes during a rural network. The average monthly cost is about
thirty-five dollars for airtime.

ii) Wireless Passive Tracking


A big advantage that this type of tracking system is that there is no monthly
fee, so that when the system was introduced, there will be other costs associated
with it. But setting the scheme is a bit 'expensive. The average is about $ 700 for
hardware and $ 800 for software and databases. With this type of system, most say
that the disadvantage is that information about where the vehicle is not only can
exist when the vehicle is returned to the base business. This is a great disadvantage,
particularly for companies that are looking for a monitoring system that tells them
where their vehicle will be in case of theft or an accident. However, many systems
are now introducing wireless modems into their

7
devices so that tracking information can be without memory of the vehicle to be
seen. With a wireless modem that is wireless passive tracking systems are also able
to gather information on how fast the vehicle was traveling, stopping, and made
other detailed information. With this new addition, many companies believe that
this system is perfect, because there is no monthly bill.

iii) Via satellite in real time


This type of system provides less detailed information, but work at the
national level, making it a good choice for shipping and trucking companies.
Spending on construction of the system on average about $ 700. The monthly fees
for this system vary from five dollars for a hundred dollars, depending on how the
implementation of a reporting entity would be.

Technology
Over the next few years, GPS tracking will be able to provide businesses with
a number of other benefits. Some companies have already introduced a way for a
customer has signed the credit card and managed at local level through the device.
Others are creating ways for dispatcher to send the information re-routing, the GPS
device directly to a manager. Not a new requirement for GPS systems is that they
will have access to the Internet and store information about the vehicle as a driver
or mechanic GPS device to see the diagrams used to assist with the vehicle you
want to leave. Beyond that all the information be saved and stored in its database.

1.5 Typical Architecture

Major constituents of the GPS based tracking are

i. GPS tracking device

8
The device fits into the vehicle and captures the GPS location information
apart from other vehicle information at regular intervals to a central server.
The other vehicle information can include fuel amount, engine temperature,
altitude, reverse geocodingodometerthrottle , door open/close, tire pressure,
cut off fuel, turn off ignition, turn on headlight, turn on taillight, battery
status, GSM area code/cell code decoded, number of GPS satellites in view,
glass open/close, fuel amount, emergency button status, cumulative idling,
computed , engine RPM, position, and a lot more. Capability of these
devices actually decides the final capability of the whole tracking system.

ii. GPS tracking server


The tracking server has three responsibilities: receiving data from the GPS
tracking unit, securely storing it, and serving this information on demand to
the user.
iii. User interface

The UI determines how one will be able to access information, view vehicle
data, and elicit important details from it.

1.6 History of Vehicle Tracking


GPS or Global Positioning Systems were designed by the United States
Government and military, which the design was intended to be used as
surveillance. After several years went by the government signed a treaty to allow

9
civilians to buy GPS units also only the civilians would get precise downgraded
ratings.
Years after the Global Positioning Systems were developed the military
controlled the systems despite that civilians could still purchase them in stores. In
addition, despite that Europe has designed its own systems called the Galileo the
US military still has complete control.
GPS units are also called tracking devices that are quite costly still. As more
of these devices develop however the more affordable the GPS can be purchased.
Despite of the innovative technology and designs of the GPS today the devices has
seen some notable changes or reductions in pricing. Companies now have more
access to these devices and many of the companies can find benefits.
These days you can pay-as-you go or lease a GPS system for your company.
This means you do not have to worry about spending upfront money, which once
stopped companies from installing the Global positioning systems at one time.
Todays GPS applications have vastly developed as well. It is possible to use
the Global Positioning Systems to design expense reports, create time sheets, or
reduce the costs of fuel consumption. You can also use the tracking devices to
increase efficiency of employee driving. The GPS unit allows you to create Geo-
Fences about a designated location, which gives you alerts once your driver(s)
passes through. This means you have added security combined with more powerful
customer support for your workers.

10
Todays GPS units are great tracking devices that help fleet managers stay in
control of their business. The applications in todays GPS units make it possible to
take full control of your company. It is clear that the tracking devices offer many
benefits to companies, since you can build automated expense reports anytime.

GPS units do more than just allow companies to create reports. These devices
also help to put an end to thieves. According to recent reports, crime is at a high,
which means that car theft is increasing. If you have the right GPS unit, you can
put an end to car thefts because you can lock and unlock your car anytime you
choose.
GPS are small tracking devices that are installed in your car and it will supply
you with feedback data from tracking software that loads from a satellite. This
gives you more control over your vehicles.
The chief reason for companies to install tracking devices is to monitor their
mobile workforce. A preventive measure device allows companies to monitor their
employees activities. Company workers can no longer take your vehicles to
unassigned locations. They will not be able to get away with unauthorized
activities at any time because you can monitor their every action on a digital
screen.
The phantom pixel is another thing some webmasters do to get better
rankings. Unfortunately it will backfire on you since the search engines do not
want this to occur. You see, the phantom pixel is when you might have a 1 pixel
image or an image so small it cannot be seen by the regular eye. They use the pixel
to stuff it with keywords. The search engine can view it in the code, which is how
they know it is there and can give you better rank for the keywords in theory. Of
course since the search engines dont like this phantom pixel you are instead not
getting anything for the extra keywords except sent to the bottomless pit.

11
Chapter 2
Block Diagram of VTS

2.1 Block Diagram of Vehicle Tracing Using GSM and GPS Modem

In this project AT89S52 microcontroller is used for interfacing to various


hardware peripherals. The current design is an embedded application, which will
continuously monitor a moving Vehicle and report the status of the Vehicle on
demand. For doing so an AT89S52 microcontroller is interfaced serially to a GSM
Modem and GPS Receiver. A GSM modem is used to send the position (Latitude
and Longitude) of the vehicle from a remote place. The GPS modem will
continuously give the data i.e. the latitude and longitude indicating the position of
the vehicle. The GPS modem gives many parameters as the output, but only the
NMEA data coming out is read and displayed on to the LCD. The same data is sent
to the mobile at the other end from where the position of the vehicle is demanded.
An EEPROM is used to store the mobile number.

12
The hardware interfaces to microcontroller are LCD display, GSM modem
and GPS Receiver. The design uses RS-232 protocol for serial communication
between the modems and the microcontroller. A serial driver IC is used for
converting TTL voltage levels to RS-232 voltage levels. When the request by user
is sent to the number at the modem, the system automatically sends a return reply
to that mobile indicating the position of the vehicle in terms of latitude and
longitude.
As the Micro Controller, GPS and GSM take a sight of in depth knowledge,
they are explained in the next chapters.

2.2.1 GPS
GPS, in full Global Positioning System, space-based radio-navigation system
that broadcasts highly accurate navigation pulses to users on or near the Earth. In
the United States Navstar GPS, 24 main satellites in 6 orbits circle the Earth every
12 hours. In addition, Russia maintains a constellation called GLONASS (Global
Navigation Satellite System).

2.2.1.1 Working of GPS


GPS receiver works on 9600 baud rate is used to receive the data from space
Segment (from Satellites), the GPS values of different Satellites are sent to
microcontroller AT89S52, where these are processed and forwarded to GSM. At
the time of processing GPS receives only $GPRMC values only. From these values
microcontroller takes only latitude and longitude values excluding time, altitude,
name of the satellite, authentication etc. E.g. LAT: 1728:2470 LOG: 7843.3089
GSM modem with a baud rate 57600.
A GPS receiver operated by a user on Earth measures the time it takes radio
signals to travel from four or more satellites to its location, calculates the distance
to each satellite, and from this calculation determines the users longitude, latitude,

13
and altitude. The U.S. Department of Defense originally developed the Navstar
constellation for military use, but a less precise form of the service is available free
of charge to civilian users around the globe. The basic civilian service will locate a
receiver within 10 meters (33 feet) of its true location, though various
augmentation techniques can be used to pinpoint the location within less than 1 cm
(0.4 inch). With such accuracy and the ubiquity of the service, GPS has evolved far
beyond its original military purpose and has created a revolution in personal and
commercial navigation. Battlefield missiles and artillery projectiles use GPS
signals to determine their positions and velocities, but so do the U.S. space shuttle
and the International Space Station as well as commercial jetliners and private
airplanes. Ambulance fleets, family automobiles, and railroad locomotives

2.2.2 GSM
GSM (or Global System for Mobile Communications) was developed in 1990.
The first GSM operator has subscribers in 1991, the beginning of 1994 the network
based on the standard, already had 1.3 million subscribers, and the end of 1995
their number had increased to 10 million!
There were first generation mobile phones in the 70's, there are 2nd generation
mobile phones in the 80's and 90's, and now there are 3rd gen phones which are
about to enter the Indian market. GSM is called a 2nd generation, or 2G
communications technology In this project it acts as a SMS Receiver and SMS
sender. The GSM technical specifications define the different entities that form the
GSM network by defining their functions and interface requirements.

14
2.2.3 RS232 Interface
In telecommunicationsserial single-ended data control Data Terminal
EquipmentData Circuit-terminating Equipmentcomputer serial ports, RS-232 is the
traditional name for a series of standards for binary and signals connecting
between a DTE () and a DCE (). It is commonly used in . The standard defines the
electrical characteristics and timing of signals, the meaning of signals, and the
physical size and pin out of connectors. The current version of the standard is TIA-
232-F Interface between Data Terminal Equipment and Data Circuit-Terminating
Equipment Employing Serial Binary Data Interchange, issued in 1997.
An RS-232 port was once a standard feature of a personal computer
modemsprintersmiceuniversal serial bus for connections to , , , data storage, un-
interruptible power supplies, and other peripheral devices. However, the limited
transmission speed, relatively large voltage swing, and large standard connectors
motivated development of the which has displaced RS-232 from most of its
peripheral interface roles. Many modern personal computers have no RS-232 ports
and must use an external converter to connect to older peripherals. Some RS-232
devices are still found especially in industrial machines or scientific instruments.

Figure 2.2: 25 pin connector as described in the RS-232 standard

15
MICROCONTROLLER (ATMEL89S52)

In this project we used ATMEL89S52 controller. This controller has four I/O
ports. The AT89S52 is a low-power, high-performance CMOS 8-bit
microcontroller with 8K bytes of in-system programmable Flash memory. The
device is manufactured using Atmels high-density non-volatile memory
technology and is compatible with the Indus-try-standard 80C51 instruction set and
pin out. The on-chip Flash allows the program memory to be reprogrammed in
system or by a conventional non-volatile memory programmer. By combining a
versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the
Atmel

AT89S52 is a powerful microcontroller which provides a highly-flexible and


cost-effective solution to many embedded control applications. The AT89S52
provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32
I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-
vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator,
and clock circuitry. In addition, the AT89S52 is designed with static logic for
operation down to zero frequency and supports two software selectable power
saving modes. The Idle Mode stops the CPU while allowing the RAM,
timer/counters, serial port, and interrupt system to continue functioning. The
Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all
other chip functions until the next interrupt or hardware reset.

4.1.1. FEATURES

Compatible with MCS-51 Products

16
8K Bytes of In-System Programmable (ISP) Flash Memory Endurance:
10,000 Write/Erase Cycles

4.0V to 5.5V Operating Range

Fully Static Operation: 0 Hz to 33 MHz

Three-level Program Memory Lock

256 x 8-bit Internal RAM

32 Programmable I/O Lines

Three 16-bit Timer/Counters

Eight Interrupt Sources

Full Duplex UART Serial Channel

Low-power Idle and Power-down Modes

Interrupt Recovery from Power-down Mode

Watchdog Timer Dual Data Pointer

Power-off Flag Fast Programming Time

Flexible ISP Programming (Byte and Page Mode)

Green (Pb/Halide-free) Packaging Option.

4.1.2. MEMORY ORGANIZATION

17
MCS-51 devices have a separate address space for Program and Data
Memory. Up to 64K bytes each of external Program and Data Memory can be
addressed. Program Memory If the EA pin is connected to GND, all program
fetches are directed to external memory. On the AT89S52, if EA is connected to
VCC, program fetches to addresses 0000H through 1FFFH are directed to internal
memory and fetches to addresses 2000H through FFFFH are to external memory.
Data Memory The AT89S52 implements 256 bytes of on-chip RAM.

The upper 128 bytes occupy a parallel address space to the Special Function
Registers. This means that the upper 128 bytes have the same addresses as the SFR
space but are physically separate from SFR space. When an instruction accesses an
internal location above address 7FH, the address mode used in the instruction
specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space.
Instructions which use direct addressing access the SFR space. For example, the
following direct addressing instruction accesses the SFR at location 0A0H (which
is P2). MOV 0A0H, #data Instructions that use indirect addressing access the upper
128 bytes of RAM. For example, the following indirect addressing instruction,
where R0 contains 0A0H, accesses the data byte at address 0A0H, rather than P2
(whose address is 0A0H). MOV @R0, #data Note that stack operations are
examples of indirect addressing, so the upper 128 bytes of data RAM are available
as stack space.

4.1.3. WATCHDOG TIMER (ONE-TIME ENABLED WITH


RESET-OUT):

The WDT is intended as a recovery method in situations where the CPU may
be subjected to software upsets. The WDT consists of a 14-bit counter and the
Watchdog Timer Reset (WDTRST) SFR. The WDT is defaulted to disable from

18
exiting reset. To enable the WDT, a user must write 01EH and 0E1H in sequence to
the WDTRST register (SFR location 0A6H). When the WDT is enabled, it will
increment every machine cycle while the oscillator is running. The WDT timeout
period is dependent on the external clock frequency.

Using The WDT:

To enable the WDT, a user must write 01EH and 0E1H in sequence to the
WDTRST register (SFR location 0A6H). When the WDT is enabled, the user
needs to service it by writing 01EH and 0E1H to WDTRST to avoid a WDT
overflow. The 14-bit counter overflows when it reaches 16383 (3FFFH), and this
will reset the device. When the WDT is enabled, it will increment every machine
cycle while the oscillator is running. This means the user must reset the WDT at
least every 16383 machine cycles. To reset the WDT the user must write 01EH and
0E1H to WDTRST. WDTRST is a write-only register. The WDT counter cannot be
read or written. When 11 1919DMICRO6/08 AT89S52 WDT overflows, it will
generate an output RESET pulse at the RST pin. The RESET pulse duration is
98xTOSC, where TOSC = 1/FOSC. To make the best use of the WDT, it should be
serviced in those sections of code that will periodically be executed within the time
required to prevent a WDT reset.

WDT during Power down and Idle:

In Power-down mode the oscillator stops, which means the WDT also
stops. While in Power-down mode, the user does not need to service the WDT.
There are two methods of exiting Power-down mode: by a hardware reset or via a
19
level-activated external interrupt which is enabled prior to entering Power-down
mode. When Power-down is exited with hardware reset, servicing the WDT should
occur as it normally does whenever the AT89S52 is reset. Exiting Power-down
with an interrupt is significantly different. The interrupt is held low long enough
for the oscillator to stabilize. When the interrupt is brought high, the interrupt is
serviced. To prevent the WDT from resetting the device while the interrupt pin is
held low, the WDT is not started until the interrupt is pulled high. It is suggested
that the WDT be reset during the interrupt service for the interrupt used to exit
Power-down mode. To ensure that the WDT does not overflow within a few states
of exiting Power-down, it is best to reset the WDT just before entering Power-
down mode. Before going into the IDLE mode, the WDIDLE bit in SFR AUXR is
used to determine whether the WDT continues to count if enabled. The WDT keeps
counting during IDLE (WDIDLE bit = 0) as the default state. To prevent the WDT
from resetting the AT89S52 while in IDLE mode, the user should always set up a
timer that will periodically exit IDLE, service the WDT, and re enter IDLE mode.
With WDIDLE bit enabled, the WDT will stop to count in IDLE mode and
resumes the count upon exit from IDLE

20
21
Fig.no.6. Block Diagram of Microcontroller

UART :

The UART in the AT89S52 operates the same way as the UART in the
AT89C51 and AT89C52. For further information on the UART operation, please
click on the document link below:

TIMER 0 AND 1:

Timer 0 and Timer 1 in the AT89S52 operate the same way as Timer 0 and
Timer 1 in the AT89C51 and AT89C52. For further information on the timers
operation,http://www.atmel.com/dyn/resources/prod_documents/DOC4316.PDF12
1919DMICRO6/08 AT89S52

TIMER 2

Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an


event counter. The type of operation is selected by bit C/T 2 in the SFR T2CON
(shown in Table 5-2). Timer 2 has three operating modes: capture, auto-reload (up
or down counting), and baud rate generator. The modes are selected by bits in
T2CON, as shown in Table 10-1. Timer 2 consists of two 8-bit registers, TH 2 and
TL2. In the Timer function, the TL 2 register is incremented every machine cycle.
Since a machine cycle consists of 12 oscillator periods, the count rate is 1/12 of the
oscillator frequency. In the Counter function, the register is incremented in
response to a 1-to-0 transition at its corresponding external input pin, T2.

In this function, the external input is sampled during S5P2 of every machine
cycle. When the samples show a high in one cycle and a low in the next cycle, the

22
count is incremented. The new count value appears in the register during S3P1 of
the cycle following the one in which the transition was detected.

CAPTURE MODE:

In the capture mode, two options are selected by bit EXEN2 in T2CON. If
EXEN2 = 0, Timer 2 is a 16-bit timer or counter which upon overflow sets bit TF 2
in T2CON. This bit can then be used to generate an interrupt. If EXEN2 = 1, Timer
2 performs the same operation, but a 1-to-0 transition at external input T2EX also
causes the current value in TH2 and TL2 to be captured into RCAP2H and
RCAP2L, respectively. In addition, the transition at T2EX causes bit EXF2 in
T2CON to be set. The EXF2 bit, like TF 2, can generate an interrupt. The capture
mode is illustrated.

AUTO-RELOAD (UP OR DOWN COUNTER) :

Timer 2 can be programmed to count up or down when configured in its 16-


bit auto-reload mode. This feature is invoked by the DCEN (Down Counter
Enable) bit located in the SFR T2MOD (see Table 10-2). Upon reset, the DCEN bit
is set to 0 so that timer 2 will default to count up. When DCEN is set, Timer 2 can
count up or down, depending on the value of the T2EX pin

Compatible with MCS-51 Products

8K Bytes of In-System Programmable (ISP) Flash Memory Endurance:


10,000 Write/Erase Cycles

4.0V to 5.5V Operating Range

Fully Static Operation: 0 Hz to 33 MHz


23
Three-level Program Memory Lock

256 x 8-bit Internal RAM

32 Programmable I/O Lines

Three 16-bit Timer/Counters

Eight Interrupt Sources

Full Duplex UART Serial Channel

Low-power Idle and Power-down Modes

Interrupt Recovery from Power-down Mode

Watchdog Timer Dual Data Pointer

Power-off Flag Fast Programming Time

Flexible ISP Programming (Byte and Page Mode)

24
4.2. 89S52 PINDIAGRAM

Fig.no.7. 89S52 Pin Diagram

VCC:

Pin No:40 Supply voltage.

GND:

Pin No: 20 Ground..

25
PORT 1:

Pin No: 12 19:

The Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provides
internal pull-ups and P1.1 require external pull-ups. P1.0 and P1.1 also serve as the
positive input (AIN0) and negative input (AIN1), respectively, of the on-chip
precision analog comparator. The Port 1 output buffers can sink 20 mA and can
drive LED displays directly.

When 1s are written to Port pins, they can be used as inputs. When pins P1.2
to P1.7 are used as inputs and are externally Pulled low, they will source current
(IIL) because of the internal pull-ups. Port 1 also receives code data during Flash
programming and verification.

PORT 3:

Pin No: 2, 3, 6-9, 11:

Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with internal
pull-ups. P3.6 hard-wired as an input to the output of the on-chip comparator and is
not accessible as a general-Purpose I/O pin. The Port 3 output buffers can sink 20
mA. When 1s are written to Port pins they are pulled high by the internal pull-ups
and can be used as inputs.

As inputs, Port 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 AT89C2051 as listed below:

26
PORT PIN ALTERNATE FUNCTIONS:

RXD (P3.0) : serial input port

TXD (P3.1) : serial output port

INT0 (P3.2) : external interrupt 0

INT1 (P3.3) : external interrupt 1

T0 (P3.4) ; timer 0 external input

T1 (P3.5) : timer 1 external input

Port 3 also receives some control signals for Flash programming and
verification.

RESET:

Pin No: 1:

Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding
the RST pin high two machine cycles while the oscillator is running resets the
device. Each machine cycle takes 12 oscillator or clock cycles.

XTAL1:

Pin No: 5:

Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.

XTAL2:

27
Pin No: 4:

Output from the inverting oscillator amplifier.

4.2 POWER SUPPLY UNIT

As we all know any invention of latest technology cannot be activated


without the source of power. So it this fast moving world we deliberately need a
proper power source which will be apt for a particular requirement. All the
electronic components starting from diode to Intel ICs only work with a DC
supply ranging from _+5v to _+12. we are utilizing for the same, the most cheapest
and commonly available energy source of 230v-50Hz and stepping down ,
rectifying, filtering and regulating the voltage. This will be dealt briefly in the
forth-coming sections.

STEP DOWN TRANSFORMER

When AC is applied to the primary winding of the power transformer it can


either be stepped down or up depending on the value of DC needed. In our circuit
the transformer of 230v/15-0-15v is used to perform the step down operation
where a 230V AC appears as 15V AC across the secondary winding . One
alteration of input causes the top of the transformer to be positive and the bottom
negative. The next alteration will temporarily cause the reverse. The current rating
of the transformer used in our project is 2A. Apart from stepping down AC
voltages , it gives isolation between the power source and power supply circuitries.

RECTIFIER UNIT

In the power supply unit, rectification is normally achieved using a solid


state diode. Diode has the property that will let the electron flow easily in one
direction at proper biasing condition . As AC is applied to the diode, electrons only

28
flow when the anode and cathode is negative. Reversing the polarity of voltage
will not permit electron flow.
A commonly used circuit for supplying large amounts of DC power is the
bridge rectifier. A bridge rectifier of four diodes (4*IN4007) are used to achieve
full wave rectification. Two diodes will conduct during the negative cycle and the
other two will conduct during the positive half cycle. The DC voltage appearing
across the output terminals of the bridge rectifier will be somewhat lass than 90%
of the applied rms value. Normally one alteration of the input voltage will reverse
the polarities. Opposite ends of the transformer will therefore always be 180 deg
out of phase with each other.

For a positive cycle, two diodes are connected to the positive voltage at the
top winding and only one diode conducts . At the same time one of the other two
diodes conducts for the negative voltage that is applied from the bottom winding
due to the forward bias for that diode. In this circuit due to positive half cycleD1 &
D2 will conduct to give 10.8v pulsating DC. The DC output has a ripple frequency
of 100Hz. Since each altercation produces a resulting output pulse, frequency =
2*50 Hz. The output obtained is not a pure DC and therefore filtration has to be
done.

FILTERING UNIT

Filter circuits which is usually a capacitor acting as a surge arrester always


follow the rectifier unit. This capacitor is also called as a decoupling capacitor or a
bypassing capacitor, is used not only to short the ripple with frequency of 120Hz
to ground but also to leave the frequency of the DC to appear at the output. A load
resistor R1 is connected so that a reference to the ground is maintained . C1R1 is

29
for bypassing ripples. C2R2 is used as a low pass filter, i.e. it passes only low
frequency signals and bypasses high frequency signals. The load resistor should be
1% to 2.5% of the load.

1000f/25v: for the reduction of ripples from the pulsating.

10f/25v : for maintaining the stability of the voltage at the load side.

O,1f : for bypassing the high frequency disturbances.

VOLTAGE REGULATORS

The voltage regulators play an important role in any power supply unit. The
primary purpose of a regulator is to aid the rectifier and filter circuit in providing a
constant DC voltage to the device. Power supplies without regulators have an
inherent problem of changing DC voltage values due to variations in the load or
due to fluctuations in the AC liner voltage. With a regulator connected to the DC
output, the voltage can be maintained within a close tolerant region of the desired
output. IC7812 and 7912 is used in this project for providing +12v and 12v DC
supply.

Specifications :

Resistors R1 and R2 maintain line load regulation.

At the secondary side of the transformer,

Applied voltage = 15v

Conducting drop across the diodes = 2*0.6


= 1.2v

30
without capacitor:

Vavg = (15-1.2)v = 13.8c pulsating DC

Frequency = 100Hz

With capacitor:

V=Vavg *1.414(formfactor)

= 19.51v
frequency = oHz

With 7812 voltage regulator :

V0= +12v

With 7912 voltage regulator :

V0= -12v

31
MAX232

The MAX232 from Maxim was the first IC which in one package contains
the necessary drivers (two) and receivers (also two), to adapt the RS-232 signal
voltage levels to TTL logic. It became popular, because it just needs one voltage
(+5V) and generates the necessary RS-232 voltage levels (approx. -10V and +10V)
internally. This greatly simplified the design of circuitry. Circuitry designers no
longer need to design and build a power supply with three voltages (e.g. -12V, +5V,
and +12V), but could just provide one +5V power supply, e.g. with the help of a
simple 78x05 voltage regulator.

Figure 4.5 MAX232

MAX 232 is compatible with RS-232 standard, and consists of dual


transceiver. Each receiver converts TIA/EIA-232-E levels into 5V TTL/CMOS
levels. Each driver converts TTL/COMS levels into TIA/EIA-232-E levels. The

32
MAX 232 is characterized for operation from -40C to +85C for all packages.
MAX 232 is purposed for application in high-performance information processing
systems and control devices of wide application.

RS232

RS232 is the 9 pin connector. It is used to interfacing with the PC in the


serial port. In this circuit 2 and 7 pins only used. The Serial Port is harder to
interface than the Parallel Port. In most cases, any device that connect to the serial
port will need the serial transmission converted back to parallel so that it can be
used this can be done using a UART. On the software side of things, there are
many more registers that have to attend than on a Standard Parallel Port (SPP)

33
2.2.6 LCD
A flat panel display electronic visual displayvideo display liquid crystals
liquid crystal display (LCD) is a , , or that uses the light modulating properties of
(LCs). LCs do not emit light directly.
LCDs are used in a wide range of applications, including computer
monitorstelevisionaircraft cockpit
displayssignageclockscalculatorstelephonescathode ray tube plasma displaysimage
persistence, , instrument panels, , , etc. They are common in consumer devices
such as video players, gaming devices, , watches, , and . LCDs have replaced
(CRT) displays in most applications. They are available in a wider range of screen
sizes than CRT and , and since they do not use phosphors, they cannot suffer image
burn-in. LCDs are, however, susceptible to .
LCDs are more energy efficient and offer safer disposal than CRTs. Its low
electrical power consumption enables it to be used in batteryelectronic
electronically modulated optical device liquid crystals light source
backlightreflector monochromepixels- powered equipment. It is an made up of any
number of segments filled with and arrayed in front of a () or to produce images in
color or . The most flexible ones use an array of small . The earliest discovery
leading to the development of LCD technology, the discovery of liquid crystals,
dates from 1888. By 2008, worldwide sales of televisions with LCD screens had
surpassed the sale of CRT units. Following figure is a 16x2 LCD.
Figure 2.10 A general purpose alphanumeric LCD, with two lines of 16
characters.

34
Monochrome passive-matrix LCDs were standard in most early laptops (although a
few used plasma displays) and the original Nintendo Game Boyuntil the mid-
1990s, when color active-matrix became standard on all laptops. The commercially
unsuccessful Macintosh Portable (released in 1989) was one of the first to use an
active-matrix display (though still monochrome).
Passive-matrix LCDs are still used today for applications less demanding than
laptops and TVs. In particular, portable devices with less information content to be
displayed, where lowest power consumption (no backlight), low cost and/or
readability in direct sunlight are needed, use this type of display.
2.2.6.1 Advantages and Disadvantages
In spite of LCDs being a well proven and still viable technology, as display
devices LCDs are not perfect for all applications.
Advantages
Very compact and light.
Low power consumption.
No geometric distortion.
Little or no flicker depending on backlight technology.
Not affected by screen burn-in.
Can be made in almost any size or shape.
No theoretical resolution limit.

Disadvantages
Limited viewing angle, causing color, saturation, contrast and brightness to
vary, even within the intended viewing angle, by variations in posture.
Bleeding and uneven backlighting in some monitors, causing brightness
distortion, especially toward the edges.

35
Smearing and ghosting artifacts caused by slow response times (>8 ms) and
"sample and hold" operation.
Fixed bit depth, many cheaper LCDs are only able to display 262,000
colors. 8-bit S-IPS panels can display 16 million colors and have
significantly better black level, but are expensive and have slower
response time.
Low bit depth results in images with unnatural or excessive contrast.
Input lag
Dead or stuck pixels may occur during manufacturing or through use

36
GSM MODULE

GSM Modem (SIM300)

Fig 10 : GSM Module

The keypad and SPI LCD interface will give you the flexibility to develop
customized applications.
Two serial ports can help you easily develop our applications.

37
Two audio channels include two microphones inputs and two speaker
outputs. These audio interfaces can be easily configured by AT command.
One ADC input
Two GPIO ports and SIM card detection port

SIM CARD
Following is the reference circuit about SIM interface. We recommend
an Electro-Static discharge device ST ESDA6V1W5 or ON SEMI SMF05C for
ESD ANTI. The resistors (R204-R206) showed in the figure should be added in
series on the IO line between the module and the SIM card for matching the
impedance The SIM_PRESENCE pin is used for detecting the SIM card removal.
Note: The pull up resistor R207 must be added.
We can select the 8 pins SIM card. The reference circuit about SIM card illustrates
as following figure.

SIM300 is a Tri-band GSM/GPRS engine that works on frequencies


EGSM 900 MHz, DCS 1800 MHz and PCS1900 MHz. SIM300 provides GPRS
multi-slot class 10 capability and support the GPRS coding schemes CS-1, CS-2,
CS-3 and CS-4.

With a tiny configuration of 40mm x 33mm x 2.85 mm , SIM300 can


fit almost all the space requirement in our application, such as Smart phone, PDA
phone and other mobile device. The physical interface between SIM300 and the
mobile application is through a 60 pins board-to-board connector, which provides
all hardware interfaces from module to customers boards except the RF antenna
interface.

THE PART OF POWER ON CIRCUIT


We can turn on the module by driving the PWRKEY to a low level
voltage for period time. The automatic power on circuit illustrate as following
figure. The PWRKEY pin is the NO.34 pin of the module interface. The value of
38
the capacitor C155 is recommended as 330uF/16V. The diode D2 1N4148 is
used for current discharge when power down. The diode can be modified to the
other type part which discharge capability is better. We can make a decision by
some experiments ourselves.

Fig 11 : MAX 232 Pin Details

LOGIC SIGNAL VOLTAGE

Serial RS-232 (V.24) communication works with voltages


(between -15V ... -3V are used to transmit a binary '1' and +3V ... +15V to transmit
a binary '0') which are not compatible with today's computer logic voltages. On the
other hand, classic TTL computer logic operates between 0V ... +5V (roughly
0V ... +0.8V referred to as low for binary '0', +2V ... +5V for high binary '1' ).
Modern low-power logic operates in the range of 0V ... +3.3V or even lower.
So, the maximum RS-232 signal levels are far too high for
today's computer logic electronics, and the negative RS-232 voltage can't be
grokked at all by the computer logic. Therefore, to receive serial data from an RS-
232 interface the voltage has to be reduced, and the 0 and 1 voltage levels inverted.

39
In the other direction (sending data from some logic over RS-232) the low logic
voltage has to be "bumped up", and a negative voltage has to be generated, too.
The MAX232 and MAX232A were once rather expensive ICs, but today they are
cheap. It has also helped that many companies now produce clones (ie. Sipex).
These clones sometimes need different external circuitry, e.g. the capacities of the
external capacitors vary. It is recommended to check the data sheet of the particular
manufacturer of an IC instead of relying on Maxim's original data sheet.
The original manufacturer (and now some clone manufacturers, too) offers a large
series of similar ICs, with different numbers of receivers and drivers, voltages,
built-in or external capacitors, etc. E.g. The MAX232 and MAX232A need
external capacitors for the internal voltage pump, while the MAX233 has these
capacitors built-in. The MAX233 is also between three and ten times more
expensive in electronic shops than the MAX232A because of its internal
capacitors. It is also more difficult to get the MAX233 than the garden variety
MAX232A.
A similar IC, the MAX3232 is nowadays available for low-power 3V logic.

MAX232 to RS232 DB9 Connection as a DCE

MAX232 Pin Nbr. MAX232 Pin Name Signal Voltage DB9 Pin

7 T2out RTS RS-232 8

8 R2in CTS RS-232 7

9 R2out CTS TTL n/a

40
10 T2in RTS TTL n/a

11 T1in TX TTL n/a

12 R1out RX TTL n/a

13 R1in TX RS-232 3

14 T1out RX RS-232 2

15 GND GND 0 5

RS-232
(Recommended Standard-232) A TIA/EIA standard for serial
transmission between computers and peripheral devices (modem, mouse, etc.).
Using a 25-pin DB-25 or 9-pin DB-9 connector, its normal cable limitation of 50
feet can be extended to several hundred feet with high-qualitycable.

RS-232 defines the purpose and signal timing for each of the 25 lines;
however, many applications use less than a dozen. RS-232 transmits positive
voltage for a 0 bit, negative voltage for a 1. In 1984, this interface was officially

41
renamed TIA/EIA-232-E standard (E is the current revision, 1991), although most
people still call it RS-232.

MISCELLANOUS COMPONENTS:

RESISTOR:

A device used in electrical circuits to maintain a constant relation between


current flow and voltage. Resistors are used to step up or lower the voltage at
different points in a circuit and to transform a current signal into a voltage signal or
vice versa, among other uses. The electrical behavior of a resistor obeys Ohm's law
for a constant resistance; however, some resistors are sensitive to heat, light, or
other variables. Variable resistors, or rheostats, have a resistance that may be
varied across a certain range, usually by means of a mechanical device that alters
the position of one terminal of the resistor along a strip of resistant material. The
length of the intervening material determines the resistance. Mechanical variable
resistors are also called potentiometers, and are used in the volume knobs of audio
equipment and in many other devices.

Preset resistors are used in circuits when it is necessary to alter the


resistance. Dark/light and temperature sensors usually have these components as
the preset resistor allows the circuit to be made more or less sensitive (they can be
turned up or down - reducing or increasing resistance).

A small screwdriver can be used to turn the centre part of the preset resistor,
altering the value of the resistance.The range of resistance varies, for example:

42
0 to 100 ohms
0 to 1M ohms

CAPACITOR:
A capacitor is a passive electronic component that stores energy in the form
of an electrostatic field. In its simplest form, a capacitor consists of two conducting
plates separated by an insulating material called the dielectric. The capacitance is
directly proportional to the surface areas of the plates, and is inversely proportional
to the separation between the plates. Capacitance also depends on the dielectric
constant of the substance separating the plates. The standard unit of capacitance is
the farad, abbreviated.

DIODE:

A diode is a specialized electronic component with two electrodes called the


anode and the cathode. Most diodes are made with semiconductor materials such
as silicon, germanium, or selenium. Some diodes are comprised of metal electrodes
in a chamber evacuated or filled with a pure elemental gas at low pressure. Diodes
can be used as rectifiers, signal limiters, voltage regulators, switches, signal
modulators, signal mixers, signal demodulators, and oscillators.

The fundamental property of a diode is its tendency to conduct electric


current in only one direction. When the cathode is negatively charged relative to
the anode at a voltage greater than a certain minimum called forward breakover,
then current flows through the diode. If the cathode is positive with respect to the
anode, is at the same voltage as the anode, or is negative by an amount less than
the forward breakover voltage, then the diode does not conduct current. This is a
simplistic view, but is true for diodes operating as rectifiers, switches, and limiters.

43
The forward breakover voltage is approximately six tenths of a volt (0.6 V) for
silicon devices, 0.3 V for germanium devices, and 1 V for selenium devices.

TRANSISTOR:

The transistor, invented by three scientists at the Bell Laboratories in 1947,


rapidly replaced the vacuum tube as an electronic signal regulator. A transistor
regulates current or voltage flow and acts as a switch or gate for electronic signals.
A transistor consists of three layers of a semiconductor material, each capable of
carrying a current. A semiconductor is a material such as germanium and silicon
that conducts electricity in a "semi-enthusiastic" way. It's somewhere between a
real conductor such as copper and an insulator (like the plastic wrapped
aroundwires).
The semiconductor material is given special properties by a chemical
process called doping. The doping results in a material that either adds extra
electrons to the material (which is then called N-type for the extra negative charge
carriers) or creates "holes" in the material's crystal structure (which is then called
P-type because it results in more positive charge carriers). The transistor's three-
layer structure contains an N-type semiconductor layer sandwiched between P-type
layers (a PNP configuration) or a P-type layer between N-type layers (an NPN
configuration).
A small change in the current or voltage at the inner semiconductor layer
(which acts as the control electrode) produces a large, rapid change in the current
passing through the entire component. The component can thus act as a switch,
opening and closing an electronic gate many times per second. Today's computers
use circuitry made with complementary metal oxide semiconductor (CMOS)
technology. CMOS uses two complementary transistors per gate (one with N-type
material; the other with P-type material.

44
CRYSTAL OSCILLATOR:

A typical crystal oscillator circuit. It consists of a quartz crystal of the


required frequency, a high value resistor, and two small value ceramic capacitors -
one from each leg of the crystal to ground. The quartz crystal can be identified as a
small, flat, silver metallic can, approximately 12mm tall, with its operating
frequency stamped either on the side or top. The resistors and capacitors may either
be of conventional through hole type, or more frequently nowadays, small surface
mount components.

LED:

The heart of a LED is its semiconductor chip. The chip is manufactured in a


long chemical process. The chip itself contains many of the optical elements
described in the previous chapter Geometrical Optics. Electricity is brought to
the chip through a thin wire of gold and most often through conductive glue that
connects the bottom of the LED to its reflector. These connections are further
connected to the legs of the LED, i.e. anode and cathode.

High reliability
High radiant intensity
Peak wavelength p=940nm
2.54mm Lead spacing

45
PCB DESGNING AND FABRICATION

PROCEDURE FOR MAKING THE PCB

PREPARING OF LAYOUT

With the diagram and all the hand, draw a complete layout plan of the circuit
on a sheet of a tracing paper. As a model, for laying the circuit, a thermo cole base
may be used to hold components. Avoid overcrowding of components while
making full space utilization. Keep the ground line on the side of the PCB and the
supply line on other side as far as possible. When all the components have been
mounted on the tracing paper sheet fixed on a piece of thermo cole base, take out a
sketch pen for making in such a way that all the connecting wires are equal in
width, termination rounded off. Re-draw draw it on a fresh paper if required.

PAINTING OF PCB

The tracing so prepared has to be imposed over the copper printed circuit
board keeping in view that the component would be mounted from the non-clad
side of the board. Take a PCB lamination sheet and cur a piece of required size of
the board by using hacksaw file edges, put the copper clad sheet on the table
keeping side on the runway the dirt grease and oxide with a sand paper with its
marked side tracing the carbon paper and at her side on top. Since the tracing paper
is transformed you can now reproduce a carbon point over a surface but using ball
pen on a hard pencil over the drawing on the transparent side. When the carbon
print has been obtained over the copper clad board drill ropes in the board using a
hand drill. The holes may be draw with 1/32 bit for component lead sand the
carbon should be raised or wiped by mistake.

46
DEVELOPMENT OF THE PRINTED CIRCUIT DIAGRAM

After painting the board, it will be made by the cool air for sometime. Now
take a plastic tray and get some Fe Cl3 chemical powder. The ferric chloride salt is
then added with 500ml of water. The color of the solution is pink. Color of the salt
is in yellow, now we add three to five drops of dilute HCL or H2SO4. This is
necessary to quicken the process.

ETCHING OF PCB

Now we take the painted copper clad board and dip it in the solution kept in
the tray. After 15 to 25 minutes we see the board, with only printed pattern portion
remaining in other place the copper coating is removed due to the chemical action.
Then the board is taken out and washes in water. After wash the board by using
thinner solution. Now a printed circuit has been formed on the board.

Take fresh water and mix a few teaspoons of FeCL3 add a few drops of
dilute HCL to it, as it speeds the etching process. Shake well immerse the PC Bin
the solution for about 20 minutes occasionally altering the solution by giving the
seesaw reaction to the disk storing reduces the etching time. Observe the changing
color on the copper surface. Take out the PCB only when the unpainted portion of
the copper surface is completely dissolved in the solution wash the PCB with the
water. After the PCB is thoroughly washed remove the paint by soft pieces of the
cloth dipped in thinner or turpentine.

DRILLING OF HOLES

47
Then take a drilling machine with 1/32 drill bit to make holes for the
incretion of the components use 1/18 drill bit for inset wires and other thick
components.

ADVANTAGES

Reliability in operation and low cost.


Space required becomes less.

MATERIAL REQUIRED

Copper clad sheet (It is made of hylam or board over


which the sheet copper is pressed.)
Paint or Nail polish or even PCB Ink.
Painting brush, tray.
Ferric chloride solution and also few drop of dilute HCL or
H2so4.
Thinner or kerosene or petrol.
Cotton cloth.
Trace paper.

SOLDERING

Soldering is a process in which two or more metal items are joined together
by melting and flowing a filler metal (solder) into the joint, the filler metal having
a lower melting point than the work piece. Soldering differs from welding in that
soldering does not involve melting the work pieces. There are three forms of
soldering, each requiring progressively higher temperatures and producing an
increasingly stronger joint strength:

1. soft soldering, which originally used a tin-lead alloy as the filler metal,

48
2. silver soldering, which uses an alloy containing silver,

3. brazing which uses a brass alloy for the filler.

The alloy of the filler metal for each type of soldering can be adjusted to modify
the melting temperature of the filler. Soldering appears to be a hot glue process, but
it differs from gluing significantly in that the filler metals alloy with the work piece
at the junction to form a gas- and liquid-tight bond. Soft soldering is characterized
by having a melting point of the filler metal below approximately 400
C (752 F), whereas silver soldering and brazing use higher temperatures,
typically requiring a flame or carbon arc torch to achieve the melting of the filler.
Soft solder filler metals are typically alloys (often containing lead) that
have liquidus temperatures below 350C. In this soldering process, heat is applied
to the parts to be joined, causing the solder to melt and to bond to the work pieces
in an alloying process called wetting. In stranded wire, the solder is drawn up into
the wire by capillary action in a process called 'wicking'. Capillary action also
takes place when the work pieces are very close together or touching. The joint
strength is dependent on the filler metal used, where soft solder is the weakest and
the brass alloy used for brazing is the strongest. Soldering, which uses metal to join
metal in a molecular bond has electrical conductivity and is water- and gas-
tight. There is evidence that soldering was employed up to 5000 years ago in
Mesopotamia.

49
v

CHAPTER 7

50
KEIL Software
7.1 Introduction
Many companies provide the 8051 assembler, some of them provide
shareware version of their product on the Web, Kiel is one of them. We can
download them from their Websites. However, the size of code for these shareware
versions is limited and we have to consider which assembler is suitable for our
application.

7.2 KEIL uVision2


Kiel uVision2is an IDE (Integrated Development Environment) that helps you
write, compile, and debug embedded programs. It encapsulates the following
components:
A project manager.
A make facility.
Tool configuration.
Editor.
A powerful debugger.
To help you get started, several example programs

Creating Your Own Application in uVision2


To create a new project in uVision2, you must:
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 Database
Create source files to add to the project.

51
Select Project - Targets, Groups, and 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

7.3 KEIL Software Programing Procedure


How to write embedded C program in Keil Software?
Following steps are to be followed in order to develop, code and test the
equipment with software.
7.3.1 Procedure Steps
Step-1:
Install KEIL MicroVision-2 in your PC, Then after Click on that KEIL
UVision-2 icon. After opening the window go to toolbar and select Project Tab
then close previous project.
Step-2:
Next select New Project from Project Tab.
Step-3:
Then it will open Create New Project window. Select the path where you
want to save project and edit project name.
Step-4:
Next it opens Select Device for Target window, It shows list of companies
and here you can select the device manufacturer company.
Step-5:

52
For an example, for your project purpose you can select the chip as 89c51/52
from Atmel Group. Next Click OK Button, it appears empty window here you can
observe left side a small window i.e, Project Window. Next create a new file.
Step-6:
From the Main tool bar Menu select File Tab and go to New, then it will
open a window, there you can edit the program.
Step-7:
Here you can edit the program as which language will you prefer either
Assembly or C.
Step-8:
After editing the program save the file with extension as .c or .asm, if you
write a program in Assembly Language save as .asm or if you write a program in
C Language save as .c in the selected path. Take an example and save the file as
test.c.
Step-9: Then after saving the file, compile the program. For compilation go to
project window select source group and right click on that and go to Add files
to Group.
Step-10:
Here it will ask which file has to Add. For an example here you can add
test.c as you saved before.
Step-11:
After adding the file, again go to Project Window and right click on your c
file then select Build target for compilation. If there is any Errors or Warnings
in your program you can check in Output Window that is shown bottom of the
Keil window.
Step-12:

53
Here in this step you can observe the output window for errors and
warnings.
Step-13:
If you make any mistake in your program you can check in this slide for
which error and where the error is by clicking on that error.
Step-14:
After compilation then next go to Debug Session. In Tool Bar menu go to
Debug tab and select Start/Stop Debug Session.
Step-15:
Here a simple program for LEDs Blinking. LEDS are connected to PORT-
1. you can observe the output in that port.
Step-16:
To see the Ports and other Peripheral Features go to main toolbar menu and
select peripherals.
Step-17:
In this slide see the selected port i.e, PORT-1.
Step-18:
Start to trace the program in sequence manner i.e., step by step execution and
observe the output in port window.
Step-19: After completion of Debug Session Create an Hex file for Burning the
Processor. Here to create an Hex file go to project window and right click on
Target next select Option for Target.
Step-20: It appears one window; here in target tab modify the crystal
frequency as you connected to your microcontroller.
Step-21:
Next go to Output tab. In that Output tab click on Create HEX File and
then click OK.
54
Step-22:
Finally Once again compile your program. The Created Hex File will appear
in your path folder.

7.4 Applications of KEIL Software


Select Project - Rebuild all target files or Build target.
i) Debugging an Application in uVision2:

To debug an application created using uVision2,


You must:
Select Debug - Start/Stop Debug Session.
Use the Step toolbar buttons to single-step through your program. You may
enter G, main in the Output Window to execute to the main C function.
Open the Serial Window using the Serial #1 button on the toolbar.
Debug your program using standard options like Step, Go, Break, and so on.
ii) Peripheral Simulation:
The uvision2 debugger provides complete simulation for the CPU and
on chip peripherals of most embedded devices. To discover which
peripherals of a device are supported, in u vision2. Select the Simulated
Peripherals item from the Help menu. You may also use the web-based
device database. We are constantly adding new devices and simulation
support for on-chip peripherals so be sure to check Device Database often.

55
8.1 Applications
Commercial fleet operators are by far the largest users of vehicle tracking
systems. These systems are used for operational functions such as routing, security,
dispatch and collecting on-board information.
These systems are also used in consumer vehicles as devices for preventing
theft and retrieving stolen/lost vehicles. The signal sent out by the installed device
help the police to track the vehicle. These tracking systems can be used as an
alternative for traditional car alarms or in combination with it. Installing tracking
systems can thus bring down the insurance costs for your vehicle by reducing the
risk factor.
Vehicle Tracking systems often have several alternatives, like sending
automatic alerts to a phone or email if the vehicle is moved without due
authorization. They can also work as one layer of several combined security
measures.
Apart from security concerns, the tracking systems can also help users such as
taxi services to improve their customer service. The systems enable the operators
to identify the empty taxis and direct the nearest one to pick up the customer.
Vehicle tracking systems can also be applied for monitoring driving behavior
for both commercial and individual situations. Parents for instance can use tracking
devices to keep an eye on their teenage sons driving.
The applications for this project are in military, navigation, automobiles,
aircrafts, fleet management, remote monitoring, remote control, security systems,
teleservices, etc.

56
Some main advantages of implementing this system are as follows:
Fleet monitoring
Vehicle scheduling
Route monitoring
Driver monitoring
Accident analysis
Geo-fencing geo-coding

57
Result Analysis
We a team of 4 members have successfully completed our Project on Tracking
Down Vehicle and Locking it remotely using GPS and GSM technologies.
We first tried to understand the working of our project through the schematic
and then we proceeded to build the circuit as per the schematic. Initially we faced
few problems with the GPS modem, as it wont work efficiently inside buildings.
And also the GSM modem suffered problems with the coverage area of the Mobile
Service Provider. So, we used Airtel as it has maximum coverage area. In order to
solve this problem we can use dedicated servers and purchasing satellite space so
that we can track down the vehicle anytime and anywhere.
The overall developed circuit looks as in the following figure:

Fig 9.1 Picture of VTS kit


58
The above circuit works mainly by receiving messages from a mobile phone.
There are three messages/commands by which we can track and control the
vehicle. They are,
i) TRACK
ii) LOCKD
iii) NLOCK

Fig 9.2 Message received from the VTS kit

i) TRACK: Initiates the GPS modem and receives the Latitude and Longitude
position and this information will be sent to the mobile from which it received the
message.
ii) LOCKD: When this message is sent, then the Microcontroller initiates the
motor which is located in between the passage of fuel to stop and which in turn
stops the vehicle.
iii) NLOCK: This command makes the motor to start again so that the vehicle
starts running.

This project can further be crafted by restricting the usage of limited mobile
numbers to get access to the device. This can be made by altering the program.
The message which is sent to the mobile will be as shown in the following
figure.
59
With the knowledge in Electronics and Communications we have successfully
completed our project with perfect results.

CONCLUSION AND FUTURE SCOPE


The project titled tracing down the vehicle using GSM and satellite
communication is a model for vehicle tracking unit with the help of gps receivers
and GSM modem. Vehicle Tracking System resulted in improving overall
productivity with better fleet management that in turn offers better return on your
investments. Better scheduling or route planning can enable you handle larger jobs
loads within a particular time. Vehicle tracking both in case of personal as well as
business purpose improves safety and security, communication medium,
performance monitoring and increases productivity. So in the coming year, it is
going to play a major role in our day-to-day living.
We have completed the project as per the requirements of our project. Finally
the aim of the project i.e. to trace the vehicle is successfully achieved.

60
Future Scope
We can reduce the size of the kit by using GPS+GSM on the same module.
We can increase the accuracy up to 3m by increasing the cost of the GPS
receivers.
We can use our kit for detection of bomb by connecting to the bomb detector.
With the help of high sensitivity vibration sensors we can detect the accident.
Whenever vehicle unexpectedly had an accident on the road with help of
vibration sensor we can detect the accident and we can send the location to the
owner, hospital and police.
We can use our kit to assist the traffic. By keeping the kits in the entire vehicles
and by knowing the locations of all the vehicles.
If anybody steals our car we can easily find our car around the globe. By
keeping vehicle positioning vehicle on the vehicle.

61
REFERENCES

[1]. Chen, H., Chiang, Y. Chang, F., H. Wang, H. (2010). Toward Real-Time
Precise Point Positioning: Differential GPS Based on IGS Ultra Rapid
Product,SICE Annual Conference, The Grand Hotel, Taipei, Taiwan August 18-
21.
[2]. Asaad M. J. Al-Hindawi, Ibraheem Talib, Experimentally Evaluation of
GPS/GSM Based System Design, Journal of Electronic Systems Volume 2
Number 2 June 2012
[3]. Chen Peijiang, Jiang Xuehua, Design and Implementation of Remote
monitoring system based on GSM, vol.42, pp.167-175. 2008.
[4]. V.Ramya, B. Palaniappan, K. Karthick, Embedded Controller for Vehicle In-
Front Obstacle Detection and Cabin Safety Alert System, International Journal of
Computer Science & Information Technology (IJCSIT) Vol 4, No 2, April 2012.

62

You might also like