Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 10, No. 3, 2024 1 Design of a Multidimensional Intelligent Safety Driving Monitoring System Based on Machine Vision Haisheng Song, Xiangbo Yun*, Li Wang, Zixu Niu, Zexia Li, Jingwen Ma Collage of Physics and Electronic Engineering, Northwest Normal University, Lanzhou, Gansu 730070, China * Corresponding Author: Xiangbo Yun (Email: 2561234620@qq.com) Abstract: This study introduces a multidimensional driving safety monitoring system that integrates millimeter-wave radar and an Arduino Uno-based alcohol sensor. The system aims to enhance driving safety and prevent accidents by real-time monitoring and analysis of the driving environment, driver's condition, and vehicle dynamics using machine vision technology. Utilizing millimeter-wave radar, the system precisely detects obstacles and pedestrians around the vehicle, facilitating efficient distance and speed measurements to support automatic emergency braking and collision warnings. Additionally, the Arduino Uno-based alcohol sensor monitors the driver's breath for alcohol concentration, ensuring the driver is in a suitable state for driving. Combined with machine vision technology, the system further analyzes video stream data from inside and outside the cockpit, monitoring driver behavior and external traffic conditions to enhance the identification of potential risks. The success of this research illustrates the potential of combining machine vision with advanced sensor technologies, offering new insights for the development of comprehensive driving assistance systems. Keywords: Millimeter-wave radar; Arduino Uno; Alcohol sensor; Machine vision technology. 1. Introduction A midst swift socio-economic progress and enhancements in living standards, automobiles have evolved into a quintessential means for daily commute, elevating road traffic safety to a pressing global concern. The prevalence of driving under the influence poses significant risks, with drunk driving incidents accounting for a large fraction of road accidents[1][2].With persistent high fatalities from traffic accidents, the focus on driving safety is more critical than ever. Research highlights that driver distraction, fatigue, intoxication, and environmental misjudgment are among the leading causes of vehicular accidents, underscoring the need for real-time monitoring systems that ensure driver and environmental safety[3]. The advent of artificial intelligence, machine vision, and sensor technology heralds new solutions to these challenges. The proposed system in this study integrates millimeter- wave radar with Arduino Uno-based[4] alcohol sensing to monitor the driving environment and driver behavior comprehensively through machine vision. This capability to detect a driver's alcohol levels with precision is pivotal in combating drunk driving. Millimeter-wave radar further provides accurate obstacle distance and velocity measurements, critical for collision prevention mechanisms [5].Concurrently, the alcohol sensor substantiates the driver's suitability for safe driving. Additionally, machine vision in this system enables extensive analysis of both the vehicle's interior and exterior settings, including pedestrian detection, traffic signs, and road conditions, thus expanding the assistive features of the driving safety system. This multi-faceted surveillance not only proactively warns drivers about potential perils but can also initiate automatic safety interventions, such as engaging the emergency braking system, significantly bolstering road safety. Overall, this research endeavors to craft an efficacious multidimensional safety monitoring system by integrating machine vision, millimeter-wave radar, and alcohol detection technologies. This initiative dovetails with the trajectory of intelligent driving aids development and offers innovative strategies to enhance road safety and mitigate accident rates. 2. System Scheme This study leverages machine vision technology and utilizes the Arduino Uno as the core platform to develop a comprehensive safety monitoring system for driving. The system's basic functionality employs the MQ-3[6] alcohol sensor to assess the alcohol concentration of drivers, combined with millimeter-wave radar and machine vision for multidimensional surveillance. The overall structure of the system is shown in Figure 1. Prior to vehicle operation, the system mandates a breath test for the driver; exceeding the safety threshold triggers the Arduino controller to lock the engine and sound an alarm. Should the readings surpass set limits, the Arduino controller will sever the power supply to the motor and emit a warning via buzzer and indicator lights. Simultaneously, the system engages the GPS module for positioning and communicates the location and alert messages to predetermined contacts through the GSM module via text message.[7] The system further incorporates millimeter-wave radar and machine vision technology to augment the sensing of driver conduct and environmental contexts. 2 Figure 1. System structure block diagram 2.1. Pavement information monitoring module The traffic condition monitoring section employs machine vision and millimeter-wave radar to conduct real-time target detection and data fusion, thereby improving the surveillance of traffic safety. The neural network specifically detects four types of targets: forward-moving vehicles, non-motorized vehicles, zebra crossings, and traffic signs. Millimeter-wave radar is used mainly for supplementary detection of motorized vehicles to compensate for the neural network's visual detection inaccuracies during adverse weather conditions such as rain, snow, and fog[8]. Figure 2 presents a simplified schematic of the data fusion process, which involves mapping and integrating the RGB video stream layer, YOLOv5[9] detection information layer, and millimeter-wave radar detection matrix data. The critical challenge is to calibrate the camera and radar to detect in a unified coordinate framework. Figure 2. Schematic diagram of data fusion 2.2. Dui testing module The smart alcohol detection system comprises an Arduino core chip, GSM global communications module, GPS global positioning module, MQ-3 alcohol sensor, motor module, display module, and alarm module,As shown in Figure 3. The motor, representing the vehicle in this setup, springs into action upon system start-up, as indicated on the display screen. Inserting the owner's SIM card into the GSM module's slot initiates a text message to the mobile phone to confirm successful linkage, with the display confirming the connection. Once linked, the motor, simulating the vehicle's function, operates normally. Alcohol vapor introduced into the alcohol sensor triggers the detection process. If the driver is sober, the car typically signals via motor rotation. Conversely, in the event of driver intoxication, the sensor and Arduino controller will detect it and halt the motor to prevent driving under the influence. Meanwhile, the GSM and GPS modules dispatch text alerts, including the car's location, to authorities and family members for assistance, while the LCD screen continuously updates with pertinent data. Figure 3. Alcohol detection schematic 2.3. Motor control module In the Arduino Uno-developed anti-drunk driving system, motor drive modules, like the L298N, are commonly utilized to connect the motor. This module can control the motor's speed and direction through input signal regulation. Connection of the motor drive module to the Arduino Uno's digital pins facilitates motor control. Motors typically demand higher currents and voltages, hence requiring an appropriate power source. The selection of the power supply should align with the motor's specifications, and it's critical to ensure a common ground between the Arduino Uno and the motor. As shown in Figure 4 illustrates the hardware connection schematic for the drunk driving detection module and the motor. Figure 4. Diagram of the Alcohol Detection Module and Motor Hardware Wiring 3 3. Software Design 3.1. Principle of Alcohol Detection This design's software comprises four integral components: the alcohol detection design, communication module design, display module design, and vehicle auto-lock design. The core process initiates with the communication module establishing a connection, indicated by the display module. Upon successful linkage, the motor, representing the vehicle's operation, activates. Subsequently, the alcohol detection module gathers a sample from the driver's breath to evaluate the air's alcohol content. If alcohol is detected and the measured concentration aligns with the defined limits, it is deemed indicative of drunk driving. The steps for implementation are as follows: (1) Set up the Arduino environment by installing the Arduino IDE on a computer and connecting the Arduino board. (2) Import the necessary libraries corresponding to the alcohol sensor and other utilized modules for Arduino communication and data processing. (3) Define the pin modes according to the circuitry, ensuring accurate readings and control over the sensors and modules. (4) Initialize serial communication for interfacing with the computer, establishing the correct baud rate and communication protocols. (5) Initialize the modules, including the alcohol sensor, display, alarm modules, and others, confirming their operational status. (6) Retrieve sensor data by reading the alcohol concentration from the alcohol sensor, storing it in variables for subsequent processing. (7) Assess the alcohol level using a predefined threshold to determine if it exceeds the legal driving limit. Exceeding the threshold triggers the subsequent steps. (8) Engage the engine lock system with appropriate commands to stop the engine and prevent drunk driving if alcohol levels are above the threshold. (9) Send out alerts and notifications through the GSM module via text message or phone call to the authorities or family members with the alcohol test results and vehicle location. (10) Update the display module to show the alcohol concentration, alarm status, and other relevant information on the LCD screen for driver feedback. (11) Place the entire detection and control process in a loop for ongoing alcohol monitoring and real-time response execution. 3.2. Millimeter-wave radar 3D point cloud image In the realm of automotive millimeter-wave radar systems, point clouds are formulated by detecting targets from radar echoes using CFAR detectors, which are then plotted as points within a three-dimensional coordinate space. The quantity and density of these point clouds are crucial, directly influencing the quality of the imaging and the precision of target detection. Conventional signal processing approaches often focus on refining CFAR detector algorithms to yield denser and more detailed point clouds. Figure 5. 3D point cloud imaging results Literature[10] presents a technique known as the PreCFAR grid map, designed to combat the issues of sparsity and occlusion in CFAR grid map construction by creating a representation of the static environment. Meanwhile, literature[11] suggests a region-based CFAR approach that utilizes regional target information on a two-dimensional RDM to enhance the detection signal-to- noise ratio, substantially improving CFAR detection efficacy. Additionally, literature [12] proposes a method for adaptive threshold setting, which dynamically adjusts the threshold coefficient of CFAR detection based on the relationship between radar received power and distance. This method combines the noise power around the detection unit to derive an adaptive detection threshold, thereby generating a denser and more reliable millimeter-wave radar 3D point cloud image, as shown in Figure 5. 4. System Debugging Following extensive testing with various functional drinks and diverse alcohol sensors, our system has been enhanced. The tests have shown that the system is highly sensitive to alcohol and exhibits dependable reliability, effectively aiding the prevention of drunk driving incidents. When the system is energized, the display will indicate "Alcohol Detection System Connected," signifying a successful initiation. It will proceed to confirm "GPS Connected," denoting a successful link with the GPS module, followed by a confirmation of "Connecting GSM...," indicating a successful GSM module connection. The GSM module will then communicate with the phone, triggering the switch to engage the motor that simulates the vehicle's engine. Should the alcohol sensor detect an alcohol level above the set threshold, the motor will come to an immediate halt, simulating the stopping of the 4 vehicle's engine. Concurrently, the system dispatches an alert via text message along with the current location to a predetermined phone number,as shown in Figure 6. Figure 6. The location information displayed on the mobile phone after the alcohol concentration test exceeds the standard 5. Conclusion In our research, we developed a machine vision-based multidimensional monitoring system for enhanced driving safety. At the heart of the system lie the Arduino Uno control platform, the MQ-3 alcohol sensor, and the GSM and GPS modules, working in tandem with millimeter-wave radar and machine vision technology to sensitively detect the driver's alcohol status and to perform an integrated oversight of driving behaviors. The system commences by assessing the driver's alcohol level with the MQ-3 sensor, ensuring the driver is sober before starting the engine. Throughout the drive, it employs millimeter-wave radar and machine vision to monitor and analyze the driver's behavior and the environment around the vehicle, providing instant feedback for increased safety. Should the alcohol level exceed the predetermined threshold, the system automatically disconnects the power supply to the motor and activates an audible buzzer and visual warning signals. Concurrently, the GPS module locates the vehicle, and the GSM module sends out an emergency text to predetermined contacts, enabling remote alarm signaling and location for assistance. This suite of innovative features allows the system not only to promptly detect and prevent instances of drunk driving but also to offer comprehensive surveillance of the driving process, thus serving as an effective tool in the prevention of traffic accidents. The test results vouch for the system's high precision and rapid response in detecting alcohol, showcasing its substantial utility and reliability in promoting vehicular safety. Acknowledgment This work was supported by the 2024 "Innovation and Entrepreneurship Ability Improvement Plan" project funding project of Northwest Normal University (Project name: Multi-dimensional intelligent safe driving monitoring platform based on machine vision, project number: CXCYCX2024056) References [1] Xu Jinglian,Han Junfeng,Pan Shenghui,et al.Design of car alcohol test system based on multi-sensor data fusion [J].Instrument Technique and Sensor,2010 ( 7) : 105-107. [2] Yue Rui.Advance in the breath alcohol sensor for policeman [J]Chemical Sensors,2010 ( 7) : 6-10. [3] Wang Y, Xu J, Liu X, et al. Analysis on risk characteristics of traffic accidents in small-spacing expressway interchange[J]. International journal of environmental research and public health, 2022, 19(16): 9938. [4] Banerjee, S., & Kapoor, A. (2019). An Introduction to Arduino Uno for Beginners. International Journal of Engineering Science and Computing, 9(8), 19888-19892. [5] Nasernejad P, Sayed T, Alsaleh R. Modeling pedestrian behavior in pedestrian-vehicle near misses: A continuous Gaussian Process Inverse Reinforcement Learning (GP-IRL) approach[J]. Accident Analysis & Prevention, 2021, 161: 106355. [6] Sahu P, Dixit S, Mishra S, et al. Alcohol detection based engine locking system using MQ-3 sensor[J]. International Research Journal of Engineering and Technology, 2017, 4(4): 979-981. [7] Chaudhari, N., & Gholap, A. (2018). Alcohol Detection and Engine Locking System using Arduino. International Research Journal of Engineering and Technology, 5(3), 830-833. [8] Qian K, He Z, Zhang X. 3D point cloud generation with millimeter-wave radar[J]. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies, 2020, 4(4): 1-23. [9] Horvat M, Gledec G. A comparative study of YOLOv5 models performance for image localization and classification[C]//33rd Central European Conference on Information and Intelligent Systems (CECIIS). 2022: 349. [10] WEISHAUPT F, APPENRODT N, TILLY J F, et al. PreCFAR gridmaps for automotive radar[C]. The 202118th European Radar Conference (EuRAD), London, United Kingdom, 2022: 161–164. doi: 10.23919/EuRAD 50154.2022.9784455. [11] WEI Ziping, LI Bin, FENG Tao, et al. Area-based CFAR target detection for automotive millimeter-wave radar[J]. IEEE Transactions on Vehicular Technology, 2023, 72(3): 2891– 2906. doi: 10.1109/TVT.2022.3216013. [12] LAN Lühongkang, HUANG Yan, ZHENG Kaihang,et al. Research on adaptive threshold point cloud imaging method of millimeter-wave radar[J]. Journal of Signal Processing, 2022, 38(10): 2009–2020. doi: 10.16798/j.issn. 1003- 0530.2022.10.002.