You are on page 1of 39

Abstract

Now days we are able to track vehicles using many applications which helps in
securing personal vehicles, public vehicles, feet units and others. Furthermore there is
a rapid increase in the occurrence of the road accident. This paper is about a system
which is developed to automatically detect an accident and alert to the recorded
contact numbers. This system can also locate the place of the accident so that the
medical services can be directed immediately towards it. The goal of this paper is to
build up a vehicle accidental monitoring system using IOT Technology. Vehicle
detection and tracking plays an effective and significant role in the area of traffic
surveillance system where efficient traffic management and safety is the main
concern. Speed is one of the basic reasons for vehicle accident. Many lives could have
been saved if emergency service could get accident information and reach in
time.GPS has become an integral part of a vehicle system. This seminar analysis the
capability of a GPS receiver to monitor speed of a vehicle and detect accident basing
on monitored speed and send accident location to an Alert Service Center. The GPS
will monitor speed of a vehicle and compare with the previous speed in every second
through a Microcontroller Unit whenever the speed will be below the specified speed,
it will assume that an accident has occurred. The system will then send the accident
location acquired from the GPS along with time and the speed by utilizing the GSM
network. This will help to reach the family members and friends service in time and
save the valuable human life.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 1


CONTENTS

CHAPTER 1: INTRODUCTION 05-08

1.1 Project Overview

1.2 Objectives

1.3 Purpose

1.4 Scope

1.5 Applicability

CHAPTER 2: LITERATURE SURVEY 08-12

2.1 Existing System

2.2 Problems in the existing system

2.3 Available solutions and their features

2.4 Proposed System

2.5 Need of proposed system

2.6 Feasibility Study

2.7 Advantages

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 2


CHAPTER 3: SOFTWARE REQUIREMENT 12-18
SPECIFICATION
3.1 Problem Statements

3.1.1 Problem Identification


3.1.2 Problem Definition
3.1.3 Problem Solution

3.2 Requirement Specification

3.3 Software and Hardware Requirement

3.4 Planning and Scheduling

3.5 Preliminary Product Description

CHAPTER 4: SYSTEM DESIGN 19-25

4.1 Project Architecture

4.2 Details of Module

4.3 Use case Diagram

4.4.1 Details and Design


4.4.2 High level Design
4.4.3 Sequence Diagram

CHAPTER 5: SYSTEM IMPLEMENTATION 29-41

6.1 Implementation Approaches of Tools and Technologies

6.2 Coding Details and Code Efficiency

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 3


CHAPTER 6: EXPERIMENTATION AND RESULT 42-46
ANALYSIS
7.1 Experimental Results (with snapshots)

7.2 Analysis of the Result with the help of Graphs and Plots.

CHAPTER 8: FUTURE ENAHANCEMENT AND 47


CONCLUSION

CHAPTER 9: REFERENCES 48

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 4


CHAPTER 1: INTRODUCTION

1.1 Project Overview:

The usage of automobiles has improved linearly over the past decade, lives
could increased in the risk of human life. This is because due to the insufficient
emergency facilities. In this paper we are using alarm system which helps in
improving the emergency system of the accident system. This system detects the
accident occurrence and the coordinated of the accident are messaged to the Family
Members and Friends. A switching system is used switch off in case there is no
causality. The Accident is detected with the help of MEMS Sensor and Vibration
Sensor. The Angle in which the car has rolled off is indicated through a message. This
Application helps in providing feasible solution to the poor emergency facilitates.

The development of a transportation system has been the generative power for
human beings to have the highest civilization above creatures in the earth.
Automobile has a great importance in our daily life. We utilize it to go to our work
place, keep in touch with our friends and family, and deliver our goods. But it can
also bring disaster to us and even can kill us through accidents. Speed is one of the
most important and basic risk factors in driving. It not only affects the severity of a
crash, but also increases risk of being involved in a crash. Despite many efforts taken
by different governmental and non-governmental organizations all around the world
by various programs to aware against careless driving, yet accidents are taking place
every now and then. However, many lives could have been saved if the emergency
service could get the crash information in time. As such, efficient automatic accident
detection with an automatic notification to the emergency service with the accident
location is a prime need to save the precious human life. Buzzer is also used to
indicate as accident has been occurred which will create a beep sound. Thus the life of
a person who met with an accident has been identified and save their life too.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 5


1.2 Accidents:

Automobiles are important to go to workplaces, meet family and friends and


to deliver goods. But often they pave the way to big disasters. According to
Wikipedia, accidents are is an unfortunate and unplanned event or circumstance, often
with lack of intention or necessity. Road accident is most unwanted thing to happen to
a road user, though they happen quite often. The most unfortunate thing is that we
don't learn from our mistakes on road. Most of the road users are quite well aware of
the general rules and safety measures while using roads but it is only the laxity on part
of road users, which cause accidents and crashes. Main cause of accidents and crashes
are due to human errors.

Following are the major reasons of accidents:

1. Over Speeding

2. Drunken Driving

3. Distractions to Driver

4. Red Light Jumping

5. Avoiding Safety Gears like Seat belts and Helmets

6. Non-adherence to lane driving and overtaking in a wrong manner.

Number of road accidents across Karnataka in India from 2014 to 2018

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 6


1.3 Objectives:

In recognition to the importance of safety and security of an individual, this


project is tried to achieve the following objectives:

1. The main objective is to minimize the accidents response time when an


accident occurs and the time emergency responders reach the accident seen in
reducing human deaths due to the road accidents.

2. To provide location tracking using Google map plotting.

3. To provide information to driver and also helps in sending messages to injured


relatives.

4. Proved a system that is fully automated to help vehicle occupants when they
are in capacitate and subconscious.

1.4 Purpose:
To provide security to the system which is placed inside the car .RFID
technology is used. To monitor the sensors data a channel is used which is
Thingspeak. This uses IOT technology to store and visualize the sensors data.

1.5 Scope:

 Poor control system


 It has low reliability
 Road safety: The timely checking of the over speeding vehicles will reduce high
percentage of road accidents
 Automation in law enforcement: The system being completely automatic, reduces
the number of traffic police officers needed to deploy in the real field for checking
speeding vehicles

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 7


1.6 Applicability:

Different sensors are used to detect accident and alcohol percentage.


Thingspeak channel uses Google, Cloud to store the sensors data. It allows visualizing
and analyzing the live data of the sensors. By using this data, automobile owner can
monitor the sensors data graphically from anywhere in the world.

CHAPTER 2 : LITERATURE SURVEY

Many researchers carried out their studies on accident detection system. Aishwarya
S.R explained an IOT based vehicle accident prevention and tracking system for night
drivers. In this paper provides Eye Blink Monitoring System (EBM) that alerts the subject
during state of drowsiness.

1. Sadhana B have explained Smart helmet intelligent safety for motorcyclist using
raspberry pi and open CV. The idea is obtained after knowing that there is increased
number of fatal road accidents over the years. This project is designed to introduce
safety systems for the motorcyclist to wear the helmet properly.

2. Sarika R. Gujar explained advanced Embedded System of Vehicle Accident Detection


and Tracking System. The main objective of this system is to first detect the accident
location and call for the emergency services. Vehicle accident detection is possible
with the help of sensors. A GPS and GSM module helps to trace the vehicle.

2.1 Existing System:

 The existing system only use the information about the vehicle’s vibrating
measurements to detect the accident and that is doesn’t work in network less area.
 And after occurrence of the accident, controlling of traffic takes high time. This
drawback can be overcome by proposed system.
 It is a common scenario that people die unnoticed during accident, especially
during night time.
 Communication is possible only through only telephone calls.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 8


 There is no such system to inform the family members and friends forces when
the driver is seriously injured.

2.2 Problems In Existing System:

Whenever accident being met, the nearby people call the ambulance. The
problem associated with this is that the victims depend on the mercy of nearby people.
There is a chance that no people near by the accident spot or people who are around
neglects the accident. This is the flow in the manual system.

2.3 Available Solutions And Their Features:

There are many solutions proposed for the concerned problem and each one
have some advantage over others. Among the other GSM and GPS solutions, some
proposed the solution of finding the accident condition using only accelerometer
sensor which may be a problem as it may lead to false alarm for some of the cases.
Our system uses more than one sensor to increase the accuracy of the system and also
we have a provision to avoid the intimation in case of false alarm.

