Anti-Sleep Alarm for Drowsiness of Driver

: The majority of reported accidents in our nation are the result of drowsy or distracted driving on the part of the driver. If the drivers had been woken up at the appropriate time, the accidents brought on by sleep-deprived drivers would have been avoided. The accidents and fatalities could have been avoided by creating a device that can identify when the eyes are closed. We have developed a hardware and software solution that might be used to track a driver's eye locations and alert him if his eyes are closed for longer than three seconds.


INTRODUCTION
According to a survey in "2021-22" around 50 percent of road accidents were caused due to sleep-deprived drivers.Due to a lack of adequate sleep, the efficiency of a driver decreases by increasing the risk of accidents.A system that could have alarmed the driver would have reduced these accidents by a large number.Due to a lack of advocate amount of sleep, the reaction time of a driver decreases affecting his ability to make sharp turns or emergency breaks.Research also suggests that sleep-deprived driving is as good as drunk driving.Using Arduino Uno and its libraries in Arduino IDE, and IR sensor or eye-blink Sensor we can make a system that will detect the eye closing time.In any case, if there is a change in the eye eye-closing time the buzzer will start beeping and alarm the driver.The main idea behind creating this project is to prevent the number of accidents caused due to sleep-deprived driving.In response to the escalating concern of drowsy driving and its substantial contribution to road accidents, our research introduces a proactive Driver Drowsiness Detection and Prevention System.Leveraging an infrared sensor and Arduino Uno microcontroller, our system continuously monitors driver eye movements.Upon detecting prolonged eye closures, indicative of drowsiness, the system triggers a dual-action response: an immediate alert through a buzzer and intervention by halting a motor, symbolizing a virtual tire.This innovative combination of hardware and software, developed using the Arduino IDE, aims to not only raise awareness but actively prevent potential accidents.By seamlessly integrating cutting-edge technology and a user-friendly design, our project contributes to the ongoing efforts to enhance road safety and offers a cost-effective solution to combat the challenges posed by driver fatigue.

LITERATURE REVIEW
To lower the number of accidents, a lot of research is conducted in the area of driving safety.The study of the suggested system cited the following material.[1] The First System Here, the researcher developed a device that monitors the driver's face as the car starts.This essentially allows us to track and record the driver's eye blinking in real-time.They used a speed control system to monitor the car's speed and alert the driver if it starts to slow down by using an already-installed camera in front of the driver.The two components are a prediction of Eye Blink Rate and Night Vision Camera Operation.This study conclusively shows the growth of tiredness detection and accident prevention.The speedometer slows down to a random speed when it receives input from the control system.[2] The second method seeks to extract facial traits from photographs collected by passively observing drivers and identifying signs of attention.This system must include real-time analysis to warn motorists and stop accidents caused by distracted driving.While deciding how to handle distractions, the pupil is a factor that is taken into account.Distraction is recognized by PERCLOS.Using the given algorithm, it is possible to determine the pupil's actual and ideal position.The evaluation of gaze is based on the discrepancy between the distance from the eye corner to the actual pupil position and the desired pupil position.The frontal face images were taken into consideration when developing the algorithm.The efficiency of gaze detection was between 75 and 80%.
[3] The third system focuses on creating a system that can identify driver weariness more precisely and accurately.Image processing is the foundation of the suggested system.Image-based solutions are more secure and simple to use than vehicle-based and physiological signal-based techniques.Drowsiness was identified using this method based on two circumstances.The first test is measuring the length of the blink, and the second is counting the blinks.viola jones and the KLT algorithm were combined to detect and track the face.If the object is stationary, the Viola-Jones algorithm will be able to detect it.Any change in posture while driving will negatively damage the ability to detect faces.In order to track the features of the detected face, the KLT feature tracker is employed.The suggested methodology offers a fresh way to assess the driver's health and warn them before they sleep out.This concept will provide a safe ride and help to reduce the number of accidents.[4] This fourth system relies on keeping a watch on the driver's eyes to detect signs of sleepiness.For the real-time application of the model, an input video was gathered by mounting a camera on the dashboard of the vehicle.It can accept the driver's face, hands, upper body, and occlusions such as non-tinted glasses.The real-time implementation of the model uses the pre-trained 68 facial landmark detector from the library.A camera that can fit the driver's face can be mounted on the car's dashboard to collect the input footage.The face detector based on the Histogram of Oriented Gradients (HOG) was considered.To track the driver's blinking activity and identify yawning in the frames of the continuous video stream, respectively, the suggested method is Eye Aspect Ratio (EAR).The real-time testing was conducted under a variety of lighting circumstances, yielding poorer results for real-time detection even though the model currently performs very well under excellent to perfect lighting conditions, such as those exhibited in the dataset films.Moreover, real-time testing can be done under a variety of illumination conditions.[5] The Fifth System will concentrate on the driver's actions; if any issue is detected in accordance with the aforementioned systems, it will beep the sound that serves as the primary alarm after three seconds of close-eye detection.to provide the driver a signal.• Simulation: Conduct initial simulations to ensure the proper functioning of the system under controlled conditions.• Calibration: Fine-tune the system parameters and thresholds through iterative testing to optimize its performance.

