SafeTravAlert Full

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

MISRIMAL NAVAJEE MUNOTH JAIN ENGINEERING COLLEGE

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

• VISION:

Producing competent computer engineers with a strong background in the latest


trends and technology to achieve academic excellence and to become pioneers
in software and hardware products with an ethical approach to serve the society

• MISSION:

To provide quality education by inculcating strong fundamentals in basic


science, mathematics and engineering concepts through the state-of-the-art
facilities. To provide the learning ambience that helps the students to enhance
problem solving skills and to inculcate in them the habit of continuous learning
in their domain of interest. To serve the society by providing insight solutions to
the real-world problems by employing the latest trends of computing technology
with strict adherence to professional and ethical responsibilities

iii
ACKNOWLEDGEMET

We express our sincere gratitude to our honourable Secretary


(Administration) Dr. Harish L Metha and Secretary (Academic) Shri L.
Jaswant S Munoth for providing the infrastructure facilities to do this project
during our course period.

We thank our Principal, Dr. C. C. Christopher, for his valuable


suggestions and guidance for the development and completion of this project.

We express profound sense of gratitude and thanks to our HEAD OF THE


DEPARTMENT, Dr. A. Geethapriya, Associate Professor, for her valuable
suggestions and guidance for the development and completion of this project.

We thank our supervisor Dr. N. Savaranan, Professor for his constant


help and valuable suggestions. We thank him for his whole hearted guidance
right from the inception to the completion of our project.

We thank our Coordinator, Mr. K. Varunamuthu, Assistant Professor,


for his valuable suggestion for the development and completion of this project.

Finally, we thank all the Teaching and Non-Teaching Staff members of


our Department who helped us to complete our project.

Above all we thank the Almighty, our parents and Siblings for their
constant support and encouragement for completing this project.

iv
ABSTRACT

The project "SafeTravAlert" addresses the pressing issue of road safety by

introducing a comprehensive vehicle tracking and accident alert system. Through

the integration of advanced sensors and real-time monitoring technology, the

system continuously monitors the vehicle's route. In the event ofan accident, the

system triggers an automatic phone call alert to pre-defined contacts, providing

immediate notification. Concurrently, it shares the vehicle's precise location,

facilitating swift response from emergency services or concerned individuals. By

combining proactive accident detection with rapid response capabilities,

SafeTravAlert aims to significantly enhance driver safety and minimize the

impact of road accidents. This abstract encapsulates theproject's objectives,

methodology, and potential impact, highlighting its significance in improving

road safety. Through real-world testing and validation, SafeTravAlert

demonstrates its effectiveness in providing timely assistance during critical

situations on the road. The project underscores the importance of leveraging

technology to mitigate road accidents and emphasizes the role of proactive safety

measures in saving lives. Overall, SafeTravAlert represents a promising initiative

towards creating safer road environments and fostering a culture of responsible

driving

v
TABLE OF CONTENTS

CHAPTER TITLE PAGE


NO. NO.

ABSTRACT v

LIST OF FIGURES viii

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

8. CONCLUSION AND FUTURE ENHANCEMANT 22


8.1 CONCLUSION 22
8.2 FUTURE ENHANCEMENT 22

APPENDICES 24

APPENDIX 1- SAMPLE CODING 24

APPENDIX 2- SCREENSHOTS 32

vii
LIST OF FIGURES

Figure No Name of the Figures Page No


11
5.1 Architecture Diagram
12
5.2 Circuit Diagram
13
5.3 Activity Diagram

5.4 Usecase Diagram 14

A2.1 IOT device stable condition 32

A2.2 IOT device after tilt condition 33

A2.3 welcome message from device 33

A2.4 Message after an accident occures 34

A2.5 Call from the device 35

viii
LIST OF ABBREVIATIONS

Abbreviations Expansion

GPL General Public License

GPS Global Positioning System

GSM Global System for Mobile


Communication
IOT Internet Of Things

IP Internet Protocol

UART Universal Asynchronous


Receiver/Transmitter
MPU memory protection unit

MCU Microcontroller Unit

SMS Short Message Service

IDE Integrated Development