2.4 Proposed System:

 The main principle of the project is the detection and rescue management. The
system is on and initialization.
 If vehicle is normal, no message has been sent to family members and friends.
And the temperature level of the driver is monitored in all the time, if it reaches
the threshold level then the action has been taken automatically.
 Whenever accident occurred, tilt sensor detects the accident happened with
vehicle.
 The controller get the input from sensors and send the accident alert information
to road side unit and then message is send to the rescue team and also WIFI and
GPS finds location of the vehicle and that also send to the rescue team.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 9


 It will facilitate connectivity to the nearest hospital and provide medical help
through IOT technology.

Block Diagram of proposed system

2.5 Need of Proposed System:

Our proposed system will help the wretched victims by notifying the nearest
necessary emergency supports. The system will have two levels of security password
protection for the vehicle, speed control mechanism and remote ignition cut-off
mechanism to make vehicle theft almost impossible.

2.6 Feasibility Study:

The feasibility of the project is analyzed in this phase and business proposal is
put forth with a very general plan for the project and some cost estimates. During
system analysis the feasibility study of the proposed system is to be carried out. This
is to ensure that the proposed system is not a burden to the company. For feasibility
analysis, some understanding of the major requirements for the system is essential.
Three key considerations involved in the feasibility analysis are

 Economical Feasibility

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 10


 Technical Feasibility
 Social Feasibility

 Economical Feasibility:

This study is carried out to check the economic impact that the system will
have on the organization. The amount of fund that the company can pour into the
research and development of the system is limited. The expenditures must be justified.
Thus the developed system as well within the budget and this was achieved because
most of the technologies used are freely available. Only the customized products had
to be purchased.

 Technical Feasibility:

This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand on
the available technical resources. This will lead to high demands on the available
technical resources. This will lead to high demands being placed on the client. The
developed system must have a modest requirement, as only minimal or null changes
are required for implementing this system.

 Social Feasibility:

The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system efficiently. The
user must not feel threatened by the system, instead must accept it as a necessity. The
level of acceptance by the users solely depends on the methods that are employed to
educate the user about the system and to make him familiar with it. His level of
confidence must be raised so that he is also able to make some constructive criticism,
which is welcomed, as he is the final user of the system.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 11


2.7 Advantages:

1. Avoids the life loss in accidents.

2. Provides quick security for patients.

3. Provides security for vehicles.

4. Alerts the driver from damage.

CHAPTER 3:SOFTWARE REQUIREMENT SPECIFICATION

3.1 Problem Statement:

3.3.1 Problem Identification:


In this continuous world, day by day several cars are invented and being
employed by each individual. As a result of an over sized variety of cars, traffic will
also increased and rash driving of cars will also increased. In result of that scenario,
accidental condition also increases rapidly. By analysing a number of accidental
reports most of the accident occurs as a result of rash driving of the car alcoholic
drunk driver.

3.3.2 Problem Definition:

To build proper and full proof system that cannot be plagued by accident. It
provides more accuracy in the detection of alcoholic person and save people life that
seat in the car in the situation of an accident.

3.3.3 Problem solution:

Better alcohol detection will be dropped by using sensor with car ignition system.
Accident detection will be simply dropped by using GSM module and GPS module

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 12


3.2 Requirement Specification:

1. Sensors:(Ultrasonic, LDR, Buzzer) Sensor Sense the different physical


parameters like Ultrasonic, LDR and Buzzer of the car and converts these sense
data into electrical signals (either voltage orcurrent).

2. Arduino (Node MCU): Node MCU (Micro-Controller Unit) is an open


source software and hardware development environment built around an
inexpensive system on a chip.

3. Mobile (Client): An electronic circuit (Radio Frequency harvesting) captures


the power generated by mobile phone use and two antennae located inside vehicle
and signal analysis algorithm are used to identify when the driver is using a
mobile phone.

4. PC (Personal Computer / Server):Basically for Data Acquisition purpose


we are going to usepersonal.

5. Arduino IDE:It is cross platform application which is written in Java and it is


used to write and upload programs to Arduino compatible boards, but also other
vendor development boards.

