SlideShare una empresa de Scribd logo
ANTISLEEP
ALARM
Under the guidance of :-
Dr. Sudhansu Kumar Samal
Centurion
Unive r sit y
GROUPMEMBERS:
2
UNDERTHEGUIDANCEOF:
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 allthe
4
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 beaccidents
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 ⏰ .
╸ ThissystemStopstheuser'scarif he/shefallsasleepatthewheelthereby,avoidingaccidents
andsavinglives.Thissystemis useful,especiallyfor peoplewhotravellongdistancesandpeople
whoaredrivinglateatnight🌃.
COMPONENTSUSED:
╸ Eye blinksensor
╸ Eye glass 👓
╸ Relaymodule
╸ Arduino nano
╸ 9Vbattery🔋
╸ Toy carremote
╸ Capacitor
╸ Wires
5
COMPONENTSUSED:
╸ Plyboard
╸ Gearmotorwithtwotires
╸ Lock andkey🗝
╸ Remote controlcar
╸ 5Vrelay
╸ 18650 battery🔋
6
CIRCUITDIAGRAM:
Transmitter:
7
CIRCUITDIAGRAM:
Receiver:
8
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
// Initialise
void setup() {
Serial.begin(9600);
the serial monitor
// set sensorPin
pinMode(sensorPin, INPUT);
as input
Serial.println("Press button");
pinMode(Relay,OUTPUT);
pinMode(buzzer,OUTPUT);
}
// Function for reading the sensor state
void readSensorState() {
// 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
1
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
2
// 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
3
}
// store the current timestamp in
previousSensorMillis
previousSensorMillis = currentMillis;
}
}
void loop() {
1
4
// store the current
currentMillis = millis();
time
readSensorState(); // read the sensor state
}
PROJECTOVERVIEW
1
5
PROJECTOVERVIEW
1
6
PROJECTOVERVIEW
1
7
PROJECTOVERVIEW
1
8
1
9

Más contenido relacionado

Similar a antisleepalarm-230417034941-79209def (1).pptx

PPT_of__Anti_Sleep_Smart_Driving_Glasses[1].pptx
PPT_of__Anti_Sleep_Smart_Driving_Glasses[1].pptxPPT_of__Anti_Sleep_Smart_Driving_Glasses[1].pptx
PPT_of__Anti_Sleep_Smart_Driving_Glasses[1].pptx
HrushabhSavla
 
IRJET- Intelligent Security System for Women by using Arduino
IRJET- Intelligent Security System for Women by using ArduinoIRJET- Intelligent Security System for Women by using Arduino
IRJET- Intelligent Security System for Women by using Arduino
IRJET Journal
 
New Microsoft PowerPoint Presentation_033815.pptx
New Microsoft PowerPoint Presentation_033815.pptxNew Microsoft PowerPoint Presentation_033815.pptx
New Microsoft PowerPoint Presentation_033815.pptx
AdityavardhanKakade
 
