Nova Explore Publications Nova Journal of Engineering and Applied Sciences DOI: 10.20286/nova-jeas-060104 Vol.6 (1) 2017:1-15 www.novaexplore.com Research Article Alcohol Detection of Drunk Drivers with Automatic Car Engine Locking System Dada Emmanuel Gbenga*1, Hamit Isseini Hamed1, Adebimpe Adekunle Lateef 2, Ajibuwa Emmanuel Opeyemi3 1 Department of Computer Engineering, University of Maiduguri, Maiduguri, Nigeria Department of Computer Science, Emmanuel Alayande College of Education, Oyo, Nigeria 3 Department of Electrical Engineering, University of Ilorin, Ilorin, Nigeria * Corresponding Author: Dada Emmanuel Gbenga, Department of Computer Engineering, University of Maiduguri, Maiduguri, Nigeria. Email: gbengadada@unimaid.edu.ng 2 Received: 2017.08.17 Accepted: 2017.09.25 Abstract Background: This study proposed an efficient technique for eradicating the upsurge in the number of cases of roads accidents caused by excessive intake of alcohol by drivers on the Nigerian roads. Material and methods: This study developed a prototype alcohol detection and engine locking system by using an Arduino Uno microcontroller interfaced with an alcohol sensor along with an LCD screen and a DC motor to demonstrate the concept. The system uses MQ-3 alcohol sensor to continuously monitor the blood alcohol content (BAC) to detect the existence of liquor in the exhalation of a driver. By placing the sensor on the steering wheel, our system has the capacity to continuously check alcohol level from the driver’s breath. The ignition will fail to start if the sensors detects content of alcohol in the driver’s breath. In case the driver got drunk while driving, the sensor will still detect alcohol in his breath and stop the engine so that the car would not accelerate any further and the driver can park by the roadside. Results: Results from testing the proposed system adequately matched the requirements for starting a car’s engine once the level of alcohol detected in the breath of the driver is higher than the prescribed level permissible by law. Conclusion: Experimental results show that the alcohol sensor was able to respond quickly when alcohol is detected and also have the ability to operate over a period. Keywords: MQ-3 Alcohol sensor, Arduino Uno ATmega328 microcontroller, Blood Alcohol Content (BAC), LCD. Introduction These days, majority of road accidents are caused by drink-driving. Drunken drivers are in an unstable condition and so, rash decisions are made on the highway which endangers the lives of road users, the driver inclusive. The enormity of this menace transcends race or boundary. In Nigeria, the problem is being tackled by issuing laws prohibiting the act of drivers getting drunk before or while driving as well as delegating law enforcements agents to arrest and persecute culprits. However, effective monitoring of drunken drivers is a challenge to the policemen and road safety officers. The reason for this stems from the natural inability of human beings to be omnipresent as well as omniscience within the same space and time. This limited ability of law enforcement agents undermines every manual effort aimed at curbing drink-driving. Nova Journal of Engineering and Applied Sciences Page: 1 There is therefore the need for an automatic alcohol detection system that can function without the restriction of space and time. The Nigerian Bureau of Statistics reported 11, 363 road accidents in 2016. Although the report stated speed violation as the foremost cause of these accidents, it can safely be inferred that most of the cases would have been due to driver’s unstable condition caused by drivers getting drunk before they drive. The investigation done by the World Health Organization in 2008 shows that about 50%-60% of traffic accidents are related to drink-driving. More so, WHO data on road traffic deaths revealed 1.25 million traffic deaths were recorded globally in 2013 with the low- and middle-income countries having higher fatality rates per 100 000 population (24.1 and 18.4 respectively). Data collected showed that 67.2% of commercial vehicles drivers in Nigeria admitted to drinking alcohol during working days. This shows that most drivers, especially commercial and heavy duty trucks drivers engage in drink-driving, which can lead to accident. Nigeria sets a legal limit of 0.5 g/100mL blood alcohol concentration (BAC), any level above that is said to be illegal. In this paper, the illegal limit is taken as 0.4. The BAC depicts the quantity of alcohol in a certain volume of blood. It is measured as either grams of ethanol per deciliter of blood (g/fdl, commonly used in the United States), or milliliters of blood, (mg/ml, used in much of Europe). For BAC level from 0.4 to 0.6, drivers feel dazed/confused or otherwise disoriented, and it is generally not safe for a driver to drive a vehicle under such condition. Also, BAC level for 0.7 to 0.8 makes a driver’s mental, physical and sensory functions to be severely impaired. At this stage, a driver is inactive and incapable of driving. BAC level of 0.2 to 0.3 is still not safe but the driver still has a little degree of self-control. Our prototype system, integrates the following hardware components in the design: An LCD, the MQ-3 alcohol sensor, DC motor, Buzzer and two LEDs are integrated to ATmega328 microcontroller. The proposed system was designed and simulated using Proteus VSM simulator. The software code to be burnt into the Arduino board was written in Arduino IDE sketch. Many research efforts have been directed to the design of efficient systems that will monitor drink-driving. Altaf et al. [1] proposed an alcohol detection and motor locking system. They used AT89S51 controller, MQ-3 alcohol sensor, and an LCD to notify the occupiers of a car. The AT89S51 controller has an on-board flash memory which allows fast development and reprogramming in a matter of seconds. Kousikan., Sundaraj [2] employed an infra-red (IR) alcohol detection system to provide continuous monitoring of a driver’s BAC. An IR source LED-894 was used to direct IR energy through an IR sensor (TSOP 1736) mounted on the steering wheel. The activation of the relay circuit is made possible by an interface of IC-4538B and transistor-BC 547. Pratiksha et al. [3] adopted the Arduino ATMEGA328 controller board interfaced with MQ-3 alcohol sensor module, GPS, GSM, LCD and DC motor. The GPS module captures the location of a vehicle, and forwards it as a distress message through the GSM module. The LCD acts as the display while the DC motor was employed as a model for specifying the ability of the mechanism to lock the engine every time ethanol is sensed. Shaik et al. [4] proposed an automatic vehicle engine locked control system using Virtual Instrumentation. The proposed system used LabVIEW to implement an alcohol breath analyzer. The method used an Arduino as the control unit interfaced with MQ-3 sensor as a breathalyzer. Other modules interfaced with the Arduino are buzzer, LED, LCD and DC motor. The LED and LCD served as the output device. ZigBee, IoT and LabVIEW software are the other tools implemented. IoT enables E-mail to be sent to concerned persons of arrested drunk suspects. Mandalkar et al. [5] proposed system included the use of a GPS for tracking the vehicle’s location, heart pulse sensor to notify normal or abnormal condition of driver, and bumper switch to detect collision of vehicle. Other functional modules interfaced to the ATmega328 controller are GSM, GPS, LCD, MQ-3 alcohol sensor, obstacle sensor, fuel blocker, alarm and relays. Bandi et al. [6] proposed system is based on ARM7 LPC2148 microcontroller which provides the continuous monitoring of a driver’s BAC. PAS 32U alcohol sensor was utilized to continuously check the existence of liquor, while the Global Positioning System and Global System for Mobile communication units send the place where the vehicle is situated via SMS. Nova Journal of Engineering and Applied Sciences Page: 2 Prashanth et al [7] developed a prototype of road accident avoiding system that have an alcohol sensor MQ-2 which detects the presence of alcohol in human breath was integrated with a PIC16F877/874 microcontroller which acts as the controller, and an LCD as the output. Shah, Nawgaje [8] proposed a system for detecting drivers that are drunk so as to track them down. The system uses Advanced RISC Machine (ARM) processor and MQ3 that detects liquor. The MQ3 sensor senses the intensity of liquor by means of an analog to digital converter which is inbuilt in LPC2148 ARM controller. Materials and Methods Our proposed work consists of various units that make up the system: the power supply unit, the alcohol detection unit, the engine locking unit, ignition system unit, display unit, alarm unit and indicating unit. An LCD display will be fitted inside the car to act as an indicator to the motorist together with everyone in the vehicle. A DC motor is used as the car engine to demonstrate the concept of engine locking. The ATmega328 microcontroller under the brand name of Arduino Uno will be used to keep looking for the output from the alcohol sensor. The Arduino Uno sketch which is the environment for programming is used to write the code, compile, generate hex file and load it to the microcontroller. Block Diagram The block diagram of the proposed system is shown in figure 1. It consists of power supply section, MQ-3 alcohol sensor, DC motor, LCD, microcontroller, alarm and LEDs. The various units were designed and tested separately. POWER SUPPLY INDICATING UNIT ALCOHOL SENSOR MQ-3 ARDUINO UNO R3 ATMEGA328 IGNITION SYSTEM ALARM DC MOTOR (CAR ENGINE) LCD DISPLAY Fig. 1: Block diagram of Alcohol detection of drunk drivers with automatic car engine locking system Power Supply Unit Nova Journal of Engineering and Applied Sciences Page: 3 Our system is powered with a 9V battery. A 5V DC supply as required by the microcontroller, sensor and display unit. While other components like DC motor require 1.5V and the LEDs need 2V. The Arduino Uno board has already been designed to operate without the use of transformer, the system can be powered via the USB connection from computer or with an external power supply of 7 to 12V. The External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. Any voltage that is above 12V will make the control device to burn thereby destroying the board. It is advisable to use voltage between 7 - 12V. ATmega328 Microcontroller Unit The proposed system is built around ATmega328 Arduino Uno microcontroller board. The unit consists of 14 pins which allows inflow and outflow of feeding (it is possible to use 6 of those pins as Pulse Width Modulation signal outputs), 6 continuous signal with time changing quantity, 16 megahertz electronic oscillator, a Universal Serial Bus port, a power connector, an on-board voltage regulator, ICSP header, and a reset button. The Atmega328 has 32 KB flash memory, 2 KB SRAM and 1 KB EEPROM. Fig. 2: Arduino Uno ATmega328 microcontroller unit MQ-3 Alcohol Sensor Unit The sensor is made of Tin Dioxide (SnO2 ) sensitive layer. The sensor is configured with a high sensitivity to alcohol and small sensitivity to Benzene. It has a simple drive circuit with fast response, stability, and long life. It has an analog interface type. On the sensor, port pins 1, 2 and 3 represents the output, GND and VCC respectively. The technical specification of the sensor is portrayed in table 1. Table 1: Alcohol Sensor Technical Specification Parameter Name Sensor type Detection gas Concentration Voltage Load resistance (R L ) Heater resistance (R H) Sensing resistance (ππ¬) Slope Temp humidity Semiconductor Alcohol gas 0.04-4mg/l alcohol ±5.0V Adjustable 31Ω Ω 2KΩ20KΩ (in 0.4mg/l alcohol) 200– 1000ppm 20±2; 65%±5%RH Nova Journal of Engineering and Applied Sciences ±3 Page: 4 The circuit diagram of the MQ-3 sensor is shown in figure 3 and 4. In the datasheet, the recommended value to be used ranges from 100k ohm to 470k ohm. Here, 200k ohm was used. Fig. 3: MQ-3 circuit diagram Fig. 4: Simplified circuit diagram of MQ-3 alcohol sensor LCD Display Unit LCD display is used for displaying the message sent from the remote location. The LCD module (Fig. 5) displays alphanumeric, kana (Japanese characters) and symbols. It consists of 16 pins (8 data lines, 3 control lines, 2 power lines, 1 contrast line and 2 pins for back light LED connection). Data line and control line are connected to the microcontroller. The LCD display power rating is as stated below: Current (πΌπ·π· ) (ππ·π· = 5.0π£) … … … … .1.0ππ΄ − 3.0ππ΄ πππ₯ Range of ππ·π· − π0 … … … … … … .1.5~5.25π ππ 5.0 ± 0.25 Fig. 5: 16x2 LCD display unit Alarm and Indicating Unit The alarm unit used is a buzzer which indicates when alcohol is detected. The buzzer used belongs to the PS series. The PS series are high-performance buzzers that employ Uni-morph piezoelectric elements and are designed for easy incorporation into various circuits. They have very low power consumption in comparison to electromagnetic units. It has a voltage requirement of 2V and is connected to pin 10 of the microcontroller. The standard resistor value of 220 β¦ Nova Journal of Engineering and Applied Sciences Page: 5 commercially available is closest to the computed value of 250 β¦, so a 220 β¦ resistor was used to limit the current going through the LEDs. DC Motor The DC motor is an electric DC motor used to demonstrate the concept of engine locking. Here in this work, the DC motor will be connected to pin 9 on the microcontroller, when alcohol is detected the DC motor stops in other to indicate that alcohol is detected and continue running when there is no alcohol detected. System Flow chart The flow chart of the system is shown in figure 6. The system algorithm comprises of three main steps. First is to boot up the system, next is the measuring state, this stage measure the amount of alcohol level from the drivers. A prescribed set limit will be given as input to the microcontroller, once the alcohol level exceeds the limit the car will not start. STEP 1: Power on the system STEP 2: checks for alcohol concentration STEP 3: if alcohol is detected STEP 3.1: turn off car engine STEP 4: Else STEP 5: Car engine running STEP 6: Goto step 1 START ALCOHOL DETECTION FROM DRUNKEN DRIVERS WITH ENGINE LOCKING SYSTEM MEASURING ALCOHOL LEVEL OF THE DRIVER IS ALCOHOL LEVEL ABOVE LIMIT NO YES 1. CAR ENGINE OFF 2.RED LED INDICATOR ON 3. ALARM ON 4. GREEN LED INDICATOR OFF 1. CAR ENGINE ON 2.GREEN LED INDICATOR ON 3.ALARM OFF 4.RED LED INDICATOR OFF STOP Fig. 6: Flowchart of the entire system System Operation The detected analog voltage values are read by the microcontroller; the Arduino Uno board contains 8 channels, 10-bit device that changes an analog voltage on a pin to a digital number. The system will link input voltages from 0-5V with values from 0-1023V to generate 5Vs for every 1024 units. The system will process the analog signal and convert it to digital value of 0 or 1. Also, the analog values from the alcohol sensor will be scaled to percentage, and this percentage is equivalent to the analog voltage values in ppm (part per million). The first condition is the intoxication stage; the second condition is the slightly drunk stage and the last stage is Nova Journal of Engineering and Applied Sciences Page: 6 drunkenness stage. Each stage will be a condition to perform a task based on the level of alcohol. In the intoxication stage, the LED indicator will be activated only, the alarm will be OFF and the car engine will be ON. In stage two, the alarm and the green LED indicator will be ON, as well as the car engine. Finally, the driver is mentally and physically inactive in stage three, so the engine will be OFF while the alarm and red LED will be ON. Therefore, once the system detect alcohol in stage three the car will be stopped and the driver can park by the roadside. Software Implementation The software design consists of a free running program which manipulates input from the Alcohol sensor and programming of the indicating unit, LCD display, DC motor, alarm unit. The program code is written on Arduino sketch and uploaded to ATMEGA328 microcontroller program memory using Arduino Uno development board. The hex file is generated using the Arduino sketch IDE environment. Figure 7 shows the device programming used for this research. System Design and Simulation Fig. 7: Device Programming After generating the hex file from the Arduino sketch environment, the hex file was copied from the Arduino file directory and linked to the Proteus for simulation. Each unit was also tested to ensure continuity and efficiency in the components before soldering. Figure 14 shows the full simulation design of our proposed system. Also, the location of hex file is depicted in figure 13. • Indicating unit Two LEDs with different colors are used. The green LED indicate when the engine is running and also notify the driver that his alcohol level is below the limit, and the other red LED indicate when there is alcohol detected and also when the engine is not running. This unit is depicted in figure 8. Fig. 8: Indicating unit Nova Journal of Engineering and Applied Sciences Page: 7 • Alarm unit The alarm unit used a buzzer to produce sound whenever alcohol is detected. The purpose of the buzzer was to create awareness to passengers whenever alcohol is detected. The alarm unit is represented in figure 9. Fig. 9: Alarm Unit • Engine locking unit The engine locking unit was built by the concept of using a DC motor to demonstrate as the car engine. The DC motor operate based on preset conditions; once the alcohol level goes above 40% the engine motor stops. The engine motor continues to run when the alcohol level goes below 39%. The DC motor is connected to pin 9 on the microcontroller and it operate from 1.5V TO 6V. Fig. 10: Engine locking unit • Alcohol checking stage Nova Journal of Engineering and Applied Sciences Page: 8 In this stage, when the car is switched on the system measures the level of alcohol from the driver breath to check whether the driver is intoxicated, slightly drunk and whether if he is extremely drunk. Based on this, the microcontroller only locks the engine when the level exceeds 40% in which case car engine stops so that the driver can manage to stare the car to the road side. The unit for measuring alcohol level is depicted in figure 11. Fig. 11: Measuring alcohol level • alcohol detection unit The alcohol sensor unit has four pins; test pin, vcc, dout and ground. The test pin is used to accept logic signals of 0 or 1 by using logic state pin as shown in figure 12. The LED is used to show when the sensor detect alcohol. in the simulation, when the logic state is 1 the led goes on to indicate that alcohol is present and off to show the absence of alcohol. Fig. 12: Detection stage Nova Journal of Engineering and Applied Sciences Page: 9 Fig. 13: Location of hex file The circuit diagram of our proposed alcohol detection system is in figure 14 below. Fig. 14: Complete Alcohol detection and engine locking design Results The results of our experiments are presented in figures 15, 16, 17 and 18. Tables 2, 3 and 4. Fig. 15: Final bread boarding of the system Nova Journal of Engineering and Applied Sciences Page: 10 Table 2: Alcohol sensor reading Normal Sensor Readings Experimental Readings 16 20 24 26 27 30 35 40 17 23 26 28 30 34 37 41 Table 3: Sensitivity level characteristics VOLATGE (V) PPM (PART PER MILLION) PERCENTAGE (%) 0 0 0 0.5 100 10 1 200 20 1.5 300 30 2 400 40 2.5 500 50 3 600 60 3.5 700 70 4 800 80 4.5 900 90 5 1000 100 Table 4: Level of drunkenness LEVEL OF DRUNKNESS Voltage Output 200 - 300ppm 300 – 400ppm 400 – 500ppm 1 – 1.5V 1.5 – 2V 2– 2.5V 20 – 30% 30 – 40% 40 – 50% LCD Display Intoxicated Slightly Drunk Drunkenness Alarm Off Off On Ignition SYS On On Off Nova Journal of Engineering and Applied Sciences Page: 11 Indicator Led Green On Led Green On Led Red On Led Red Off Led Red Off Led Green Off The graph in figure 16 shows the output voltages for alcohol detection in ppm obtained with the help of the above readings for different alcohol content samples. The response of the different samples is in parts per million (PPM) vs Alcohol Sensor Operating voltages in Volt. Fig. 16: Response of ppm (In Percentage) via alcohol sensor output voltages value Figure 17 shows the graph of the voltage level at which the detection point takes effect. At 2V the car engine stops running and continues running once the alcohol level falls below 2V. ALCOHOL DETECTION POINT 2.5 (90%-100%) VOLTAGE 2 (80%-90%)Alcohol 1.5 (60%-70%)Alcohol 1 (40-50%)Alcohol (20%-30%) Alcohol 0.5 0 (0%-10%)alcohol 1 2 3 4 5 6 PPM 7 8 9 10 11 12 Fig. 17: Alcohol detection point The detection limit at which the sensor detects Alcohol from the driver is depicted in figure 18. Nova Journal of Engineering and Applied Sciences Page: 12 Fig. 18: serial plot of the detection limit Discussion We tested the sensor’s accuracy using a deodorant perfume to simulate its response to alcohol concentration level. To verify the functionality of our system, we employed breadboard, digital multimeter, LEDs, Arduino sketch IDE, and Proteus VSM software. The final bread boarding of the entire system is shown in figure 15. Alcohol Sensor Accuracy Accuracy is the measurement of an instrument to give equivalent value to the true value or the quantity being measured. The accuracy can be related to the percentage error as Error = Actual reading – Experimental reading Percentage error = Error⁄Actual reading × 100% From the experimental results obtained as shown in table 5, Total percentage error for the whole table = 45%. Therefore, Overall percentage error = Total percentage /total sample reading = 45/20 = 2.25%. The average accuracy of the alcohol sensor used is obtained as Ave % accuracy = 100 − 2.25% = 97.75 %. Thus, our calculation above shows that the alcohol sensor is 97.75% accurate. Sensitivity Level Characteristics Table 3 shows the alcohol levels in ppm, voltage and percentage. The values in ppm correspond to the voltage and percentage. Our system displays the percentage alcohol level to the driver. The ppm values are the concentration level, that is, BAC level. The voltage values increase or decreases based on the resistance of the alcohol sensor. Using this table, the locking concept was achieved by programming instruction to the microcontroller to lock the car engine when the alcohol sensor reading is above 40%. The microcontroller uses the analog voltage values coming from the sensor to determine whether the sensor reading is above the set limit. In essence, once the microcontroller receives analog value above 2V, it automatically compares it with the preset limit, if it is not the same the engine will stop. Nova Journal of Engineering and Applied Sciences Page: 13 Level of Drunkenness Experimental results were obtained based on the three pre-designated conditions for drunk driving. In intoxication stage, the car engine will be running as the driver can still control himself. Also in the slightly drunk state, the system will still allow the engine to run. Finally, in the drunken state, the driver will lose stability and cannot make decisions. In that case, the engine automatically locks off. Table 4 shows the level of drunkenness. Conclusions In this paper, we proposed a method to sense the presence of alcohol from the breath of drivers and curtail the catastrophic effects it can have on peoples’ lives. The system was designed and implemented successfully via the use of Arduino Uno ATMEGA328 microcontroller and MQ-3 sensor. Experimental evaluation of the system showed that the alcohol sensor was able to deliver fast response when alcohol is detected. Also, the ability of the alcohol sensor to operate over a long time is a feature of the proposed system. References 1. Altaf SV, Abhinay S, Ansari E, Kaunain Md, Anwer R. Alcohol Detection and Motor Locking System. International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering. 2017; 6(2): 989-993. 2. Kousikan M, Sundaraj M. Automatic Drunken Drive Prevention System. International Journal of Students Research in Technology and Management. 2014; 2(2): 75-77. 3. Bhuta P, Desai K, Keni A. Alcohol Detection and Vehicle Controlling. International Journal of Engineering Trends and Applications. 2015; 2(2): 92-97. 4. Shafi S., Tanmay NTS, Tarunya D, Vinay G, Reena K. Automatic Vehicle Engine Locking Control System to Prevent Drunken Driving using Virtual Instrumentation. International Journal of Engineering and Technical Research. 2016; 5(1):76-79. 5. Mandalkar RB, Pandore RN, Shinde MB, Godse VD. Alcohol Detection and Accident Avoidance using Locking with Tracking. International Journal of Advanced Research in Computer Science and Management Studies. 2015; 3(9): 142-147. 6. Geeta BS, Marur DR. Smart Drunken Driver Detection and Speed Monitoring System for Vehicles. International Journal of Advanced Technology in Engineering and Science. 2015; 3(3):67-74. 7. Prashanth KP, Padiyar K, Naveen KPH, Kumar KS. Road Accident Avoiding System using Drunken Sensing Technique. International Journal of Engineering Research and Technology. 2014; 3(10): 818823. 8. Shah S, Nawgaje DD. ARM Based Drunk Driver Identification with Tracking System. International Journal of Modern Trends in Engineering and Research. 2016; 3(4): 302-307. Nova Journal of Engineering and Applied Sciences Page: 14 9. Bindu JH, Reddy GA, Anoosha P, Vinolini KAV. Programmed Engine Locking System by Automatically Detecting Drunken Drivers. International Journal of Innovative Research in Science, Engineering and Technology. 2015; 4(11):11344-11348. 10. Vijay J, Saritha B, Priyadharshini B, Deepeka S, Laxmi R. Drunken Driven Protection System. International Journal of Scientific and Engineering Research. 2011; 2(12):1-4. 11. Ogazi C, Edison E. The drink driving situation in Nigeria. Traffic Injury Prevention. 2012; 13(2):115-9. https://doi.org/10.1080/15389588.2011.645097 Nova Journal of Engineering and Applied Sciences Page: 15