Environment

ix
CHAPTER 1

INTRODUCTION

1.1 INTERNET OF THINGS (IOT)


The internet of things, or IoT, is a system of interrelated computing
devices, mechanical and digital machines, objects, animals or people that are
provided with unique identifiers (UIDs) and the ability to transfer data over a
network without requiring human-to-human or human-to-computer
interaction. A thing in the internet of things can be a person with a heart
monitor implant, a farm animal with a biochip transponder, an automobile that
has built-in sensors to alert the driver when tire pressure is low or any other
natural or man-made object that can be assigned an Internet Protocol (IP)
address and is able to transfer data over a network. Increasingly,
organizations in a variety of industries are using IoT to operate more
efficiently, better understand customers to deliver enhanced customer service,
improve decision-making and increase the value of the business. An IoT
ecosystem consists of web- enabled smart devices that use
embeddedsystems, such as processors, sensors and communication
hardware, to collect, send and act on data they acquire from their
environments
1.2 ARDUINO
Arduino is an open-source hardware and software company, project, and
user community that designs and manufactures single-board
microcontrollers and microcontroller kits for building digital devices. Arduino
boards are available commercially from the official website or through
authorized distributors.

Arduino board designs use a variety of microprocessors and controllers.


The boards are equipped with sets of digital and analog input/output (I/O) pins

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.3 NEO6M GPS

The NEO-6M GPS module is a compact and affordable GPS receiver


widely utilized in various projects. With its low power consumption and high
sensitivity, it quickly acquires satellite signals for precise positioning and
timing information. Operating within a voltage range of 3.3V to 5V, it
interfaces seamlessly with microcontrollers through UART communication.
Its default baud rate of 9600 bps ensures efficient data transmission. This
module's versatility extends to applications such as vehicle tracking, asset
management, and IoT devices requiring location-based services. While its
integration requires minimal external components, it may benefit from an
external antenna for enhanced reception in challenging environnts. Despite
limitations like limited indoor reception and susceptibility to signal
interference, its reliability and ease of use make it a popular choice for both
hobbyists and professionals seeking dependable GPS functionality in their
projects.

1.4 MPU6050

The MPU6050 is a versatile motion-tracking device combining a


gyroscope and accelerometer in a single chip. Renowned for its accuracy and
affordability, it provides precise measurement of angular velocity and

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

The GSM module's significance lies in facilitating real-time


communication for the SafeTravAlert device. Integrated with the Arduino, it
enables SMS alerts, calls, and real-time tracking. The module's SIM card
provides network access and authentication. Utilizing AT commands, the
Arduino communicates with the GSM module. Network connectivity
involves searching for available networks and registering with operators.
Seamless data transmission encompasses SMS messaging and voice calls.
Overall, the GSM module plays a pivotal role in realizing the project's goal
of enhancing road safety through timely alerts and tracking.

1.6 NODE MCU

The NodeMCU serves as a crucial component in the SafeTravAlert


project, facilitating wireless connectivity and IoT capabilities. Integrated
with the Arduino platform, it enables seamless communication between the
device and the internet. Its compact size and built-in Wi-Fi functionality
make it ideal for IoT applications. The NodeMCU is based on the ESP8266
microcontroller, offering a powerful and cost-effective solution for wireless
communication.

3
CHAPTER 2

LITERATURE SURVEY

Nikhil Kumar et al.[4] worked on An IoT Based Vehicle Accident

Detection and Classification System using Sensor Fusion.This work presents an

IoT-based automotive accident detection and classification (ADC) system,

which uses the fusion of smartphone’s built-in and connected sensors not only

to detect but also to report the type of accident.

Harshit Srivastava et al.[1] worked on the project IoT-Based Road

Accident Rescue System Implementation for Smart City Applications. Here the

IMU's three axis accelerometer, gyroscope, and magnetometer data are

programmed to determine the vehicle's orientation and position. A Wi-Fi-based

communication is established using to send data received from sensor units to

Google Firebase cloud servers in real-time.

Shaik Mazhar Hussain et al.[5] worked towords A Conceptual Framework on

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

light of IOT technology

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.

