Iot Alcohol

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

International Journal of Pure and Applied Mathematic s

Volume 118 No. 20 2018, 4303-4307


ISSN: 1314-3395 (on-line version)
url: http://www.ijpam.eu
Special Issue
ijpam.eu

DRUNK AND DRIVE DETECTION USING IOT


Supraja A1, Bhanu Sri A2, Mary Posonia A3
1,2
U.G Student, Department of Computer Science and Engineering, Sathyabama Institute of Science and Technology, Chennai
3
Assistant Professor, School of Computing, Sathyabama Institute of Science and Technology, Chennai.
E-mail:[email protected], [email protected], [email protected]

Abstract : This system is designed to detect the alcohol level in the body of the person who is driving car and avoid
accidents occurring due to drunk and driving. The proposed system is going to detect whether the person who is driving car
is drunk or not and we are going to control the vehicle. This can be done using raspberry pi. If the person is drunk means
car is automatically slowed down or speed is reduced based on the traffic. Ultrasonic sensors are used to detect whether
any vehicles are present in the front or back of the car. From this sensor reading if any vehicle is present car is slowed or if
any vehicles are not present means car is stopped. Along with drunk and drive detection drowsy driving can also be
detected using this system. This can be done using eye blink sensor. It is used to capture the eye lid movement and if the
eye is closed for longer time vehicle‟s speed is controlled based on ultrasonic sensor. This will reduce the accidents. If in
case of any accident vibration sensor notices the accident. In case of any accident an alert message is sent to the family
members.

Keywords: Alcohol detection, raspberry pi, alcohol sensor, ultrasonic sensor, eye blink sensor.

1. INTRODUCTION body crosses a particular limit vehicle‟s ignition will off


and GPS module finds out the location and alert will be
Road safety has become a major public health concern. sent to the police and family using GSM module.
Over 1, 37,000 people were died in road accidents in
2013. Now days, many road accidents are occurring due Gupta et al [3] proposed “Alcohol Detection with Vehicle
to the alcohol consumption of the person who is driving Controlling”. This system is mainly used for preventing
the vehicle. Thus drunken driving is most common accidents that are occurring due to drunken driving. An
reason of accidents in almost all countries all over the alcohol detector is connected to the PCB (Printed Circuit
world. This system should be installed in the vehicle. Board).When alcohol level crosses a permissible limit
This proposed system Drunk and Drive Detection using ignition of the vehicle is stopped. This system should be
IOT is mainly used to detect the drunken drivers and installed inside the vehicle.
control their vehicles to reduce the accidents. This system
is installed in the vehicle. If the person is drunk and Goswami et al [5] proposed “Alcohol Detection with
driving the car then alcohol sensor present inside the car Vehicle Controlling”. This system needs an android phone
detects the alcohol through the breath of the driver. UV with some sensors and program installed on android
sensor is present in the front and back of the car. If any phone. This program matches the current sensor readings
vehicle or object is present, then speed of the car slowed with the values that are already present in the system. If
down. If nothing is present then car is stopped and buzzer any match found then an alert message will be sent along
will ring. If any accident occur vibration sensor detects it with the location.
and sends a message to the relatives.
Phalak et al [6] proposed “Smartphone and Sensor Based
II. REVIEW OF RELATED WORK Drunk Driving Prevention System”. According to this
system DUI (Driving under Influence) of alcohol is the
Dai et al [1] proposed” Mobile phone based drunk driving major cause of accidents. So they proposed a system to
detection”. This system requires a mobile phone. It should find the driver‟s condition based on the real driving test
be installed in the vehicle with orientation. A program cases. A specially designed hardware consisting of sensors
should be installed in that phone it compares the sensor and a mobile are installed in the vehicle. A program is
readings with the real time driving test cases. If there is installed in hardware and mobile phone. When a person is
any presence of drunk driving then automatically the driving the vehicle sensor readings are compared to the
phone will alert the driver or sends the alert message to the real time test case values. If there is any presence of DUI
police/family. of alcohol alert message will be sent.

Bhuta et al [2] proposed “Alcohol Detection and Vehicle Sarkar et al [7] proposed “A Real Time Embedded
Controlling”. Arduino is used in this system. An alcohol System Application for Driver Drowsiness and Alcoholic
detector and GPS module, GSM module are connected to Intoxication Detection”. This system uses embedded
the arduino board. When the alcohol level in the driver‟s system. This system consists of 5 megapixel camera with

4303
International Journal of Pure and Applied Mathematics Special Issue

embedded system board raspberry. Raspberry pi is


interfaced with another arduino board which is used for
some tasks like alarm notifications and ignition lock .It
performs these tasks if and only if it receives a message
from raspberry pi about the presence of alcohol.

Savania et al [8] proposed “Alcohol Detection and


