In this project we are going to make an embedded system which will help to provide protection against theft. This system will send the data to the user who want to track the vehicle showing the using position of vehicle in terms of latitude and longitude. Most of the people know that GPS is more secure but they don’t apply because it is expensive. This design is needed for the real time location of the vehicle. It changes the microcontroller P89V51RD2 interfaces with various hardware peripheries this uncontrolled interfaces serially with GSM modem and GPS receiver.
This project is about tracking system that tracks vehicle using gps and gsm/gprs. Also, it displays information for user interface using web and mobile application.Beside that it displays information on lcd as a form of public notice board too.
This is used to track the exact location of a vehicle using GPS tracking systems and give information about the position to concerned person through GSM via SMS.
Fnal year project on iot accident detection and tracking system 26-may 21'ankitadeokate
This presentation is based upon final year project supervised under the premises of cummins college of engineering for women, pune, on IoT based Accident Detection & Tracking System and also contributing towards smart healthcare sector, by initiating theologies of research or the ways of research can be taken out in this area aswell, to make this system further more intelligent on predictions conducted from the studies of statistics and machine learning, to automate this research from data log and system can be made smart supervisory, to contribute towards smart healthcare sector.
smart city - smart healthcare sector- industry 4.0
This project is about tracking system that tracks vehicle using gps and gsm/gprs. Also, it displays information for user interface using web and mobile application.Beside that it displays information on lcd as a form of public notice board too.
This is used to track the exact location of a vehicle using GPS tracking systems and give information about the position to concerned person through GSM via SMS.
Fnal year project on iot accident detection and tracking system 26-may 21'ankitadeokate
This presentation is based upon final year project supervised under the premises of cummins college of engineering for women, pune, on IoT based Accident Detection & Tracking System and also contributing towards smart healthcare sector, by initiating theologies of research or the ways of research can be taken out in this area aswell, to make this system further more intelligent on predictions conducted from the studies of statistics and machine learning, to automate this research from data log and system can be made smart supervisory, to contribute towards smart healthcare sector.
smart city - smart healthcare sector- industry 4.0
The main objective of our project is to provide an optimum solution to the traffic hazards and the road accidents. According to this project when a vehicle meets with an accident, immediately vibration sensor will detect the signal and sends it to ARM controller. Microcontroller sends the alert message through the GSM MODEM including the location to police control room or a rescue team. So the police can immediately trace the location through the GPS MODEM after receiving the information.
Vehicle anti theft tracking system based on internet of things Jyothsna Sridhar
As the number of urban vehicles are growing rapidly vehicle theft has become an important concern for all vehicle owners.
However present anti theft system lacks the tracking and monitoring system.
The vehicle anti theft tracking System based on Internet of things is proposed which can provide all round service to car owners.
Real Time Vehicle Monitoring Using Raspberry Pi Albin George
An advanced vehicle monitoring and tracking system based on Embedded Linux Board and android application is designed and implemented for monitoring the school vehicle from any location A to location B at real time. The proposed system would make good use of new technology that based on Embedded Linux board namely Raspberry Pi and Smartphone android application. The proposed system works on GPS/GPRS/GSM SIM900A Module which includes all the three things namely GPS GPRS GSM. The GPS current location of the vehicle; GPRS sends the tracking information to the server and the GSM is used for sending alert message to vehicle’s owner mobile. The proposed system would place inside the vehicle whose position is to be determined on the web page and monitored at real time. In the proposed system, there is comparison between the current vehicle path and already specified path into the file system of raspberry pi. Here in the proposed system the already specified path inside the raspberry pi’s file system taken from vehicle owner’s android smartphone using android application. Means the selection of path from location A to B takes place from vehicle owner’s android application which gives more safety and secures traveling to the traveler. Hence the driver drives the vehicle only on the vehicle owner’s specified path. If the driver drives the vehicle on the wrong path then the alert message will be sent from the proposed system to the vehicle’s owner mobile and also speakers alert driven using Raspberry pi’s audio jack. If the vehicle’s speed goes beyond the specified value of the speed, then also the warning message will be sent from system to the owner mobile. The proposed system also took care of the traveler’s safety by using LPG Gas leakage sensor MQ6 and temperature sensor DS18B20.
Vehicle tracking system using gps and google mapsanchit bhargava
This project describe how vehicle can be tracked through help of GPS (Global Positioning System) and then using Google Map we can easily put coordinates on the map to find exact locations. with that a software which monitoring every routine of vehicle.
Here we are making a project which just traces our vehicle location, in terms of its precise latitude and longitude and then send it to a mobile number (as per our requirement). This project consists of three main devices which are :- (i) Arduino UNO, (ii) GPS module (Neo-6M), & (iii) GSM- 900A.These all three devices will be going to be installed in the vehicle to which we want to trace. Initially what happened that we make a program in arduino (in C language) regarding interfacing the GSM device and GPS device. And we also set a mobile number in the program as per our need, on which we get the info regarding its (vehicle’s) location. First of all we make a call to the mobile number which has been installed in the GSM module and then after some specific delay (as per mentioned in the program) we get a sms regarding the exact latitude and longitude of the vehicle. It is done in a way that GPS device is continuously receiving the location of the vehicle from the satellite and then transferring to the arduino board, from where we send it to the required mobile no. And hence in this way we can easily get info regarding the exact location of the vehicle. Once the message has been sent to the predefined mobile no. the GSM gets deactivated and the GPS gets activated. Thus we can easily trace our vehicle. 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. 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 theft prevention and retrieval device.
here we controller an robot car through the internet using wifi module connected to the microcontroller, that sends the data and receives the data according to data the car movies and the car has been attached a camera which is used to record videos or take pictures or live streaming
The main objective of our project is to provide an optimum solution to the traffic hazards and the road accidents. According to this project when a vehicle meets with an accident, immediately vibration sensor will detect the signal and sends it to ARM controller. Microcontroller sends the alert message through the GSM MODEM including the location to police control room or a rescue team. So the police can immediately trace the location through the GPS MODEM after receiving the information.
Vehicle anti theft tracking system based on internet of things Jyothsna Sridhar
As the number of urban vehicles are growing rapidly vehicle theft has become an important concern for all vehicle owners.
However present anti theft system lacks the tracking and monitoring system.
The vehicle anti theft tracking System based on Internet of things is proposed which can provide all round service to car owners.
Real Time Vehicle Monitoring Using Raspberry Pi Albin George
An advanced vehicle monitoring and tracking system based on Embedded Linux Board and android application is designed and implemented for monitoring the school vehicle from any location A to location B at real time. The proposed system would make good use of new technology that based on Embedded Linux board namely Raspberry Pi and Smartphone android application. The proposed system works on GPS/GPRS/GSM SIM900A Module which includes all the three things namely GPS GPRS GSM. The GPS current location of the vehicle; GPRS sends the tracking information to the server and the GSM is used for sending alert message to vehicle’s owner mobile. The proposed system would place inside the vehicle whose position is to be determined on the web page and monitored at real time. In the proposed system, there is comparison between the current vehicle path and already specified path into the file system of raspberry pi. Here in the proposed system the already specified path inside the raspberry pi’s file system taken from vehicle owner’s android smartphone using android application. Means the selection of path from location A to B takes place from vehicle owner’s android application which gives more safety and secures traveling to the traveler. Hence the driver drives the vehicle only on the vehicle owner’s specified path. If the driver drives the vehicle on the wrong path then the alert message will be sent from the proposed system to the vehicle’s owner mobile and also speakers alert driven using Raspberry pi’s audio jack. If the vehicle’s speed goes beyond the specified value of the speed, then also the warning message will be sent from system to the owner mobile. The proposed system also took care of the traveler’s safety by using LPG Gas leakage sensor MQ6 and temperature sensor DS18B20.
Vehicle tracking system using gps and google mapsanchit bhargava
This project describe how vehicle can be tracked through help of GPS (Global Positioning System) and then using Google Map we can easily put coordinates on the map to find exact locations. with that a software which monitoring every routine of vehicle.
Here we are making a project which just traces our vehicle location, in terms of its precise latitude and longitude and then send it to a mobile number (as per our requirement). This project consists of three main devices which are :- (i) Arduino UNO, (ii) GPS module (Neo-6M), & (iii) GSM- 900A.These all three devices will be going to be installed in the vehicle to which we want to trace. Initially what happened that we make a program in arduino (in C language) regarding interfacing the GSM device and GPS device. And we also set a mobile number in the program as per our need, on which we get the info regarding its (vehicle’s) location. First of all we make a call to the mobile number which has been installed in the GSM module and then after some specific delay (as per mentioned in the program) we get a sms regarding the exact latitude and longitude of the vehicle. It is done in a way that GPS device is continuously receiving the location of the vehicle from the satellite and then transferring to the arduino board, from where we send it to the required mobile no. And hence in this way we can easily get info regarding the exact location of the vehicle. Once the message has been sent to the predefined mobile no. the GSM gets deactivated and the GPS gets activated. Thus we can easily trace our vehicle. 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. 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 theft prevention and retrieval device.
here we controller an robot car through the internet using wifi module connected to the microcontroller, that sends the data and receives the data according to data the car movies and the car has been attached a camera which is used to record videos or take pictures or live streaming
ENERGY GENERATION FROM PIEZO ELECTRIC MATERIAL FOR AN OPEN TRAFFIC CONTROL MO...ijiert bestjournal
In this paper,the embedded board with interface mo dule to implement a traffic control system. The proposed model uses an embedded board to replace a manual operation,since the embedded board has the advantage of being easily carried,a real-time operation,a low cost,and programmable. In additio n users can operate this measurement system with the help of the operating system andthe GPS modules to connect to the Internet. The design provides the step by step function to he lp user operate,such as traffic flow information b y using embedded measurement system. This design can also show the traffic flow detailsin LCM (Liquid Crystal Monitor). GPS is mainly used to identify th e vehicle state information. Vehicle state informat ion will be send to control section and based on the in formation traffic light phase is changed according to the traffic by LABVIEW.Piezoelectric crystals are u sed to generate electrical energy for traffic light signals by applying mechanical vibration. Piezoelec tric effect is used to generate the electrical ener gy. This system can be mainly used for real time applic ations.
A proposed model for traffic signal preemption using global positioning syste...csandit
A Traffic Signal Preemption system is an automated system that allows normal operation of
traffic lights at automated signalized intersections to be preempted. Preemption of signals is
generally done to assist emergency vehicles, such as ambulances, so that response times are
reduced and right-of-way is provided in a smooth and controlled manner. This paper proposes
an innovative and cost-effective server-centric model to facilitate preemption using a simple
mobile phone app which uses Global Positioning System (GPS) and a microcontroller which
controls traffic signals.
A PROPOSED MODEL FOR TRAFFIC SIGNAL PREEMPTION USING GLOBAL POSITIONING SYSTE...cscpconf
A Traffic Signal Preemption system is an automated system that allows normal operation of traffic lights at automated signalized intersections to be preempted. Preemption of signals is
generally done to assist emergency vehicles, such as ambulances, so that response times are reduced and right-of-way is provided in a smooth and controlled manner. This paper proposes an innovative and cost-effective server-centric model to facilitate preemption using a simple mobile phone app which uses Global Positioning System (GPS) and a microcontroller which controls traffic signals.
This article explains about development of Internet of Things (IoT) based decision support for vehicle drivers using GPS and GSM modules. This project is helpful to avoid the road accidents by maintaining the proper speed limit at different locations such as school zones, hospital regions and so on. Initially an admin database is created with a web server. The data base contains six parts such as S.No, longitude1, latitude1, longitude2, latitude2, speed limit. The web server has been implemented with a PHP page which provides a connection to the databases allowing web clients to send queries to data base. A PC application is distributed among local guides; they can provide speed limits of the allocated regions. A GPS receiver is used to provide the vehicle’s location and a GSM module is configured as GPRS to provide internet connection through mobile data. An Organic Light Emitting Diode (OLED) is used to display the speed limit of the vehicle’s location. Arduino UNO (At mega 328P) board is used to interface all the components. The instructions to the vehicle drivers are given by using OLED display when the location is tracked by GPRS, and also an alarm sounds at extreme conditions.
Cellphone based voting machine project reportDiLip ChauDhary
India is world’s largest democracy. Fundamental right to vote or simply voting in elections forms the basis of Indian democracy.
In India all earlier elections a voter used to cast his vote by using ballot paper. This is a long, time-consuming process and very much prone to errors.
This situation continued till election scene was completely changed by electronic voting machine. No more ballot paper, ballot boxes, stamping, etc. all this condensed into a simple box called ballot unit of the electronic voting machine.
Cell phone based voting machine is capable of saving considerable printing stationery and
transport of large volumes of electoral material. It is easy to transport, store, and maintain. It completely rules out the chance of invalid votes. Its use results in reduction of polling time, resulting in fewer problems in electoral preparations, law and order, candidates' expenditure, etc. and easy and accurate counting without any mischief at the counting centre.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
1. 1
REALTIME VEHICLE TRACKING SYSTEM
B. Tech. Project Report
BY
DILIP KUMAR CHAUDHARY
Roll No.- 100103103
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING
SHARDA UNIVERSITY, GREATER NOIDA
Uttar Pradesh-201306 (INDIA)
MAY, 2014
2. 2
CHAPTER 1
INTRODUCTION
1.1 VEHICLE TRACKING SYSTEM
A vehicle tracking system combines the use of automatic vehicle location in
individual vehicles with software that collects these fleet data for a comprehensive
picture of vehicle locations. Modern vehicle tracking systems commonly
use GPS technology for locating the vehicle, but other types of automatic vehicle
location technology can also be used. Vehicle information can be viewed on electronic
maps via the Internet or specialized software.
1.1.1 Working
This project is based on vehicle tracking and positioning in which we locate our vehicle in
globe with mean see level as a reference. This is done with the help of Microcontroller 8051,
GPS receiver, GSM modem, MAX 232. The instruction is written in the internal memory of
Microcontroller (ROM). With the help of the information it processes the data and act to it
accordingly as it interfaces with GPS and GSM. There is a serial communication of 8051.
Here GPS act as a receiver as it receive the data and GSM transmits and receives the data.
GPS pin transmitter is connected to Microcontroller via MAX232. Pins of GSM transmitter
and receiver are connected to serial ports of microcontroller.
Microcontroller will take the data from the GPS receiver and then send information to the
user in the form of coordinates on the LCD with the help of GSM modem. GPS values of all
the satellite are send to the microcontroller P89V51RD2 which are processed and forwarded
to GSM module. At the time of processing GPS receives only GPGGA values only. Out of
these values microcontroller takes only latitude and longitude values excluding time,
altitude, name of satellite, authentication etc. E.g. LAT: 1728:2470 LOG: 7843.3089
3. 3
1.1.2 Block Diagram
Fig 1.1- Block diagram of working
1.2 Working process
Developing Automatic Vehicle Location system using GPS for positioning information
and GSM/GPRS or information transmission with following features:
Acquisition of vehicle’s location information ( latitude & longitude) after specified time
interval.
Transmission of vehicle’s location and other information to the monitoring
station/Tracking server after specified interval of time.
Developing a web based software to display all transmitted information to end user along
with displaying location of vehicle on a map.
Overall system is partitioned into two major design units.
In-Vehicle unit.
Tracking, Server/Monitoring Station.
1.2.1 In-Vehicle Unit
This is major part of the system and it will be installed into the vehicle. It is responsible
for capturing the following information for the vehicle
Current location of In-vehicle unit is also responsible for transmitting this information to
Tracking Server located anywhere in the world.
4. 4
Fig 1.2- In-vehicle Unit of VTS
1.2.2 Data Transreceiver
When all required information is extracted and processed, it needs to be transmitted to a
remote Tracking Server which will be able to display this information to the end user. For
real time tracking of vehicle, reliable data transmission to remote server is very
important. Wireless network is required to transmit vehicle information to remote server.
Existing GSM network is selected to transmit vehicle information to remote server
because of broad coverage of GSM network. For data transmission over GSM network
GSM modem is required. GSM modem can send and receive data SMS text messages
and GPRS data over GSM network. Location data is transferred to microcontroller
through serial interface. After processing of the data provided by GPS receiver,
microcontroller transmits this information to remote location using GSM/GPRS modem.
Microcontroller controls the operation of GSM/GPRS modem through serial interface
using AT commands.
1.2.2.1 Software flow
Microcontroller is acting as Central Processing Unit for In-Vehicle unit. Microcontroller
needs instructions to operate the whole system. These instructions are provided to
microcontroller by writing the software into microcontroller’s flash memory. It reads the
software instruction by instruction and performs the action.
1.2.2.2 Tracking Server
Tracking server maintains all information received from all In-Vehicle units installed in
different vehicles into a central database. This database is accessible from internet to
authorized users through a web interface. Authorized users can track their vehicle and
5. 5
view all previous information stored in database. Tracking server has a GSM/GPRS
modem attached to it that receives SMS from In-Vehicle units and sends those messages
to the server through serial port. Tracking server saves this information into database.
Fig 1.3- Tracking server unit
Design of Tracking Server is partitioned into four major parts.
( i ) Web Interface
( ii ) Database
( iii ) Communication Software
( iv ) Hardware design
1.3 Web Interface Design
Tracking Server maintains all information in a database. To display this information to
users front end software is required that can display all information to the user. The
system is being installed the In-Vehicle unit in his vehicle and also the administrator of
the system who is managing Vehicle Tracking System. There may be a number of
vehicles installed with In-Vehicle units therefore server must be able to manage and
distinguish information sent by all In-Vehicle units. For this purpose information must be
available to server about all vehicles that are installed with In-Vehicle units. Whenever
In-Vehicle unit is installed, information about that vehicle is stored in the database. Web
interface must also support this functionality. Since web interface will be accessible over
the internet therefore access must be restricted to authorized users only. Therefore
information about all users of the system must be stored in database.
1.4 Database Design
Database is designed to store all received vehicle information, information about In-
Vehicle units and users of the system. Information to be stored in the database is
6. 6
Information about users of the system.
Information about vehicles.
Information about received from vehicles.
1.5 Design of Communication Software
The software that is to be designed will provide communication interface to the GSM
modem attached to computers serial port. It will control the operations of GSM.
This software must be able to support following functions
Configuration of GSM for sending and receiving SMS.
Processing received SMS and saving information into database.
Sending SMS to in vehicle unit as required by user.
Exchanging information with In-Vehicle units through internet.
Main program listens for SMS and handles all communication with In-Vehicle units
using SMS.
1.6 Application
Better way to track an individual vehicle.
Theft protection.
Historical Report.
Real time alert.
Manages the route.
School vehicle tracking.
Police department tracking.
Industrial Transport tracking.
Defense service.
Airlines services.
Transport service.
7. 7
CHAPTER 2
POWER SUPPLY
2.1 INTRODUCTION
These days almost all the electronic equipments include a circuit that converts AC supply
into DC supply. The part of equipment that converts AC into DC is known as AC to DC
converter. In general, at the input of the power supply is a transformer. It is followed by
a rectifier, a smoothing filter and then by a voltage regulator circuit.
2.2 COMPONENTS OF POWER SUPPLY
Power supply consists of four components:-
(i) Step-Down Transformer
(ii) Rectifier
(iii) Filter
(iv) Voltage Regulator
Block diagram of such a supply is shown below:-
Fig. 2.1 Block diagram of Power Circuit
2.2.1 Step Down Transformer
A transformer in which the output (secondary) voltage is less than the input (primary)
voltage is called step down transformer. Alternating current is passed through the primary
coil which creates the changing magnetic field in iron core. The changing magnetic field
then induces alternating current of the same frequency in the secondary coil (the output).
A step down transformer has more turns of wire on the primary coil than in secondary
coil which makes a smaller induced voltage in the secondary coil.
The transformer equation relates the number of turns of wire to the difference in voltage
between the primary and secondary coils.
Vp
/Vs = Np
/Ns ...(2.1)
TRANSFORME
R
VOLTAGE
REGULATO
R
RECTIFIER FILTER
8. 8
Vp is the voltage in the primary coil.
Vs is the voltage in the secondary coil.
Np is the number of turns of wire on the primary coil.
Ns is the number of turns of wire on the secondary coil.
2.2.2 Rectifier
Rectifier is defined as an electronic device used for converting A.C voltage into
unidirectional voltage. A rectifier utilizes unidirectional conduction device like P-N
junction diode.
There are three types of rectifier:-
a. Half wave rectifier.
b. Full wave center tap rectifier.
c. Full wave bridge rectifier.
2.2.3 Filter
The output from any of the rectifier circuits is not purely D.C but also has some A.C
components, called ripples, along it. Therefore such supply is not useful for driving
sophisticated electronic devices/circuits. Hence, it becomes essential to reduce the ripples
from the pulsating D.C supply available from rectifier circuits to the minimum. This is
achieved by using a filter or smoothing circuit which removes the A.C components and
allows only the D.C component to reach the load. A filter circuit should be placed
between the rectifier and the load.
2.2.4 Voltage Regulator
Voltage Regulator (regulator), usually having three legs, converts varying input voltage
and produces a constant regulated output voltage.
7805 voltage regulator has three pins:-
a. Input:- For 7805 the rectified and filtered voltage coming at this pin must be
between 8 to 18V in order to get stable 5V DC output at the output pin.
b. b. Ground:- This pin is connected to the ground of the circuit to which this 5V
DC supply is provided.
c. Output:- If the input voltage at input pin is between 8-18V then at the output
pin a stable 5V DC voltage will be available. 7805 can give +5V output at about
9. 9
150 mA current, but it can be increased to 1A when good cooling is added to
7805 regulator chi
INPUT O OUTPUT
GND
Fig. 2.2 Pin configuration
2.3 5V DC POWER SUPPLY USING FULL WAVE CENTER TAP
RECTIFIER
The transformer supplies the source voltage for two diode rectifiers, D1 and D2. This
transformer has a center-tapped, low-voltage secondary winding that is divided into two
equal parts (W1 and W2). W1 provides the source voltage for D1, and W2 provides the
source voltage for D2. The connections to the diodes are arranged so that the diodes
conduct on alternate half cycles. When the center tap is grounded, the voltages at the
opposite ends of the secondary windings are 180 degrees out of phase with each other.
Thus, when the voltage at point A is positive with respect to ground, the voltage at point
B is negative with respect to ground. Let's examine the operation of the circuit during one
complete cycle.
During the first half cycle (indicated by the solid arrows), the anode of D1 is positive
with respect to ground and the anode of D2 is negative. As shown, current flows from
ground (center tap) to point A, through diode D1 to point B and to point D. When D1
conducts, it acts like a closed switch so that the positive half cycle is felt across the load
(RL).
During the second half cycle (indicated by the dotted lines), the polarity of the applied
voltage has reversed. Now the anode of D2 is positive with respect to ground and the
anode of D1 is negative. Now only D2 can conduct. Current now flows, as shown, from
point C to point B through diode D2 then to point F and back to point D.
7805
10. 10
Now during both the cycles the capacitor C1 quickly charges to the peak voltage but
when the input voltage becomes less than peak voltage the capacitor discharges through
load resistance and loses charge. But because of large load resistance the discharging
time is large and hence capacitor does not have sufficient time to discharge appreciably.
Due to this the capacitor maintains a sufficiently large voltage across the load.
Fig. 2.3 Centre-tap full-wave rectifier
The voltage across the capacitor is applied to 7805 voltage regulator which provides a
constant 5V D.C. voltage at its output.
Fig. 2.4 Output waveforms of centre-tap full-wave rectifier
12. 12
CHAPTER 3
SERIAL COMMUNICATIO USING RS-232 & MAX-232
3.1 Introduction
Serial communication is often used either to control or to receive data from an embedded
microprocessor. Serial communication is a form of I/O in which the bits of a byte begin
transferred appear one after the other in a timed sequence on a single wire. Serial
communication has become the standard for inter-computer communication.
3.1.1 RS-232
IBM introduced the DB-9 RS-232 version of serial I/O standard, which is most widely
used in PCs and several devices. In RS232, high and low bits are represented by flowing
voltage ranges:
Bit Voltage range ( in V )
0 +3 +25
1 -25 -3
Table No. 3.1- Voltage Range
The range -3V to +3V is undefined. The TTL standards came a long time after the RS232
standard was set. Due to this reason RS232 voltage levels are not compatible with TTL
logic. Therefore, while connecting an RS232 to microcontroller system, a voltage
converter is required. This converter converts the microcontroller output level to the
RS232 voltage levels, and vice versa. IC MAX232, also known as line driver, is very
commonly used for this purpose.
The simplest connection between a PC and microcontroller requires a minimum of three
pins, RxD (receiver, pin2), TxD (transmitter, pin3) and ground (pin5) of the serial port of
computer.
13. 13
Fig. 3.1 RS-232
3.1.1.1 Pin Description RS-232
Pin Signal Pin Signal
1 Data Carrier Detect 6 Data Set Ready
2 Received Data 7 Request to Send
3 Transmitted Data 8 Clear to Send
4 Data Terminal Ready 9 RingIndicator
5 Signal Ground
Table No. 3.2- Pin Description of RS-232
Fig. 3.2 USB to SERIAL cable
3.1.2 MAX-232
The MAX 232 device is a dual driver/receiver that includes a capacitive voltage
generator to supply EIA-232 voltage levels from a single 5V supply. The voltage level
14. 14
in the RS232 bus is about 30V. Each receiver converts EIA-232 inputs to 5V TTL/CMOS
levels. These receivers have a typical threshold of 1.3V and a typical hysteresis of 0.5 V,
and can accept ±30V inputs. Each driver converts TTL/CMOS input levels into EIA-232
levels. It is used in battery-powered systems, Terminals, modems, computer and many
other applications.
Fig. 3.3 MAX-232
3.1.2.1 Pin description of MAX-232
Pin No. Function Name
1 Capacitor connection pins Capacitor 1 +
2 Capacitor 3 +
3 Capacitor 1 -
4 Capacitor 2 +
5 Capacitor 2 -
6 Capacitor 4 -
7 Output pin; outputs the serially transmitted data at RS232 logic
level; connected to receiver pin of PC serial port
T2 Out
8 Input pin; receives serially transmitted data at RS 232 logic
level; connected to transmitter pin of PC serial port
R2 In
9 Output pin; outputs the serially transmitted data at TTL logic
level; connected to receiver pin of controller.
R2 Out
10 Input pins; receive the serial data at TTL logic level; connected T2 In
15. 15
11 to serial transmitter pin of controller. T1 In
12 Output pin; outputs the serially transmitted data at TTL logic
level; connected to receiver pin of controller
R1 Out
13 Input pin; receives serially transmitted data at RS 232 logic
level; connected to transmitter pin of PC serial port
R1 In
14 Output pin; outputs the serially transmitted data at RS232 logic
level; connected to receiver pin of PC serial port
T1 Out
15 Ground (0V) Ground
16 Supply voltage; 5V (4.5V – 5.5V) Vcc
Table No.3.3- Description of Pin Diagram of MAX232
3.2 Serial Communication
TxD pin of serial port connects to RxD pin of controller via MAX232. And similarly,
RxD pin of serial port connects to the TxD pin of controller through MAX232.
MAX232 has two sets of line drivers for transferring and receiving data. The line drivers
used for transmission are called T1 and T2, where as the line drivers for receiver are
designated as R1 and R2. The connection of MAX232 with computer and the controller
is shown in the circuit diagram.
The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels
during serial communication of microcontrollers with PC. The controller operates at TTL
logic level (0-5V) whereas the serial communication in PC works on RS232 standards (-
25 V to + 25V). This makes it difficult to establish a direct link between them to
communicate with each other.
The intermediate link is provided through MAX232. It is a dual driver/receiver that
includes a capacitive voltage generator to supply RS232 voltage levels from a single 5V
supply. Each receiver converts RS232 inputs to 5V TTL/CMOS levels. These receivers
(R1 & R2) can accept ±30V inputs. The drivers (T1 & T2), also called transmitters,
convert the TTL/CMOS input level into RS232 level.
The transmitters take input from controller’s serial transmission pin and send the output
to RS232’s receiver. The receivers, on the other hand, take input from transmission pin of
RS232 serial port and give serial output to microcontroller’s receiver pin. MAX232 needs
four external capacitors whose value ranges from 1µF to 22µF.
16. 16
Fig. 3.4Connection between RS232 & Microcontroller
An important parameter considered while interfacing serial port is the Baud rate which is
the speed at which data is transmitted serially. It is defined as number of bits transmitted
or received per second. It is generally expressed in bps (bits per second). AT89C51
microcontroller can be set to transfer and receive serial data at different baud rates using
software instructions. Timer1 is used to set the baud rate of serial communication for the
microcontroller. For this purpose, Timer1 is used in mode2 which is an 8-bit auto reload
mode.
To get baud rates compatible with the PC, TH1 should be loaded with the values as
shown:
Baud Rate ( bps ) TH1 ( Hex Value )
9600 FD
4800 FA
2400 F4
1200 E8
Table No. 3.4 - TH1 Values
In this project baud rate 9600bps is used.
For serial communication P89v51RD2 has registers SBUF and SCON (Serial control
register). SBUF is an 8-bit register. For transmitting a data byte serially, it needs to be
placed in the SBUF register. Similarly whenever a data byte is received serially, it comes
in the SBUF register, i.e., SBUF register should be read to receive the serial byte.
17. 17
3.2.1 SCON (Serial Control) Register
SCON register is used to set the mode of serial communication. The project uses
Mode1,in which the data length is of 8 bits and there is a start and a stop bit. The SCON
register is bit addressable register. The following table shows the configuration of each
bit
SM0 SM1 SM2 REN TB8 RB8 TI RI
D7 D6 D5 D4 D3 D2 D1 D0
Table No.3.5-SCON Register Values
SM0 SM1 Mode
0 0 Serial Mode 0
0 1 Serial Mode 1, 8 bit Data, 1 start bit, 1 stop bit.
1 0 Serial Mode 2
1 1 Serial Mode 3
Table No.3.6- Serial Mode
TI (transmit interrupt):
It is an important flag bit in the SCON register. The controller raises the TI flag when the
8-bit character is transferred. This indicates that the next byte can be transferred now. The
TI bit is raised at the beginning of the stop bit.
RI (receive interrupt):
It is also a flag bit of the SCON register. On receiving the serial data, the microcontroller
skips the start and stop bits, and puts the byte is SBUF register. The RI flag bit is then
raised to indicate that the byte has been received and should be picked up.
3.3 HyperTerminal
Hyper Terminal, a Windows XP application, can be used to receive or transmit serial data
through RS232. To open Hyper Terminal, go to Start Menu, select all programs, go to
Accessories, click on Communications and select Hyper Terminal.
To start a new connection, go to File menu and click on new connection. The connection
window opens up. Give a name to your connection and select 1st
icon and click on OK.
18. 18
Connection property window opens here. Select Bit rate as 9600bps, Data bits 8, Parity as
none, Stop bit 1, Flow control none and click OK. Now the serial data can be read on
hyper terminal.
In program, Timer1 is used with auto reload setting. The baud rate is fixed to 9600bps by
loading TH1 to 0xFD. The value 0x50 is loaded in the SCON register. This will initialize
the serial port in Mode1. The program continuously receives a character (say “Sharda
University”) from the serial port of the computer and transmits it back.
Fig. 3.5 HperTerminal
19. 19
CHAPTER 4
GPS MODULE INTERFACING
4.1 GPS (Global Positioning System)
GPS (Global Position System) is a space based satellite navigation system that provides
the location and time of a person or vehicle or any devices in every weather and
anywhere on the earth 24hours a day. The GPS receiver will receive the signal
information from the GPS satellite and with the help of triangulation; the exact location
of the vehicle is traced.
Fig. 4.1 GPS module
4.2 Interfacing GPS
Fig. 4.2 shows how to interface the GPS with microcontroller. The GPS module
continuously transmits serial data (RS232 protocol) in the form of sentences according to
NMEA standards. The latitude and longitude values of the location are contained in the
GPGGA sentence (refer NMEA format).To communicate over UART or USART, we
just need three basic signals which are namely, RXD (receive), TXD (transmit), GND
(common ground). So to interface UART with 8051, we just need the basic signals.
20. 20
Fig. 4.2 Interfacing GPS to Microcontroller
4.2.1 Interfacing GPS with 8051
We now want to receive data from satellite to 8051 Primer Board by using GPS module
through UART0. The serial data is taken from the GPS module through MAX232 into
the SBUF register of 8051 microcontroller (refer serial interfacing with 8051). The serial
data from the GPS receiver is taken by using the Serial Interrupt of the controller. This
data consists of a sequence of NMEA sentences from which GPGGA sentence is
identified and processed.
Fig. 4.3Circuit Diagram to Interface GPS with 8051
21. 21
4.3 Source Code
The first six bytes of the data received are compared with the pre-stored string and if
matched then only data is further accounted for; otherwise the process is repeated again.
From the comma delimited GPGGA sentence, latitude and longitude positions are
extracted by finding the respective comma positions and extracting the data.
3.4 Compilation of Code
To compile the above C code we use the KEIL software. We properly set up the KIEL
and we correctly set the project to proper compilation of the code. To compile the above
code, 1st
we had created Hex file fro the C file and then added it to the project.
3.5 Testing of GPS
To test GPS we connected GPS modem to the PC through USB to SERIAL cable with
the help of RS-232. Then we open the Hyper Terminal screen, select which port we are
using and set the default settings. Now the screen shows some text messages.
22. 22
CHAPTER 5
GSM MODULE Interfacing
5.1 GSM (Global System for Mobile Communication)
A GSM modem is a special type of modem which accepts a SIM card, and operates over
a subscription to a mobile operator, just like a mobile phone. GSM (Global system for
mobile) uses a process called circuit switching. This method of communication allows a
path to be established between two devices. Once the two devices are connected, a
constant stream of digital data is relayed.
Fig. 5.1 GSM Module.
5.1.1 Features of GSM
Quad Band GSM/GPRS : 850 / 900 / 1800 / 1900 MHz
Built in RS232 to TTL or viceversa Logic Converter (MAX232)
Configurable Baud Rate
SMA (Sub Miniature version A) connector with GSM L Type Antenna
Built in SIM (Subscriber Identity Module) Card holder
Built in Network Status LED
Inbuilt Powerful TCP / IP (Transfer Control Protocol / Internet Protocol) stack for
internet data transfer through GPRS (General Packet Radio Service)
Audio Interface Connectors (Audio in and Audio out)
Most Status and Controlling pins are available
Normal Operation Temperature : -20 °C to +55 °C
Input Voltage : 5V to 12V DC
LDB9 connector (Serial Port) provided for easy interfacing
23. 23
Fig. 5.2 GSM Component Description.
5.2 Interfacing GPS
Fig. 5.3 shows how to interface the GSM with microcontroller. The GSM module is
communicate the microcontroller with mobile phones through UART. To communicate
over UART or USART, we just need three basic signals which are namely, RXD
(receive), TXD (transmit), GND (common ground).
GSM modem interfacing with microcontroller for SMS control of industrial equipments.
The sending SMS through GSM modem when interfaced with microcontroller or PC is
much simpler as compared with sending SMS through UART. Text message may be sent
through the modem by interfacing only three signals of the serial interface of modem
with microcontroller i.e., TxD, RxD and GND. The transmit signal of serial port of
microcontroller is connected with receive signal (RxD) of the serial interface of GSM
Modem while receive signal of microcontroller serial port is connected with transmite
signal (TxD) of serial interface of GSM Modem.
The SMS message in text mode can contain only 140 characters at the most. It depends
upon the amount of information collected from GPS Engine that you need at the base
station for tracking vehicle or person.
24. 24
Fig. 5.3 Interfacing GSM to Microcontroller
5.2.1 Interfacing GSM with 8051
We now want to display a text in mobile from 8051 by using GSM module through
UART. 8051 contains two serial interfaces that are UART0 & UART1. Here we are
using UART0. The GSM modem is being interfaced with the microcontroller 8051 for
SMS communication. The SMS can be sending and receiving for the data sharing and
situation information and control.
Fig. 5.4 Circuit Diagram to Interface GSM with 8051
5.3 AT Commands
The following Commands and sequence of events performed for sending text message to
a mobile phone through GSM Modem interfaced with microcontroller:
25. 25
1. First select the text mode for SMS by sending the following AT Command to
GSM Modem : AT+CMGF = 1 . This command configures the GSM modem in
text mode.
2. Send the following AT Command for sending SMS message in text mode along
with mobile number to the GSM Modem : AT+CMGS =+923005281046 . This
command sends the mobile number of the recipient mobile to the GSM modem.
3. Send the text message string ("GSM Modem Test") to the GSM Modem This is a
test message from UART".
4. Send ASCII code for CTRL+Z i.e., 0x1A to GSM Modem to transmit the
message to mobile phone. After message string has been sent to the modem, send
CTRL+Z to the micro-controller, which is equivalent to 0x1A (ASCII value).
26. 26
CHAPTER 6
MICROCONTROLLER P89V51RD2
6.1 INTRODUCTION
The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and 1024 bytes of data
RAM. A key feature of the P89V51RD2 is its X2 mode option. The design engineer can
choose to run the application with the conventional 80C51 clock rate (12 clocks per
machine cycle) or select the X2 mode (6 clocks per machine cycle) to achieve twice the
throughput at the same clock frequency. Another way to benefit from this feature is to
keep the same performance by reducing the clock frequency by half, thus dramatically
reducing the EMI. The Flash program memory supports both parallel programming and
in serial In-System Programming (ISP). Parallel programming mode offers gang-
programming at high speed, reducing programming costs and time to market. ISP allows
a device to be reprogrammed in the end product under software control. The capability to
field/update the application firmware makes a wide range of applications possible. The
P89V51RD2 is also In-Application Programmable (IAP), allowing the Flash program
memory to be reconfigured even while the application is running.
6.2 FEATURES
80C51 Central Processing Unit
5 V Operating voltage from 0 to 40 MHz
64 kB of on-chip Flash program memory with ISP (In-System Programming) and
IAP (In-Application Programming)
Supports 12-clock (default) or 6-clock mode selection via software or ISP
SPI (Serial Peripheral Interface) and enhanced UART
PCA (Programmable Counter Array) with PWM and Capture/Compare functions
Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each)
Three 16-bit timers/counters
Programmable Watchdog timer (WDT)
Eight interrupt sources with four priority levels
Second DPTR register
Low EMI mode (ALE inhibit)
27. 27
TTL- and CMOS-compatible logic levels
Brown-out detection
Low power modes
Power-down mode with external interrupt wake-up
Idle mode
6.3 BLOCK DIAGRA
Figure 6.1 Architecture of P89V51
6.4 PIN DESCRIPTION
Figure 6.2 Pin Diagram of P89V51
28. 28
VDD Supply voltage.
VSS Ground.
Port 0
Port 0 is an 8-bit open drain bi-directional I/O port. Port 0 pins that have ‘1’s written to
them float, and in this state can be used as high-impedance inputs. Port 0 is also the
multiplexed low-order address and data bus during accesses to external code and data
memory. In this application, it uses strong internal pull-ups when transitioning to ‘1’s.
Port 0 also receives the code bytes during the external host mode programming, and
outputs the code bytes during the external host mode verification. External pull-ups are
required during program verification or as a general purpose I/O port.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 pins are pulled
high by the internal pull-ups when ‘1’s are written to them and can be used as inputs in
this state. As inputs, Port 1 pins that are externally pulled LOW will source current (IIL)
because of the internal pull-ups. P1.5, P1.6, P1.7 have high current drive of 16 mA. Port
1 also receives the low-order address bytes during the external host mode programming
and verification.
Table 6.1 Alternate function of Port-1
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. Port 2 pins are pulled
HIGH by the internal pull-ups when ‘1’s are written to them and can be used as inputs in
this state. As inputs, Port 2 pins that are externally pulled LOW will source current (IIL)
because of the internal pull-ups. Port 2 sends the high-order address byte during fetches
from external program memory and during accesses to external Data Memory that use
16-bit address (MOVX@DPTR). In this application, it uses strong internal pull-ups when
29. 29
transitioning to ‘1’s. Port 2 also receives some control signals and a partial of high-order
address bits during the external host mode programming and verification.
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3 pins are pulled
HIGH by the internal pull-ups when ‘1’s are written to them and can be used as inputs in
this state. As inputs, Port 3 pins that are externally pulled LOW will source current (IIL)
because of the internal pull-ups. Port 3 also receives some control signals and a partial of
high-order address bits during the external host mode programming and verification.
Table 6.2 Alternate Function of Port-3
RXD: serial input port
TXD: serial output port
INT0: external interrupt 0 input
INT1: external interrupt 1 input
T0: external count input to Timer/Counter 0
T1: external count input to Timer/Counter 1
WR: external data memory write strobe
RD: external data memory read strobe
Program Store Enable: PSEN is the read strobe for external program memory.
When the device is executing from internal program memory, PSEN is inactive (HIGH).
When the device is executing code from external program memory, PSEN is activated
twice each machine cycle, except that two PSEN activations are skipped during each
30. 30
access to external data memory. A forced HIGH-to-LOW input transition on the PSEN
pin while the RST input is continually held HIGH for more than 10 machine cycles will
cause the device to enter external host mode programming.
Reset:
While the oscillator is running, a HIGH logic state on this pin for two machine cycles
will reset the device. If the PSEN pin is driven by a HIGH-to-LOW input transition while
the RST input pin is held HIGH, the device will enter the external host mode, otherwise
the device will enter the normal operation mode.
Figure 6.3 Reset Circuit
External Access Enable:
EA must be connected to VSS in order to enable the device to fetch code from the
external program memory. EA must be strapped to VDD for internal program execution.
However, Security lock level 4 will disable EA, and program execution is only possible
from internal program memory. The EA pin can tolerate a high voltage of 12 V.
Address Latch Enable:
ALE is the output signal for latching the low byte of the address during an access to
external memory. This pin is also the programming pulse input (PROG) for flash
programming. Normally the ALE is emitted at a constant rate of 1¤6 the crystal
frequency and an be used for external timing and clocking. One ALE pulse is skipped
during each access to external data memory. However, if AO is set to ‘1’, ALE is
disabled.
Crystal 1:
Input to the inverting oscillator amplifier and input to the internal clock generator
circuits.
31. 31
Crystal 2:
Output from the inverting oscillator amplifier.
Figure 6.4 Oscillator Circuit
6.5 Functional Description
6.5.1 Memory organization
The device has separate address spaces for program and data memory.
6.5.1.1 Flash program memory
There are two internal flash memory blocks in the device. Block 0 has 64 kbytes and
contains the user’s code. Block 1 contains the Philips-provided ISP/IAP routines and may
be enabled such that it overlays the first 8 kbytes of the user code memory. The 64 kB
Block 0 is organized as 512 sectors, each sector consists of 128 bytes. Access to the IAP
routines may be enabled by clearing the BSEL bit in the FCF register. However, caution
must be taken when dynamically changing the BSEL bit. Since this will cause different
physical memory to be mapped to the logical program address space, the user must avoid
clearing the BSEL bit when executing user code within the address range 0000H to
1FFFH.
6.5.1.2 Data RAM memory
The data RAM has 1024 bytes of internal memory. The device can also address up to 64
kB for external data memory.
6.5.1.3 Expanded data RAM addressing
The P89V51RD2 has 1 kB of RAM.
The device has four sections of internal data memory:
1. The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly addressable.
32. 32
2. The higher 128 bytes of RAM (80H to FFH) are indirectly addressable.
3. The special function registers (80H to FFH) are directly addressable only.
4. The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable by the move
external instruction (MOVX) and clearing the EXTRAM bit Since the upper 128 bytes
occupy the same addresses as the SFRs, the RAM must be accessed indirectly. The RAM
and SFRs space are physically separate even though they have the same addresses.
6.5.2 Flash memory In-Application Programming
6.5.2.1 Flash organization
The P89V51RD2 program memory consists of a 64 kB block. An In-System
Programming (ISP) capability, in a second 8 kB block, is provided to allow the user code
to be programmed in-circuit through the serial port. There are three methods of erasing or
programming of the Flash memory that may be used. First, the Flash may be programmed
or erased in the end-user application by calling low-level routines through a common
entry point (IAP). Second, the on-chip ISP boot loader may be invoked. This ISP boot
loader will, in turn, call low-level routines through the same common entry point that can
be used by the end-user application. Third, the Flash may be programmed or erased using
the parallel method by using a commercially available EPROM programmer which
supports this device.
6.5.2.2 Boot block
When the microcontroller programs its own Flash memory, all of the low level details are
handled by code that is contained in a Boot block that is separate from the user Flash
memory. A user program calls the common entry point in the Boot block with
appropriate parameters to accomplish the desired operation. Boot block operations
include erase user code, program user code, program security bits, etc. A Chip-Erase
operation can be performed using a commercially available parallel programer. This
operation will erase the contents of this Boot Block and it will be necessary for the user
to reprogram this Boot Block (Block 1) with the Philips-provided ISP/IAP code in order
to use the ISP or IAP capabilities of this device.
33. 33
6.5.2.3 Power-On reset code execution
Following reset, the P89V51RD2 will either enter the SoftICE mode (if previously
enabled via ISP command) or attempt to autobaud to the ISP boot loader. If this autobaud
is not successful within about 400 ms, the device will begin execution of the user code.
6.5.2.4 In-System Programming (ISP)
In-System Programming is performed without removing the microcontroller from the
system. The In-System Programming facility consists of a series of internal hardware
resources coupled with internal firmware to facilitate remote programming of the
P89V51RD2 through the serial port. This firmware is provided by Philips and embedded
within each P89V51RD2 device. The Philips In-System Programming facility has made
in-circuit programming in an embedded application possible with a minimum of
additional expense in components and circuit board area. The ISP function uses five pins
(VDD, VSS, TxD, RxD, and RST). Only a small connector needs to be available to
interface your application to an external circuit in order to use this feature.
6.5.2.5 Using the In-System Programming
The ISP feature allows for a wide range of baud rates to be used in your application,
independent of the oscillator frequency. It is also adaptable to a wide range of oscillator
frequencies. This is accomplished by measuring the bit-time of a single bit in a received
character. This information is then used to program the baud rate in terms of timer counts
based on the oscillator frequency. The ISP feature requires that an initial character (an
uppercase U) be sent to the P89V51RD2 to establish the baud rate. The ISP firmware
provides auto-echo of received characters. Once baud rate initialization has been
performed, the ISP firmware will only accept Intel Hex-type records. In the Intel Hex
record, the ‘NN’ represents the number of data bytes in the record. The P89V51RD2 will
accept up to 32 data bytes. The ‘AAAA’ string represents the address of the first byte in
the record. If there are zero bytes in the record, this field is often set to 0000. The ‘RR’
string indicates the record type. A record type of ‘00’ is a data record. A record type of
‘01’ indicates the end-of-file mark. In this application, additional record types will be
added to indicate either commands or data for the ISP facility. The maximum number of
34. 34
data bytes in a record is limited to 32 (decimal). As a record is received by the
P89V51RD2, the information in the record is stored internally and a checksum
calculation is performed. The operation indicated by the record type is not performed
until the entire record has been received. Should an error occur in the checksum, the
P89V51RD2 will send an ‘X’ out the serial port indicating a checksum error. If the
checksum calculation is found to match the checksum in the record, then the command
will be executed. In most cases, successful reception of the record will be indicated by
transmitting a ‘.’ character out the serial port.
6.6 FUNCTIONAL DESCRIPTION
The function of the pins of microcontroller P89V51 used in the REAL TIME VEHICLE
TRACKING SYSTEM can be described as follows:
– Pin no 9 is connected to the reset button to reset the microcontroller automatically
when we switch on the power. It is a Power on reset.
– Pin no 10 & 11 of PORT 3 is connected MAX-232 and GSM Module.
– Pin no 14 and 15 of PORT 3 is connected to RS and ENABLE pin of LCD
respectively.
– Crystal is connected to the pin no 18(XTAL 1) and pin no 19(XTAL 2) providing
11.0592 MHz frequency.
– Pin no 20 is connected to the ground (GND).
– Pin no 31( EA/Vpp) should be strapped to VCC for internal program executions,
this pin also receives the 12-volt programming enable voltage (VPP) during flash
programming.
– Pin no 32 – 39 of PORT 0 are connected to the DB0-DB7 (8-bit) data lines of
LCD display.
– Pin no 40 is connected to the positive supply (Vcc)
35. 35
CHAPTER 7
LIQUID CRYSTAL DISPLAY
7.1 INTRODUCTION
Fig. 7.1 LCD
ry simple to interface with the controller as well as are cost effective.
The most commonly used ALPHANUMERIC displays are 1x16 (Single Line & 16
characters), 2x16 (Double Line & 16 character per line) & 4x20 (four lines & Twenty
characters per line).
The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines. The number on
data lines depends on the mode of operation. If operated in 8-bit mode then 8 data lines +
3 control lines i.e. total 11 lines are required. And if operated in 4-bit mode then 4 data
lines + 3 control lines i.e. 7 lines are required. How do we decide which mode to use? It’s
simple if you have sufficient data lines you can go for 8 bit mode & if there is a time
constrain i.e. display should be faster then we have to use 8-bit mode because basically 4-
bit mode takes twice as more time as compared to 8-bit mode.
7.2 PIN DESCRIPTION
Pin Symbol Function
1 Vss Ground
2 Vdd Supply Voltage
3 Vo Contrast Setting
36. 36
4 RS Register Select
5 R/W Read/Write Select
6 En Chip Enable Signal
7-14 DB0-DB7 Data Lines
15 A/Vee Gnd for the backlight
16 K Vcc for backlight
Table 7.1 Pin Description of LCD
Figure 7.2 Pin Discription
1.RS(Register Select)
When RS is low (0), the data is to be treated as a command. When RS is high (1), the
data being sent is considered as text data which should be displayed on the screen.
2. R/W(Read/Write)
37. 37
When R/W is low (0), the information on the data bus is being written to the LCD. When
RW is high (1), the program is effectively reading from the LCD. Most of the times there
is no need to read from the LCD so this line can directly be connected to GND thus
saving one controller line.
3. E(enable)
The ENABLE pin is used to latch the data present on the data pins. A HIGH - LOW
signal is required to latch the data. The LCD interprets and executes our command at the
instant the EN line is brought low. If you never bring EN low, your instruction will never
be executed.
4. D0-D7
The 8 bit data pins D0-D7 are used to send information to the LCD or read the contents
of the LCD’s internal registers. .To display any character on LCD micro controller has to
send its ASCII value to the data bus of LCD. For e.g. to display 'AB' microcontroller has
to send two hex bytes 41h and 42h respectively LCD display used here is having 16x2
size. It means 2 lines each with 16 characters.
In 4-bit mode the data is sent in nibbles, first we send the higher nibble and then the
lower nibble. To enable the 4-bit mode of LCD, we need to follow special sequence of
initialization that tells the LCD controller that user has selected 4-bit mode of operation.
We call this special sequence as resetting the LCD. Following is the reset sequence of
LCD.
Wait for about 20mS
Send the first init value (0x30)
Wait for about 10mS
Send second init value (0x30)
Wait for about 1mS
Send third init value (0x30)
Wait for 1mS
Select bus width (0x30 - for 8-bit and 0x20 for 4-bit)
Wait for 1Ms
38. 38
7.3 LCD CONNECTIONS IN 8-BIT MODE
Figure 7.3 LCD Connection in 8-bit Mode
7.4 FUNCTIONAL DESCRIPTION
7.4.1 Writing and reading the data from the LCD
Writing data to the LCD is done in several steps:
1) Set R/W bit to low
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
Read data from data lines (if it is reading):
1) Set R/W bit to high
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
EXAMPLE:
Fig. 7.4 Example LCD connection.
39. 39
7.5 LCD COMMAND CODES
1. CLEAR DISPLAY SCREEN
2. RETURN HOME
4 DECREMENT CURSOR ( SHIFT CURSOR TO LEFT)
5 SHIFT DISPLAY RIGHT.
6. INCREMENT CURSOR ( SHIFT CURSOR TO RIGHT)
7. SHIFT DISPLAY LEFT
8. DISPLAY OFF, CURSOR OFF
A DISPLAY OFF CURSOR ON
C DISPLAY ON CURSOR OFF
E DISPLAY ON CURSOR BLINKING
F. DISPLAY ON CURSOR BLINKING.
10. SHIFT CURSOR POSITION TO LEFT
14. SHIFT CURSOR POSITION TO RIGHT
18. SHIFT THE ENTIRE DISPLAY TO THE LEFT
1C SHIFT THE ENTIRE DISPLAY TO THE RIGHT
80 FORCE CURSOR TO BEGINNING OF IST LINE
C0 FORCE CURSOR TO BEGINNING OF 2ND
LINE
38 2 LINES AND 5 X 7 MATRIX
7.5.1 Checking the busy status of LCD
The code to check the status of LCD whether it is busy or not is as follows:
WAIT_LCD:
SETB EN ;Start LCD command
CLR RS ;It's a command
SETB RW ;It's a read command
MOV DATA, #0FFh ;Set all pins to FF initially
MOV A,DATA ;Read the return value
JB ACC.7,WAIT_LCD ;If bit 7 high, LCD still busy
CLR EN ;Finish the command
40. 40
CLR RW ;Turn off RW for future commands
RET
Thus, our standard practice will be to send an instruction to the LCD and then call our
WAIT_LCD routine to wait until the instruction is completely executed by the LCD.
This will assure that our program gives the LCD the time it needs to execute instructions
and also makes our program compatible with any LCD, regardless of how fast or slow it
is.
7.5.2 Initializing the LCD
The code to initialize the LCD is as follows:
INIT_LCD:
SETB EN
CLR RS
MOV DATA, #38h
CLR EN
LCALL WAIT_LCD
SETB EN
CLR RS
MOV DATA, #0Eh
CLR EN
LCALL WAIT_LCD
SETB EN
CLR RS
MOV DATA, #06h
CLR EN
LCALL WAIT_LCD
RET
Having executed this code the LCD will be fully initialized and ready for us to send
display data to it.
7.5.3 Clearing the display
The code to clear the LCD display is as follows:
41. 41
CLEAR_LCD:
SETB EN
CLR RS
MOV DATA,#01h
CLR EN
LCALL WAIT_LCD
RET
we may clear the LCD at any time by simply executing an LCALL CLEAR_LCD.
7.5.4 Writing text to the LCD
The code to write any text to the LCD is as follows:
WRITE_TEXT:
SETB EN
SETB RS
MOV DATA,A
CLR EN
LCALL WAIT_LCD
RET
The WRITE_TEXT routine that we just wrote will send the character in the accumulator
to the LCD which will, in turn, display it. Thus to display text on the LCD all we need to
do is load the accumulator with the byte to display and make a call to this routine.
42. 42
CHAPTER 8
PROJECT DESCRIPTION
8.1 CIRCUIT DIAGRAM
Figure 8.1 Circuit Diagram of VTS
8.2 Functional Description
The function of the pins of microcontroller P89V51RD2 used in the REAL TIME
VEHICLE TRACKING SYSTEM can be described as follows:
– Pin no 9 is connected to the reset button to reset the microcontroller automatically
when we switch on the power. It is a Power on reset.
– Pin no 10 & 11 of PORT 3 is connected MAX-232 and GSM Module.
– Pin no 14 and 15 of PORT 3 is connected to RS and ENABLE pin of LCD
respectively.
– Crystal is connected to the pin no 18(XTAL 1) and pin no 19(XTAL 2) providing
11.0592 MHz frequency.
– Pin no 20 is connected to the ground (GND).
– Pin no 31( EA/Vpp) should be strapped to VCC for internal program executions,
this pin also receives the 12-volt programming enable voltage (VPP) during flash
programming.
43. 43
– Pin no 32 – 39 of PORT 0 are connected to the DB0-DB7 (8-bit) data lines of
LCD display.
– Pin no 40 is connected to the positive supply (Vcc)
8.3 WORKING OF THE SYSTEM
The working of this project is controlled by a microcontroller PHILIPS P89V51RD2. The
project works in the following ways:
1. Switch on power supply.
2. Message “vts using gps & gsm” will appear on LCD.
3. GPS start receiving the data from the satellite and then send the data to tha
microcontroller.
4. Microcontroller extract the useful data received from GPS.
5. Longitude and Latitude will appear on LCD.
6. Microcontroller send the Longitude and Latitude by SMS using GSM modem.
8.4 LIST OF COMPONENTS
S. NO. Components Name Quantity
1. 12V Adepter 4
2. 7805 Voltage regulater 2
3. Capacitor 33pF 2
4. Crystal oscillator 11.0592MHz 1
5. Capacitor 10 uF 10
6. Push button 2
7. LCD 1
8. Max-232 1
9 RS-232 1
10. Male and female connectors 8
11. GPS Module 1
12. GSM Module 2
Table 8.1 List of Components
44. 44
CHAPTER 9
SOFTWARE
9.1 Keil
9.1.1 Introduction
Compilers are programs used to convert a High Level Language to object code. Desktop
compilers produce an output object code for the underlying microprocessor, but not for
other microprocessors. I.E the programs written in one of the HLL like ‘C’ will compile
the code to run on the system for a particular processor like x86 (underlying
microprocessor in the computer). For example compilers for Dos platform is different
from the Compilers for Unix platform
So if one wants to define a compiler then compiler is a program that translates source
code into object code. The compiler derives its name from the way it works, looking at
the entire piece of source code and collecting and reorganizing the instruction. See there
is a bit little difference between compiler and an interpreter. Interpreter just interprets
whole program at a time while compiler analyzes and execute each line of source code in
succession, without looking at the entire program.
Fig. 9.1 Keil
9.1.2 Keil cross compiler
Keil is a German based Software development company. It provides several development
tools like
• IDE (Integrated Development environment)
• Project Manager
• Simulator
45. 45
• Debugger
• C Cross Compiler , Cross Assembler, Locator/Linker
Keil Software provides you with software development tools for the 8051 family of
microcontrollers. With these tools, you can generate embedded applications for the
multitude of 8051 derivatives. Keil provides following tools for 8051 development
1. C51 Optimizing C Cross Compiler,
2. A51 Macro Assembler,
3. 8051 Utilities (linker, object file converter, library manager),
4. Source-Level Debugger/Simulator,
5. µVision for Windows Integrated Development Environment.
The keil 8051 tool kit includes three main tools, assembler, compiler and linker.
An assembler is used to assemble your 8051 assembly program
A compiler is used to compile your C source code into an object file
A linker is used to create an absolute object module suitable for your in-circuit emulator.
8051 project development cycle: - these are the steps to develop 8051 project using keil
1. Create source files in C or assembly.
2. Compile or assemble source files.
3. Correct errors in source files.
4. Link object files from compiler and assembler.
5. Test linked application.
9.2 Proteus
9.2.1 Introduction
Proteus is a software for microprocessor/microcontroller simulation, schematic
capture, and printed circuit board (PCB) design. It is developed by Labcenter
Electronics.
Proteus PCB design combines the ISIS schematic capture and ARES PCB layout
programs to provide a powerful, integrated and easy to use suite of tools for professional
PCB Design. All Proteus PCB design products include an integrated shape based
autorouter and a basic SPICE simulation capability as standard. More advanced routing
46. 46
modes are included in Proteus PCB Design Level 2 and higher whilst simulation
capabilities can be enhanced by purchasing the Advanced Simulation option and/or
micro-controller simulation capabilities.
Fig 9.2 Proteus
9.2.2 System Components
ISIS Schematic Capture - a tool for entering designs.
PROSPICE Mixed mode SPICE simulation - industry standard SPICE3F5
simulator combined with a digital simulator.
ARES PCB Layout - PCB design system with automatic component placer, rip-
up and retry auto-router and interactive design rule checking.
VSM - Virtual System Modeling lets co-simulate embedded software for popular
microcontrollers alongside hardware design.
System Benefits Integrated package with common user interface and fully
context sensitive help.
9.3 Flash Magic
Flash Magic is a tool which used to program hex code in EEPROM of micro-controller. it
is a freeware tool. It only supports the micro-controller of Philips and NXP. You can burn
a hex code into those controller which supports ISP (in system programming) feature. To
check whether your micro-controller supports ISP or not take look at its datasheet. So if
your device supports ISP then you can easily burn a hex code into EEPROM of your
device.
47. 47
Flash magic supports several chips like ARM Cortex M0, M3, M4, ARM7 and 8051. The
procedure to program code memory is very easy and needs only five steps to configure
Flash magic for better operation. Flash magic use Serial or Ethernet protocol to program
the flash of device.
Fig. 9.3 FlashMagic
48. 48
CHAPTER 10
CONCLUSIONS
The three potential of this project is reach, relevant and result. Firstly it will provide
marketers a fantastic reach. Today almost all people carry their mobile phones. Secondly,
this system gives customer control since they get more precise information, personalized
message and targeted offer. Thirdly, it is a unique medium since marketers have better
understanding of customers need. This will result in high impact of advertisement and
greater human satisfaction.
This system has both strength and weakness. Some consumers think that this system hack
their privacy and they feel the risk of being monitored. In order to have the system in the
market, it is necessary to establish and maintain the trust of a consumer. The best way is
to give confidence to the consumers that they will only receive the relevant information.
49. 49
CHAPTER 11
RESULTS AND FUTUTRE SCOPE
Result
With the help of this system position of a device or person can be detected. This system
coves all the theoretical and practical areas related to n this project. A small movement of
a person or a device is noticeable with this system. It enables its user to track and trace
their vehicle, mobile assets. It performs the task which can be used by military or police
and also it can be used for personal security.
This project presents the automotive localization system using GPS and GSM services.
The system permits localization of automobile and transmitting the position to the owner
on his mobile phone as a short message (SMS) at his request. The system can be
interconnected with the car alarm system and alert the owner on his mobile phone.
The present application is a low cost solution for automobile position and status, very
useful in case of car theft situation, for monitoring adolescent drivers by their parents as
well as in car tracking system applications. The proposed solution can be used in other
types of application, where the information needed is requested rarely and at irregular
period of time (when requested).
Scope
Vehicle tracking system is becoming increasingly important in large cities and it is more
secured than other systems. Now a day’s vehicle thefting is rapidly increasing , with this
we can have a good control in it. The vehicle can be turned off by only with a simple
SMS. Since, now a days the cost of the vehicles are increasing they will not step back to
offord it. This setup can be made more interactive by adding a display to show some
basic information about the vehicle and also add emergency numbers which can be used
in case of emergency. Upgrading this setup is very easy which makes it open to future
requirements without the need of rebuilding everything from scratch, which also makes it
more efficient.
50. 50
APPENDIX-A
GPS Coding
#include<reg51.h> //Define 8051 Registers
void serial(void); //Serial Communication Register
void DelayMs(unsigned int); //Delay Function
unsigned int i,j;
unsigned char b[25],d;
//---------------------------
// Main Program
//---------------------------
void main()
{
EA=1; //Enable All Interrupt
ES=1; //Enable Serial Port Interrupt
serial(); //Serial Communication
while(1); //Loop Forever
}
//----------------------------------------------------------
// Serial Communication Register Initialization
//----------------------------------------------------------
void serial(void)
{
TMOD=0X20; //Timer1, Mode2
SCON=0X50; //Serial Mode1, Receive Enable
TH1=0XFD; //Baud Rate 9600bps
TR1=1; //Timer1 ON
}
//-----------------------------------------
// Serial Interrupt Function
//-----------------------------------------
51. 51
void serin (void) interrupt 4 //Serial Port Interrupt
{
if(RI==1) //Receive Interrupt Gets Enabled
{ //after Stop Bit get Received
d=SBUF; //Serial Buffer value moved to a variable
b[j]=d;
SBUF=b[j];
DelayMs(20); //Delay Function
j++;
}
SCON=0X50; //Initialising Receive and Transmit Interrupt
}
//---------------------------------
// Delay Function
//---------------------------------
void DelayMs(unsigned int k)
{
unsigned int i;
for(i=0;i<=k;i++);
}
52. 52
APPENDIX-B
GSM Coding in C
//-------------------------------------------------
Setup the serial port for 9600 baud at 11.0592MHz.
//-------------------------------------------------
void serial_init(void)
{
SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */
TH1 = 0xFD; /* TH1: reload value for 9600 baud @ 11.0592MHz*/
TR1 = 1; /* TR1: timer 1 run */
TI = 1; /* TI: set TI to send first char of UART */
}
//-------------------------------------
// Main program starts here
//-------------------------------------
void main(void)
{
serial_init(); //serial initialization
printf("AT+CMGF=1%c",13);
delay(20); //Text Mode | hex value of 13 is 0x0D (CR )
printf("AT+CMGS="9136701213"%c",13);
delay(20); //Type your mobile number Eg : "9136701213"
printf("Hi :-) GSM Modem Test");
delay(20); //Type text as u want
printf("%c",0x1A);
delay(20); //line feed command
while(1);
}
57. 57
APPENDIX-D
JAVA Application Code
import gnu.io.CommPort;
import gnu.io.CommPortIdentifier;
import gnu.io.SerialPort;
import gnu.io.SerialPortEvent;
import gnu.io.SerialPortEventListener;
import java.awt.Desktop;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.*;
import java.util.*;
public class Test
{
public Test()
{
super();
}
void connect ( String portName ) throws Exception
{
CommPortIdentifier portIdentifier =
CommPortIdentifier.getPortIdentifier(portName);
if ( portIdentifier.isCurrentlyOwned() )
{
System.out.println("Error: Port is currently in use");
}
else
{
CommPort commPort = portIdentifier.open(this.getClass().getName(),2000);
if ( commPort instanceof SerialPort )
{
SerialPort serialPort = (SerialPort) commPort;
serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,S
erialPort.PARITY_NONE);
InputStream in = serialPort.getInputStream();
OutputStream out = serialPort.getOutputStream();
serialPort.addEventListener(new SerialReader(in));
58. 58
serialPort.notifyOnDataAvailable(true);
(new Thread(new SerialWriter(out))).start();
}
else
{
System.out.println("Error: Only serial ports are handled by this example.");
}
}
}
/**
* Handles the input coming from the serial port. A new line character
* is treated as the end of a block in this example.
*/
public static class SerialReader implements SerialPortEventListener {
private InputStream in;
private byte[] buffer = new byte[1024];
public static StringBuffer sb=new StringBuffer();
public static int count=0;
public SerialReader(InputStream in) {
this.in = in;
}
public void serialEvent(SerialPortEvent arg0) {
int data;
try {
new Timer().scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
System.out.println(sb);
System.out.println("==========================");
String str=new String(sb);
String sp[]=str.split("latitude");
String latitude=sp[1].substring(0,5);
String sp1[]=sp[1].split("longitude");
String longitude=sp1[1].substring(2,6);
StringBuffer sb1=new
StringBuffer(latitude);
sb1.insert(3,'.');
//sb1.append('N');
System.out.println(sb1);
60. 60
}
/** */
public static class SerialWriter implements Runnable
{
OutputStream out;
public SerialWriter ( OutputStream out )
{
this.out = out;
}
public void run ()
{
try
{
int c = 0;
while ( ( c = System.in.read()) > -1 )
{
this.out.write(c);
}
}
catch ( IOException e )
{
e.printStackTrace();
System.exit(-1);
}
}
}
public static void main ( String[] args )
{
try
{
(new Test()).connect("COM5");
}
catch ( Exception e )
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
61. 61
REFRENCES
Muhammad Ali Mazidi , Janice Gillispie Mazidi, Rolin D. Mckinlay. Second edition,
“THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEM”
K. J. Ayala. Third edition, “The 8051 MICROCONTROLLER” Tutorial on
microcontroller:
www.8051projects.net/microcontroller_tutorials/Tutorial on LCD:
www.8051projects.net/lcd-interfacing/
WEBSITES
www.howstuffworks.com
www.alldatasheets.com
www.efyprojects.com
www.google.com
www.eci.gov.in/Audio_VideoClips/presentation/EVM.ppt
www.rajasthan.net/election/guide/evm.htm
www.indian-elections.com/electoralsystem/electricvotingmachine.html