Geriatrics preventing falls in elderly - technology [IIT Bombay Techfest Win...
Geriatrics  preventing falls in elderly - technology [IIT Bombay Techfest Win...Geriatrics  preventing falls in elderly - technology [IIT Bombay Techfest Win...
Geriatrics preventing falls in elderly - technology [IIT Bombay Techfest Win...
Rohit Pandharkar
 
Iot based health monitoring system
Iot based health monitoring systemIot based health monitoring system
Iot based health monitoring system
ShaswataMohanta
 
FINGUER TIP OXIMETER
FINGUER TIP OXIMETERFINGUER TIP OXIMETER
FINGUER TIP OXIMETER
ACN
 
Bontrager node en
Bontrager node enBontrager node en
UEE PPT.pptx
UEE PPT.pptxUEE PPT.pptx
UEE PPT.pptx
MansiKumari26
 
Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Ph psm02-zipato-multisensor-quad-user-manual-v1.4Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Domotica daVinci
 
Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Ph psm02-zipato-multisensor-quad-user-manual-v1.4Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Ana Roza Braña
 
Twin wheeler modified for arduino simplified serial protocol to sabertooth v22
Twin wheeler modified for arduino simplified serial protocol to sabertooth v22Twin wheeler modified for arduino simplified serial protocol to sabertooth v22
Twin wheeler modified for arduino simplified serial protocol to sabertooth v22
josnihmurni2907
 
Darma Sleep Solution
Darma Sleep SolutionDarma Sleep Solution
Darma Sleep Solution
Pippen Zeng
 
Intelligent fatigue detection and automatic vehicle control system
Intelligent fatigue detection and automatic vehicle control systemIntelligent fatigue detection and automatic vehicle control system
Intelligent fatigue detection and automatic vehicle control system
ijcsit
 
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
toppeakelec
 
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
toppeakelec
 
White Paper on Security Systems for residential installations - Version 2.0 -...
White Paper on Security Systems for residential installations - Version 2.0 -...White Paper on Security Systems for residential installations - Version 2.0 -...
White Paper on Security Systems for residential installations - Version 2.0 -...
Ritesh Nagpal
 
Fall detector
Fall detectorFall detector
Fall detector
Atul Sinha
 
Manual acc
Manual accManual acc
Smart digital and analogue ambience control and
Smart digital and analogue ambience control andSmart digital and analogue ambience control and
Smart digital and analogue ambience control and
eSAT Publishing House
 
Location identifier
Location identifierLocation identifier
Location identifier
Raji Sara
 

Similar a antisleepalarm-230417034941-79209def (1).pptx (20)

PPT_of__Anti_Sleep_Smart_Driving_Glasses[1].pptx
PPT_of__Anti_Sleep_Smart_Driving_Glasses[1].pptxPPT_of__Anti_Sleep_Smart_Driving_Glasses[1].pptx
PPT_of__Anti_Sleep_Smart_Driving_Glasses[1].pptx
 
IRJET- Intelligent Security System for Women by using Arduino
IRJET- Intelligent Security System for Women by using ArduinoIRJET- Intelligent Security System for Women by using Arduino
IRJET- Intelligent Security System for Women by using Arduino
 
New Microsoft PowerPoint Presentation_033815.pptx
New Microsoft PowerPoint Presentation_033815.pptxNew Microsoft PowerPoint Presentation_033815.pptx
New Microsoft PowerPoint Presentation_033815.pptx
 
Geriatrics preventing falls in elderly - technology [IIT Bombay Techfest Win...
Geriatrics  preventing falls in elderly - technology [IIT Bombay Techfest Win...Geriatrics  preventing falls in elderly - technology [IIT Bombay Techfest Win...
Geriatrics preventing falls in elderly - technology [IIT Bombay Techfest Win...
 
Iot based health monitoring system
Iot based health monitoring systemIot based health monitoring system
Iot based health monitoring system
 
FINGUER TIP OXIMETER
FINGUER TIP OXIMETERFINGUER TIP OXIMETER
FINGUER TIP OXIMETER
 
Bontrager node en
Bontrager node enBontrager node en
Bontrager node en
 
UEE PPT.pptx
UEE PPT.pptxUEE PPT.pptx
UEE PPT.pptx
 
Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Ph psm02-zipato-multisensor-quad-user-manual-v1.4Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Ph psm02-zipato-multisensor-quad-user-manual-v1.4
 
Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Ph psm02-zipato-multisensor-quad-user-manual-v1.4Ph psm02-zipato-multisensor-quad-user-manual-v1.4
Ph psm02-zipato-multisensor-quad-user-manual-v1.4
 
Twin wheeler modified for arduino simplified serial protocol to sabertooth v22
Twin wheeler modified for arduino simplified serial protocol to sabertooth v22Twin wheeler modified for arduino simplified serial protocol to sabertooth v22
Twin wheeler modified for arduino simplified serial protocol to sabertooth v22
 
Darma Sleep Solution
Darma Sleep SolutionDarma Sleep Solution
Darma Sleep Solution
 
Intelligent fatigue detection and automatic vehicle control system
Intelligent fatigue detection and automatic vehicle control systemIntelligent fatigue detection and automatic vehicle control system
Intelligent fatigue detection and automatic vehicle control system
 
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
 
White Paper on Security Systems for residential installations - Version 2.0 -...
White Paper on Security Systems for residential installations - Version 2.0 -...White Paper on Security Systems for residential installations - Version 2.0 -...
White Paper on Security Systems for residential installations - Version 2.0 -...
 
Fall detector
Fall detectorFall detector
Fall detector
 
Manual acc
Manual accManual acc
Manual acc
 
Smart digital and analogue ambience control and
Smart digital and analogue ambience control andSmart digital and analogue ambience control and
Smart digital and analogue ambience control and
 
Location identifier
Location identifierLocation identifier
Location identifier
 

Último

按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
yizxn4sx
 
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
yizxn4sx
 
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginnersSOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SethiLilu
 
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
uwoso
 
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
xuqdabu
 
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
uyesp1a
 
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
nvoyobt
 
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
1jtj7yul
 
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
ei8c4cba
 
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
eydeofo
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
xuqdabu
 
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
xuqdabu
 
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
kuehcub
 
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
zpc0z12
 
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
terpt4iu
 
Production.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd ddddddddddddddddddddddddddddddddddProduction.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd dddddddddddddddddddddddddddddddddd
DanielOliver74
 
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
1jtj7yul
 
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
terpt4iu
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
u0g33km
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
terpt4iu
 

Último (20)

按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
按照学校原版(Westminster文凭证书)威斯敏斯特大学毕业证快速办理
 
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
 
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginnersSOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
 
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
 
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
 
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
 
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
 
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
 
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
 
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
 
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
 
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
 
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
 
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
 
Production.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd ddddddddddddddddddddddddddddddddddProduction.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd dddddddddddddddddddddddddddddddddd
 
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
 
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
 

antisleepalarm-230417034941-79209def (1).pptx

  • 1. ANTISLEEP ALARM Under the guidance of :- Dr. Sudhansu Kumar Samal Centurion Unive r sit y
  • 4. Introduction ╸ In modern-times, owing to hectic schedules it becomes very difficult to remain active allthe 4 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 beaccidents 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 ⏰ . ╸ ThissystemStopstheuser'scarif he/shefallsasleepatthewheelthereby,avoidingaccidents andsavinglives.Thissystemis useful,especiallyfor peoplewhotravellongdistancesandpeople whoaredrivinglateatnight🌃.
  • 5. COMPONENTSUSED: ╸ Eye blinksensor ╸ Eye glass 👓 ╸ Relaymodule ╸ Arduino nano ╸ 9Vbattery🔋 ╸ Toy carremote ╸ Capacitor ╸ Wires 5
  • 6. COMPONENTSUSED: ╸ Plyboard ╸ Gearmotorwithtwotires ╸ Lock andkey🗝 ╸ Remote controlcar ╸ 5Vrelay ╸ 18650 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 // Initialise void setup() { Serial.begin(9600); the serial monitor // set sensorPin pinMode(sensorPin, INPUT); as input Serial.println("Press button"); pinMode(Relay,OUTPUT); pinMode(buzzer,OUTPUT); } // Function for reading the sensor state void readSensorState() {
  • 11. // 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 1
  • 12. 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 2
  • 13. // 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 3
  • 14. } // store the current timestamp in previousSensorMillis previousSensorMillis = currentMillis; } } void loop() { 1 4 // store the current currentMillis = millis(); time readSensorState(); // read the sensor state }
  • 19. 1 9