1.1 Introduction To Embedded Systems:: Vechicle Tracking On Google Maps Using Arduino, Esp8266 & Gps
1.1 Introduction To Embedded Systems:: Vechicle Tracking On Google Maps Using Arduino, Esp8266 & Gps
1.1 Introduction To Embedded Systems:: Vechicle Tracking On Google Maps Using Arduino, Esp8266 & Gps
CHAPTER 1
INTRODUCTION
DEPT. OF ECE,LITS 1
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
As the embedded system is the combination of both software and hardware Software
deals with the languages like ALP, C, and VB etc., and Hardware deals with Processors,
Peripherals, and Memory
Embedded
System
Software Hardware
o ALP o Processor
o C o Peripherals
o VB o memory
Etc.,
DEPT. OF ECE,LITS 2
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Instruction set: The set of instructions that the microprocessor can execute.
Bandwidth : The number of bits processed in a single instruction.
Clock speed : Given in megahertz (MHz), the clock speed determines how many
instructions per second the processor can execute.
In both cases, the higher the value, the more powerful the CPU. For example, a 32-bit
microprocessor that runs at 50MHz is more powerful than a 16-bit microprocessor that runs at
25MHz. In addition to bandwidth and clock speed, microprocessors are classified as being
either RISC (reduced instruction set computer) or CISC (complex instruction set computer).
A microprocessor has three basic elements, as shown above. The ALU performs all
arithmetic computations, such as addition, subtraction and logic operations (AND, OR, etc). It
is controlled by the Control Unit and receives its data from the Register Array. The Register
Array is a set of registers used for storing data. These registers can be accessed by the ALU
very quickly. Some registers have specific functions - we will deal with these later. The
Control Unit controls the entire process. It provides the timing and a control signal for getting
data into and out of the registers and the ALU and it synchronizes the execution of
instructions (we will deal with instruction execution at a later date).
DEPT. OF ECE,LITS 3
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
ALU
CU
Memory
DEPT. OF ECE,LITS 4
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
their better-known general-purpose cousins, faster and more powerful versions are continually
being introduced. DSPs can also be embedded within complex "system-on-chip" devices,
often containing both analog and digital circuitry.
Application Specific Integrated Circuit (ASIC)
ASIC is a combination of digital and analog circuits packed into an IC to achieve the
desired control/computation function
There are two different types of computer instruction set there are:
DEPT. OF ECE,LITS 5
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
A new microprocessor can be developed and tested more quickly if one of its aims is
to be less complicated.
Operating system and application programmers who use the microprocessor's
instructions will find it easier to develop code with a smaller instruction set.
The simplicity of RISC allows more freedom to choose how to use the space on a
microprocessor.
Higher-level language compilers produce more efficient code than formerly because
they have always tended to use the smaller set of instructions to be found in a RISC computer.
RISC characteristics
CISC, which stands for Complex Instruction Set Computer, is a philosophy for
designing chips that are easy to program and which make efficient use of memory. Each
instruction in a CISC instruction set might perform a series of operations inside the processor.
This reduces the number of instructions required to implement a given program, and allows
the programmer to learn a small but flexible set of instructions.
At the time of their initial development, CISC machines used available technologies to
optimize computer performance.
DEPT. OF ECE,LITS 6
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
The ease of micro-coding new instructions allowed designers to make CISC machines
upwardly compatible: a new computer could run the same programs as earlier computers
because the new computer would contain a superset of the instructions of the earlier
computers.
As each instruction became more capable, fewer instructions could be used to
implement a given task. This made more efficient use of the relatively slow main memory.
Because micro program instruction sets can be written to match the constructs of high-
level languages, the compiler does not have to be as complicated.
The disadvantages of CISC:
Still, designers soon realized that the CISC philosophy had its own problems,
including:
Harvard Architecture
Von-Neumann Architecture
DEPT. OF ECE,LITS 7
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Harvard Architecture
Computers have separate memory areas for program instructions and data. There are
two or more internal data buses, which allow simultaneous access to both instructions and
data. The CPU fetches program instructions on the program memory bus.
DEPT. OF ECE,LITS 8
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
the PIC by Microchip Technology, Inc. and the ARM Cortex-M3 processor (not all ARM
chips have Harvard architecture).
Even in these cases, it is common to have special instructions to access program memory as
data for read-only tables, or for reprogramming.
Von-Neumann Architecture
A computer has a single, common memory space in which both program instructions
and data are stored. There is a single internal data bus that fetches both instructions and data.
They cannot be performed at the same time
The terms "von Neumann architecture" and "stored-program computer" are generally used
interchangeably, and that usage is followed in this article.
The primary difference between Harvard architecture and the Von Neumann
architecture is in the Von Neumann architecture data and programs are stored in the same
memory and managed by the same information handling system.
Whereas the Harvard architecture stores data and programs in separate memory
devices and they are handled by different subsystems.
DEPT. OF ECE,LITS 9
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
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 or GLONASS 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.
Urban public transit authorities are an increasingly common user of vehicle tracking systems,
particularly in large cities.
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,
DEPT. OF ECE,LITS 10
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
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 near-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 salesperson and their vehicle. These systems also
offer tracking of calls, texts, web use and generally provide a wider range of options.
1. GPS tracking: The device fits into the vehicle and captures the GPS location
information apart from other vehicle information at regular intervals to a central
server. Other vehicle information can include fuel amount, engine temperature,
altitude, reverse geocoding, 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 odometer, engine RPM, throttle position,
GPRS status and a lot more. Capability of these devices actually decide the final
capability of the whole tracking system; most vehicle tracking systems, in addition to
providing the vehicle's location data, feature a wide range of communication ports that
can be used to integrate other on board systems, allowing to check their status and
control or automate their operation.
2. 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.
DEPT. OF ECE,LITS 11
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
3. User interface: The UI determines how one will be able to access information, view
vehicle data, and elicit important details from it.
Vehicle tracking systems are commonly used by fleet operators for fleet
management functions such as fleet tracking, routing, dispatching, on-board information and
security. Along with commercial fleet operators, urban transit agencies use the technology for
a number of purposes, including monitoring schedule adherence of buses in service, triggering
automatic changes of buses' destination sign displays once the vehicle approaches the bus
terminus (or other set location along a bus route such as a particular bus stop along the route),
and triggering pre-recorded (or even synthetic speech) bus stop, route (and its destination) or
service announcements for passengers.
Such programs are also used to provide customers with real-time information 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 scheduled time of the next arrival. Transit systems providing this kind of information
assign a unique number to each stop, and waiting passengers can obtain information by
entering the stop number into an automated telephone system or an application on the transit
system's website. Some transit agencies provide a virtual map on their website, with icons
DEPT. OF ECE,LITS 12
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
depicting the current locations of buses in service on each route, for customers'
information, while others provide such information only to dispatchers or other employees.
With the GPS technology being enhanced day by day, companies are coming up with
devices that are compatible with phones and other modern gadgets. These devices provide live
time activity of the fleet on personal devices without even logging onto their website as well.
Keeping a track of fleet commander's actionable data, improving efficiency, reducing fuel cost
etc. also come under fleet tracking. These devices and software help in cost cutting.[5]
Vehicle tracking systems are also popular in consumer vehicles as a theft prevention,
monitoring 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 (NICB) to prevent motor
vehicle theft. This approach recommends four layers of security based on the risk factors
pertaining to a specific vehicle. Vehicle Tracking Systems 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.
Stolen vehicle recovery: Both consumer and commercial vehicles can be outfitted with RF
or GPS units to allow police to do tracking and recovery. In the case of LoJack, the police
can activate the tracking unit in the vehicle directly and follow tracking signals.
DEPT. OF ECE,LITS 13
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Fleet management: When managing a fleet of vehicles, knowing the real-time location of
all drivers allows management to meet customer needs more efficiently. Whether it is
delivery, service or other multi-vehicle enterprises, drivers now only need a mobile phone
with telephony or Internet connection to be inexpensively tracked by and dispatched
efficiently.
Asset tracking: Companies needing to track valuable assets for insurance or other
monitoring purposes can now plot the real-time asset location on a map and closely
monitor movement and operating status.
Field service management: Companies with a field service workforce for services such as
repair or maintenance, must be able to plan field workers’ time, schedule subsequent
customer visits and be able to operate these departments efficiently. Vehicle tracking
allows companies to quickly locate a field engineer and dispatch the closest one to meet a
new customer request or provide site arrival information.
Field sales: Mobile sales professionals can access real-time locations. For example, in
unfamiliar areas, they can locate themselves as well as customers and prospects, get
driving directions and add nearby last-minute appointments to itineraries. Benefits include
increased productivity, reduced driving time and increased time spent with customers and
prospects.
Trailer tracking: Haulage and Logistics companies often operate lorries with detachable
load carrying units. The part of the vehicle that drives the load is known as the cab and the
load carrying unit is known as the trailer. There are different types of trailer used for
different applications, e.g., flat bed, refrigerated, curtain sider, box container.
Surveillance: A tracker may be placed on a vehicle to follow the vehicle's movements.
Transit tracking: temporary tracking of assets or cargoes from one point to another. Users
will ensure that the assets do not stop on route or do a U-Turn in order to ensure the
security of the assets.
Fuel Monitoring: monitor the fuel through tracking device (with help of fuel sensor
connected to the device).
Distance Calculation: calculate the distance traveled by the fleet.
OBD II - Plug and play interface which provides most of engine diagnostics information.
DEPT. OF ECE,LITS 14
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Vehicle tracking systems are widely used worldwide. Components come in various shapes and
forms but most utilize GPS technology and GSM services. While most will offer real-time
tracking, others record real time data and store it to be read, in a fashion similar to data
loggers. Systems like these track and record and allow reports after certain points have been
solved.
Unconventional use:
Industries not traditionally known to use vehicle tracking systems (logistics and
transportation industries are the ones that have traditionally incorporated vehicle tracking
system into their operations) have started to use it in creative ways to improve their processes
or businesses.
Vehicle tracking systems used in food delivery vans may alert if the temperature of the
refrigerated compartment moves outside of the range of safe food storage temperatures. Car
rental companies are also using it to monitor their rental fleets.
DEPT. OF ECE,LITS 15
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
DEPT. OF ECE,LITS 16
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
CHAPTER 2
LITERATURE SURVEY
The technology was not without its limits.It was restricted by the distance which
became a hurdle in accuracy and better connectivity between drivers and fleet operators.Base
station was dependent on the driver for the information and a huge size fleet could not have
been managed depending on man-power only.
The scene of vehicle tracking underwent a change with the arrival of gps
technology.This reduced the dependence on man-power.Most of the work of tracking become
electronic.computers provide a great help in managing a large fleet of vehicle.This also made
the information authentic.As this technology was available at affordable cost all whether small
or big fleet could take benefit of this technology.
Because of cheap accessibility of the device computer tracking facilities has come to
stay and associated with enhanced management.Today each vehicle carriers tracking unit
which is monitored from the base station.Base station receives the data from the unit.
All these facilities require a heavy investment of capital for the installation of the
infrastructure of tracking system for monitoring and dispatching .
This kind of vehicle tracking is the most economical system to set up. It uses cellular
phone to transmit fleet location information in which you will have the option to view the data
on the Internet using the supporting software. The system is not that updated; however,
location is relayed in either every five or 10 minutes, depending on your choice. You have to
pay a monthly fee to avail this system service.
DEPT. OF ECE,LITS 17
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Advanced systems determine the sector in which the mobile phone is located and
roughly estimate also the distance to the base station. Further approximation can be done
by interpolating signals between adjacent antenna towers. Qualified services may achieve a
precision of down to 50 meters in urban areas where mobile traffic and density of antenna
towers (base stations) is sufficiently high. Rural and desolate areas may see miles between
base stations and therefore determine locations less precisely.
2.2 Disadvantage:
Reduced privacy is the primary drawback of cellphone tracking. According to the Electronic
Frontier Foundation, "Location information collected by cellphone companies can provide an
extraordinarily invasive glimpse into the private lives of cellphone users." For this reason, it is
possible to disable casual location tracking features such as the "Find My Friends" iPhone
application. Tracking information remains available to phone providers and emergency
services, however.
DEPT. OF ECE,LITS 18
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
CHAPTER 3
BLOCK EXPLANATION
Block diagram:
To track the vehicle, we need to find the Coordinates of Vehicle by using GPS module.
GPS module communicates continuously with the satellite for getting coordinates. Then we
need to send these coordinates from GPS to our Arduino by using UART. And then Arduino
extract the required data from received data by GPS.
DEPT. OF ECE,LITS 19
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Looking at the board from the top down, this is an outline of what you will see (parts
of the board you might interact with in the course of normal use are highlighted)
Fig7:Arduino Board
Starting clockwise from the top center:
Analog Reference pin (orange)
Digital Ground (light green)
Digital Pins 2-13 (green)
DEPT. OF ECE,LITS 20
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - These pins cannot be used for
digital i/o (Digital Read and Digital Write) if you are also using serial communication
(e.g. Serial.begin).
Reset Button - S1 (dark blue)
In-circuit Serial Programmer (blue-green)
Analog In Pins 0-5 (light blue)
Power and Ground Pins (power: orange, grounds: light orange)
External Power Supply In (9-12VDC) - X1 (pink)
Toggles External Power and USB Power (place jumper on two pins closest to desired
supply) - SV1 (purple)
USB (used for uploading sketches to the board and for serial communication between
the board and the computer; can be used to power the board) (yellow)
Digital Pins
In addition to the specific functions listed below, the digital pins on an Arduino
board can be used for general purpose input and output via the pin Mode(), Digital
Read(), and Digital Write() commands. Each pin has an internal pull-up resistor which
can be turned on and off using digital Write() (w/ a value of HIGH or LOW,
respectively) when the pin is configured as an input. The maximum current per pin is
40mA.
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
On the Arduino Diecimila, these pins are connected to the corresponding pins of the
FTDI USB-to-TTL Serial chip. On the Arduino BT, they are connected to the
corresponding pins of the WT11 Bluetooth module. On the Arduino Mini and LilyPad
Arduino, they are intended for use with an external TTL serial module (e.g. the Mini-
USB Adapter).
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a
low value, a rising or falling edge, or a change in value. See the attach Interrupt()
function for details.
PWM: 3, 5, 6, 9, 10, and 11 Provide 8-bit PWM output with the analog Write()
function. On boards with an ATmega8, PWM output is available only on pins 9, 10,
and 11.
DEPT. OF ECE,LITS 21
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
BT Reset: 7. (Arduino BT-only) Connected to the reset line of the bluetooth module.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication, which, although provided by the underlying hardware, is not currently
included in the Arduino language.
LED: 13. On the Diecimila and LilyPad, there is a built-in LED connected to digital
pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
Analog Pins
In addition to the specific functions listed below, the analog input pins support 10-bit
analog-to-digital conversion (ADC) using the analog Read() function. Most of the analog
inputs can also be used as digital pins: analog input 0 as digital pin 14 through analog input 5
as digital pin 19. Analog inputs 6 and 7 (present on the Mini and BT) cannot be used as digital
pins.
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library
(documentation on the Wiring website).
Power Pins
VIN (sometimes labeled "9V"): The input voltage to the Arduino board when it's using
an external power source (as opposed to 5 volts from the USB connection or other
regulated power source). You can supply voltage through this pin, or, if supplying
voltage via the power jack, access it through this pin. Also note that the Lily Pad has
no VIN pin and accepts only a regulated input.
5V: The regulated power supply used to power the microcontroller and other
components on the board. This can come either from VIN via an on-board regulator, or
be supplied by USB or another regulated 5V supply.
3V3 (Diecimila-only) : A 3.3 volt supply generated by the on-board FTDI chip.
GND: Ground pins.
Other Pins
AREF: Reference voltage for the analog inputs. Used with analog Reference
Reset: (Diecimila-only) Bring this line LOW to reset the microcontroller. Typically
used to add a reset button to shields which block the one on the board.
DEPT. OF ECE,LITS 22
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
The Arduino i/o board is a simple circuit featuring the ATmega8 processor from Atmel. The
board is composed of a printed circuit board (PCB) and electronic parts.
buy a ready made board. See how you can buy a board or just the PCB.
o European distributor
o US distributor
build your own board. If you want you can build your own PCB just by downloading
the CAD files from the Hardwarepage. Extract the .brd file and send it to a PCB
manufacturer. Be aware that manufacturing a single pcb will be very expensive. It's
better to get together with other people and make 20 or 30 at a time. Since you get the
full CAD files you can make your own customised version of Arduino. if you make
modifications or fix bugs please send us your changes!
DEPT. OF ECE,LITS 23
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
o purchase parts. purchase the parts from any electronics store. The Serial version in
particular has been designed to use the most basic parts that can be found anywhere in the
world. The USB version on the other hand requires some advanced soldering skills because of
the FTDI chip that is an smd part. Here is a list of parts for the serial board.
o assemble the board. We put together a step by step guide on how to build an arduino
board. Newbies: never soldered before? afraid of trashing thousands of boards before getting
one properly soldered? fear not :) learn to master the art of soldering.
o program the bootloader. In order for the development environment to be able to program the
chip, this has to be programmed with a piece of code called bootloader. See
the bootloader page on how to program it on your chip.
Linux note: For help getting the Arduino IDE running on Debian, please see the FAQ ("How
can I run the Arduino IDE under Linux?").
Mac OS X note: After downloading the IDE, run the macosx_setup.command. It corrects
permission on a few files for use with the serial port and will prompt you for your password.
You may need to reboot after running this script.
DEPT. OF ECE,LITS 24
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
If you are using a USB Arduino, you will need to install the drivers for the FTDI chip on the
board. These can be found in the drivers directory of the Arduino distribution.
On Windows, you will need to unzip FTDI USB Drivers.zip. Then, when you plug in the
Arduino board, point the Windows Add Hardware wizard to the FTDI USB Drivers directory.
The latest version of the drivers can be found on the FTDI website.
DEPT. OF ECE,LITS 25
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
If you're using a serial board, power the board with an external power supply (6 to 25
volts DC, with the core of the connector positive). Connect the board to a serial port on your
computer.
On the USB boards, the power source is selected by the jumper between the USB and
power plugs. To power the board from the USB port (good for controlling low power devices
like LEDs), place the jumper on the two pins closest to the USB plug. To power the board
from an external power supply (needed for motors and other high current devices), place the
jumper on the two pins closest to the power plug. Either way, connect the board to a USB port
on your computer. On Windows, the Add New Hardware wizard will open; tell it you want to
specify the location to search for drivers and point to the folder containing the USB drivers
you unzipped in the previous step.
5 | Upload a program
Open the LED blink example sketch: File > Sketchbook > Examples > led_blink.
DEPT. OF ECE,LITS 26
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Here's what the code for the LED blink example looks like.
Select the serial device of the Arduino board from the Tools | Serial Port menu. On
Windows, this should be COM1 or COM2 for a serial Arduino board, or COM3, COM4,
or COM5 for a USB board. On the Mac, this should be something like /dev/cu.usbserial-
1B1 for a USB board, or something like /dev/cu.USA19QW1b1P1.1 if using a Keyspan
adapter with a serial board (other USB-to-serial adapters use different names).
DEPT. OF ECE,LITS 27
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Push the reset button on the board then click the Upload button in the IDE. Wait a few
seconds. If successful, the message "Done uploading." will appear in the status bar.
If the Arduino board doesn't show up in the Tools | Serial Port menu, or you get an error while
uploading, please see the FAQ for troubleshooting suggestions.
A few seconds after the upload finishes, you should see the amber (yellow) LED on the board
start to blink.
DEPT. OF ECE,LITS 28
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
3.2.1.Wireless network:
Wi-Fi’s Walkie-Talkie Network:
DEPT. OF ECE,LITS 29
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
like this transmit at a signal strength of about 0.25 watts, and they can transmit about 500 to
1,000 feet.If we want to connect two computers together in a network using Walkie-Talkie
technology:
DEPT. OF ECE,LITS 30
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
hopping is that it is much more immune to interference and can allow dozens of WiFi cards to
talk simultaneously without interfering with each other.
Connecting Wi-Fi:
Adding WiFi to a Computer:
Many new laptops come with a Wi-Fi card built in. It is also easy to add a Wi-Fi card
to an older laptop or a desktop PC. The process is
Take a 802.11a, 802.11b or 802.11g network card. 802.11g has the advantage of
higher speeds and good interoperability on 802.11b equipment.
For a laptop, this card will normally be a PCMCIA card that slide into a
PCMCIA slot on laptop. Or take a small external adapter and plug it into a USB port.
For a desktop machine, take a PCI card & install inside the machine, or a small
external adapter and connect to the computer with a USB cable.
Install the card
Install the drivers for the card
Find an 802.11 hotspot
Access the hotspot.
A hotspot is a connection point for a Wi-Fi network.
HOTSPOT:
It is a small box that is hardwired into the Internet. The box contains an 802.11
radio that can simultaneously talk to up to 100 or so 802.11 cards. There are many Wi-Fi
hotspots now available in public places like restaurants, hotels, libraries and airports. We can
create our own hotspot in our home.
DEPT. OF ECE,LITS 31
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Configuring WiFi:
On the newest machines, an 802.11 card will automatically connect with an
802.11 hotspot and a network connection will be established. As soon as we turn on our
machine, it will connect and we will be able to browse the web, send email, etc using Wi-Fi.
On older machines we often have to go through this simple 3-step process to connect to a
hotspot:
Access the software for the 802.11 card- normally there is an icon for the card down in
the system tray at the bottom right of the screen.
Click the "Search button" in the software. The card will search for all of the available
hotspots in the area and shows a list.
Double-click on one of the hotspots to connect to it.
On ancient 802.11 equipment, there is no automatic search feature. We have to find
what is known as the SSID (server set id) of the hotspot (usually a short word of 10 characters
or less) as well as the channel number (an integer between 1 and 11) and type these two pieces
of information in manually. All the search feature is doing is grabbing these two pieces of
information from the radio signals generated by the hotspot and displaying them for us.
Wi-Fi Security:
· Data Security /Encryption
§ Third Party solution-Fortress
§ Wi-FI protected Access(WPA)
§ Wired Equivalent privacy (WEP)-shared key.
· Access
§ WPA/WEP
§ Close system-No advertising
§ Mac Authentication –Mac address control
· Attack-Denial of service
· Client protection
· Antivirus/Firewall
DEPT. OF ECE,LITS 32
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Wi-Fi hotspots can be open or secure. If a hotspot is open, then anyone with a Wi-
Fi card can access the hotspot. If it is secure, then the user needs to know a WEP key to
connect.
Hotspot in Home:
Setting up a Hotspot in a Home:
It is very easy to set up a Wi-Fi hotspot in home. It can be done in one of the two
ways:
If there are several computers hooked together on an Ethernet network and want to add
a wireless hotspot to the mix, purchase a Wireless Access Point and plug it into the Ethernet
network.
If it is the first time to set up a network in home, or to upgrading, buy a Wireless
Access Point Router. This is a single box that contains: 1) a port to connect to cable
modem or DSLmodem, 2) a router, 3) an Ethernet hub, 4) a firewall and 5) a wireless access
point. Connect the computers to this box either with traditional Ethernet cables or with
wireless cards.
Either way, once turn our Wireless Access Point on, there is a Wi-Fi hotspot in house.
In a typical home, the new hotspot will provide coverage for about 100 feet (30.5 meters) in
all directions, although walls and floors do cut down on the range. Even so, we get good
coverage throughout a typical home. For a large home, buy inexpensive signal boosters to
increase the range of the Hotspot.
Configuring a New Hotspot in Home:
DEPT. OF ECE,LITS 33
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Most wireless access points come with default values built-in. Once we plug them in,
they start working with these default values in 90 percent of the cases. However, we may want
to change things. You normally get to set three things on the access point:
The SSID -- it will normally default to the manufacturer's name. We can set it to any
word or phrase.
The channel -- normally it will default to channel 6. However, if a nearby neighbor is
also using an access point and it is set to channel 6, there can be interference. Choose any
other channel between 1 and 11. An easy way to see if our neighbors have access points is to
use the search feature that comes with your wireless card.
The WEP key -- The default is to disable WEP. To turn it on, enter a WEP key and
turn on 128-bit encryption.
Access points come with simple instructions for changing these three values. Normally do it
with a Web browser. Once it is configured properly, we can use our new hotspot to access the
Internet from anywhere in our home.
Advantages of Wi-Fi:
1. Wi-Fi is a core technology in GPS Industries Applications.
2. Wi-Fi technology available in hotels, airports, etc., will be more inclined to bring laptop
with us when traveling for personal reasons.
3. Frees network devices from cables, allows for a more dynamic network to be grown.
Changes the way people live, communicate, work and play.
4. Many reliable and bug-free Wi-Fi products on the market
5.It helps to become more productive at home, like online shopping and banking;
6. Wi-Fi technology allows getting out of home office and working in other rooms.
Disadvantages of Wi-Fi:
1.The 802.11b and 802.11g flavors of Wi-Fi use the 2.4 GHz spectrum, which is crowded
with other devices such as Bluetooth, microwave ovens, cordless phones, or video sender
devices, among many others.
2.Power consumption is fairly high compared to other standards, making battery life and heat
a concern.
3.It is not always configured properly by users.
DEPT. OF ECE,LITS 34
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Future:
There will be a requirement for technologies such as WLAN in this application. In
the cellular terminal market there is room to accommodate numerous wireless technologies
and a feature set incorporating WLAN looks likely to be adopted in around 25% of terminals
by 2009.For the WLAN market, the notebook/laptop is proving to be one of the most
important growth areas for the technology. IMS Research has predicted WLAN penetration
into notebooks will be in excess of 90% by 2007.Generate more revenue as wireless internet
access attracting more business customers, corporate events and outlines.
3.3 LIQUID CRYSTAL DISPLAY:
A liquid crystal display (LCD) is a thin, flat display device made up of any number of
color or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists
of a column of liquid crystal molecules suspended between two transparent electrodes, and
two polarizing filters, the axes of polarity of which are perpendicular to each other. Without
the liquid crystals between them, light passing through one would be blocked by the other.
The liquid crystal twists the polarization of light entering one filter to allow it to pass through
the other.
A program must interact with the outside world using input and output devices that
communicate directly with a human being. One of the most common devices attached to an
controller is an LCD display. Some of the most common LCDs connected to the contollers are
16X1, 16x2 and 20x2 displays. This means 16 characters per line by 1 line 16 characters per
line by 2 lines and 20 characters per line by 2 lines, respectively.
Many microcontroller devices use 'smart LCD' displays to output visual information.
LCD displays designed around LCD NT-C1611 module, are inexpensive, easy to use, and it is
even possible to produce a readout using the 5X7 dots plus cursor of the display. They have a
standard ASCII set of characters and mathematical symbols. For an 8-bit data bus, the display
requires a +5V supply plus 10 I/O lines (RS RW D7 D6 D5 D4 D3 D2 D1 D0). For a 4-bit
data bus it only requires the supply lines plus 6 extra lines(RS RW D7 D6 D5 D4). When the
LCD display is not enabled, data lines are tri-state and they do not interfere with the operation
of the microcontroller.
Features:
DEPT. OF ECE,LITS 35
Shapes and S
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
(8).Display data RAM and character generator RAM may be Accessed by the
microprocessor.
Description Of 16x2:
This is the first interfacing example for the Parallel Port. We will start with something simple.
This example doesn't use the Bi-directional feature found on newer ports, thus it should work
with most, if no all Parallel Ports. It however doesn't show the use of the Status Port as an
input. So what are we interfacing? A 16 Character x 2 Line LCD Module to the Parallel Port.
These LCD Modules are very common these days, and are quite simple to work with, as all
the logic required to run them is on board.
Schematic Diagram:
DEPT. OF ECE,LITS 36
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Above is the quite simple schematic. The LCD panel's Enable and Register Select is
connected to the Control Port. The Control Port is an open collector / open drain output. While
most Parallel Ports have internal pull-up resistors, there are a few which don't. Therefore by
incorporating the two 10K external pull up resistors, the circuit is more portable for a wider
range of computers, some of which may have no internal pull up resistors.
o We make no effort to place the Data bus into reverse direction. Therefore we hard wire
the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the data
lines. As a result we cannot read back the LCD's internal Busy Flag which tells us if the LCD
has accepted and finished processing the last instruction. This problem is overcome by
inserting known delays into our program.
o The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy
here. As with all the examples, I've left the power supply out. You can use a
bench power supply set to 5v or use a onboard +5 regulator. Remember a few
de-coupling capacitors, especially if you have trouble with the circuit working
properly.
DEPT. OF ECE,LITS 37
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Intelligent, with built-in Hitachi HD44780 compatible LCD controller and RAM
providing simple interfacing
61 x 15.8 mm viewing area
5 x 7 dot matrix format for 2.96 x 5.56 mm characters, plus cursor line
Can display 224 different symbols
Low power consumption (1 mA typical)
Powerful command set and user-produced characters
TTL and CMOS compatible
Connector for standard 0.1-pitch pin headers
2 VDD - Power, 5V
6 E H,H->L Enable
DEPT. OF ECE,LITS 38
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
15 NC - NOT CONNECTED
16 NC - NOT CONNECTED
FEATURES:
Even limited to character based modules, there is still a wide variety of shapes and
sizes available. Line lengths of 8,16,20,24,32 and 40 characters are all standard, in one, two
and four line versions.
DEPT. OF ECE,LITS 39
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
PIN DESCRIPTION:
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two
pins are extra in both for back-light LED connections).
DEPT. OF ECE,LITS 40
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
CONTROL LINES:
EN: Line is called "Enable." This control line is used to tell the LCD that you are sending it
data. To send data to the LCD, your program should make sure this line is low (0) and then set
the other two control lines and/or put data on the data bus. When the other lines are
completely ready, bring EN high (1) and wait for the minimum amount of time required by the
LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.
RS:
Line is the "Register Select" line. When RS is low (0), the data is to be treated as a
command or special instruction (such as clear screen, position cursor, etc.). When RS is high
DEPT. OF ECE,LITS 41
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
(1), the data being sent is text data which sould be displayed on the screen. For example, to
display the letter "T" on the screen you would set RS high.
RW:
Line is the "Read/Write" control line. When RW is low (0), the information on the data
bus is being written to the LCD. When RW is high (1), the program is effectively querying (or
reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are
write commands, so RW will almost always be low.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation
selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1,
DB2, DB3, DB4, DB5, DB6, and DB7.
• RS - 0 Instructions
- 1 Character
Writing data to the LCD:
DEPT. OF ECE,LITS 42
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Entering Text:
First, a little tip: it is manually a lot easier to enter characters and commands in
hexadecimal rather than binary (although, of course, you will need to translate commands from
binary couple of sub-miniature hexadecimal rotary switches is a simple matter, although a little
bit into hex so that you know which bits you are setting). Replacing the d.i.l. switch pack with
a of re-wiring is necessary.
SWITCHES:
The switches must be the type where On = 0, so that when they are turned to the zero
position, all four outputs are shorted to the common pin, and in position “F”, all four outputs
are open circuit.
All the available characters that are built into the module are shown in Table 3.
Studying the table, you will see that codes associated with the characters are quoted in binary
and hexadecimal, most significant bits (“left-hand” four bits) across the top, and least
significant bits (“right-hand” four bits) down the left.
Most of the characters conform to the ASCII standard, although the Japanese and Greek
characters (and a few other things) are obvious exceptions. Since these intelligent modules
were designed in the “Land of the Rising Sun,” it seems only fair that their Katakana phonetic
symbols should also be incorporated. The more extensive Kanji character set, which the
Japanese share with the Chinese, consisting of several thousand different characters, is not
included!
DEPT. OF ECE,LITS 43
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Using the switches, of whatever type, and referring to Table 3, enter a few characters
onto the display, both letters and numbers. The RS switch (S10) must be “up” (logic 1) when
sending the characters, and switch E (S9) must be pressed for each of them. Thus the
operational order is: set RS high, enter character, trigger E, leave RS high, enter another
character, trigger E, and soon
3.4 GPS:
A GPS receiver calculates its position by precisely timing the signals sent by GPS
satellites high above the Earth. Each satellite continually transmits messages that include
The receiver uses the messages it receives to determine the transit time of each message
and computes the distance to each satellite. These distances along with the satellites' locations
are used with the possible aid of trilateration, depending on which algorithm is used, to
compute the position of the receiver. This position is then displayed, perhaps with a moving
map display or latitude and longitude; elevation information may be included. Many GPS
units show derived information such as direction and speed, calculated from position changes.
DEPT. OF ECE,LITS 44
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Three satellites might seem enough to solve for position since space has three
dimensions and a position near the Earth's surface can be assumed. However, even a very
small clock error multiplied by the very large speed of light the speed at which satellite
signals propagate — results in a large positional error. Therefore receivers use four or more
satellites to solve for the receiver's location and time. The very accurately computed time is
effectively hidden by most GPS applications, which use only the location. A few specialized
GPS applications do however use the time; these include time transfer, traffic signal timing,
and synchronization of cell phone base stations Although four satellites are required for
normal operation, fewer apply in special cases. If one variable is already known, a receiver
can determine its position using only three satellites. For example, a ship or aircraft may have
known elevation. Some GPS receivers may use additional clues or assumptions (such as
reusing the last known altitude, dead reckoning, inertial navigation, or including information
from the vehicle computer) to give a less accurate (degraded) position when fewer than four
satellites are visible.
DEPT. OF ECE,LITS 45
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
To provide an introductory description of how a GPS receiver works, error effects are
deferred to a later section. Using messages received from a minimum of four visible satellites,
a GPS receiver is able to determine the times sent and then the satellite positions
corresponding to these times sent. The x, y, and z components of position, and the time sent,
are designated as where the subscript i is the satellite number and has the value 1,
2, 3, or 4. Knowing the indicated time the message was received , the GPS receiver could
compute the transit time of the message as , if would be equal to correct reception
A satellite's position and pseudorange define a sphere, centered on the satellite, with
radius equal to the pseudorange. The position of the receiver is somewhere on the surface of
this sphere. Thus with four satellites, the indicated position of the GPS receiver is at or near
the intersection of the surfaces of four spheres. In the ideal case of no errors, the GPS receiver
would be at a precise intersection of the four surfaces.
If the surfaces of two spheres intersect at more than one point, they intersect in a
circle. The article trilateration shows this mathematically. A figure, Two Sphere Surfaces
Intersecting in a Circle, is shown below. Two points where the surfaces of the spheres
intersect are clearly shown in the figure. The distance between these two points is the diameter
of the circle of intersection. The intersection of a third spherical surface with the first two will
be its intersection with that circle; in most cases of practical interest, this means they intersect
at two points. Another figure, Surface of Sphere Intersecting a Circle (not a solid disk) at Two
Points, illustrates the intersection. The two intersections are marked with dots. Again the
article trilateration clearly shows this mathematically.
For automobiles and other near-earth vehicles, the correct position of the GPS receiver
is the intersection closest to the Earth's surface.[40] For space vehicles, the intersection farthest
from Earth may be the correct one.
DEPT. OF ECE,LITS 46
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
The correct position for the GPS receiver is also the intersection closest to the surface
of the sphere corresponding to the fourth satellite.
Here Tx pin of GPS module is directly connected to digital pin number 10 of Arduino.
By using Software Serial Library here, we have allowed serial communication on pin 10 and
11, and made them Rx and Tx respectively and left the Rx pin of GPS Module open. By
default Pin 0 and 1 of Arduino are used for serial communication but by
using SoftwareSerial library, we can allow serial communication on other digital pins of the
Arduino. 12 Volt adaptor is used to power the GPS Module. Go through here to learn “How to
Use GPS with Arduino” and get the coordinates.
Fig13:Circuit explaination
Wi-Fi module ESP8266’s Vcc and GND pins are directly connected to 3.3V and GND
of Arduino and CH_PD is also connected with 3.3V. Tx and Rx pins of ESP8266 are directly
connected to pin 2 and 3 of Arduino. Software Serial Library is also used here to allow serial
communication on pin 2 and 3 of Arduino. We have already covered the Interfacing of
DEPT. OF ECE,LITS 47
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
ESP8266 Wi-Fi module to Arduino in detail, also please go through “How to Send Data from
Arduino to Webpage using WiFi”.
ESP8266 has two LEDs, one is Red, for indicating Power and second is Blue that is
Data Communication LED. Blue LED blinks when ESP sends some data via its Tx pin. Also,
do not connect ESP to +5 volt supply otherwise your device may damage. Here in this project,
we have selected 9600 baud rate for all the UART communications.
DEPT. OF ECE,LITS 48
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
CHAPTER 4
4.1Result:
Vehicle tracking system in which you can track vehicle on google maps.we will send
the location coordinates to the local server and you just need to open a ‘webpage’ on your
computer,where you will find a link to google maps with your vehicles location
coordinates.when you click on that link,it takes you on google maps,showing your vehicle
location.
• vehicle occupants from striking interior objects such aThis system can be interfaced
with vehicle airbag system that can prevent s the steering wheel or window.
• This can also be developed by interconnecting a camera to the controller module that
takes the photograph of accident spot that makes the tracking easier.
DEPT. OF ECE,LITS 49
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Vehicle tracking systems can help to reduce running costs by specifically targeting
those who speed and waste fuel. By focussing upon these drivers it is possible to not
only reduce fuel and maintenance bills, but to also reduce insurance premiums.
By using a system's automatic mileage reminder it is possible to reduce time wasted
through vehicle maintenance. In addition, by having a service that ensures your
vehicles are regularly serviced means that resale values for the fleet will also be
higher. It can also help to avoid penalties for issues such as bald tyres and tax as
reminders are clear and precise.
Some insurance companies will offer around a thirty percent discount to companies
who implement a GPS vehicle tracking system. This is not only because it encourages
safer driving, but also helps recovery if thefts do occur.
Productivity of workers can be increased by being able to keep track of lunch hours,
exposing unauthorised stops and breaks and by evaluating the overtime requests of
workers. By having detailed information on the whereabouts of vehicles at all times, it
is far easier to keep an eye on employee activities.
Vehicle tracking systems will vastly reduce your phone bills as it is no longer a
necessity to constantly call employees to find their location.
By having all the relevant information on one screen, those running the software have
easy access to answer enquiries rapidly and accurately.
GPS systems reduce the amount of paperwork that drivers must fill out. By doing this
you not only soften the blow of introducing such a system, but also increase the
accuracy of your records.
DEPT. OF ECE,LITS 50
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
CHAPTER 5
CODING
#include<LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
#include <SoftwareSerial.h>
SoftwareSerial gps(10,11); // RX, TX
//String str="";
char str[70];
String gpsString="";
char *test="$GPGGA";
String latitude="No Range ";
String longitude="No Range ";
int temp=0,i;
boolean gps_status=0;
void setup()
{
lcd.begin(16,2);
Serial.begin(9600);
gps.begin(9600);
lcd.print("Vehicle Tracking");
lcd.setCursor(0,1);
lcd.print(" System ");
delay(2000);
gsm_init();
lcd.clear();
Serial.println("AT+CNMI=2,2,0,0,0");
lcd.print("GPS Initializing");
lcd.setCursor(0,1);
DEPT. OF ECE,LITS 51
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
DEPT. OF ECE,LITS 52
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
temp=0;
}
}
void gpsEvent()
{
gpsString="";
while(1)
{
while (gps.available()>0) //checking serial data from GPS
{
char inChar = (char)gps.read();
gpsString+= inChar; //store data from GPS into gpsString
i++;
if (i < 7)
{
if(gpsString[i-1] != test[i-1]) //checking for $GPGGA sentence
{
i=0;
gpsString="";
}
}
if(inChar=='\r')
{
if(i>65)
{
gps_status=1;
break;
}
else
{
i=0;
DEPT. OF ECE,LITS 53
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
}
}
}
if(gps_status)
break;
}
}
void gsm_init()
{
lcd.clear();
lcd.print("Finding Module..");
boolean at_flag=1;
while(at_flag)
{
Serial.println("AT");
while(Serial.available()>0)
{
if(Serial.find("OK"))
at_flag=0;
}
delay(1000);
}
lcd.clear();
lcd.print("Module Connected..");
delay(1000);
lcd.clear();
lcd.print("Disabling ECHO");
boolean echo_flag=1;
while(echo_flag)
{
DEPT. OF ECE,LITS 54
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
Serial.println("ATE0");
while(Serial.available()>0)
{
if(Serial.find("OK"))
echo_flag=0;
}
delay(1000);
}
lcd.clear();
lcd.print("Echo OFF");
delay(1000);
lcd.clear();
lcd.print("Finding Network..");
boolean net_flag=1;
while(net_flag)
{
Serial.println("AT+CPIN?");
while(Serial.available()>0)
{
if(Serial.find("+CPIN: READY"))
net_flag=0;
}
delay(1000);
}
lcd.clear();
lcd.print("Network Found..");
delay(1000);
lcd.clear();
}
void get_gps()
{
DEPT. OF ECE,LITS 55
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
gps_status=0;
int x=0;
while(gps_status==0)
{
gpsEvent();
int str_lenth=i;
latitude="";
longitude="";
int comma=0;
while(x<str_lenth)
{
if(gpsString[x]==',')
comma++;
if(comma==2) //extract latitude from string
latitude+=gpsString[x+1];
else if(comma==4) //extract longitude from string
longitude+=gpsString[x+1];
x++;
}
int l1=latitude.length();
latitude[l1-1]=' ';
l1=longitude.length();
longitude[l1-1]=' ';
lcd.clear();
lcd.print("Lat:");
lcd.print(latitude);
lcd.setCursor(0,1);
lcd.print("Long:");
lcd.print(longitude);
i=0;x=0;
str_lenth=0;
DEPT. OF ECE,LITS 56
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
delay(2000);
}
}
void init_sms()
{
Serial.println("AT+CMGF=1");
delay(400);
Serial.println("AT+CMGS=\"+91**********\""); // use your 10 digit cell no. here
delay(400);
}
void send_data(String message)
{
Serial.println(message);
delay(200);
}
void send_sms()
{
Serial.write(26);
}
void lcd_status()
{
lcd.clear();
lcd.print("Message Sent");
delay(2000);
lcd.clear();
lcd.print("System Ready");
return;
}
void tracking()
{
init_sms();
DEPT. OF ECE,LITS 57
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
DEPT. OF ECE,LITS 58
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
CONCLUSION
Vehicle tracking systems are very useful and important in large cities.Now a days
vehicle accidents and theft is rapidly increasing,with this project we can have a good control.
This technology can also help to advance the transportation system and can be used in
organizations for security purpose and tracking purpose.
DEPT. OF ECE,LITS 59
VECHICLE TRACKING ON GOOGLE MAPS USING ARDUINO,ESP8266 & GPS
1. "Re: Comments to Access Board Docket Number 2007-1" (PDF). Office of Technical
Information Services, APTA. January 20, 2009. p. 3. Retrieved 2009-11-26.
2. ^ Jump up to:a b "Real-Time Muni Arrival Information Just a Free Call Away". San
Francisco MTA. July 13, 2005. Retrieved 2009-11-26.
3. Jump up^ "Cell phone bus tracking applications developed". Metro Magazine. April
2009. Retrieved 2009-11-26.
4. Jump up^ "WebWatch allows you to obtain 'real-time' schedule information for your
bus stop and (to) track buses in real time.". Duluth Transit Authority. 2007.
Retrieved 2009-11-26.
5. Jump up^ "Cost cutting and real time tracking". Retrieved 2 June 2016.
6. Jump up^ Claburn, Thomas (March 4, 2009). "Court Asked To Disallow Warrantless
GPS Tracking". Information Week. Retrieved 2009-03-18.
DEPT. OF ECE,LITS 60