Nazia Parveen et al.[3] worked on IOT Based Automatic Vehicle Accident

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.

The accelerometer detects accidents or sudden changes in movement and this

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 EXISTING METHOD

The current system relies heavily on smartphone sensors for vehicle


tracking and accident detection. It continuously monitors the vehicle's route
and utilizes smartphone sensors to detect accidents. In case of an accident, the
system initiates an automatic phone call alert to predefined contacts and shares
the vehicle's location. However, this system faces several limitations. Firstly,
it is dependent on the accuracy and reliability of smartphone sensors, which
may lead to false positives or false negatives in accident detection. Moreover,
its effectiveness is limited in areas with poor cellular or internet connectivity,
affecting its performance in remote or rural areas. Additionally, privacy
concerns arise due to the collection of data from smartphones, potentially
impacting user adoption. Furthermore, continuous monitoring and data
transmission can drain the smartphone's battery quickly, potentially reducing
user acceptance. Despite these drawbacks, the existing system highlights the
importance of leveraging technology for enhancing road safety but also
underscores the need for improvements in reliability, coverage, and user
acceptance.

3.1.1 Disadvantages

• Dependency on Smartphone Sensors: The system relies heavily on the


accuracy and reliability of smartphone sensors. If these sensors
malfunction or provide inaccurate data, it could lead to false positives or
false negatives in accident detection and classification.

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.

3.2 PROPOSED SYSTEM

The proposed system aims to revolutionize road safety through a


comprehensive approach that encompasses real-time tracking, efficient
accident detection, automated alert systems, location sharing, and enhanced
overall road safety features. By implementing advanced sensors and
analytics, the system ensures continuous, real-time monitoring of vehicle
routes, enabling immediate detection of accidents. In the event of an
accident, an automated phone call alert system notifies predefined contacts,
facilitating swift response from emergency services or concerned
individuals. Additionally, the system shares accurate location information,
further expediting assistance during emergency situations. With seamless
integration with mobile devices, the proposed system ensures accessibility
and user-friendly interaction, ultimately contributing to a safer road
environment through timely alerts and enhanced safety measures

7
3.2.1 Advantages

• Real-Time Tracking: Implement a robust system for continuous, real-


time monitoring of vehicle routes.
• Accident Detection: Utilize advanced sensors and analytics for efficient
and immediate accident detection.
• Automated Alert System: Develop an automated phone call alert
system to notify predefined contacts in case of an accident.
• Location Sharing: Enable swift response by sharing accurate location
information during emergency situations.
• Enhanced Road Safety: Implement features that enhance overall road
safety, providing timely alerts to drivers and emergency services.
• Mobile Integration: Create seamless integration with mobile devices
for accessibility and user-friendly interaction with the system.

3.3 FEASIBILITY STUDY


The feasibility study for the project involves assessing its technical,
economic, and operational viability to determine if it's practical and
achievable. it also evaluates potential risks and mitigation strategies to
address challenges that may arise during project implementation.
Furthermore, stakeholder analysis is conducted to assess the level of support
and involvement from key individuals or organizations. The study explores
alternative solutions and technologies to determine the most effective
approach for achieving project objectives. Lastly, the feasibility study
outlines a comprehensive plan for project execution, including resource
allocation, timeline, and milestones, to ensure a structured and systematic
approach towards achieving project goal

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.

3.3.2 Operational Feasibility


Assess the practicality of implementing and operating the system
within existing regulatory frameworks and infrastructure. Consider factors
such as user acceptance, ease of use, and scalability. Evaluate the potential
impact on existing workflows and procedures, particularly for emergency
response services. Identify any operational challenges or constraints that
may affect the successful deployment and utilization of the system.

3.3.3 Economic Feasibility


Conduct a cost-benefit analysis to determine the project's financial
viability. Evaluate the initial investment required for hardware, software
development, and testing. Estimate ongoing operational costs, including
maintenance, support, and data transmission expenses. Compare projected
costs with potential benefits, such as reduced accident response time and
improved road safety, to determine if the project is economically feasible.

9
CHAPTER 4

SYSTEM REQUIREMENTS

4.1 HARDWARE 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

The software requirements give a detailed description of the system and


all its features.

• Arduino IDE

10
CHAPTER 5

SYSTEM DESIGN

5.1 OVERVIEW OF ARCHITECTURE

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.

Figure 5.1 System Architecture

11
5.2 CIRCUIT DIAGRAM

The circuit diagram illustrates the arrangement of electrical components and


their connections within a circuit. Each component, and lines indicate the
pathways for electrical current flow. It provides a concise visual representation
facilitating analysis, design, and troubleshooting of electrical circuits.

Figure 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.

Figure 5.3 Activity Diagram for SafeTravAlert

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.

Figure 5.4 Use Case Diagram for SafeTravAlert

14
CHAPTER 6

SYSTEM IMPLEMENTATION

6.1 MODULES

• BUILDING HARDWARE FOR SYSTEM


• PREPROCESSING OF MODULES
• IMPLEMENTATION AND TESTING OF SYSTEM

6.1.1 Building Hardware for System


Firstly, building the hardware for an accident detection system involves a
systematic process of selecting, wiring, and integrating various components to
ensure the system's functionality and reliability. The initial step in this process is
the selection of appropriate components based on the system requirements and
desired functionality. For the accident detection system, crucial components
include the Arduino Uno microcontroller board, MPU6050 accelerometer sensor,
NEO-6M GPS module, GSM module, and a reliable power source. Each
component plays a vital role in the overall functionality of the system, with the
Arduino Uno serving as the central processing unit, the MPU6050 sensor
detecting motion changes, the NEO-6M module determining location, and the
GSM module enabling communication for sending alerts.

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.

6.1.2 Preprocessing of Modules


In the process of implementing an accident detection system using Arduino
Uno, MPU6050, NEO-6M GPS module, GSM module, ESP32, Bug converter,
and a power source, preprocessing of modules plays a crucial role in ensuring the
proper functioning and integration of each component. Let's delve into the
preprocessing procedures for each component:
Arduino Uno: As the central processing unit, the Arduino Uno requires initial
setup and configuration. This involves installing the necessary libraries and drivers to
enable communication with other components, such as the MPU6050, NEO- 6M
GPS module, and GSM module. Additionally, configuring the Arduino Uno'sinput
and output pins for interfacing with these components is essential.
MPU6050 Accelerometer Sensor: Before integrating the MPU6050
accelerometer sensor into the system, calibration may be required to ensure
accurate readings. This typically involves running calibration routines provided by
the sensor manufacturer to account for any biases or offsets. Once calibrated, the
sensor needs to be initialized in the Arduino code, configuring settings such as
sensitivity and range.
NEO-6M GPS Module: The preprocessing of the NEO-6M GPS module involves
configuring the module's baud rate and communication protocol to match the
requirements of the Arduino Uno. Additionally, the module may require
16
initialization commands to enable GPS data output. Once configured, the Arduino
code needs to parse the incoming GPS data to extract relevant information such as
latitude, longitude, and speed.
GSM Module: Configuring the GSM module involves setting up communication
parameters such as baud rate, serial interface, and PIN authentication.
Additionally, the module may require initialization commands to establish a
connection with the cellular network. Once configured, the Arduino code needs to
handle sending SMS alerts or making phone calls in the event of an accident
detection.
ESP32: Preprocessing the ESP32 module involves setting up the development
environment and installing the required libraries and drivers. Configuration of the
ESP32's Wi-Fi or Bluetooth capabilities may also be necessary, depending on the
intended functionality. Once configured, the ESP32 can be programmed to handle
additional tasks such as data logging, remote monitoring, or transmitting alerts via
Wi-Fi or Bluetooth.
Bug Converter: The Bug converter acts as an intermediary between the Arduino
Uno and the GSM module, facilitating communication between the two
components. Preprocessing involves configuring the Bug converter's settings, such
as baud rate and serial interface, to ensure compatibility with both the Arduino
Uno and the GSM module. Additionally, the Bug converter may require
initialization commands to establish proper communication.

6.1.3 Implementation and Testing of System