6. Android Studio:It is a platform to build mobile application for the project in


order to handle all devicesremotely.

3.3 Hardware Requirements and Software Requirements:

Software Requirements:

The software on which the project is proposed to be developed has the


following configuration:

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 13


 Operating System : Window 7 or Above
 Programming Language : Java 6
 Java IDE : Netbean’s
 Mobile Application : Android API 4.4 Above
 Android IDE : Eclipse with ADT Plugin
 External API : Open CV Java
 Server : Thingspeak
 Tool : Arduino
 Front end : XML

Hardware Requirements:

The selection of hardware is very important in the existence and proper


working of my software. When selecting hardware, the size and requirements are also
important.

The proposed System is developed on:

 System : Pentium V or Above.

 Hard Disk : 40 GB.

 Monitor : 15 VGA.

 Ram : 4 GB.

 Sensors : Ultrasonic, LDR

 Kit : Arduino Uno Device and its kit

 Component : Breadboard, jumbled wires, buzzer,


LED.

3.4 Planning and Scheduling:

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 14


We made a project on the IOT-based system proposed by Nasr et al. [42]
detects accidents using a sensor. This system provides basic information regarding
accident to the family members and friends. The system also facilitates determination
and communication of the shortest and the best route, which is then sent to the nearest
ambulance.

Months Data Collected

January
Sensors details

February Software Details

March Learn connections of IOT


devices

Learn connections of software


April
to hardware things

May Vehicle data

June & July Implementation of the project

September Prepared report of the project

3.4 Preliminary Device Details:

Arduino Node MCU: Node MCU is an open


source firmware for which open source prototyping
board designs are available. The name
"Node MCU" combines “node” and
"MCU" (Micro Controller Unit). IOT
BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 15
microcontroller unit or development board contain low-power processors which support
various programming environments and may collect data from the sensor by using the
firmware and transfer raw or processed data to an local or cloud-based server. Node MCU
is an open source and LUA programming language based firmware developed for ESP8266
Wi-Fi chip.

Ultrasonic Sensor: The HC-SR04 Ultrasonic


Sensor is a very affordable proximity/distance
sensor that has been used mainly for object
avoidance in various robotics projects. It
essentially gives your Arduino eyes/ special
awareness and can prevent your robot from
crashing or falling off a table An object passing within the preset range will be detected and
generate an output signalThe detect point is independent of target size,
material or reflectivity.

LDR (Light Dependent Register):

The passive component is basically


a resistor whose resistance value decreases
when the intensity of light decreases. This
optoelectronic device is mostly used in
light varying sensor circuit, and light and
dark activated switching circuits.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 16


Bread Board:

A thin plastic board which is used to


hold electronic components (transistors,
register, chips, etc-) that are wired
together. Which used to developed
prototypes of electronic circuits, bread
boards can be used for future jobs. The
purpose of the bread board is to make
quick electrical connections between
components- like registers, led,
capacitors, etc- so that you can test your
circuit before permanently soldering it
together.

Buzzer:

A buzzer or beeper is an audio signalling device,


which may be mechanical, electro mechanical, or
piezo electric.

It is a small yet efficient component to add sound


features to our project / system. It is vary small
and compact 2- pin structure hence can be esily
used on bread board.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 17


LED (Light Emitting Diodes):

Light Emitting Diodes are
basically tiny light bulbs that fit easily
into an electrical circuit. They can be
found in dozens of applications including
digital clocks, remote controls, and
traffic lights. Unlike ordinary
incandescent light bulbs, LEDs do not
have a filament that will burn out, so
they have a much longer lifetime. LEDs
are illuminated by the movement of
electrons in a semiconductor material.
The composition of the semiconductor
affects the wavelength (colour) and
intensity of the emitted light. LEDs also
generate much less heat and a larger
percentage of the electrical current is
directed toward generating light, which
reduces electrical power.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 18


CHAPTER 4: SYTEM DESIGN

4.1 Project Architecture:

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 19


4.2 Module Description:

 Car Model
Car Model is the integrated device with toy car the devices are integrated to
the node MCU board with bread board, the model is embedded with an
Arduino code to detect the obstacles and the light intensity of the opposite
vehicle.
 Application
