ACCIDENT PREVENTION, DETECTION AND REPORTING SYSTEM USING ARDUINO

by electronicsworkshop111 in Circuits > Arduino

3643 Views, 7 Favorites, 0 Comments

ACCIDENT PREVENTION, DETECTION AND REPORTING SYSTEM USING ARDUINO

image-16.png

In today’s world there is a severe increase in the use of vehicles. Such heavy automobile usage has increased traffic and thus resulting in a rise in road accidents. This takes a toll on the property as well as causes human life loss because of unavailability of immediate preventive and safety facilities. Complete accident prevention is unavoidable but at least repercussions can be reduced. This embedded system can prevent the accident to occur and proper preventive measures are taken in this system. The ambulance service and the police station can easily find the location as the location along with the google map link was sent to their smart devices with mobile network accessibility.The system consists of eye blink sensor, temperature sensor, alcohol sensor, accelerometer, GPS module, GSM module, motor, buzzer, led etc. and all these devices are interfaced with the central micro controller unit. We are going to use eye blink sensor for detecting sleep by setting the certain time limit, if the driver gets sleepy,we can warn him. Temperature sensor helps us in detecting the heat of the engine and if the engine is overheated then that of a normal condition, we can warn the driver. Alcohol sensor helps us in detecting if the driver is drunk or not. If he/she is over drunk the vehicle provides warning and the engine stops functioning.Accelerometer detects the occurrence of accident and sends signal to the micro controller for further functioning. GPS module provides us the location, speed, time and date of the certain place where the vehicle is in the real time.If accident occurs, the location of accident that we get from the GPS is send to the ambulance service and police by the help of GSM module. Everything might be all right after a simple accident so the driver can re-inform the ambulance service and police station in this case.


MOTIVATION

Currently there is no technology for accident detection.As it is done manually there is loss of life in golden hours.The accident victim is dependent on the mercy of others to rush him to hospital.Many times an accident goes unnoticed for hours before help comes .Due to all these factors there is a high rate of mortality of the accident victims.In addition to this there is delay in the ambulance reaching the hospital to the traffic congestion between accident location and hospital which increases the chances of the death of victim

Although automobiles save our lots of travelling time, the risk increases in travelling because of the accidents. For the prevention from such accidents, we can use modern additional technologies. In the context of our project,we have used some sensors, electronic modules and microcontroller unit which helps us in providing prevention from accidents, detects the accident if it occurs even after the preventive measures and reports the ambulance service.

According to My Republica,18 December 2018; Killer roads claim 864 lives across Nepal in 4 months

PROBLEMS

The use of vehicles increases in the proportion of the population. Due to the traffic

congestion, the accidents are also increasing day by day. This causes the loss of life due

to the delay in the arrival of ambulance to the accident spot or from the accident spot to

the hospital. So, it is necessary to take the accident victim to the hospital as soon as

possible. Whenever, the accident occurs, it has to be informed to the investigation unit.

So, it is also beneficial if the intimation is reached to the enquiry section so that the

time for the investigation can be minimized.

OBJECTIVES

The main objective of this project is to prevent the accident which happens due to alcoholism of driver, sudden asleep and due to the over heating of engine.Certainly, if the accident happens due to other cases, the used electronic devices will be able to provide the spontaneous message and exact location to police and ambulance in order to recover victims.

SCOPE AND APPLICATION OF THE PROJECT

The project we are discussing has a wide range of practical scopes:

• The accident preventive measures can be use with all type of engined vehicles.

i.e. diesel/petrol engine.

• The GPS and GSM system can be used to determine over speed in restricted

area and charge penalty automatically decreasing human manpower, saving

time and money.

• Reporting system can be used with Home security, personal security connecting

with family, vehicle security.

And many more

PCB Manufacturer


If you are looking for a pcb manufacurer, jlc pcb is best option for you. The cbreasons to choose JLCPCB for pcb manufacturing are:

  • Higher Quality
  • Lower Cost
  • Faster Delivery

If you want to order your pcb from jlcpcb just go through the link below:

https://jlcpcb.com/EWS


LITERATURE REVIEW

The products available in the market are not reliable when it comes to synchronizing

more than one parameter. The literature survey revealed that systems available in

market has a major disadvantage, it is specifically designed for one sole purpose like

Accident detection, Accident prevention or accident reporting. These systems on their

own have many advantages but these systems, but from cost point we have to reconsider

our decision to buy these products due to their lack of multitasking ability. These

systems are useful as it improves their functionalities by adding a feature to the existing

system will increase the redundancies. To overcome this disadvantage, we are

proposing a system which could increase the functionality and reliability such that it

can prevent the vehicle accident along with accident detection system and accident

reporting to the ambulance service and police station. Thus, our proposed system is

much more advantageous over the existing system.

Sensors are used in everyday objects such as touch-sensitive elevator buttons (tactile

sensor) and lamps which dim or brighten by touching the base, besides innumerable

applications of which most people are never aware. With advances

in micromachinery and easy-to-use microcontroller platforms, the uses of sensors have

expanded beyond the traditional fields of temperature, pressure or flow measurement,

for example into MARG sensors.

George Atwood invented the very first accelerometer in the 1700s. The Atwood

machine, as it was called, consists of masses on springs where the velocity is calculated

based on displacements experienced.

The Global Positioning System (GPS), originally Navstar GPS, is a satellite-based

radionavigation system owned by the United States government and operated by

the United States Space Force. The GPS project was started by the U.S. Department of

Defense in 1973, with the first prototype spacecraft launched in 1978 and the full

constellation of 24 satellites operational in 1993.

The Global System for Mobile Communications (GSM) is a standard developed by

the European Telecommunications Standards Institute (ETSI) to describe the protocols

for second-generation (2G) digital cellular networks used by mobile devices such as

mobile phones and tablets. It was first deployed in Finland in December 1991. By the

mid-2010s, it became a global standard for mobile communications achieving over 90%

market share, and operating in over 193 countries and territories. 2G networks

developed as a replacement for first generation (1G) analog cellular networks.

Subsequently, the 3GPP developed third-generation (3G) UMTS standards, followed

by the fourth-generation (4G) LTE Advanced and the fifth-generation 5G standards,

which do not form part of the ETSI GSM standard.


HARDWARE PART

The hardware devices to be used for accident prevention, detection and reporting system are eye blink sensor, temperature sensor, alcohol sensor, accelerometer, GPS module, GSM module, buzzers,led, microcontroller (Arduinouno), power supply, connecting wires etc.

EYE BLINK SENSOR

The eye blink sensor senses the eye blink using infrared signal. The variation across the

eye will vary as per the eye blink. If the eye is closed the output is high otherwise the

output is low.

TEMPERATURE SENSOR (LM35)

LM35 is a precession Integrated circuit Temperature sensor, whose output voltage

varies, based on the temperature around it. It is a small and cheap IC which can be used

to measure temperature anywhere between -55°C to 150°C. It can easily be interfaced

with any Microcontroller that has ADC function or any development platform like

Arduino.

ALCOHOL SENSOR (MQ-3)

MQ-3 module is suitable for detecting Alcohol, Benzine, CH4, Hexane, LPG, CO.

Sensitive material of MQ-3 gas sensor is SnO2, which with lower conductivity in clean

air. When the target alcohol gas exists, the sensor’s conductivity is more higher along

with the gas concentration rising. MQ-3 gas sensor has high sensitivity to Alcohol, and

has good resistance to disturb of gasoline, smoke and vapor. This sensor provides an

analog resistive output based on alcohol concentration. When the alcohol gas exists, the

sensor’s conductivity gets higher along with the gas concentration rising.

ACCELEROMETER (ADXL 335 MEMS)

An accelerometer is a device that measures proper acceleration. Proper acceleration,

being the acceleration (or rate of change of velocity) of a body in its own

instantaneous rest frame, is not the same as coordinate acceleration, being the

acceleration in a fixed coordinate system. For example, an accelerometer at rest on the

