Driver Drowsiness Detection & Alerting System using Arduino

Road accidents became a matter of concern due to the huge increase in traffic. The primary cause of accidents is due to the drowsiness of drivers in the nighttime. Fatigue and drowsiness are some of the leading causes of major accidents on Highways. The only solution to this problem is detecting the drowsiness and alerting the driver.

So, in this project, we have thought of building a Driver Drowsiness Detection and Alerting System for Drivers using Arduino Nano, Eye blink Sensor, and RF Transceiver module. The basic purpose of this system is to track the driver’s eye movements using Eye blink Sensor and if the driver is feeling drowsy, then the system will trigger a warning message using a loud buzzer alert.



Materials Required for Building a Drowsiness DetectorArduino Nano

Eyeblink Sensor
RF Transceiver Module
HD12E & HD12D IC
Buzzer
9V Battery
12V DC power supply



Driver Drowsiness Detector Circuit Diagram

Driver Drowsiness Detector consists of RF Transmitter and Receiver section. The transmitter section consists of an RF Transmitter and Eye Blink Sensor and the receiver side uses Arduino Uno with RF receiver for data processing. The circuit diagram for the transmitter and receiver section is given below.


Arduino Code

int flag=0;
int t1=0;
int t2=0;
void setup() 
{
  Serial.begin(9600);
  pinMode(2,OUTPUT);

}
void loop() 
{
  int x=analogRead(A0);
  //Serial.println(x);

    if(x<400 && flag==0)
  {
    flag=1;
    t1=millis();
  }
  else if(x>400 && flag==1)
  {
    flag=0;
    t2=millis();
    Serial.println(t2-t1);
    if((t2-t1)>1000)
    {
      digitalWrite(2,HIGH);
      Serial.println("Alert2!!!!!!!!!!!!!!!!!");
      delay(2000);
      digitalWrite(2,LOW);
    }
    else; 
  } 
}

Original Source: Circuit Digest

Comments

Popular posts from this blog

Design Multiplexer and Demultiplexer ICs using VHDL on Modelsim

Watch OTT Content on Raspberry Pi

What are the basic components of electronics?