Accident Prevention of Vehicle”. In this an alcohol sensor
is placed in the vehicle to detect the alcohol. If the alcohol
gases are detected then for every 5 minutes a message is
sent to their relatives. In this an arm7 microcontroller is
used and it is connected to GSM and GPS. The GPS is
used to track the location of the vehicle and message will Fig.1. System architecture
be sent using GSM module.
Architecture of the proposed system is show in
Deshmukh et al [9] proposed “Driver fatigue Detection Fig.1.Raspberry pi is the main part of this system. All the
Using Sensor Network”. This system consists of sensors sensors i.e., alcohol sensor, vibration sensor, eye blink
that are directly faced towards driver‟s face. This system sensor, ultra sonic sensor are connected to the raspberry
monitors the driver eyes to check whether the driver is pi. All the sensor readings are sent to the raspberry pi and
sleeping or not by eye blink sensor and detect their pulse raspberry pi monitors the speed of the vehicle. DC motor
from fingers by using LED and LDR. Analyze the sensor is used to indicate the speed of the vehicle. Raspberry Pi is
readings and find the fatigue level. a small size computer developed in by the raspberry Pi
Foundation. There are two models of Raspberry Pi. They
III. PROPOSED SYSTEM are model A and model B. The main difference between
these two models is model B has an extra USB port and
In the proposed system, we are going to identify
Ethernet. Various components of Raspberry Pi include
weather the person driving the car drank alcohol or not
GPU (Graphics Processing Unit), GPIO (General Purpose
and according to that provide some applications like
Input Output), LEDs, USB, HDMI, power, SD card slot,
automatic lock system in vehicles. Alcohol sensor is used
Ethernet. Alcohol sensor MQ3 is used to detect the
to identify the level of alcohol in the person. A. If he
presence of alcohol in the air. It is used in breath
consumes alcohol and if he opens the car door, then it
analyzers. It has 6 pins. But only 4 of them are used.
cannot be open or else if he is consuming the alcohol
inside the car while driving it, then automatically slows Two pins are used for heating purpose and the
down the car. Ultrasonic sensor detects the presence of other two pins are used for connecting to the power and
any vehicle outside the car, if any cars are present then it ground. It consists of Sno2 layer inside aluminium micro
maintains the low speed if there is no car means it will tubes. And there is a heating element in the tube.
automatically stop the car and back light is “on” . In case Ultrasonic sensors consist of two main parts called
of any accident vibration sensor is used to identify the transmitter and receiver. Transmitter emits high frequency
accident. Along with drunk and driving dizzy driving can sound waves at regular intervals. They travel in air with
also be identified using eye blink sensor. If the person is velocity of sound. If they strike any object then their
sleepy and if he closes eyes for more than five seconds echo is received by the receiver. Distance is calculated by
vehicle‟s speed can be controlled based on ultrasonic the time span between emitting the sound and receiving
sensor reading. the echo. Eye blink sensor is used to capture the eyelid
movement. Eye lid movement is captured by the infrared
(IR) light reflected from the surface of the eye. Vibration
sensor is used to detect the occurrence of accidents. If any
a. SYSTEM ARCHITECTURE accident occurs then an alert message will be sent to the
family members.

b. CIRCUIT DIAGRAM

4304
International Journal of Pure and Applied Mathematics Special Issue

j. text = msg.as_string()
k. server.sendmail(from, to, text)
l. print "mail sent"
m. server.quit()
5.repeat

i. alcohol sensor:
a. i=GPIO.input(11)
b. if i==0 then
c. print "alcohol not detected"
d. sleep(1)
e. else if i==1:
f. print "alcohol detected"
g. sleep(1)
h. mail()
Fig.2. circuit diagram
ii. vibration sensor:
The above diagram (Fig.2.) shows the circuit diagram for a. i=GPIO.input(12)
the proposed system. b. if i==0 then
c. print "vibration not detected"
VI. MONITORING THE SPEED OF VEHICLE d. sleep(1)
e. else if i==1:
1. Whenever the person starts the vehicle this f. print "vibration detected"
system starts working. g. sleep(1)
2. Check the alcohol level using alcohol sensor. If h. mail()
BAC (Blood Alcohol Level) is greater than
0.02% then check the ultra sonic sensor reading. iii. eye blink sensor
3. If the ultrasonic sensor‟s reading is greater than a. i=GPIO.input(13)
1m stop the vehicle else slow down the speed of b. if i==0 then
the vehicle and again check the ultrasonic c. print "person not sleeping"
sensor‟s reading. d. sleep(1)
4. If there is no alcohol in the body , check for e. else if i==1:
drowsy driving using eye blink sensor. f. print "person sleeping"
5. If the eye is closed for 5 sec then check for any g. sleep(1)
accident using vibration sensor. If there is any h. mail()
accident send the alert message.
6. If there is no accident means repeat step 3. VII. RESULTS AND DISSCUSSIONS

Now days many accidents are happening due to drunk