surface of the Earth will measure an acceleration due to Earth’s gravity, straight

upwards (by definition) of g ≈ 9.81 m/s2. By contrast, accelerometers in free fall (falling

toward the center of the Earth at a rate of about 9.81 m/s2) will measure zero.

GPS Module (SIM 28ML)

A GPS navigation device, GPS receiver, or simply GPS is a device that is capable of

receiving information from GPS satellites and then to calculate the device’s

geographical position. Using suitable software, the device may display the position on

a map, and it may offer directions. The Global Positioning System (GPS) is a global

navigation satellite system (GNSS) made up of a network of a minimum of 24, but

currently 30, satellites placed into orbit by the U.S. Department of Defense.

BUZZER

A buzzer or beeper is an audio signaling device, which may be mechanical,

electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm

devices, timers, and confirmation of user input such as a mouse click or keystroke.

D.C. MOTOR (CONTROL SWITCH)

A DC motor is any of a class of rotary electrical machines that converts direct current

electrical energy into mechanical energy. The most common types rely on the forces

produced by magnetic fields. Nearly all types of DC motors have some internal

mechanism, either electromechanical or electronic, to periodically change the direction

of current flow in part of the motor.

MICROCONTROLLER (ARDUINO UNO R3)

The Arduino Uno R3 is a microcontroller board based on a removable, dual-inline-

package. The board is equipped with sets of digital and analog input/output (I/O) pins

that may be interfaced to various expansion boards(shields) and other circuits. The

board has 14 digital I/O pins (six capable of PWM output), 6 analog I/O pins, and is

programmable with the Arduino IDE (Integrated Development Environment), via a

type B USB cable. it has one 5v output pin and one 3.3v output pin. it also contains

three ground pins.


SOFTWARE PART

The software applications to be used for accident prevention, detection and reporting

system are Arduino IDE, google map and messaging app.

ARDUINO IDE

The Arduino Integrated Development Environment (IDE) is a cross-

platform application (for Windows, macOS, Linux) that is written in functions from C

and C++. It is used to write and upload programs to Arduino compatible boards, but

also, with the help of 3rd party cores, other vendor development boards. A program

written with the IDE for Arduino is called “sketch”. Sketches are saved on the

development computer as files with the file extension.io. Arduino Software (IDE) prior

to 1.0 saved sketches with the extension.pde. Arduino IDE was created for people with

no profound knowledge of electronics. Arduino IDE also contains a message area, a

text console, a toolbar with buttons for common functions and a series of menus.

MESSAGING APP

Messaging apps are apps and platforms that enable messaging, many of which started

around social networking platforms, but many of which have now developed into broad platforms enabling status

updates, chat bots, payments and conversational commerce (e-commerce via chat).

GOOGLE MAP

Google Maps is a web mapping service developed by Google. It offers satellite

imagery, aerial photography, street maps, 360° panoramic views of streets (Street

View), real-time traffic conditions, and route planning for traveling by foot, car, bicycle

and air (in beta), or public transportation.


BACKGROUND THEORY

Arduino is an open source project that created microcontroller based kits for building

digital devices and interactive objects that can sense and control physical devices.

OVERVIEW

Arduino is an open source hardware and software project, created with a simple aims

in mind to be as simple as possible. Arduino is widely used by artists, hackers and

professionals to casually design prototype and experiment with electronics. Can use it

as brain for their robot, to build a new digital music instrument, or to make your house

plant tweet you when it’s dry. An Arduino contains a microchip, which is a very small

processor that you can program. You can attach sensors to it so it can measure

conditions like how much light there is in the room). It can control how other objects

react to those conditions (room gets dark, LED turns on).

The project is based on microcontroller board designs, produced by several vendors

using various microcontrollers. Microcontrollers use inputs and outputs like a

computer. Inputs capture information from the user or the environment while outputs

do something with the information that has been captured. A switch and a sensor could

be a digital and an analog input respectively into the Arduino and any object we want

to turn on and off and control could be an output. It could be a motor or even a computer.

