SafeTravAlert Full
SafeTravAlert Full
SafeTravAlert Full
• VISION:
• MISSION:
iii
ACKNOWLEDGEMET
Above all we thank the Almighty, our parents and Siblings for their
constant support and encouragement for completing this project.
iv
ABSTRACT
system continuously monitors the vehicle's route. In the event ofan accident, the
technology to mitigate road accidents and emphasizes the role of proactive safety
driving
v
TABLE OF CONTENTS
ABSTRACT v
LIST OF ABBREVIATIONS ix
1. INTRODUCTION 1
1.1 INTERNET OF THINGS (IOT) 1
1.2 ARDUINO 1
1.3 NEO6M GPS 2
1.4 MPU6050 2
1.5 GSM 3
1.6 NODE MCU 3
2. LITERATURE SURVEY 4
3. SYSTEM ANALYSIS 6
3.1 EXISTING SYSTEM 6
3.1.1 Disadvantages 6
3.2 PROPOSED SYSTEM 7
3.2.1 Advantages 8
3.3 FEASIBILITY STUDY 8
3.3.1 Technical feasibility 9
3.3.2 Operational feasibility 9
3.3.3 Economic feasibility 9
4. SYSTEM REQUIREMENTS 10
4.1 HARDWARE REQUIREMENTS 10
4.2 SOFTWARE REQUIREMENTS 10
vi
5. SYSTEM DESIGN 11
5.1 OVERVIEW OF ARCHITECTURE 11
5.2 CIRCUIT DIAGRAM 12
5.3 ACTIVITY DIAGRAM 13
5.4 USECASE DIAGRAM 14
6. SYSTEM IMPLEMENTATION 15
6.1 MODULES DESCRIPTION 15
6.1.1 Building hardware for system 15
6.1.2 Preprocessing of modules 16
6.1.3 Implementation and testing of device 17
7. SYSTEM TESTING 19
7.1 TESTING OBJECTIVES 19
7.2 TYPES OF TESTS 19
7.2.1 Unit test cases 19
7.2.2 Integration test cases 20
7.2.3 System test cases 20
APPENDICES 24
APPENDIX 2- SCREENSHOTS 32
vii
LIST OF FIGURES
viii
LIST OF ABBREVIATIONS
Abbreviations Expansion
IP Internet Protocol
ix
CHAPTER 1
INTRODUCTION
1
that maybe interfaced to various expansion boards ('shields') or breadboards
(forprototyping) and other circuits. The boards feature serial communications
interfaces, The Arduino Software (IDE)makes it easy to write code and uploadit
to the board offline. The Arduino Integrated Development Environment - or
Arduino Software (IDE) connects to the Arduino boards to upload programs
and communicate with them. Programs written using Arduino Software (IDE)
are called sketches. These sketches are written in the text editor and are saved
with the file extension
1.4 MPU6050
2
acceleration along three axes. Operating with a supply voltage range
of2.375V to 3.46V. The MPU6050 communicates via I2C or SPI interfaces,
facilitating seamless integration into various projects. Its compact size and low
power consumption make it ideal for applications such as motion- controlled
gaming, drone stabilization, and wearable devices. Despite occasional noise
and calibration requirements, its robust performance and richfeature set make
it a popular choice among hobbyists and professionals alike for motion sensing
and orientation tracking tasks.
1.5 GSM
3
CHAPTER 2
LITERATURE SURVEY
which uses the fusion of smartphone’s built-in and connected sensors not only
Accident Rescue System Implementation for Smart City Applications. Here the
IOT based System Designto Prevent Road Accidentsin Accident Prone CitiesIn
this paper, A conceptual frame work has been proposed that highlights different
causes of road accidents to take place. This paper also covers possible measuring
parameters and approaches that draws a solution to prevent road accidents in the
4
Mohammad Ehsanul Alim et al.[2] Designed & Implementation of IoT
Based Smart Helmet for Road Accident Detection. This project focus that The
Bike rider’s engine will start only when the rider buckle the helmet. GPS &
GSM Technology is used for tracking the location of the bike rider and sending
text message to the family members of the Bike rider when an accident occurs.
Alert System This system uses a GPS receiver to detect the coordinates of the
vehicle. The GSM module sends the coordinates to the rescue team via SMS.
system displays coordinates or status messages on an LCD display and also this
system alerts the rescue team with the accident location via SMS
5
CHAPTER 3
SYSTEM ANALYSIS
3.1.1 Disadvantages
6
• Limited Coverage: The effectiveness of the system may be limited in
areas with poor cellular or internet connectivity, as it relies on IoT
platforms for data transmission. In remote or rural areas with limited
network infrastructure, the system's performance may be compromised.
• Privacy Concerns: Collecting data from smartphones raises privacy
concerns, as users may be apprehensive about sharing their sensor data,
especially if it involves continuous monitoring of their movements and
activities.
• Power Consumption: Continuous monitoring and data transmission can
drain the smartphone's battery quickly. Users may be reluctant to use
the system if it significantly impacts their device's battery life.
7
3.2.1 Advantages
8
3.3.1 Technical Feasibility
Evaluate the availability and compatibility of required technologies
such as GPS, sensors, and communication systems. Assess the feasibility of
integrating these technologies into a cohesive system capable of real-time
tracking and accident detection. Consider potential technical challenges and
determine if viable solutions exist.
9
CHAPTER 4
SYSTEM REQUIREMENTS
The hardware requirements may serve as the basis for a contract for the
implementation of the system and should therefore be a complete engineer as
the starting point for the system design.
• Bug Converter
• GPS
• Arduino Uno
• MPU6050
• GSM
• Node MCU
• Adaptor-12v
• Sim Card
• Connector wires
4.2 SOFTWARE REQUIREMENTS
• Arduino IDE
10
CHAPTER 5
SYSTEM DESIGN
The diagram shows the overall architecture of the project which consists
of the procedure and components. Each block shows the functional and
connections components of the project.
The setup consists of a Tilt sensor (MPU6050) interfaced with an Arduino
UNO, along with a communication module (NEO6M GPS & SIM800L) and
Adafruit io Sensor for location sharing. When triggered, the system sends call and
SMS alerts containing the device's location information obtained from the GPS
module. This integrated solution provides real-time notification capabilities with
precise location tracking, enhancing user safety and security.
11
5.2 CIRCUIT DIAGRAM
12
5.3 ACTIVITY DIAGRAM
This module diagram represents the flow from one activity to another
activity. The activity can be described as an operation of the system. Some
activities are based on conditions satisfied by the actor/object.
13
5.4 USE CASE DIAGRAM
This diagram shows the user such as actor, system and the role of
developer in this project. This behavior diagram models the functionality of the
system using use cases.
14
CHAPTER 6
SYSTEM IMPLEMENTATION
6.1 MODULES
Once the components are selected, the next step is to wire and connect
them together effectively. This involves referring to the datasheets and pinout
diagrams of each component to ensure proper connections. The MPU6050
accelerometer sensor and NEO-6M GPS module are connected to the Arduino
Uno, while ensuring appropriate power and ground connections for all
components. Additionally, the GSM module is connected to the Arduino Uno to
facilitate communication with external devices or services for sending alerts.
15
We create a solid foundation for the accident detection system's hardware
setup. This setup enables seamless communication and data transfer between
thevarious components, ensuring accurate detection and timely alerts in case of
accidents. Through this process, we establish a reliable hardware infrastructure
that forms the backbone of the accident detection system, laying the
groundworkfor its successful implementation and functionality.
17
GPS module, GSM module, ESP32, Bug converter, and power source. Moreover,
algorithms are developed to process sensor data, detect potential accidents based
on predefined criteria, and execute alerts when necessary. The integration of all
components into a cohesive system architecture ensures proper communication
and interaction between hardware and software elements.
18
CHAPTER 7
SYSTEM TESTING
19
7.2.2 Integration Testing
Integration testing takes as its input modules that have been unit
tested.groups them in larger aggregates, applies tests defined in an
integration test plan to those aggregates, and delivers as its output the
integrated system ready for system testing. It involves the combination of
many modules which are tightly coupled with each other. The main function
or goal of this testing is to test the interfaces between the units/modules.
Integration testing can be started once the modules to be tested are available.
It does not require the other module to
20
The testing takes place as:
Input: Power supply to the device and tilt the device for the sensor detection
Output: Recognizing the motion from the sensor and collect the exact location,
where the motion detected then sends the information via SMS and a call
through GSM module to the configured mobile number
21
CHAPTER 8
8.1 CONCLUSION
SafeTravAlert presents a robust solution for enhancing road safety and
providing real-time assistance during emergencies. By integrating advanced
sensors and communication modules, the device effectively detects accidents
and promptly notifies pre-configured contacts via SMS and phone calls. The
incorporation of a GSM module ensures reliable communication even in
remote areas. Additionally, the ability to track vehicle movement in real-time
enhances accountability and aids in swift response in case of emergencies.
Through this project, we have successfully demonstrated the potential of
technology to mitigate road accidents and improve overall safety measures.It
is not only enhances individual safety but also facilitates more efficient
emergency response coordination, potentially reducing response times and
improving outcomes. The scalability of SafeTravAlert allows for widespread
adoption across various transportation modes, including cars, motorcycles,
and public transport vehicles, thereby maximizing its impact on road safety.
22
Smart Road Infrastructure Integration: Integrating the device with
smart road infrastructure, such as traffic lights and road signs, can enhance
communication and coordination between vehicles and the surrounding
environment, further improving safety.
Enhanced Energy Efficiency: Implementing energy-efficient components
and renewable energy sources, such as solar panels or kinetic energy
harvesting systems, can prolong battery life and reduce the device's
environmental impact.
Integration with Wearable Devices: Integrating the device with wearable
devices, such as smartwatches or fitness trackers, can enable seamless
monitoring of vital signs and provide additional safety features for users.
Notification when Low Signal: Through the GPS tracker, if the vehicle
reaches the low signal areas, automatically a notification will be sent to the
pre-defined contact
23
APPENDICES
APPENDIX 1
SAMPLE CODING
Arduino code
//declaring an variables
const int RunningAverageCount1 = 64;
float RunningAverageBuffer1[RunningAverageCount1],
RunningAverageVolt1;
int NextRunningAverage1;
int i1;// declaring a variable
const int RunningAverageCount2 = 64;
float RunningAverageBuffer2[RunningAverageCount2],
RunningAverageVolt2;
int NextRunningAverage2;
int i2;
int mv, x_axis, y_axis;
//including packages
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 9); // RX = pin 10, TX = pin 9
TinyGPSPlus gps;
25
sei();//allow interrupts
gsm_init();
gsm_msg(99);
}
ISR(TIMER2_COMPA_vect)
{
++ms0p125;
if(ms0p125 > 8000) //1sec
{
update_flag = 1;
ms0p125 = 0;
}}
void loop()
gps.encode(mySerial.read());
}
if(gps.location.isUpdated())
{
latitude = gps.location.lat();
longitude = gps.location.lng();
link = "http://www.google.com/maps/place/" + String(latitude) + "," +
String(longitude) ;
26
//Serial.print("Link Google Maps : ");
//Serial.println(link);
//Serial.print("Satellite Count : ");
//Serial.println(gps.satellites.value());
//Serial.print("Latitude : ");
//Serial.println(latitude, 6);
//Serial.print("Longitude : ");
//Serial.println(longitude, 6);
//Serial.print("Speed MPH : ");
//Serial.println(gps.speed.mph());
//Serial.print("Altitude Feet : ");
//Serial.println(gps.altitude.feet());
//Serial.println("");
}
//Read accelerometer value
RunningAverageBuffer1[NextRunningAverage1++] = analogRead(A0);
if(NextRunningAverage1 >=
RunningAverageCount1)NextRunningAverage1 = 0;
RunningAverageVolt1 = 0;
for(i1=0; i1< RunningAverageCount1; ++i1)RunningAverageVolt1 +=
RunningAverageBuffer1[i1];
RunningAverageVolt1 /= RunningAverageCount1;
RunningAverageBuffer2[NextRunningAverage2++] = analogRead(A1);
if(NextRunningAverage2 >=
RunningAverageCount2)NextRunningAverage2 = 0;
27
RunningAverageVolt2 = 0;
///////////////////
mySerial.print("%X-axis: ");
if(x_axis < 10)mySerial.print(" ");
else if(x_axis < 100)mySerial.print(" ");
mySerial.print(x_axis);
mySerial.print(" deg, Y-axis: ");
if(y_axis < 10)mySerial.print(" ");
else if(y_axis < 100)mySerial.print(" ");
mySerial.print(y_axis);
mySerial.print(" deg, ");
mySerial.print("Location: ");
mySerial.print(link);
mySerial.print(", Status: ");
28
if( (x_axis <= 45) || (x_axis >= 135) || (y_axis <= 45) || (y_axis >= 135) )
{
mySerial.print("ACCIDENT OCCURRED");
mySerial.println("#");
if(flag2 == 0)
{
gsm_msg(2);
flag2 = 1;
}}
else
{
mySerial.print("SAFE");
mySerial.println("#");
flag2 = 0;
}
update_flag = 0;
}
delay(10);
}
void gsm_init(void)
{
at_flag = 1;
while(at_flag)
{
Serial.println("AT");
29
while(Serial.available()>0)
{
if(Serial.find("OK"))at_flag=0;
}
delay(1000);
}
delay(500);
echo_flag = 1;
while(echo_flag)
{
Serial.println("ATE0");
while(Serial.available()>0)
{
if(Serial.find("OK"))echo_flag=0;
}
delay(1000);
}
delay(500);
net_flag = 1;
while(net_flag)
{
Serial.println("AT+CPIN?");
while(Serial.available()>0)
{
if(Serial.find("+CPIN: READY"))net_flag = 0;
30
}
delay(1000);
}
delay(500);
}
31
APPENDIX 2
SCREEN SHOTS
This picture represents the Connection of an Iot device with all the
components, without the power supply
32
Figure A2.2 IOT device after tilt condition
This picture represents the Iot device with a power supply by
the adaptor, after the tilt condition
33
Figure A2.4 Message after an accident occurs
This picture represents Alert message with a Location from the device
to which the mobile number configured when the device is in tilt
condition
34
Figure A2.5 Call from the device
35
REFERENCES
4. Nazia Parveen,Ashif Ali and Aleem Ali (2020) “IOT Based Automatic
Vehicle Accident Alert System”, IEEE 5th International Conference on
Computing Communication and Automation (ICCCA), pp.951-963
5. Shaik Mazhar Hussain, Kamaludin Mohamad Yusuf, Shaik Ashfaq
Hussain(2017) “A Conceptual Framework on IOT based System
Design to Prevent Road Accidents in Accident Prone Cities”,
International Conference on Infocom Technologies and Unmanned
Systems (Trends and Future Directions) (ICTUS), pp.626-641
36
COs, PO Mapping, PSO Mapping
COURSE OUTCOMES
CORRELATION LEVELS
Substantial/ High 3
Moderate/ Medium 2
Slight/ Low 1
No correlation
CS8811.1 3 3 1 1 2 3
CS8811.2 3 2 3 3 1 3 3 2
CS8811.3 3 3 3 3 3 3 1 2
CS8811.4 3 3 3 3 2 3
CS8811.5 3 3 3
37