o Configuration
Here in this module user is going to set the emergency message and
phone number of the guardians or other to send emergency message

o Detection(Accelerometer)
In this module application detects the driving parameters like
 Rough Driving
 Smooth Driving
 Accident
 Rash Diversions etc
 Drink and Drive

After detection then if accident takes place the accelerometer sense the reading of x,
y, z axis respectively then detects the frequency range then send the alert message to
the configured numbers continuously.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 20


Acceleration Values during Dropping the Smartphone Forcefully

AccelerationValuesduringShakingtheSmartphoneForcefully

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 21


4.3 Use-case Diagram:

Use case diagram is one of them and its specific purpose is to gather
system requirements and actors. Use case diagrams specify the events of a
system and their flows. But usecase diagram never describes how they
areimplemented.

System

Read Data

Send Data

Driver
Client (Family
Members)
Monitor and search
vehicle information

Receive vehicle
Data
vehicle

Informed about
fence
Tower

Decision making

Server

4.4 Details And Design:


BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 22
4.4.1 High Level Design:

A data flow diagram (DFD) illustrates how data is processed by a system


in terms of inputs and outputs. As its name indicates its focus is on the flow of
information, where data comes from, where it goes and how it gets stored.

 LDR and Ultrasonic Sensor DFD:

Data Flow Diagram of LDR Sensor Data Flow Diagram of Ultrasonic Sensor

 Complete DFD Diagram:

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 23


Start

GPS data
No acquired?

Yes

Monitor speed, time &position

Speed <
specified
No
Yes

Buzzer sound

Cancel
send? Yes
N

Send location, previous speed and


time

Send message and plot location

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 24


4.4.2 Sequence Diagram:

Sequence Diagrams, commonly used by developers, model the interaction


between objects in a single use case. They illustrate how the different parts of system
of interact with each other to carry out a function, and the order in which the
interaction occur when particular use case is executed.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 25


CHAPTER 6: SYSTEM IMPLEMENTAION

6.1 Implementation Approaches of Tools andTechnologies:

The main aim of this project is to construct a smart vehicle system with
minimizing the limitations of existing methods and also enhancing the security of
vehicles and human beings and also reduces the accidental injuries. Smart vehicle
system will entail a speed and other parameters of vehicle sensing mechanism which
automatically messages to personal contacts with the details of vehicle position when
an accident occurs using the GSM/GPS system. The system also contains fire sensor
and an eye blink sensor.
The GPS tracking and GSM alert based algorithm is designed and
implemented with LPC2148 MCU in embedded system domain. The proposed
Vehicle accident detection system can track geographical information automatically
and sends an alert SMS regarding accident. Experimental work has been carried out
carefully. 

 GPS:
GPS stands for Global Positioning System and used to detect the Latitude and
Longitude of any location on the Earth, with exact UTC time (Universal Time
Coordinated). GPS module is used to track the location of accident in our project.
This device receives the coordinates from the satellite for each and every second, with
time and date. We have previously extracted $GPGGA string in Vehicle Tracking
System to find the Latitude and Longitude Coordinates. The result is provided in the
form of a geographic position - longitude and latitude - to, for most receivers, within
an accuracy of 10 to 100 meters. Software applications can then use those coordinates
to provide driving or walking instructions. GPS module sends the data related to
tracking position in real time. The GPS satellites are maintained by the United States
Air Force.

 GSM:
GSM (Global System for Mobile Communications, is a standard set developed
by the European Telecommunications Standards Institute (ETSI) to describe protocols
for second generation (2G) digital cellular networks used by mobile phones. General
packet radio service (GPRS) is a packet oriented mobile data service on the 2G and

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 26


3G cellular communication system's global system for mobile communications
(GSM) where protocols means set of invisible computer rules that govern how an
internet document gets transmitted to your screen and 2G is short for second-
generation wireless telephone technology and provides advantages like to provide the
services such as text messages, picture messages and MMS (multimedia messages).

In simple language, GSM also introduced a series of features such as short


messaging service (SMS), international roaming, fax and data messaging services.
Another popular feature was the ability to let users download ringtones, logos, photos,
that enabled the users to personalize their phones.

 GPRS:
GPRS was originally standardized by European Telecommunications
Standards Institute (ETSI) in response to the earlier CDPD and i-mode packet-
switched cellular technologies.

We can say GSM is mobile service provider and GPRS is the services which
they provide for using internet or GSM means mobile calling, GPRS means mobile
internet.

Live Tracking and Accident Detection System

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 27


Technologies:

 Java:

Java is a general-purpose programming language that is class-based, object-


oriented, and designed to have as few implementation dependencies as possible. It is
intended to let application developers write once, run anywhere (WORA), meaning
that compiled Java code can run on all platforms that support Java without the need
for recompilation. Java applications are typically compiled to byte code that can run
on any Java virtual machine (JVM) regardless of the underlying computer
architecture.

 Net-Beans:

Net-Beans is an integrated development environment (IDE) for Java. Net-


Beans allow applications to be developed from a set of modular software components
called modules. Net-Beans run on Windows, Mac OS, Linux and Solaris. In addition
to Java development, it has extensions for other languages like PHP, C, C++,
HTML5, and JavaScript. Applications based on Net-Beans, including the Net-Beans
IDE, can be extended by third party developers.

 Eclipse IDE
Eclipse is an integrated development environment (IDE) used in computer
programming. It contains a base workspace and an extensible plug-in system for
customizing the environment. Eclipse is written mostly in Java and its primary use is
for developing Java applications, but it may also be used to develop applications in
other programming languages via plug-ins including C, C++, C#, COBOL,
JavaScript, Perl, PHP, Python, Ruby (including Ruby on Rails framework). It can also
be used to develop documents with LaTeX (via a TeXlipse plug-in) and packages for
the software Mathematical. Development environments include the Eclipse Java
development tools (JDT) for Java and Scalar.

The initial codebase originated from IBM Visual Age. The Eclipse software
development kit (SDK), which includes the Java development tools, is meant for Java

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 28


developers. Users can extend its abilities by installing plug-ins written for the Eclipse
Platform, such as development tool kits for other programming languages, and can
write and contribute their own plug-in modules.

Eclipse software development kit (SDK) is free and open-source software,


released under the terms of the Eclipse Public License, although it is incompatible
with the GNU General Public License. It was one of the first IDEs to run under GNU
Class path and it runs without problems under IcedTea.
 Android

Android is a mobile operating system based on a modified version of the


Linux kernel and other open source software, designed primarily for touch screen
mobile devices such as smart phones and tablets. Android is developed by a
consortium of developers known as the Open Handset Alliance and commercially
sponsored by Google. It was unveiled in 2007, with the first commercial Android
device launched in September 2008. It is free and open source software, its source
code is known as Android Open Source Project (AOSP) which is primarily licensed
under the Apache License. However most Android devices ship with additional
proprietary software pre-installed, most notably Google Mobile Services (GMS)
which includes core apps such as Google Chrome, the digital distribution platform
Google Play and associated Google Play Services development platform.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 29


6.2 Code Details and Code Efficiency:

Data Reading in LDR Sensor

const int ldr = 8;

void setup()

// put your setup code here, to run once:

Serial.begin(9600);

pinMode(ldr, INPUT);

void loop()

// put your main code here, to run repeatedly:

int value = analogRead(A0);

Serial.println(value);

delay(150);

Ultrasonic Sensor Code:

// defines pins numbers

const int trigPin = 8; //D4

const int echoPin = 9; //D3

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 30


const int greenled = 6;

const int whiteled = 5;

const int redled = 7;

const int buz = 4;

// defines variables

long duration;

int distance;

void setup()

pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output

pinMode(echoPin, INPUT); // Sets the echoPin as an Input

Serial.begin(9600); // Starts the serial communication

pinMode(greenled, OUTPUT);

pinMode(redled, OUTPUT);

pinMode(whiteled, OUTPUT);

pinMode(buz, OUTPUT);

Serial.println("*****Circuit On*****");

digitalWrite(whiteled, HIGH);

void loop()

// Clears the trigPin

digitalWrite(trigPin, LOW);

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 31


delayMicroseconds(2);

// Sets the trigPin on HIGH state for 10 micro seconds

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

// Reads the echoPin, returns the sound wave travel time in microseconds

duration = pulseIn(echoPin, HIGH);

// Calculating the distance

distance= duration*0.034/2;

if(distance < 10)

Serial.println("Vehicl Crossed Lane");

Serial.println("");

digitalWrite(greenled, LOW);

digitalWrite(redled, HIGH);

tone(buz, 1000);

else

Serial.print("Distance: ");

Serial.println(distance);

digitalWrite(greenled, HIGH);

digitalWrite(redled, LOW);

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 32


noTone(buz);

// Prints the distance on the Serial Monitor

delay(2000);

Android Activity:

package com.proj.ad;

import android.app.Activity;

import android.content.Intent;

import android.os.Bundle;

import android.view.View;

import android.view.View.OnClickListener;

import android.widget.Button;

import android.widget.EditText;

import android.widget.TextView;

import android.widget.Toast;

public class LoginActivity extends Activity implements OnClickListener

Button btnButton;

EditText etUsername;

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 33


EditText etPassword;

TextView tv;

@Override protected void onCreate(Bundle savedInstanceState)

// TODO Auto-generated method stub

super.onCreate(savedInstanceState);

setContentView(R.layout.login);

btnButton = (Button) findViewById(R.id.btnLogin);

etUsername = (EditText) findViewById(R.id.etUsername);

etPassword = (EditText) findViewById(R.id.etPassword);

tv = (TextView) findViewById(R.id.textView1);

btnButton.setOnClickListener(this);

tv.setOnClickListener(this);

@Override public void onClick(View arg0)

// TODO Auto-generated method stub

switch (arg0.getId())

case R.id.btnLogin:

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 34


if (etUsername.getText().toString().equals("ad")

&& etPassword.getText().toString().equals("ad"))

Toast.makeText(getApplicationContext(),
"Successfull...",Toast.LENGTH_LONG).show();

Intent i = new Intent(LoginActivity.this, MainPanel.class);

startActivity(i);

else

Toast.makeText(getApplicationContext(), "Username
Password Wrong", Toast.LENGTH_LONG).show();

break;

case R.id.textView1:

Intent i = new Intent(this, RegisterActivity.class);

startActivity(i);

break;

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 35


CHAPTER7: EXPERIMENTATION AND RESULT ANALYSIS

7.2 Analysis of the Result with the help of Screen Readings:

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 36


BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 37
CHAPTER 8: FUTURE ENHANCEMENT AND CONCLUTION

 Future Enhancement:

In future they developed android application system will ensure the safety of
the old aged people and reduce risk of physically challenged people by alerting the
user fall detection and the abnormal health condition. The system supports
independent living and confidence of the old aged people effectively. And also the
system is greatly user interface. The sensors used in this project also wearable and
light weight and the transmission range of the system is very high because of the
GSM, is the major highlight of the project.

 Conclusion:

The application is used in the cars to detect and alert accidents and avoid
damages and loss of life and all. Proposed model with LDR sensor will avoid
accidents in nights due to flash lights problems in heavy wheeler vehicles.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 38


CHAPTER 9: REFERENCE

1. Vikram Singh Kushwaha, Deepa Yadav, Abuyeed Topinkatti, Amrita Kumari. “Car
Accident Detection System using GPS And GSM”, Volume 2 , Issue 1(Jan-Feb
2015), PP12-17
2. Nimisha Chaturvedi, Pallika Srivastava. “Automatic Vehicle Accident Detection and
Messaging System Using GSM and GPS Modem “,Volume: 05 Issue: 03 | Mar-2018
3. C.Prabha, R.Sunitha, R.Anitha. “Automatic Vehicle Accident Detection and
Messaging System Using GSM and GPS Modem”, Vol. 3, Issue 7, July 2014
4. Hoang Dat Pham, MichealDrieberg, Chi Cuong Nguyen, “Development of vehicle
tracking system using GPS and GSM modem”, Conference: 2013 IEEE Conference
on Open Systems (ICOS). Lih-Jen Kau, Member, IEEE, and Chih-Sheng Chen, “A
Smart Phone-Based Pockert
5. Fall Accident Detection, Positioning and Rescue System”, Dec 2013.

BLDEA COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA Page 39

You might also like