These systems provide sets of digital and analog input/output (I/O) pins that can

interface to various expansion boards (termed shields) and other circuits. The boards

feature serial communication interfaces, including Universal Serial Bus (USB) on some

models for loading programs from personal computers. For programming the

microcontrollers, the Arduino project provides an integrated development environment

(IDE) based on a programming language named processing, which also supports the

languages, C and C++. The Arduino language is very similar to C. It’s almost the same

language but Arduino provides us with several libraries to make things a bit easier.

FEATURES

An Arduino board consists of an Atmel 8, 16- or 32-bit AVR microcontroller (although

since 2015 other makers’ microcontrollers have been used) with complementary

components that facilitate programming and incorporation into other circuits. An

important aspect of the Arduino is its standard connectors, which let users connect the

14CPU board to a variety of interchangeable add-on modules termed shields. Some

shields communicate with the Arduino board directly over various pins, but many

shields are individually addressable via 1°C serial bus-so many shields can be stacked

and used in parallel A handful of other processors have also been used by Arduino compatible devices.

Most boards include a 5 V linear regulator and a 16 MHz crystal oscillator (or ceramic

resonator in some variants). An Arduino’s microcontroller is also pre-programmed with

a boot loader that simplifies uploading of programs to the on-chip flash memory,

compared with other devices that typically need an external chip programmer. This

makes using an Arduino more straightforward by allowing the use of an ordinary

computer as the programmer. Currently, opt boot boot loader is the default boot loader

installed on Arduino UNO. Some serial Arduino boards contain a level shifter circuit to convert between RS-232

logic levels and transistor-transistor logic (TTL) level signals. Current Arduino boards

are programmed via Universal Serial Bus (USB), implemented using USB-to-serial

adapter chips such as the FTDI FT232. Some boards, such as later-model Uno boards,

substitute the FTDI chip with a separate AVR chip containing USB-to-serial firmware,

which is reprogrammable via its own ICSP header. Other variants, such as the Arduino

Mini and the unofficial Boarduino, use a detachable USB-to-serial adapter board or

cable, bluetooth or other methods, when used with traditional microcontroller tools

instead of the Arduino IDE, standard AVR in-system programming (ISP) programming

is used. The Arduino board exposes most of the microcontroller’s I/O pins for use by other

circuits. The Diecimila Duemilanove and current Uno provide 14 digital I/O pins, six

of which can produce pulse-width modulated signals, and six analog inputs, which can

also be used as six digital I/O pins. These pins are on the top of the board, via female

0.1-inch (2.54 mm) headers. Several plug-in application shields are also commercially

available. The Arduino Nano, and Arduino-compatible Bare Bones Board and

Board uno boards may provide male header pins on the underside of the board that can

plug into solder less breadboard.

METHODOLOGY

WORKING PRINCIPLE

In this system at first, we worked on the prevention of vehicle accident and even after

all the preventive measures applied if the accident occurs the system detects it. After

the detection of vehicle accident, the system automatically reports to the ambulance

service and police station without any time loss so that the casualty might not loss

his/her life due to late in rescue.

The system is installed in the vehicle. As the preventive measures for vehicle accident

the sensors like MQ-3 alcohol sensor, eye blink sensor and LM35 temperature sensor

are used. For the detection of vehicle accident accelerometer is installed and for

reporting GPS module and GSM module are used. Motor (control switch) is used for

engine control and buzzer, led lights etc. are used for warning during prevention. All

these devices are interfaced with the central microcontroller (Arduino Uno) unit.

Alcohol sensor helps us in detecting if the driver is drunk or not. If he/she is over drunk

the vehicle provides warning and the engine stop functioning. Eye blink sensor is used

for detecting the eye blink, if a driver gets sleepy, he gets warned. Temperature sensor

helps us in detecting the temperature of the engine and if the engine is overheated then

that of a normal condition, driver is warned with red colored LED. Accelerometer

detects the occurrence of accident and sends signal to the microcontroller for further

functioning. GPS module provides the location, speed, time and date of the certain place