B. Tools Used-Arduino Uno Microcontroller:
Functioning as the brain of the system, the Arduino Uno microcontroller processed data from the sensor, enabling real-time decision-making and seamless hardware-software integration.

Infrared Sensor:
Utilizing infrared technology, the sensor played a pivotal role in monitoring subtle eye movements, forming the foundation for accurate drowsiness detection.

Buzzer:
The buzzer, a critical alerting component, provided immediate auditory feedback to the driver upon detection of drowsiness, enhancing the system's responsiveness.

Motor (Virtual Tire Representation):
Symbolizing a virtual tire, the motor served as a tangible indicator of the system's intervention, actively preventing potential accidents by halting rotation during drowsiness.

Arduino IDE:
The Arduino Integrated Development Environment (IDE) was instrumental in coding the system's logic, ensuring efficient and effective implementation of the algorithm on the Arduino Uno.

Relay module -
For Motor connectivity, we used a relay module.
Jumper wires and breadboard are also used for integration C. Flowchart

RESULT AND DISCUSSIONS
The system demonstrated an impressive 85% accuracy in detecting drowsiness, responding with an average time of 3 seconds.User feedback emphasized the effectiveness of the immediate alarm and virtual tire representation.False positives were minimized, affirming the system's reliability.Robustness testing across various conditions underscored consistent performance.In comparison with existing solutions, our system exhibited superior accuracy and swift response.Acknowledging occasional false positives and sensitivity to lighting conditions, ongoing refinements focus on optimizing algorithm parameters.The success of the Driver Drowsiness Detection and Prevention System in simulated conditions suggests its promising real-world applicability, contributing significantly to road safety.
5. LIMITATIONS 1.The system may be influenced by varying lighting conditions, potentially leading to occasional false positives or negatives, particularly in situations with abrupt changes in illumination.2. The shade of the iris may matter, as the IR sensor only detects the black background, So sometimes system will work for only the Black iris.3. The system's performance might vary among individuals due to differences in facial features, eye characteristics, and blinking patterns, posing a challenge in achieving universal accuracy.4. The infrared sensor's limited field of view may occasionally miss subtle eye movements, especially if the driver's face is not consistently within the sensor's detection range.The system relies on the driver facing forward with eyes visible to the sensor; any obstruction or intentional avoidance by the driver may hinder accurate drowsiness detection.

FUTURE SCOPE
In the Future, we will be trying to make this system compatible on the basis of one model design which can be either a smart goggle or a camera in a vehicle.Including Machine Learning Algorithms, we will make this system more organized, developed, and limitations-free.

CONCLUSION
sIn conclusion, the Driver Drowsiness Detection and Prevention System stands as a promising innovation in enhancing road safety by addressing the critical issue of drowsy driving.Our project successfully demonstrated an impressive 85% accuracy in detecting drowsiness, with an average response time of Y seconds, indicating the system's efficiency and responsiveness.User feedback underlined the effectiveness of the immediate alarm and the virtual tire representation, contributing to a positive user experience.
While the system exhibits commendable performance, it is not without limitations, including sensitivity to lighting conditions and individual variability.Acknowledging these constraints, ongoing refinements and future developments, such as the integration of machine learning algorithms and multisensory inputs, present opportunities for further optimization.
• Hardware Components: Assemble the hardware components, including the infrared (IR) sensor, Arduino uno microcontroller, buzzer, and a motor representing a virtual tire.• Circuit Design: Develop a circuit on a breadboard to establish the necessary connections between the components.Sensor Integration: • IR Sensor Placement: Strategically position the IR sensor to capture the driver's eye movements effectively.• Data Collection: Configure the Arduino Uno to collect real-time data from the IR sensor, focusing on changes in eye status.Algorithm Development: • Data Processing: Implement an algorithm to process the incoming data and identify patterns indicating prolonged eye closures.• Threshold Setting: Establish a threshold duration (e.g., 3 seconds) for detecting drowsiness based on the processed data.System Response: • Buzzer Activation: Program the system to activate a buzzer immediately upon detecting drowsiness, providing an audible alert to the driver.• Motor Intervention: Develop code to halt the rotation of the connected motor, symbolizing a virtual tire, as a proactive measure to prevent potential accidents.Software Integration: • Arduino IDE Programming: Develop and upload the code to the Arduino uno microcontroller using the Arduino IDE for seamless software-hardware integration.• Real-Time Monitoring: Implement a monitoring system to observe the real-time functioning of the algorithm and responses.Testing and Calibration: