Vehicle Accident Detection And Prevention Using Raspberry PI And IOT

— Safety is primary concern everywhere and for everyone. Every person wants his to be secured while travelling. This project describes a system that can monitor a vehicle and driver. This is a simple and useful security system and easy to install. Here our application uses Raspberry Pi as its controller and heart beat sensor is interfaced to verify the driver’s heart rate. In case of abnormal condition the vehicle will stop to avoid further damage. This module is employed as a precautionary measure. Four vibration sensors are also connected to identify accident and the location details will be updated using IoT module. Location details are taken through GPS module.


I. INTRODUCTION
The high demand vehicles has also increased the traffic hazards and the road accidents. Life of the vehicle drivers is under high risk. This is because of the lack of best emergency facilities available. The total number of road accidents increased by 2. Despite many efforts taken by government and non-government organizations 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 The average response time of ambulance in India in general is 18-20 min in cities, it varies significantly in case of rural ,sub-urban areas. So an efficient automatic accident detection with an automatic notification of accident location is the main moto of this paper. Nowadays, Global Positioning System (GPS) has become an integral part of a vehicle for tracking and navigation system. It can provide accurate time, location coordinate. On the other hand IOT module ESP8266. It offers a complete and self-contained Wi-Fi networking solution; it can be used to host the application or to offload Wi-Fi___33 networking functions from another application processor. This paper proposes to utilize the GPS receiver to monitor the Latitude & Longitude Details of the vehicle and detect an accident based on the vibration sensor input which (4 of them) are placed on the vehicle's circumference and send the location and time of the accident from the GPS data by using the GSM network to the Cloud. heart beat. And the location details are displayed on the LCD screen.

Background
Information about some recent statistics on Road accidents in Newspapers Heart attacks, road accidents cause 30% of BSF deaths a year <Times of India, Apr 25, 2016[8]>  In a worrying trend, the Border Security Force (BSF) has found that heart diseases or road accidents account for nearly 30% of deaths of its personnel annually.
 BSF director general K K Sharma, said figures showed that out of about 400 deaths taking place in a year in the country's largest border guarding force, 70 were because of heart attacks and about 50 due to vehicular accidents.
 "The DG emphasized on the use of technology for effective domination and border management. He said a trial is undergoing on a 5-km patch along the IB in Punjab and Jammu border... by using smart gadgets," a senior official said.
Road Rage, Dangerous driving cause maximum road accidents in India.
2) NDTV, Dec 12, 2016[7]  India has one of the world's highest accident rates, yet nothing is done to correct the driving pattern of young people who are the cause of most accidents and also its victims.
 With more youth in the country getting behind the wheel, the study has found that accidents are mostly caused by impulsiveness, sensation-seeking, driving anger, vengeance and even proneness to boredom.
 "Every day, nearly 3,400 people get killed on the world's roads (World Health Organization, WHO, 2013). Numerous studies have focused on the engineering causes of road fatalities, as well as the technical shortcomings in the vehicles involved, (but) the third component -the driver, who has been found to be the major component of road fatalities -is often ignored"

III. LITERATURE SURVEY
In this [1] paper the author came up with the basic point, speed is the primary risk factor in driving. So he used the GPS receiver which provides the speed information in every second. The following are the hardware components used for his project GPS receiver, GSM/GPRS module PIC18F4550. Speed is one of the most significant causes of an accident. The Detection is based on the current speed of the vehicle at the particular time. So this is a good measure to identify a threat. Performance of detection and prediction system is confined to only one sensor.
Using of GSM module makes the hardware complex and bulky. Here not only detection but also prevention is done by utilizing heart beat sensor.
The complete details of the location when accident occurs is available to online which can be monitored live rather than just a sms notification to few as suggested in the paper [1]. Many techniques can be used to measure speed. The most common is the car speedometer. But analog to digital converter is required to acquire speed from the speedometer. Laser speed guns are limited to single point and Instantaneous measurements. But a GPS receiver provides speed information in every second. Therefore, it is more convenient to monitor the speed with a GPS receiver The GSM/GPRS modem utilizes the GSM network to send the location of the accident. The modem can be controlled by a microcontroller through AT Command set  Here [2] the idea they proposed is that, the system can detect the accident using Flex sensor. Flex Sensor changes its resistance depending upon amount of bend due to accident. Accelerometer, GPS, GSM, USB camera modules. Accelerometer with sensitivity ±3g can read low order of magnitude drop, which can effectively detect vehicle rollover accident information and these two sensors are connected to AVR microcontroller. If sensor's output is more than certain threshold value then it indicates that accident has occurred. Using GPS these co-ordinates along with time will be messaged to nearest hospital for emergency medical help. It sends the text message of the location and time stamp to the pre-defined set of endpoints. At the same time, camera which is situated in vehicle is also activated and live transmission of situation takes place. It helps in understanding actual severity of accident and to take appropriate action according to it. Camera is being installed and real time video is transmitted which is a good implementation. This detects with at least 2 sensors which is a better way to be specific about the situation. Here GSM is used which might occupy a large space of the system. Real time camera might result in faulty and disturbing video of the driver which may lead to unnecessary conclusions by the hospital people. The AVR microcontroller is bit old which doesn't have some advanced properties when compared with Raspberry pi. There is no implementation of IOT.

IV. METHODOLOGY
This "IOT Based Vehicle Accident Detection and Prevention Using Raspberry pi" aims at detecting an accident and update the location details, also date and time in cloud which is readily accessible to everyone. In addition to this heart beat sensor is also installed which updates, monitors and also notifies if there is an abnormal condition along with stopping the vehicle to prevent from accidents. This project can be segregated into 3 segments I. Detecting unit II. Prevention unit III. Updating in Cloud (IOT) Here our application uses Raspberry Pi as its controller and heart beat sensor is interfaced to verify the driver's heart rate. In case of abnormal condition the vehicle will stop to avoid further damage. This module is employed as a precautionary measure. Four vibration sensors are also connected to identify accident and the location details will be updated using IoT module. Location details are taken through GPS module.

I. Detecting unit
It consists of Vibration sensor, GPS Module, Motor, buzzer, LCD display as the functioning components in this unit. The vibration sensors which are taken four which resemble four sides of a vehicle. This can be extended to larger number depending upon the size of the vehicle and measuring capability. Initially the motor which runs resembles the movement of vehicle. If suppose any of the 4 vibration sensors gets activated, then the buzzer gets triggered and the motor turns off. At the same time "Accident occurred" is displayed on LCD screen along with the Latitude, longitude of the location is displayed on the screen. This buzzer continuous along until we restart it again.

II. Prevention unit
In this we worked on Heart beat sensor as the major hardware along with few other components like Motor which resembles the functioning of a vehicle. The heart beat sensor actually measures the beats per second and updates the same on to LCD screen.
If the sensor detects any abnormal situation like in my project I have given an abnormal situation if the HB is greater than 120. In this way I designed abnormal situation. Let's keep this as threshold value.
So if the sensor detects more than this then the motor automatically stops resembling the slowing down of vehicle in real time, displays the heartbeat on the LCD screen along with the message "Abnormal Heart Beat".

III. Updating in Cloud (IOT)
In this unit IOT -Wi-Fi module ESP8266 is the main component. The same latitude and longitude details are uploaded onto the cloud which is written the same in the code. This cloud details are shared with the hospital entities and others who can monitor lively.
Regulated power supply is used in this project due to the reason of many power consuming elements in the circuit. converting them to an electrical charge. The prefix piezo-is Greek for press or 'squeeze'.

GPS Module
The Global Positioning System (GPS) is a U.S. space-based global navigation satellite system. It provides reliable positioning, navigation, and timing services to worldwide users on a continuous basis in all weather, day and night, anywhere on or near the Earth which has an unobstructed view of four or more GPS satellites.GPS is made up of three segments: Space, Control and User. The Space Segment is composed of 24 to 32 satellites in Medium Earth Orbit and also includes the boosters required to launch them into orbit. The Control Segment is composed of a Master Control Station, an Alternate Master Control Station, and a host of dedicated and shared Ground Antennas and Monitor Stations. The User Segment is composed of hundreds of thousands of U.S. and allied military users of the secure GPS Precise Positioning Service, and tens of millions of civil, commercial and scientific users of the Standard Positioning Service (see GPS navigation devices). GPS satellites broadcast signals from space that GPS receivers use to provide three-dimensional location (latitude, longitude, and altitude) plus precise time.