where the vehicle is in the real time. If accident occurs, the accelerometer detects it and

location of accident is obtained using GPS, and finally sends the information to the

ambulance service and police by the help of GSM module.

The message obtained in mobile phone consists of the location of the accidental place

in the form of google map link which will help to the emergency units like ambulance

service and police station to reach the casualty in time and rescue the lives.

SYSTEM DESIGN

BLOCK DIAGRAM

The vehicle unit consist of alcohol sensor, eye blink sensor and temperature sensor as

preventive measures of an accident, buzzer and red light LEDs for alert. First alcohol

sensor detects the concentration of alcohol in driver, if it is found below the threshold

the motor rotates and vehicle is ready to be drive.

Whenever alcohol is detected the motor stops. Similarly, when the driver feels sleepy,

the eye blink sensor detects and alert the driver with buzzer and red colored led lights.

The system will also check temperature of engine continuously and keeps alerting if

found above threshold value of engine temperature. Vehicle unit also consists of

accelerometer which keeps on informing the coordinate of vehicle position to the

microcontroller. If it is found random, the GPS location tracker tracks and informs the

emergency number with values of latitude, longitude and google map position using

GSM SIM module.

Vehicle unit sends the information to the emergency contacts like police control room

and ambulance unit.

ALGORITHM

Algorithm for the working of the system:

  1. Start
  2. First of all, the system is powered with the proper amount of power supply.
  3. After the system is on, alcohol sensor detects if the driver is drunk or not. If
  4. he/she is over drunk the system provides warning and the engine of the vehicle
  5. stop functioning.
  6. If no alcohol is detected then the vehicle starts properly or does not stop running.
  7. Eye blink sensors detects whether the driver is drowsy or not. If the driver is
  8. asleep the system warns him with alarm and red light alert.
  9. Continuously Temperature sensor helps us in detecting the heat of the engine
  10. and if the engine is overheated then that of a normal condition, driver gets red
  11. light alert else keeps moving.
  12. If accident occurs, accelerometer detects the occurrence of accident and sends
  13. signal to the microcontroller for further functioning.
  14. GPS module finds the location and GSM module sends message with latitude,
  15. longitude and link of google map to emergency numbers of ambulance and
  16. police.
  17. Once the system is on, it continuously checks all the sensors by the help of
  18. microcontroller (Arduino Uno) in order to perform all the prevention, detection
  19. and reporting works.

FLOWCHART

SCHEMATIC DIAGRAM

image-16.png

PROBLEMS FACED

During the progress of our project, we came to encounter numerous problems that

slowed our progress. some of the major problems are mentioned below:


Due to the lack of electronics stores we could not get our hands on the

equipment in time, which was required in our project.

As electronics devices are very sensitive to voltage and temperature and

could be damaged easily, few sensor and devices were damaged which

resulted in delay in time and increase in cost of project.

Arduino IDE was corrupted, it took time to delete and install it again in

computer. This caused irregular output in serial monitor.

Initially, GSM SIM card was not getting signal, later on changing the SIM

card fixed that problem.

CODING

#include<SoftwareSerial.h>
SoftwareSerial Serial1(2,3); //make RX arduino line is pin 2, make TX arduino line is pin 3.
SoftwareSerial gps(10,11);
#include<LiquidCrystal.h>
LiquidCrystal lcd(4,5,6,7,8,9);
 
#define x A1
#define y A2
#define z A3
 
int xsample=0;
int ysample=0;
int zsample=0;
 
#define samples 10
 
#define minVal -50
#define MaxVal 50
 
int i=0,k=0;
int  gps_status=0;
float latitude=0; 
float logitude=0;                       
String Speed="";
String gpsString="";
char *test="$GPRMC";
 
void initModule(String cmd, char *res, int t)
{
  while(1)
  {
    Serial.println(cmd);
    Serial1.println(cmd);
    delay(100);
    while(Serial1.available()>0)
    {
       if(Serial1.find(res))
       {
        Serial.println(res);
        delay(t);
        return;
       }
 
       else
       {
        Serial.println("Error");
       }
    }
    delay(t);
  }
}
 
void setup() 
{
  Serial1.begin(9600);
  Serial.begin(9600);
  lcd.begin(16,2);  
  lcd.print("Accident Alert  ");
  lcd.setCursor(0,1);
  lcd.print("     System     ");
  delay(2000);
  lcd.clear();
  lcd.print("Initializing");
  lcd.setCursor(0,1);
  lcd.print("Please Wait...");
  delay(1000);
   
  Serial.println("Initializing....");
  initModule("AT","OK",1000);
  initModule("ATE1","OK",1000);
  initModule("AT+CPIN?","READY",1000);  
  initModule("AT+CMGF=1","OK",1000);     
  initModule("AT+CNMI=2,2,0,0,0","OK",1000);  
  Serial.println("Initialized Successfully");
  lcd.clear();
  lcd.print("Initialized");
  lcd.setCursor(0,1);
  lcd.print("Successfully");
  delay(2000);
  lcd.clear();
  lcd.print("Callibrating ");
  lcd.setCursor(0,1);
  lcd.print("Acceleromiter");
  for(int i=0;i<samples;i++)
  {
    xsample+=analogRead(x);
    ysample+=analogRead(y);
    zsample+=analogRead(z);
  }
 
  xsample/=samples;
  ysample/=samples;
  zsample/=samples;
 
  Serial.println(xsample);
  Serial.println(ysample);
  Serial.println(zsample);
  delay(1000);
   
  lcd.clear();
  lcd.print("Waiting For GPS");
  lcd.setCursor(0,1);
  lcd.print("     Signal    ");
  delay(2000);
  gps.begin(9600);
  get_gps();
  show_coordinate();
  delay(2000);
  lcd.clear();
  lcd.print("GPS is Ready");
  delay(1000);
  lcd.clear();
  lcd.print("System Ready");
  Serial.println("System Ready..");
}
 
void loop() 
{
    int value1=analogRead(x);
    int value2=analogRead(y);
    int value3=analogRead(z);
 
    int xValue=xsample-value1;
    int yValue=ysample-value2;
    int zValue=zsample-value3;
     
    Serial.print("x=");
    Serial.println(xValue);
    Serial.print("y=");
    Serial.println(yValue);
    Serial.print("z=");
    Serial.println(zValue);
 
    if(xValue < minVal || xValue > MaxVal  || yValue < minVal || yValue > MaxVal  || zValue < minVal || zValue > MaxVal)
    {
      get_gps();
      show_coordinate();
      lcd.clear();
      lcd.print("Sending SMS ");
      Serial.println("Sending SMS");
      Send();
      Serial.println("SMS Sent");
      delay(2000);
      lcd.clear();
      lcd.print("System Ready");
    }       
}
 
void gpsEvent()
{
  gpsString="";
  while(1)
  {
   while (gps.available()>0)            //Serial incoming data from GPS
   {
    char inChar = (char)gps.read();
     gpsString+= inChar;                    //store incoming data from GPS to temparary string str[]
     i++;
    // Serial.print(inChar);
     if (i < 7)                      
     {
      if(gpsString[i-1] != test[i-1])         //check for right string
      {
        i=0;
        gpsString="";
      }
     }
    if(inChar=='\r')
    {
     if(i>60)
     {
       gps_status=1;
       break;
     }
     else
     {
       i=0;
     }
    }
  }
   if(gps_status)
    break;
  }
}
 
void get_gps()
{
  lcd.clear();
  lcd.print("Getting GPS Data");
  lcd.setCursor(0,1);
  lcd.print("Please Wait.....");
   gps_status=0;
   int x=0;
   while(gps_status==0)
   {
    gpsEvent();
    int str_lenth=i;
    coordinate2dec();
    i=0;x=0;
    str_lenth=0;
   }
}
 
