Book GSM
Book GSM
Supervised By
We, hereby, declare that the work presented in this thesis is the outcome of the project
performed by us under the supervision of Mr. Kalyan Mondol ,Assistant Professor Dept. of
EEE , The International University of Scholars , Dhaka, Bangladesh. We also declare that no
part of this thesis has been or is being submitted elsewhere for the award of any degree or
diploma.
Candidate’s Signature
---------------------------------
Sagar Ahmed – 192020237
-----------------------------
SM Jaman – 192020285
------------------------------------------
Md. Rashedul Hoque – 191020206
------------------------------------------
Rashman Ibn Rahman - 171020033
Supervisor ,
........................
Mr. Kalyan Mondol
Assistant Professor
Dept. of EEE , The International University of Scholars.
LETTER OF ACCEPTANCE
This Thesis Project entitled “Design & Implementation of GPS & GSM Based Vehicle Accident
Notification System” submitted by Sagar Ahmed – 192020237 , SM Jaman – 192020285, Md.
Rashedul Hoque – 191020206, Rashman Ibn Rahman – 171020033 to the Department of
Electrical and Electronic Engineering, University of Scholars Dhaka, Bangladesh is accepted by
the department in partial fulfillment of requirements for the Award of the Degree of Bachelor of
Science and Engineering.
......................
Mr. Kalyan Mondol
Assistant Professor
Dept. of EEE ,
The International University of Scholars.
. . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . .
Shaiyek Md. Buland Taslim
Head
Dept. of EEE ,
The International University of Scholars.
ABSTRACT
In this project, vehicle accident detection and rescue information system is developed in
order to detect vehicle accident and send the location information of the accident place
to vehicle owner, nearest hospital and police. The communication between the
cellphone and hardware device is established via GSM/GPRS shield, and the location is
traced by using the GPS shield. The accident is detected through accelerometer sensors,.
The project is developed for real time data fetching form the hardware device using
sensors and send notification to different users either through android mobile
application or SMS. This project approximately provides the accurate detection of the
location of accident occurred, and send notification to the nearest police station and
hospital.
ACKNOWLEDGMENTS
First of all, we would like to thank almighty Allah for giving us strength, patience and
knowledge to complete this project work.
We would like to express our sincere gratitude to our supervisor Mr. Kalayan Mondol
for the continuous support, for his patience, motivation, and immense knowledge. His
guidance helped us in all the time of work and writing of this thesis. We could not have
imagined having a better supervisor and mentor for this project.
We would like to thank our friends for their feedback, cooperation and of course
friendship.
In addition, we would like to express our gratitude to the faculty members of the
Department of Electrical and Electronic Engineering (EEE),University Of Scholars,
Dhaka, Bangladesh who helped us with their feedback.
Last but not least, we would like to thank our family, our parents and to our brothers
and sisters for supporting us.
TABLE OF CONTENTS
DECLARATION..........................................................................................................ii
LETTER OF ACCEPTANCE......................................................................................iii
ABSTRACT.................................................................................................................iv
ACKNOWLEDGMENTS.............................................................................................v
TABLE OF CONTENTS.............................................................................................vi
LIST OF FIGURES.......................................................................................................1
LIST OF ABBREVIATION..........................................................................................2
LIST OF TABLES........................................................................................................3
CHAPTER 1: INTRODUCTION..................................................................................4
1.1 Background.....................................................................................................................4
1.2 Objective.........................................................................................................................6
1.3 Motivation.......................................................................................................................6
Interface Layer....................................................................................................................10
Service layer........................................................................................................................11
Sensing Layer......................................................................................................................12
Arduino 13
Features 15
Board Description...............................................................................................................17
Hardware Connection:........................................................................................................24
CHAPTER 4: IMPLEMENTATION..........................................................................28
Overall Conclusion..............................................................................................................36
Future Work........................................................................................................................36
REFERENCE..............................................................................................................37
APPENDIX.................................................................................................................39
LIST OF FIGURES
Figure 2.6: IIC / I2C 1602 Blue Backlight LCD Display Module[13]...........................19
INTRODUCTION
1.1 Background
The rapid growth of technology and infrastructure has made our lives easier. The advent
of technology has also increased the traffic hazards and the road accident take place
frequently which causes huge loss of life and property because of the poor emergency
facilities. Our project will provide an optimum solution to this draw back by using
GSM, GPS and Accelerometer. In addition to, it also takes the precaution to prevent the
accident by using alcohol sensor and Temperature sensor used to detect fire. The system
will send the accident location acquired from GPS along with the time. This will help to
reach the rescue service in time and save the valuable human life. Using IoT technique a
vehicle tracking system (VTS) can be built. A vehicle tracking system combines the use
of automatic vehicle location of 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 internet with specialized software.
The history of vehicle tracking dates to the beginning of GPS technology in 1978. In the
early years, the technology was not yet operational, due to an insufficient number of
satellites orbiting the earth. On Jan. 17, 1994, after years of gradual growth, the final of
the first 24 satellites was launched, and the GPS system was considered fully
operational. Early GPS was designed primarily only for military but in 1996, President
Bill Clinton determined that the system would be an asset to civilians as well as the
military. This policy change made GPS technology available to the average individual,
including fleet managers, who could see the benefit of using the technology to keep tabs
on their vehicles. In the early days of fleet tracking, in order to properly track a fleet,
each vehicle had to be enabled with a costly GPS device. The company was required to
pay a typically high monthly fee to use the satellite tracking system. While helpful,
these early systems were difficult to implement, costly to use and sometimes
inconvenient for drivers and fleet management alike. Thus it took several
years for the concept to catch on. In the earliest days, only large, wealthy fleets took
advantage of the technology. The modern fleet tracking system provides the necessary
data to fleet managers allowing them to run their operations more efficiently. Reports on
driver behavior, vehicle performance and fuel use all make it easier for the fleet
manager to cut costs and increase efficiencies. These systems go beyond simple
reporting of each vehicle’s location, offering fleet managers a wealth of information
about their vehicles and their drivers .
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.
3. User interface: The UI determines how one will be able to access
information, view vehicle data, and elicit important details from it.
In Bangladesh this VTS is available. There are some company like GP, ROBI provides
Vehicle Tracking Service (VTS) which has some common features like tracking the
vehicle using satellite GPS & GSM communication. But there is no system which can
detect accident and also give the service of VTS. Here comes carsafe project which can
detect speed of a car, location of a car, and if there is any accident occur it can
communicate automatically to the nearest police station, hospital and owner to reduce
instant loss or damage.
1.2 Objective
Here the following objectives are set, in the view of above mentioned research
background for the present work in VTS, accident detection and rescue information
system.
1.3 Motivation
In Bangladesh, there are some company provides vehicle tracking system. Every VTS
do the same thing like speed check, track vehicle. Some VTS can detect an accident.
But there is no VTS that gives notification to the nearest hospital and police station if
any accident occurs. In Bangladesh, where a person who faces an accident get less
facility in treatment there need a system that can communicate to the nearest hospital
and police station. Statistics shows, there are more than 3,000 people die on
Bangladesh's roads every year. The country has one of the highest rates in the world,
with more than 85 deaths for every 10,000 registered motor vehicles. That's around 50
times higher than the rate in most western countries. According to the World Health
Organization (WHO), road traffic injuries cause a loss of about 2% of GDP in
Bangladesh, or about £1.2bn annually. This is almost equal to the total foreign aid
received in a fiscal year. The losses include direct and indirect expenses, such as
medical costs, insurance loss, property damage, family income losses and traffic
congestion [3].
Now-a-days lots of accidents happen on highways due to increase in traffic and also due
to rash driving of the drivers. And in many situations the family members or the
ambulance and police authority is not informed in time. This result in delaying the help
reached to the person suffered due to an accident. A serious accident occurs at
nightmare and it might be not caught sight of other people then the victim is unable to
call some emergency services by himself don’t get help at the right time. If other may
see the accident but they don’t have the number of hospital or police station. So It take’s
lots of time to inform a nearest hospital or police station. That increase the vulnerability
of life of the people who got into accident. Besides, Many people died on the way to the
hospital due to lack of information about nearest hospital or delay for waiting for the
ambulance. This project will implement a system that can detect accident and show the
nearest hospital to the car passengers, also a hospital and police station will get notified
about any accident occurred near to the hospital and police station. So that, the hospital
and police station can send rescue team in very short time. This project will help to
reduce the greater loss and damage for any accident.
1.4 Outline of the report
The outline of the rest of this report has been structured as follows.
Chapter 2 presents the background study for the project and hardware specification of
the components used in the project it also describes the technical previous related works
on the topic of VTS and IoT..
Chapter 3 explains methodology of the project that how the project being implemented.
Chapter 4 presents the real implementation of the project. The hardware, web services
including website and mobile application.
Chapter 5 outlines conclusion of this work precisely and also describes the scope of
future work for possible extended application of the project.
CHAPTER 2
BACKGROUND STUDY
2.2 History
In 1983, work began to develop a European standard for digital cellular voice
telecommunications when the European Conference of Postal and Telecommunications
Administrations (CEPT) set up the Groupe Spécial Mobile (GSM) committee and later provided
a permanent technical-support group based in Paris. Five years later, in 1987, 15 representatives
from 13 European countries signed a memorandum of understanding in Copenhagen to develop
and deploy a common cellular telephone system across Europe, and EU rules were passed to
make GSM a mandatory standard.The decision to develop a continental standard eventually
resulted in a unified, open, standard-based network which was larger than that in the United
States.
In February 1987 Europe produced the first agreed GSM Technical Specification. Ministers
from the four big EU countries cemented their political support for GSM with the Bonn
Declaration on Global Information Networks in May and the GSM MoU was tabled for
signature in September. The MoU drew in mobile operators from across Europe to pledge to
invest in new GSM networks to an ambitious common date.
In this short 38-week period the whole of Europe (countries and industries) had been brought
behind GSM in a rare unity and speed guided by four public officials: Armin Silberhorn
(Germany), Stephen Temple (UK), Philippe Dupuis (France), and Renzo Failli (Italy). In 1989
the Groupe Spécial Mobile committee was transferred from CEPT to the European
Telecommunications Standards Institute (ETSI).The IEEE/RSE awarded to Thomas
Haug and Philippe Dupuis the 2018 James Clerk Maxwell medal for their "leadership in the
development of the first international mobile communications standard with subsequent
evolution into worldwide smartphone data communication".The GSM (2G) has evolved into 3G,
4G and 5G.
2.3 Network structure
The network is structured into several discrete sections:
Microcontroller ATmega328P
Operating Voltage 5V
(recommended)
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
Weight 25 g
GSM, GPS, GSRM Shied (SIM808)
Features
General
1. SIM808 module
2. MIC29302 power chip
3. CP2102: USB TO UART converter
4. SMF05C: TVS diode
5. 1N5408: on board rectifier
6. SIM808 functional pins
7. Arduino expansion connector
8. USB TO UART interface
9. DC power jack
10. GPS antenna connector
11. Bluetooth antenna connector
12. Firmware upgrade interface
13. GSM antenna connector
14. SIM card slot
15. 3.5mm earphone/mic jack
16. GPS status indicator
17. CP2102 UART Tx/Rx indicator
18. NET indicator:
a. flashes fast when the module starts up
b. flashes slowly after GSM register succeed
19. Power indicator
20. Power switch
21. SIM808 control button: press the button and hold for 1s, to startup/shutdown the
SIM808
22. Reset button
23. UART selection switch, select controlling the SIM808 via:
a. CP2102
b. UART pins of Arduino interface
24. SIM808 UART configuration:
a. SIM_TX: SIM808 UART TX
b. SIM_RX: SIM808 UART RX
25. IOREF power selection: configure the UART voltage level
2.7 Acclerometer Gravity Sensor.
In many research IoT has been used in vehicle tracking system to find the vehicle location. In
[10], the hardware and software of the GPS and GSM network were developed. The proposed
GPS/GSM based System has the two sections, first is a mobile unit and another is controlling
station. The system forms, interfaces, connections, data transmission and gathering of
information among the mobile unit and control stations are working effectively. These
outcomes are good with GPS technologies.
In [11], a vehicle tracking system is an electronic device, installed in a vehicle to enable
the owner or a third party to track the vehicle's place. This paper proposed to design a
vehicle tracking system that works using GPS and GSM technology. This system built
based on embedded system, used for tracking and positioning of any vehicle by using
Global Positioning System (GPS) and Global system for mobile communication (GSM).
This design will continuously watch a moving Vehicle and report the status of the
Vehicle on demand.
In [12], Face Detection System used to detect the face of the driver, and compare with
the predefined face. The car owner is sleeping during the night time and someone theft
the car. At that point Face Detection System obtains pictures by one little web camera,
which is hidden easily in somewhere in the car. Face Detection System compared the
obtained images with the stored images. If the images don't match, then the information
sends to the owner through MMS. The owners get the pictures of the criminal in cell
phone and follow the place through GPS. The place of the car and its speed displayed to
the owner through SMS. The owner can recognize the thief images as well as the place
of the car and can easily find out the hijacker’s image. This system applied in day-to-
day life.
In [13], this system provided vehicle cabin safety, security based on embedded system
by modifying the existing modules. This technique screens the level of the poisonous
gasses, for example, CO, LPG and alcohol inside the vehicle provided alert information
as alarm during the dangerous situations. The SMS sends to the authorized person
through the GSM. In this technique, the IR Sensor used to identify the static obstacle in
front of the vehicle and the vehicle stopped if any obstacle detected. This is avoiding
accidents due to collision of vehicles with any static obstacles.
In [14], Kai-Tai Song and Chih-Chieh Yang have a designed and built on a real-time
visual tracking system for vehicle safety applications. In this paper manufactured a
novel element based vehicle-tracking algorithm, consequently identify and track a few
moving articles, like cars and motorcycles, in front of the following vehicle. Joint with
the concept of focus of expansion (FOE) and view investigation, the built system can
fragment elements of moving articles from moving background and offer a collision
word of warning on real-time. The proposed algorithm using a CMOS image sensor and
NMOS embedded processor architecture. The constructed stand-alone visual tracking
system validated in real road tests. The developed remain solitary visual following
framework approved in genuine street tests. The results provided information of
collision warning in urban artery with speed about 60 km/hour both at night and day
times.
In [15], the remote monitoring system based on SMS and GSM was implemented. In
view of the total design of the system, the hardware and software designed. In this
paper, the GSM network is a medium for transmitting the remote signal. This consists of
two sections that are the checking focus and the remote observing station. The
observing centers consists of a PC and correspondence module of GSM. The software
monitoring center and the remote observing station executed by utilizing VB. The result
of this demonstration shows that the system can watch and control the remote
communication between the monitoring center and the remote checking station.
In [16], the proposed tracking system based on cloud computing infrastructure. The
sensors are used to monitor the fuel level, driver conditions, and speed of the vehicle.
All data exchanged to cloud server using GSM empowered device. All the vehicles
equipped with GPS antenna to find the place. To stay away from the alcoholic and
drive, the alcohol sensor introduced to monitor the driver status. The proposed
technology significantly avoids the accident in highways.
CHAPTER 3
The project is combined an accident detection mechanism with a VTS. Hardware used
in this project are listed below:
1. Arduino
2. GSM, GPS, GSRM Shied (SIM900)
3. Accelerometer Gravity Sensor
The above block diagram explains the working procedure of the system which can be
designed for this project. An Arduino UNO is used here for automation and controlling
of the other supporting devices those are GPS, GSM, vibration sensor, LCD display,
puss switch, buzzer etc. Actually this paper gives a practical model of a vehicle accident
detection and rescue information system which can do routing, tracking of moving
vehicle as well as detect accident in large area.
Actually this system consists of two section, the first one is tracking location which is
done by GPS in it and as the car moves the location of the car change continuously, the
GPS finds the location in terms of two co-ordinates that are longitude and latitude.
These two co-ordinates communicate with GSM modem which is shown in the block
diagram.
The second one is detection of accident through vibration sensor. To detect accident, a
threshold is set to a highest vibration value. If the vibration value is greater than the
threshold value, then it will consider that accident occur and wait 60 second for a
confirmation. After detection of an accident the system send the accident location to the
web server. The web server then informs the car owner and nearest police station and
hospital through web service using web application/ mobile application/ mobile SMS.
A hardware and web service is designed to implement the project. The hardware will be
installed in the vehicle and any user can monitor their vehicle by using the web service.
Also any police station and hospital can get the notification of accident occur through
the website.
Hardware Connection:
Step 4: Ask Driver for confirm accident. Set wait time 60 second.
Step 6: Send notification to web server owner account, nearest police station, hospital
also send SMS. Go to step 2.
Step 9: go to step 6.
The system communicates with the web server through GPRS communication via a
GSM, GPRS Shield. It will send the vehicle location’s latitude and longitude data to
web server upon user request or after detection of accident. The web application will
forward necessary notification to the nearest police station and hospital with the
website, mobile application and mobile SMS.
The complete design flow of the project can be depicted by Figure 3.33.
Decisions of design
specification and
hardware
Hardware connection,
Program for hardware & web
service
Notification through
GSM
IMPLEMENTATION
Embedded device
Circuit connection:
Arduino IDE is used to write program for Arduino Uno Board and to upload the
program to the board.
CONCLUSION
Overall Conclusion
The IoT Based Vehicle Accident detection and rescue system is successfully
implemented using database server and API and fulfils all the requirements to be an IoT
based framework. This device is capable of reading and collecting the required data and
sends them securely to the database stored in server. This system can do tracking of a
vehicle which have this device. Besides, if an accident occur this system can
communicate nearest hospital and police station. Police station and hospital’s authority
can see the shortest route to reach the accident spot using this system which have a web
application and mobile application. Web based real time data visualization makes this
system more convenient to see all the data in a clean, formatted and user friendly way.
Future Work
So far, it has been implemented that the system can collect data successfully from
sensors and communicate with web server. In near future, the system can be improved
by using more sensor to detect accident with more accuracy and more different way of
accident detection. This system will try to communicate at least three nearest hospitals if
any major accident occurs and show the shortest path to reach the accident spot.
Moreover, the system will integrate with other system. For example, an insurance
company can use the project database to inquiry about an accident and provide money
to the owner in time. In Bangladesh, traffic jam is very popular word. If people use this
system, the system can collect traffic data and notify the driver about traffic and find out
a way which have less traffic jam.
REFERENCE
[3] S. Al-Mahmood, "Bangladesh's road accidents take heavy toll on poor – and on
economy", the Guardian, 2017. [Online]. Available:
https://www.theguardian.com/global-development/2012/aug/22/bangladesh-
road-accidents-poor-economy. [Accessed: 15- Jul- 2017]
[6] "Cite a Website - Cite This For Me", Arduino.org, 2017. [Online].
Available:http://www.arduino.org/products/boards/arduino-uno. [Accessed: 02-
Aug- 2017]
[9] S. Module, S. Arduino. and T. If the module does not vibrate, "SW420",
Bdspeedytech.com, 2017. [Online]. Available:
http://bdspeedytech.com/index.php?route=product/product&product_id=1388&s
earch=sw+420. [Accessed: 02- Aug- 2017]
[10] Asaad M. J. Al-Hindawi, Ibraheem Talib,“Experimentally Evaluation of
GPS/GSM Based System Design”, Journal of Electronic Systems Volume 2
Number 2 June 2012
[11] Kunal Maurya , Mandeep Singh, Neelu Jain, “ Real Time Vehicle Tracking
System using GSM and GPS Technology- An Anti-theft Tracking System,”
International Journal of Electronics and Computer Science Engineering. ISSN
2277-1956/V1N3-1103-1107
[12] Vikram Kulkarni & Viswaprakash Babu, “embedded smart car security system
on face detection’, special issue of IJCCT, ISSN(Online):2231-0371,
ISSN(Print):0975-7449,volume-3, issue-1
[14] Kai-Tai Song, Chih-Chieh Yang, of National Chiao Tung University, Taiwan,
“Front Vehicle Tracking Using Scene Analysis”, Proceedings of the IEEE
International Conference on Mechatronics & Automation 2005.
#include <Wire.h>
#include <SoftwareSerial.h>
SoftwareSerial SIM900A(10,11); // arduino D1O > GSM RX D11> GSM TX
const int RELAY_PIN = 4; // Arduino pin connected to Relay's pin
const int ANALOG_THRESHOLD = 350;
void setup() {
void loop() {
delay(200);
}
}
void SendMessage2()
{
//Serial.println ("Sending Message");
delay(1000);
SIM900A.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode
delay(1000);
//Serial.println ("Set SMS Number");
SIM900A.println("AT+CMGS=\"+8801770917298\"\r"); //Mobile phone number to send message
delay(1000);
// Serial.println ("Set SMS Content");
SIM900A.println("I am in accident!");// Messsage content
delay(100);
// Serial.println ("Finish");
SIM900A.println((char)26);// ASCII code of CTRL+Z
delay(1000);
// Serial.println ("Message has been sent ");
}