LIQUID CRYSTAL DISPLAY
LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs (seven segment LEDs or other multi segment LEDs) because of the following reasons: The declining prices of LCDs.
The ability to display numbers, characters and graphics. This is in contrast to LEDs, which are limited to numbers and a few characters.
Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep displaying the data.

Raspberry Pi
Built on the latest Broadcom 2837 ARMv8 64bit processor, the new generation Raspberry Pi 3 Model B is faster and more powerful than its predecessors. With built-in wireless and Bluetooth connectivity, it becomes the ideal IoT ready solution.
WIFI MODULE ESP8266EX ESP8266EX offers a complete and self-contained Wi-Fi networking solution; it can be used to host the application or to offload Wi-Fi networking functions from another application processor.

HEART BEAT CIRCUIT DRIVE:
Heart rate is the speed of people's emotional state, exercise intensity and objective indicator of cardiac function. But most people are very difficult to accurately measure the time and his heart rate values. If the heart rate monitor with me, heart ECG electrodes will be detected by monitoring the signal processing device, the user can at any time that your heart rate changes, changes in heart rate, self-monitoring status.

CLOUD
The cloud used for this project is "THINKSPEAK" which is provided by MATLAB for educational purpose. We can create an account and then we can use it for educational use.

CODING:
We have used C programming in Raspberry pi for this project. For this Project, We have taken some small changes in the hardware. The vibration sensors which we have taken for the project are just only four for prototype purpose but in real time this number might change, it depends on many parameters. Like the size of the vehicle many other parameters also effect the number of sensors to be used in the project. The GPS module should be kept in an open space which actually effects the output of the GPS Module. The power distribution is to be taken care as the 220 volts is stepped down to 12v, 5v depending upon the requirement of the hardware utilized. The Heart beat sensor threshold is set to be 120 Beats per sec which can be altered. The beats will update on the LCD screen with a little lag which is the result of the response time of the Heart beat sensor. The motor turns off if there is any abnormal situation occurred and this is done my Pulse modulation. The location details are shared onto the cloud after a gap of 15-20 sec this may be due to the network connectivity.
The Cloud used for provided by THINKSPEAK which is taken up by MATLAB provided for student educational Purpose. We have utilized this and kept this in public mode so that anyone can access these results with the help of the URL.

V. RESULTS
The buzzer activates whenever any four of the vibration sensor gets high at the same time the GPS location details are displayed on the LCD screen as well as they are updated onto the Cloud "thinkspeak.com" this is a free website which can be used for educational purpose in regards with matlab.in between the motor also stops indicating vehicle turns off after the accident occurred and also a message will be displayed as "accident detected". On the other hand heart beat sensor functions by displaying the current heart beat in (BPS) Beats per sec. I have taken a threshold of 120. If it exceeds this value then the system will notify an abnormal situation occurred and turns off the motor indicating vehicle turns off. Also a message will be displayed saying "abnormal" and the abnormal heart beat is also displayed on the LCD.

Figure 6 prototype
The above image is the project which is developed to detect and prevent the accident.   We can go for better Cloud services for faster processing, advanced features and much more details of the incident to increase the output clarity for providing better results to the end user.
For further research and advancement we can go by adding much more sensing modules which will increase the detection mechanism. The cloud could be with much more features as this cloud is a free version it will be of minimum applications.

ACKNOWLEDGMENT
I would like to express my heartiest gratitude to my project guide Prof. c.v. Vidhyapathi Assistant Professor (Selection Grade), Embedded Department, VIT University, Vellore, for his suggestions, guidance and constant encouragement throughout the progress of the thesis. His consistent support and intellectual guidance inspired me to innovate new ideas. I am greatly indebted to him for reviewing, analyzing the thesis structure and giving me valuable recommendations.
I would like to pay my sincere regards to the Faculty members of the embedded department and Communication department, for providing their invaluable support and laboratory facilities which were a vital necessity for the completion of research work.
Special thanks are due to my parents and my sister whose love and affectionate blessings have been a constant source of inspiration.
All the thanks are, however, only fraction of what is due to the Almighty for granting me an opportunity and the divine grace to successfully accomplish this assignment.