void show_coordinate()
{
    lcd.clear();
    lcd.print("Lat:");
    lcd.print(latitude);
    lcd.setCursor(0,1);
    lcd.print("Log:");
    lcd.print(logitude);
    Serial.print("Latitude:");
    Serial.println(latitude);
    Serial.print("Longitude:");
    Serial.println(logitude);
    Serial.print("Speed(in knots)=");
    Serial.println(Speed);
    delay(2000);
    lcd.clear();
    lcd.print("Speed(Knots):");
    lcd.setCursor(0,1);
    lcd.print(Speed);
}
 
void coordinate2dec()
{
  String lat_degree="";
    for(i=20;i<=21;i++)         
      lat_degree+=gpsString[i];
       
  String lat_minut="";
     for(i=22;i<=28;i++)         
      lat_minut+=gpsString[i];
 
  String log_degree="";
    for(i=32;i<=34;i++)
      log_degree+=gpsString[i];
 
  String log_minut="";
    for(i=35;i<=41;i++)
      log_minut+=gpsString[i];
     
    Speed="";
    for(i=45;i<48;i++)          //extract longitude from string
      Speed+=gpsString[i];
       
     float minut= lat_minut.toFloat();
     minut=minut/60;
     float degree=lat_degree.toFloat();
     latitude=degree+minut;
      
     minut= log_minut.toFloat();
     minut=minut/60;
     degree=log_degree.toFloat();
     logitude=degree+minut;
}
 
void Send()

   Serial1.println("AT");
   delay(500);
   serialPrint();
   Serial1.println("AT+CMGF=1");
   delay(500);
   serialPrint();
   Serial1.print("AT+CMGS=");
   Serial1.print('"');
   Serial1.print("+9779800000000"); //mobile no. for SMS alert
   Serial1.println('"');
   delay(500);
   serialPrint();
   Serial1.print("Latitude:");
   Serial1.println(latitude);
   delay(500);
   serialPrint();
   Serial1.print(" longitude:");
   Serial1.println(logitude);
   delay(500);
   serialPrint();
   Serial1.print(" Speed:");
   Serial1.print(Speed);
   Serial1.println("Knots");
   delay(500);
   serialPrint();
   Serial1.print("http://maps.google.com/maps?&z=15&mrt=yp&t=k&q=");
   Serial1.print(latitude,6);
   Serial1.print("+");              //28.612953, 77.231545   //28.612953,77.2293563
   Serial1.print(logitude,6);
   Serial1.write(26);
   delay(2000);
   serialPrint();
}
 
void serialPrint()
{
  while(Serial1.available()>0)
  {
    Serial.print(Serial1.read());
  }
}

Part 2 Coding

#include <SoftwareSerial.h>
 
//define for temperature sensor
int sensorInput;
int tempsensePin=A4;
int temp;
int ledPin_temp =3;
int threshold_temperature=15;
 
//define eye blink senaor
int IRSensor = 2;
int BUZZER = 13;
 
//define alcohol sensor
const int MQ3=0;
const int motor=9;
int value;
 
 
void setup() {
 Serial.begin(9600);
 
//setup for temperature
pinMode(tempsensePin, INPUT);
pinMode(sensorInput,INPUT);
pinMode(ledPin_temp, OUTPUT);
 
//setup for eye blink sensor
pinMode (IRSensor, INPUT); 
pinMode (BUZZER, OUTPUT);
 
//setup for alcohol sensor
pinMode(MQ3, INPUT);
pinMode(motor, OUTPUT);
 
digitalWrite(BUZZER,LOW);
digitalWrite(motor,LOW);
digitalWrite(ledPin_temp,LOW);
  
}
 