a. PSEUDO CODE
1. Import the required libraries. driving. The proposed system developed an intelligent
2. Select the reuired pins and set the pin modes. system to detect the presence of alcohol and control the
3. Declare from and to. vehicle speed based on the traffic. It is based on IOT. It
4. Mail() involves the use of alcohol sensor, ultrasonic sensor, eye
a. msg = MIMEMultipart() blink sensor, vibration sensor. In addition to alcohol
b. msg['From'] = from detection and vehicle speed control this system also
c. msg['To'] = to detects drowsy driving by use of eye blink sensor. In case
d. msg['Subject'] = "required subject" of any accident detection by vibration sensor it gives alert
e. body = "alert message" message to the family members.
f. msg.attach(MIMEText(body, 'plain'))
Following table (Table-1) gives the response of the system
based on different sensor readings.
g. server=smtplib.SMTP('smtp.gmail.co
m', 587) Table.1.sensor conditions and their responses
h. server.starttls() Sr. Condition Response
i. server.login(from, N
"12345678910111213") o

4305
International Journal of Pure and Applied Mathematics Special Issue

1. Alcohol Reduce the speed of the system is now implemented in cars or any four wheelers.
condition(Threshold vehicle to minimum set In future it can be implemented in two wheelers also. It
level 500) && value can also be used in any organization to detect drunken
Ultrasonic persons. In addition to this GPS module can also be used
condition(if any
vehicle in 1m dist) to detect the location of vehicle if alcohol content is found
2. Alcohol Stop the vehicle and send in the body.
condition(Threshold the alert message
level 500) && REFERENCES
Ultrasonic
condition(if no [1] Dai, Jiangpeng, Jin Teng, Xiaole Bai, Zhaohui Shen,
vehicle in 1m dist) and Dong Xuan. "Mobile phone based drunk driving
3 Eye Blinking(Eye Reduce the speed of the detection." In Pervasive Computing Technologies for
remains closed for 5 vehicle to minimum set Healthcare (PervasiveHealth), 2010 4th International
Sec) && Ultrasonic value Conference on-NO PERMISSIONS, pp. 1-8. IEEE, 2010.
condition(if any [2] Bhuta, Pratiksha, Karan Desai, and Archita Keni.
vehicle in 1m dist) "Alcohol Detection and Vehicle Controlling."
4. Eye Blinking(Eye Stop the vehicle and send International Journal of Engineering Trends and
remains closed for 5 the alert message Applications (IJETA) 2, no. 2 (2015): 92-97.
Sec) && Ultrasonic [3] Gupta, Abhishek, Shriram Ojha, Vikash Kumar,
condition(if no Vikrant Singh, Vipin Malav, and Ramnagariya
vehicle in 1m dist) Gramothan. "Alcohol Detection with Vehicle
Vibration sensor Send alert message Controlling." International Journal of Engineering and
5.
condition(Accident Management Research 6 (2016).
condition) [4] Goswami, Tanmoy D., Shrinivas R. Zanwar, and
Zafar Ul Hasan. "Android based rush and drunk driver
For all above conditions location of the vehicle
alerting system." International Journal of Engineering
can be found out through GPS module.
Research and applications, Page (s) (2014): 1-4.
[5] Phalak, Piyush Vinay, Shashank Kowekar, and Shruti
Joshi. "Smartphone and Sensor Based Drunk Driving
Prevention System."
Fig.3.Chart showing alcohol sensor and number of
[6] Sarkar, Dwipjoy, and Atanu Chowdhury. "A real time
units measured by it embedded system application for driver drowsiness and
alcoholic intoxication detection." International Journal Of
800 Engineering Trends and Technology (IJETT) 10 (2014).
700 [7] Savania, Vijay, Hardik Agravata, and Dhrumil Patela.
600 "Alcohol Detection and Accident Prevention of Vehicle."
International Journal of Innovative and Emerging
500 Research in Engineering Vol.2, no. 3 (2015),pp. 55-59.
normal
400 [8] Deshmukh, S. V., D. P. Radake, and K. N. Hande.
threshold "Driver fatigue detection using sensor network." Int. J.
300
high Eng. Sci. Technol (2011): 89-92.
200 [9] Albert Mayan J, Kuldeep Anand D.S, Neha
100 Sadhvi,"Efficient and secure server migration on cloud
storage with VSM and dropbox services", International
0
Conference on Information Communication and
alcohol sensor Embedded Systems (ICICES), Chennai , pp. 1-5,2017
[10]B.Bharathi and Mahesh kumar (2016), „Non invasive
BG scrutinizer system‟, Global Journal of Pure and
In the above chart (Fig.3.) x-axis denotes the sensor and y Applied Mathematics, vol.12, No: 8, pp. 5123 – 5125
axis denotes the number of units measured by it. Blue [11]Surendar E, Thomas V.M, Posonia A.M ,"Animal
tracking using background subtraction on multi threshold
coloured bar indicates a low level of alcohol. Red coloured
segmentation ", Proceedings of IEEE International
bar indicates the threshold value. Green coloured bar Conference on Circuit, Power and Computing
indicates the high level of alcohol. Technologies, ICCPCT, 2016 .

VIII. CONCLUSION AND FUTURE WORK

This proposed system can reduce the number of road


accidents that are occurring due to drunken driving. This

4306
4307
4308

You might also like