SlideShare a Scribd company logo
1 of 19
ANTI SLEEP
ALARM
Under the guidance of :-
Dr. Sudhansu Kumar Samal
Centurion
University
GROUP MEMBERS:
2
UNDER THE GUIDANCE OF:
04
03
01
02
Introduction
Components Used
Circuit Diagram
Code
Content:
Introduction
╸ In modern-times, owing to hectic schedules it becomes very difficult to remain active all the
time. Imagine a situation where a person is driving home from work, dead tired after facing all
the challenges of the day. His hands are on the wheel and foot on the pedal but suddenly he
starts feeling drowsy, his eyes start shutting and his vision blurs and before he knows it, he’s
asleep. Falling asleep on the wheel can lead to serious consequences, there may be accidents
and people may even lose their lives. This situation is much more common then we notice and
hence, it is very important to counter this problem. So to address this issue, we have come up
with a Driver Anti-sleep Alarm ⏰ .
╸ This system Stops the user's car if he/she falls asleep at the wheel thereby, avoiding accidents
and saving lives. This system is useful, especially for people who travel long distances and people
who are driving late at night 🌃.
4
COMPONENTS USED:
╸ Eye blink sensor
╸ Eye glass 👓
╸ Relay module
╸ Arduino nano
╸ 9V battery 🔋
╸ Toy car remote
╸ Capacitor
╸ Wires
5
COMPONENTS USED:
╸ Ply board
╸ Gear motor with two tires
╸ Lock and key 🗝
╸ Remote control car
╸ 5V relay
╸ 1 8650 battery 🔋
6
CIRCUIT DIAGRAM:
7
Transmitter:
CIRCUIT DIAGRAM:
8
Receiver:
9
CODE:
#define Relay 13
#define buzzer A0
static const int sensorPin = 10;
// sensor input pin
int SensorStatePrevious = LOW;
// previousstate of the sensor
unsigned long minSensorDuration = 3000; // Time we
wait before the sensor active as long
unsigned long minSensorDuration2 = 4000;
unsigned long SensorLongMillis; //
Time in ms when the sensor was active
bool SensorStateLongTime = false; //
True if it is a long active
const int intervalSensor = 50;
// Time between two readings sensor state
unsigned long previousSensorMillis;
// Timestamp of the latest reading
1 0
unsigned long SensorOutDuration; //
Time the sensor is active in ms
//// GENERAL ////
unsigned long currentMillis; // Variabele to
store the number of milleseconds since the Arduino has
started
void setup() {
Serial.begin(9600); // Initialise
the serial monitor
pinMode(sensorPin, INPUT); // set sensorPin
as input
Serial.println("Press button");
pinMode(Relay,OUTPUT);
pinMode(buzzer,OUTPUT);
}
// Function for reading the sensor state
void readSensorState() {
1 1
// If the difference in time between the previous reading
is larger than intervalsensor
if(currentMillis - previousSensorMillis >
intervalSensor) {
// Read the digital value of the sensor (LOW/HIGH)
int SensorState = digitalRead(sensorPin);
// If the button has been active AND
// If the sensor wasn't activated before AND
// IF there was not already a measurement running to
determine how long the sensor has been activated
if (SensorState == LOW && SensorStatePrevious == HIGH
&& !SensorStateLongTime) {
SensorLongMillis = currentMillis;
SensorStatePrevious = LOW;
Serial.println("Button pressed");
}
// Calculate how long the sensor has been activated
1 2
SensorOutDuration = currentMillis - SensorLongMillis;
// If the button is active AND
// If there is no measurement running to
determine how long the sensor is active AND
// If the time the sensor has been activated is
larger or equal to the time needed for a long active
if (SensorState == HIGH && !SensorStateLongTime
&& SensorOutDuration >= minSensorDuration) {
SensorStateLongTime = true;
digitalWrite(Relay,HIGH);
Serial.println("Button long pressed");
}
if (SensorState == HIGH && SensorStateLongTime &&
SensorOutDuration >= minSensorDuration2) {
SensorStateLongTime = true;
digitalWrite(buzzer,HIGH);
delay(1000);
Serial.println("Button long pressed");
}
1 3
// If the sensor is released AND
// If the sensor was activated before
if (SensorState == HIGH && SensorStatePrevious ==
LOW) {
SensorStatePrevious = HIGH;
SensorStateLongTime = false;
digitalWrite(Relay,LOW);
digitalWrite(buzzer,LOW);
Serial.println("Button released");
if(digitalRead(sensor)==0)
{
digitalWrite(13,LOW);
digitalWrite(motor,HIGH);
}
else
{
delay(3000);
digitalWrite(a0
,HIGH);
digitalWrite(motor,LOW);
1 4
}
// store the current timestamp in
previousSensorMillis
previousSensorMillis = currentMillis;
}
}
void loop() {
currentMillis = millis(); // store the current
time
readSensorState(); // read the sensor state
}
PROJECT OVERVIEW
1 5
PROJECT OVERVIEW
1 6
PROJECT OVERVIEW
1 7
PROJECT OVERVIEW
1 8
1 9

More Related Content

What's hot

Automatic railway gate control using arduino uno
Automatic railway gate control using arduino unoAutomatic railway gate control using arduino uno
Automatic railway gate control using arduino unoselvalakshmi24
 
ALCOHOL AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
ALCOHOL  AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSMALCOHOL  AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
ALCOHOL AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSMMallemptiOohasri
 
Drink and Drive Alcohol Detection
Drink and Drive Alcohol DetectionDrink and Drive Alcohol Detection
Drink and Drive Alcohol DetectionNandha_Gopal
 
Smart Door locking system using arduino
Smart Door locking system using arduinoSmart Door locking system using arduino
Smart Door locking system using arduinoBhawnaSingh351973
 
Stopsleep anti-sleep alarm for drivers guards and others
Stopsleep anti-sleep alarm for drivers guards and othersStopsleep anti-sleep alarm for drivers guards and others
Stopsleep anti-sleep alarm for drivers guards and othersVlad Leybenzon
 
Smart door project ppt shivnaresh likhar
Smart door project ppt shivnaresh likharSmart door project ppt shivnaresh likhar
Smart door project ppt shivnaresh likharShivnaresh Likhar
 
Density based Traffic Light Controller
Density based Traffic Light ControllerDensity based Traffic Light Controller
Density based Traffic Light ControllerSophia
 
EYE BLINK SENSOR TO CONTROL ACCIDENTPpt main
EYE BLINK SENSOR TO CONTROL ACCIDENTPpt mainEYE BLINK SENSOR TO CONTROL ACCIDENTPpt main
EYE BLINK SENSOR TO CONTROL ACCIDENTPpt mainGourav Srivastava
 
ACCIDENT DETECTION SYSTEM PPT
ACCIDENT DETECTION SYSTEM PPTACCIDENT DETECTION SYSTEM PPT
ACCIDENT DETECTION SYSTEM PPTJoshnasai
 
Alcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking projectAlcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking projecthemanth prudhvi jidugu
 
Automatic Room Light Controller Using Arduinom & PIR Sensor
Automatic Room Light Controller Using Arduinom & PIR SensorAutomatic Room Light Controller Using Arduinom & PIR Sensor
Automatic Room Light Controller Using Arduinom & PIR SensorAnkit Chaudhary
 
Automatic engine locking system for drunken driver
Automatic engine locking system for drunken driverAutomatic engine locking system for drunken driver
Automatic engine locking system for drunken driverdodosgusenga
 
Alcohol detection system with gsm and gps (fiem , ece)
Alcohol detection system with gsm and gps (fiem , ece)Alcohol detection system with gsm and gps (fiem , ece)
Alcohol detection system with gsm and gps (fiem , ece)ANUBHAVGHOSHDASTIDAR
 
Automatized railway gate controller
Automatized railway gate controllerAutomatized railway gate controller
Automatized railway gate controllerAakash Varma
 
Mayank_Bluetooth Controlled Lock
Mayank_Bluetooth Controlled LockMayank_Bluetooth Controlled Lock
Mayank_Bluetooth Controlled LockMakDubey
 

What's hot (20)

LPG gas leekage dectection
LPG gas  leekage  dectectionLPG gas  leekage  dectection
LPG gas leekage dectection
 
Automatic railway gate control using arduino uno
Automatic railway gate control using arduino unoAutomatic railway gate control using arduino uno
Automatic railway gate control using arduino uno
 
ALCOHOL AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
ALCOHOL  AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSMALCOHOL  AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
ALCOHOL AND HELMET DETECTION WITH ENGINE LOCKING SYSTEM USING GSM
 
Alcohol detector
Alcohol detectorAlcohol detector
Alcohol detector
 
Drink and Drive Alcohol Detection
Drink and Drive Alcohol DetectionDrink and Drive Alcohol Detection
Drink and Drive Alcohol Detection
 
Night vision technology
Night vision technologyNight vision technology
Night vision technology
 
Smart Door locking system using arduino
Smart Door locking system using arduinoSmart Door locking system using arduino
Smart Door locking system using arduino
 
Stopsleep anti-sleep alarm for drivers guards and others
Stopsleep anti-sleep alarm for drivers guards and othersStopsleep anti-sleep alarm for drivers guards and others
Stopsleep anti-sleep alarm for drivers guards and others
 
Smart door project ppt shivnaresh likhar
Smart door project ppt shivnaresh likharSmart door project ppt shivnaresh likhar
Smart door project ppt shivnaresh likhar
 
Density based Traffic Light Controller
Density based Traffic Light ControllerDensity based Traffic Light Controller
Density based Traffic Light Controller
 
EYE BLINK SENSOR TO CONTROL ACCIDENTPpt main
EYE BLINK SENSOR TO CONTROL ACCIDENTPpt mainEYE BLINK SENSOR TO CONTROL ACCIDENTPpt main
EYE BLINK SENSOR TO CONTROL ACCIDENTPpt main
 
ACCIDENT DETECTION SYSTEM PPT
ACCIDENT DETECTION SYSTEM PPTACCIDENT DETECTION SYSTEM PPT
ACCIDENT DETECTION SYSTEM PPT
 
seminar on invisible eye
seminar on invisible eyeseminar on invisible eye
seminar on invisible eye
 
final project ppt
final project pptfinal project ppt
final project ppt
 
Alcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking projectAlcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking project
 
Automatic Room Light Controller Using Arduinom & PIR Sensor
Automatic Room Light Controller Using Arduinom & PIR SensorAutomatic Room Light Controller Using Arduinom & PIR Sensor
Automatic Room Light Controller Using Arduinom & PIR Sensor
 
Automatic engine locking system for drunken driver
Automatic engine locking system for drunken driverAutomatic engine locking system for drunken driver
Automatic engine locking system for drunken driver
 
Alcohol detection system with gsm and gps (fiem , ece)
Alcohol detection system with gsm and gps (fiem , ece)Alcohol detection system with gsm and gps (fiem , ece)
Alcohol detection system with gsm and gps (fiem , ece)
 
Automatized railway gate controller
Automatized railway gate controllerAutomatized railway gate controller
Automatized railway gate controller
 
Mayank_Bluetooth Controlled Lock
Mayank_Bluetooth Controlled LockMayank_Bluetooth Controlled Lock
Mayank_Bluetooth Controlled Lock
 

Similar to ANTI SLEEP ALARM

antisleepalarm-230417034941-79209def (1).pptx
antisleepalarm-230417034941-79209def (1).pptxantisleepalarm-230417034941-79209def (1).pptx
antisleepalarm-230417034941-79209def (1).pptxSumitKumar236277
 
Automatic Collision Control System
Automatic Collision  Control SystemAutomatic Collision  Control System
Automatic Collision Control SystemSankhadeep Rakshit
 
FINGERPRINT DOORLOCK USING ARDUINO UNO _
FINGERPRINT DOORLOCK USING ARDUINO UNO _FINGERPRINT DOORLOCK USING ARDUINO UNO _
FINGERPRINT DOORLOCK USING ARDUINO UNO _kinstinct298
 
IRJET- Gsm Based Smart Home Automation using Sensors
IRJET-  	  Gsm Based Smart Home Automation using SensorsIRJET-  	  Gsm Based Smart Home Automation using Sensors
IRJET- Gsm Based Smart Home Automation using SensorsIRJET Journal
 
Manual Prova.pdf
Manual Prova.pdfManual Prova.pdf
Manual Prova.pdfDarwinPea11
 
BANDO IBERICA: Manual de instrucciones de uso de Tensionmaster (Inglés)
BANDO IBERICA: Manual de instrucciones de uso de Tensionmaster (Inglés)BANDO IBERICA: Manual de instrucciones de uso de Tensionmaster (Inglés)
BANDO IBERICA: Manual de instrucciones de uso de Tensionmaster (Inglés)BandoIberica
 
Location identifier
Location identifierLocation identifier
Location identifierRaji Sara
 
Sensor Technology ppt
Sensor Technology pptSensor Technology ppt
Sensor Technology pptmansimore1
 
Heart beat monitoring system
Heart beat monitoring systemHeart beat monitoring system
Heart beat monitoring systemVipul Tripathi
 
Ldr based line follower robot
Ldr based line follower robotLdr based line follower robot
Ldr based line follower robotAkshay Sharma
 
Top Peak Electronics Co.,limited hot gps tracker user manual
Top Peak Electronics Co.,limited hot gps tracker user manualTop Peak Electronics Co.,limited hot gps tracker user manual
Top Peak Electronics Co.,limited hot gps tracker user manualtoppeakelec
 
Top Peak Electronics Co.,limited hot gps tracker user manual
Top Peak Electronics Co.,limited hot gps tracker user manualTop Peak Electronics Co.,limited hot gps tracker user manual
Top Peak Electronics Co.,limited hot gps tracker user manualtoppeakelec
 
Cash counting machine
Cash counting machine Cash counting machine
Cash counting machine Ambily M
 
APS48Z Owners Guide Rev. 0_11.13.19.pdf
APS48Z Owners Guide Rev. 0_11.13.19.pdfAPS48Z Owners Guide Rev. 0_11.13.19.pdf
APS48Z Owners Guide Rev. 0_11.13.19.pdfErwin Hernandez Nuñez
 
Hot car baby detctor
Hot car baby detctorHot car baby detctor
Hot car baby detctorslmnsvn
 
ARTIFICAL INTELLIGENCE OF SEVEN FEATURES SMART BIKE
ARTIFICAL INTELLIGENCE OF  SEVEN FEATURES SMART BIKEARTIFICAL INTELLIGENCE OF  SEVEN FEATURES SMART BIKE
ARTIFICAL INTELLIGENCE OF SEVEN FEATURES SMART BIKEAgara Mudhalvan
 
iodfbdfbtbasedhealthmonitoringstttttyst.pptx
iodfbdfbtbasedhealthmonitoringstttttyst.pptxiodfbdfbtbasedhealthmonitoringstttttyst.pptx
iodfbdfbtbasedhealthmonitoringstttttyst.pptxVRSCETECE
 
Presentationatchyuth 120413063530-phpapp02
Presentationatchyuth 120413063530-phpapp02Presentationatchyuth 120413063530-phpapp02
Presentationatchyuth 120413063530-phpapp02Smiley Sowjanya
 
GPS Watch User Manual
GPS Watch User ManualGPS Watch User Manual
GPS Watch User Manualrobin huang
 

Similar to ANTI SLEEP ALARM (20)

antisleepalarm-230417034941-79209def (1).pptx
antisleepalarm-230417034941-79209def (1).pptxantisleepalarm-230417034941-79209def (1).pptx
antisleepalarm-230417034941-79209def (1).pptx
 
Automatic Collision Control System
Automatic Collision  Control SystemAutomatic Collision  Control System
Automatic Collision Control System
 
FINGERPRINT DOORLOCK USING ARDUINO UNO _
FINGERPRINT DOORLOCK USING ARDUINO UNO _FINGERPRINT DOORLOCK USING ARDUINO UNO _
FINGERPRINT DOORLOCK USING ARDUINO UNO _
 
IRJET- Gsm Based Smart Home Automation using Sensors
IRJET-  	  Gsm Based Smart Home Automation using SensorsIRJET-  	  Gsm Based Smart Home Automation using Sensors
IRJET- Gsm Based Smart Home Automation using Sensors
 
Manual Prova.pdf
Manual Prova.pdfManual Prova.pdf
Manual Prova.pdf
 
BANDO IBERICA: Manual de instrucciones de uso de Tensionmaster (Inglés)
BANDO IBERICA: Manual de instrucciones de uso de Tensionmaster (Inglés)BANDO IBERICA: Manual de instrucciones de uso de Tensionmaster (Inglés)
BANDO IBERICA: Manual de instrucciones de uso de Tensionmaster (Inglés)
 
Location identifier
Location identifierLocation identifier
Location identifier
 
Sensor Technology ppt
Sensor Technology pptSensor Technology ppt
Sensor Technology ppt
 
Heart beat monitoring system
Heart beat monitoring systemHeart beat monitoring system
Heart beat monitoring system
 
Ldr based line follower robot
Ldr based line follower robotLdr based line follower robot
Ldr based line follower robot
 
Top Peak Electronics Co.,limited hot gps tracker user manual
Top Peak Electronics Co.,limited hot gps tracker user manualTop Peak Electronics Co.,limited hot gps tracker user manual
Top Peak Electronics Co.,limited hot gps tracker user manual
 
Top Peak Electronics Co.,limited hot gps tracker user manual
Top Peak Electronics Co.,limited hot gps tracker user manualTop Peak Electronics Co.,limited hot gps tracker user manual
Top Peak Electronics Co.,limited hot gps tracker user manual
 
Cash counting machine
Cash counting machine Cash counting machine
Cash counting machine
 
APS48Z Owners Guide Rev. 0_11.13.19.pdf
APS48Z Owners Guide Rev. 0_11.13.19.pdfAPS48Z Owners Guide Rev. 0_11.13.19.pdf
APS48Z Owners Guide Rev. 0_11.13.19.pdf
 
Hot car baby detctor
Hot car baby detctorHot car baby detctor
Hot car baby detctor
 
ARTIFICAL INTELLIGENCE OF SEVEN FEATURES SMART BIKE
ARTIFICAL INTELLIGENCE OF  SEVEN FEATURES SMART BIKEARTIFICAL INTELLIGENCE OF  SEVEN FEATURES SMART BIKE
ARTIFICAL INTELLIGENCE OF SEVEN FEATURES SMART BIKE
 
iodfbdfbtbasedhealthmonitoringstttttyst.pptx
iodfbdfbtbasedhealthmonitoringstttttyst.pptxiodfbdfbtbasedhealthmonitoringstttttyst.pptx
iodfbdfbtbasedhealthmonitoringstttttyst.pptx
 
Smart sensors, Smart Speed Bumps
Smart sensors, Smart Speed BumpsSmart sensors, Smart Speed Bumps
Smart sensors, Smart Speed Bumps
 
Presentationatchyuth 120413063530-phpapp02
Presentationatchyuth 120413063530-phpapp02Presentationatchyuth 120413063530-phpapp02
Presentationatchyuth 120413063530-phpapp02
 
GPS Watch User Manual
GPS Watch User ManualGPS Watch User Manual
GPS Watch User Manual
 

More from JagannathDansana (9)

Library management system
Library management systemLibrary management system
Library management system
 
AWS S3
AWS S3AWS S3
AWS S3
 
MARVEL
MARVELMARVEL
MARVEL
 
Learning Management System
Learning Management SystemLearning Management System
Learning Management System
 
FINITE AUTOMATA
FINITE AUTOMATAFINITE AUTOMATA
FINITE AUTOMATA
 
DFA AND NFA
DFA AND NFADFA AND NFA
DFA AND NFA
 
Food Ordering System
Food Ordering SystemFood Ordering System
Food Ordering System
 
BOOM BARRIER
BOOM BARRIER BOOM BARRIER
BOOM BARRIER
 
Food Ordering System
Food Ordering System Food Ordering System
Food Ordering System
 

Recently uploaded

Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 

Recently uploaded (20)

Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 

ANTI SLEEP ALARM

  • 1. ANTI SLEEP ALARM Under the guidance of :- Dr. Sudhansu Kumar Samal Centurion University
  • 4. Introduction ╸ In modern-times, owing to hectic schedules it becomes very difficult to remain active all the time. Imagine a situation where a person is driving home from work, dead tired after facing all the challenges of the day. His hands are on the wheel and foot on the pedal but suddenly he starts feeling drowsy, his eyes start shutting and his vision blurs and before he knows it, he’s asleep. Falling asleep on the wheel can lead to serious consequences, there may be accidents and people may even lose their lives. This situation is much more common then we notice and hence, it is very important to counter this problem. So to address this issue, we have come up with a Driver Anti-sleep Alarm ⏰ . ╸ This system Stops the user's car if he/she falls asleep at the wheel thereby, avoiding accidents and saving lives. This system is useful, especially for people who travel long distances and people who are driving late at night 🌃. 4
  • 5. COMPONENTS USED: ╸ Eye blink sensor ╸ Eye glass 👓 ╸ Relay module ╸ Arduino nano ╸ 9V battery 🔋 ╸ Toy car remote ╸ Capacitor ╸ Wires 5
  • 6. COMPONENTS USED: ╸ Ply board ╸ Gear motor with two tires ╸ Lock and key 🗝 ╸ Remote control car ╸ 5V relay ╸ 1 8650 battery 🔋 6
  • 9. 9 CODE: #define Relay 13 #define buzzer A0 static const int sensorPin = 10; // sensor input pin int SensorStatePrevious = LOW; // previousstate of the sensor unsigned long minSensorDuration = 3000; // Time we wait before the sensor active as long unsigned long minSensorDuration2 = 4000; unsigned long SensorLongMillis; // Time in ms when the sensor was active bool SensorStateLongTime = false; // True if it is a long active const int intervalSensor = 50; // Time between two readings sensor state unsigned long previousSensorMillis; // Timestamp of the latest reading
  • 10. 1 0 unsigned long SensorOutDuration; // Time the sensor is active in ms //// GENERAL //// unsigned long currentMillis; // Variabele to store the number of milleseconds since the Arduino has started void setup() { Serial.begin(9600); // Initialise the serial monitor pinMode(sensorPin, INPUT); // set sensorPin as input Serial.println("Press button"); pinMode(Relay,OUTPUT); pinMode(buzzer,OUTPUT); } // Function for reading the sensor state void readSensorState() {
  • 11. 1 1 // If the difference in time between the previous reading is larger than intervalsensor if(currentMillis - previousSensorMillis > intervalSensor) { // Read the digital value of the sensor (LOW/HIGH) int SensorState = digitalRead(sensorPin); // If the button has been active AND // If the sensor wasn't activated before AND // IF there was not already a measurement running to determine how long the sensor has been activated if (SensorState == LOW && SensorStatePrevious == HIGH && !SensorStateLongTime) { SensorLongMillis = currentMillis; SensorStatePrevious = LOW; Serial.println("Button pressed"); } // Calculate how long the sensor has been activated
  • 12. 1 2 SensorOutDuration = currentMillis - SensorLongMillis; // If the button is active AND // If there is no measurement running to determine how long the sensor is active AND // If the time the sensor has been activated is larger or equal to the time needed for a long active if (SensorState == HIGH && !SensorStateLongTime && SensorOutDuration >= minSensorDuration) { SensorStateLongTime = true; digitalWrite(Relay,HIGH); Serial.println("Button long pressed"); } if (SensorState == HIGH && SensorStateLongTime && SensorOutDuration >= minSensorDuration2) { SensorStateLongTime = true; digitalWrite(buzzer,HIGH); delay(1000); Serial.println("Button long pressed"); }
  • 13. 1 3 // If the sensor is released AND // If the sensor was activated before if (SensorState == HIGH && SensorStatePrevious == LOW) { SensorStatePrevious = HIGH; SensorStateLongTime = false; digitalWrite(Relay,LOW); digitalWrite(buzzer,LOW); Serial.println("Button released"); if(digitalRead(sensor)==0) { digitalWrite(13,LOW); digitalWrite(motor,HIGH); } else { delay(3000); digitalWrite(a0 ,HIGH); digitalWrite(motor,LOW);
  • 14. 1 4 } // store the current timestamp in previousSensorMillis previousSensorMillis = currentMillis; } } void loop() { currentMillis = millis(); // store the current time readSensorState(); // read the sensor state }
  • 19. 1 9