void loop() {
 
 //temperature sensor detection and prevention by  red light on
  sensorInput = analogRead(A4);
  temp = sensorInput*0.048828125;
 
 //eye blink sensor detection
  int statusSensor = digitalRead(IRSensor);
 
 //alcohol sensor detection
  value= analogRead(MQ3);
  Serial.print("alcohol concentration is: ");
  Serial.println(value);
   
if (temp>threshold_temperature)
  {
   digitalWrite(ledPin_temp,HIGH);
   Serial.print("Temperature: ");
   Serial.print(temp);
   Serial.println("C"); 
   Serial.print('\n');
   Serial.print("Warning!!!");
   Serial.print('\n');
   Serial.print("Temprature is High");
   Serial.print('\n');
   delay(2000);
  }
else
  {
  digitalWrite(ledPin_temp,LOW);
  Serial.print("Temp is fine");
  Serial.print('\n');
  delay(1000);
  }
if(statusSensor == 1)
  {
    digitalWrite(BUZZER, LOW);
  }
else
{
 digitalWrite(BUZZER, HIGH);
}
if(value>700)
  {
    digitalWrite(motor,LOW);
  }
else
  {
  digitalWrite(motor,HIGH);
  }
   
 delay(500);
 
}

Conclusion


Finally, on performing all the required procedure, we were able to implement our

project on “Accident Prevention, Detection and Reporting System” and the final output

of the project is as shown below:

In this 21’s century, with the continuous advancement in science and technology, more

emphasis is given for vehicle safety. With the increase in number of vehicle, the number

of road accident is also increasing day by day, so it is our duty to control it. Mostly the

accident takes place because of drunk drivers, drowsiness while driving and over

heating of engine causing fire. Implementation of this project will help to decrease the

accident caused because of above reason. The system is automatic, low cost and power

efficient which makes it easy to install in vehicle. Unfortunately, if accident happens to

take place, the system detects it and with the help of GPS exact location can be pointed

and informed to emergency unit using GSM module. This helps to save many lives by

informing rescuing agent in time.

Over all, this system is very affordable, targets common people and easily implemented

in all types of vehicles.

In this 21’s century, with the continuous advancement in science and technology, more

emphasis is given for vehicle safety. With the increase in number of vehicle, the number

of road accident is also increasing day by day, so it is our duty to control it. Mostly the

accident takes place because of drunk drivers, drowsiness while driving and over

heating of engine causing fire. Implementation of this project will help to decrease the

accident caused because of above reason. The system is automatic, low cost and power

efficient which makes it easy to install in vehicle. Unfortunately, if accident happens to

take place, the system detects it and with the help of GPS exact location can be pointed

and informed to emergency unit using GSM module. This helps to save many lives by

informing rescuing agent in time.

Over all, this system is very affordable, targets common people and easily implemented

in all types of vehicles.

CONCLUSION

In this 21’s century, with the continuous advancement in science and technology, more

emphasis is given for vehicle safety. With the increase in number of vehicle, the number

of road accident is also increasing day by day, so it is our duty to control it. Mostly the

accident takes place because of drunk drivers, drowsiness while driving and over

heating of engine causing fire. Implementation of this project will help to decrease the

accident caused because of above reason. The system is automatic, low cost and power

efficient which makes it easy to install in vehicle. Unfortunately, if accident happens to

take place, the system detects it and with the help of GPS exact location can be pointed

and informed to emergency unit using GSM module. This helps to save many lives by

informing rescuing agent in time.

Over all, this system is very affordable, targets common people and easily implemented

in all types of vehicles.

FUTURE ENHANCEMENT

With the completion of this project there are certain enhancement that can be done.

They are as follows:

• Along with the stopping of vehicle after a driver is found drunk, he can be fined

automatically by connecting central system with traffic control room.

• Scientifically proved music which keeps people awake, can be played time to

time in driver’s cabin.

• CCTV camera can be installed in the driver’s cabin and can be controlled from

central room of travel agencies, this can prevent accident considerably.

• Vehicle unit can be connected with central server to find contact no. of

ambulance and police control room.

• Vehicle if obtains over speed, the accelerometer can determine it and

automatically complain to traffic by which driver can be fined. This will limit

the speed of vehicle and can prevent from accident too.

• Surveillance using A.I. cameras and solving hit and run cases.

PROJECT BY

Abhishek Das

Manish Kumar Karna (https://www.facebook.com/manish.karna.BEX10

Riya Dev

Sakshi Chaudhary

Youtube