This phase encapsulates the transformation of the system architecture and
requirements into functional code while rigorously examining the system's
performance to validate its reliability and effectiveness. Initially, the
implementation process commences with the translation of system design into
code logic. This involves coding for the initialization and configuration of each
hardware component, ranging from the Arduino Uno to the MPU6050, NEO-6M

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.

Subsequently, the coding phase primarily involves the development of


Arduino sketches to control and coordinate the functionality of the system
components. This encompasses the creation of setup() and loop() functions to
initialize the system and execute the main program logic continuously,
respectively. Utilizing Arduino libraries and functions facilitates interfacing with
sensors, communication with the GSM module and Bug converter, and overall
system management. Furthermore, custom functions and algorithms are crafted to
process sensor data, detect accidents, and trigger alert messages, complemented
by error- handling mechanisms to manage unexpected events effectively. Finally,
thetesting phase scrutinizes the system's functionality through unit, integration,
functional, and performance testing, ensuring its efficacy across various
scenariosand under different conditions. By meticulously coding the system
logic, testing its functionality, and iterating on improvements, the accident
detection system attains the reliability and effectiveness necessary to enhance
road safety and provide timely assistance in case of accidents.

18
CHAPTER 7

SYSTEM TESTING

7.1 TESTING OBJECTIVES


System Testing is a type of software testing that is performed on a
complete integrated system to evaluate the compliance of the system with the
corresponding requirements. System testing detects defects within both the
integrated units and the whole system. The result of system testing is the
observed behavior of a component or a system when it is tested. System Testing
is basically performed by a testing team that is independent of the development
team that helps to test the quality of the system impartial
7.2 TYPES OF TESTS
7.2.1 Unit Test Cases
Unit Testing, also known as Component Testing, is a level of software
testing where individual units or components of software are tested. The
purpose is to validate that each unit of the software performs as designed. A
unit is the smallest testable part of any software. It usually has one or a few
inputs and usually a single output. Unit testing increases confidence in
changing / maintaining code. It is concerned with functional correctness of the
standalone modules.

The testing takes place as:

Module Name: Preprocessing of modules


Input: Tilt the device for the sensor detection
Output: Recognizing the motion from the sensor and collect the exact
location, where the motion detected

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

be completed for testing to be done.


The testing takes place as:

Module Name: Building Hardware for System, Preprocessing of modules


Input: Power supply to the device by the component (adapter)
Output: Sending the welcome message to the configured mobile number

7.2.3 System Testing


A validation test is used to test and verify the final outcome before
delivering it to the customer. This process involves understanding the
objective of the product so that it would be easy to validate the outcome. It is
the process of checking the validation of product. The process of evaluating
s.3oftware at the end of the development process to determine whether
software meets the customer expectations and requirements. Execution of
code is coming under Validation. The process of checking whether the
software product is up to the mark or in other words product has high level
requirements.

20
The testing takes place as:

Module name: Implementation and testing of Device

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

CONCLUSION AND FUTURE ENHANCEMENT

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.

8.2 FUTURE ENHANCEMENT


Integration with Advanced Driver Assistance Systems (ADAS):
Incorporating ADAS features such as lane departure warning, collision
avoidance, and adaptive cruise control can further enhance the device's
ability to prevent accidents.
Vehicle-to-Everything (V2X) Communication: Utilizing V2X
communication technology to enable communication between vehicles,
infrastructure, and pedestrians can enhance situational awareness and
provide advanced warning of potential hazards.

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;

double latitude, longitude;


char mob_no[] = "9487384543", q;
char at_flag, echo_flag, net_flag;
24
void gsm_init(void);

void gsm_msg(char mode2);


//////////////
int ms0p125 = 0;
char update_flag = 0;
char flag2 = 0;
char accident_flag;
String link;
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
cli();//stop interrupts

//set timer2 interrupt at 8kHz


TCCR2A = 0;// set entire TCCR2A register to 0
TCCR2B = 0;// same for TCCR2B
TCNT2 = 0;//initialize counter value to 0

// set compare match register for 8khz increments

OCR2A = 249;// = (16*10^6) / (8000*8) - 1 (must be <256)


// turn on CTC mode
TCCR2A |= (1 << WGM21);
// Set CS21 bit for 8 prescaler

TCCR2B |= (1 << CS21);


// enable timer compare interrupt
TIMSK2 |= (1 << OCIE2A);

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()

{//Read GPS data


mySerial.listen();
while(mySerial.available())
{

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;

for(i2=0; i2< RunningAverageCount2; ++i2)RunningAverageVolt2 +=


RunningAverageBuffer2[i2];
RunningAverageVolt2 /= RunningAverageCount2;
if(update_flag == 1)
{

x_axis = map((int)RunningAverageVolt1, 260, 400, 0, 180); //280, 420


if(x_axis < 0)x_axis = 0;
else if(x_axis > 180)x_axis = 180;
y_axis = map((int)RunningAverageVolt2, 260, 400, 0, 180);
if(y_axis < 0)y_axis = 0;
else if(y_axis > 180)y_axis = 180;

///////////////////
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);
}

void gsm_msg(char mode2)


{
Serial.print("AT+CMGF=1\r\n"); delay(500);
//Serial.print("AT+CNMI=2,2,0,0,0\r\n"); delay(500);

Serial.print("AT+CMGS="); Serial.write('"'); for(q = 0; q <= 9;


q++)Serial.write(mob_no[q]); Serial.write('"'); Serial.print("\r\n");
delay(500);
if(mode2 == 2)Serial.println("Accident occured..");
else if(mode2 == 99)Serial.println("Welcome..");
Serial.println("Location:");
Serial.println(link);

if(mode2 == 2)Serial.println("Please take some action soon..");


delay(500);
Serial.write(26);
delay(5000);
//Serial.println("ATDxxxxxxxxxx;");

Serial.print("ATD"); for(q = 0; q <= 9; q++)Serial.write(mob_no[q]);


Serial.println(";");
delay(500);
}

31
APPENDIX 2

SCREEN SHOTS

Figure A2.1 IOT device stable condition

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

Figure A2.3 welcome message from device

This picture represents a welcome message to the configured


mobile number, when the device is in the ON 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

This picture represents the call from the device to the


configured mobile number, when the device is in tilt condition

35
REFERENCES

1. Harshit Srivastava, Goutam Kumar Sahoo, Senanayake .D.D;


Maduwantha.B.A.U, Samudrini .M.G.C, Nanayakkara .A.I;Santos
Kumar Das, Poonam Singh (2022) “IoT-Based Road Accident Rescue
System Implementation for Smart City Applications”, IEEE 2nd
International Symposium on Sustainable Energy, Signal Processing and
Cyber Security (iSSSC), pp.517-531
2. Mohammad Ehsanul Alim, Sarosh Ahmad, Marzieh Naghdi Dorabati and
Ihab Hassoun(2020) “ Design & Implementation of IoT Based Smart
Helmet for Road Accident Detection”, 11th IEEE Annual Information
Technology, Electronics and Mobile Communication Conference
(IEMCON), pp.783-797
3. Nikhil Kumar, Debopam Acharya, and Divya Lohani (2021) “An IoT
Based Vehicle Accident Detection and Classification System using
Sensor Fusion”, IEEE Internet of Things Journal, volume 8, pp.869-880

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 Code & Name: CS8811 Project Work


REGULATION: R2017 YEAR/SEM: IV/VIII

COURSE OUTCOMES

CS8811.1 Identify the problem by applying acquired knowledge.


CS8811.2 Analyze and categorize executable project modules after considering risks.
CS8811.3 Choose efficient tools for designing project modules.
CS8811.4 Combine all the modules through effective team work after efficient testing.
CS8811.5 Elaborate the completed task and compile the project report.

CORRELATION LEVELS
Substantial/ High 3
Moderate/ Medium 2
Slight/ Low 1
No correlation

CO – PSO CORRELATION LEVEL MATRIX

COs PSO1 PSO2


CS8811.1 3 1
CS8811.2 2
CS8811.3 3
CS8811.4 3
CS8811.5

CO-PO CORRELATION LEVEL MATRIX


POs
COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12

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

You might also like