PHYSICS PROJECT FILE
Anti sleep alarm for drivers
BY~JAHAN MANISH VAISHNAV
Page 1 of 16
ACKNOWLEDGEMENT
I would like to take this opportunity to extend my sincere gratitude and
appreciation to my computer lab teacher MR. JIMIT PANDYA for providing
guidance and support throughout the process of completing my computer
project for school. I am also thankful to my principal Mrs. DIPANJALI SAHA
for allowing me the opportunity to explore and work on this project in the
school environment.
Additionally, I would like to express my heartfelt thanks to my family for their
unwavering support and encouragement during the completion of this project.
The invaluable lessons and skills I have acquired through this project have
enriched my learning experience and have prepared me for future challenges.
I am grateful for the opportunity to showcase my work to my class, and I am
proud to have contributed to the educational environment at our school. I am
truly grateful for the support and encouragement I have received throughout
this project.
Page 2 of 16
INDEX OF FIGURES
IMAGE
SR.NO PAGE NO
DESCRIPTION
1 Aurdino nano 11
2 Ir sensor 11
3 Relay module 11
4 Circuit diagram 12
Page 3 of 16
INDEX OF CONTENT
SR.NO TITLE PG.NO
1 ABSTRACT 5
2 INTRODUCTION 6
LITERATURE
3 REVIEW 7-8
4 METHODOLOGY 9-12
5 RESULT 13
FUTURE
6 APPROACH 14-15
7 BIBLIOGRAPHY 16
Page 4 of 16
ABSTRACT
Driver fatigue is one of the top causes of road crashes, which most of the time
leads to serious injuries or death. To counteract this, this project introduces an
inexpensive and easy-to-build Anti-Sleep Alarm System using an Arduino Nano
and a buzzer.T he system is able to sense symptoms of sleepiness and warn the
driver instantly to avoid accidents.
The basic function relies on sensing head motion or eye closure, usually
identified via an infrared (IR) sensor or a tilt sensor fitted to a headband or
glasses. Upon recognizing inappropriate behavior—i.e., nodding forward by the
driver's head or their eyes being shut for some period of time—the Arduino
Nano deals with the input and sounds off a buzzer to create an ear-piercing
alarm noise. This impromptu acoustic alert serves to awaken the driver and re-
concentrate his or her attention on the driving task.
This work illustrates an inexpensive, lightweight, and simply wearable system
which can be particularly valuable for inter-city drivers, truck drivers, and late-
night travelers. Its simplicity and convenience for field implementation are
perfect without needing elaborate hardware or software installation.
Page 5 of 16
INTRODUCTION
The system employs a simple head movement or eye-closure detection system
—typically via a tilt sensor, IR sensor, or accelerometer attached to a wearable
device such as glasses or a headband. Here's the mechanism of the system:
Sensing Drowsiness:
When the driver starts to fall asleep, his or her head usually nods forward or
remains stationary in a lowered position for a few seconds. A tilt sensor or
accelerometer picks up this movement or position.
Processing the Signal:
The sensor transmits the signal to the Arduino Nano, which is coded to keep an
eye on these readings at all times. When the input exceeds a predetermined
threshold—drowsiness—the Arduino recognizes it as a warning signal.
Activating the Alarm:
When drowsiness is sensed, the Arduino triggers a buzzer to produce a loud
noise. The noise is meant to immediately wake the driver and bring him back to
full alertness.
Resetting:
The alarm is terminated when the driver raises his head or shifts back to an
upright position, so the system can continue monitoring.
This simple and wearable solution contributes to preventing sleep-related car
accidents and increasing road safety without requiring cameras or sophisticated
image processing.
Page 6 of 16
LITERATURE REVIEW
1. Arduino Nano – The Processing Core
The Arduino Nano is a compact, breadboard-friendly microcontroller based on the ATmega328P.
Its small size, low power consumption, and suf cient I/O pins make it ideal for wearable or space-
constrained applications like a driver monitoring system.
Why Arduino Nano?
• Size and Portability: Easily integrated into wearable headgear or eyewear.
• Suf cient GPIOs: Enough digital and analog pins to handle multiple sensors and output
devices.
• USB Connectivity: Simple programming and debugging via USB.
• Low Cost and Power: Operates at 5V and consumes minimal power, perfect for long
drives.
In this project, the Arduino Nano continuously receives input from an IR sensor and evaluates
whether the driver is showing signs of sleepiness. It then controls the buzzer accordingly, all in real-
time.
An Infrared (IR) sensor typically consists of an IR LED (emitter) and a photodiode or
phototransistor (receiver). It detects changes in re ected IR light, making it ideal for proximity and
motion sensing.
How It's Used in This Project
There are two common ways IR sensors can be applied in a sleep detection system:
a. Eye Blink Detection:
• The IR sensor is positioned near the driver’s eye.
• When the eye is open, IR light re ects differently than when closed.
• The sensor detects prolonged eye closure, which is a key indicator of drowsiness.
• If the eyes remain closed beyond a certain threshold (e.g., 3 seconds), the Arduino triggers
the buzzer.
Page 7 of 16
fi
fl
fi
fl
b. Head Tilt Detection (using multiple IR sensors or a tilt switch):
• IR sensors can be placed to monitor head position (e.g., front-facing or downward-tilted).
• A constant downward tilt can indicate the driver is falling asleep.
• The Arduino compares the IR signal data and detects unusual head positions based on IR
beam interruption or re ectivity changes.
1. IR Sensor detects eye closure or head tilt.
2. Arduino Nano reads the sensor signal through a digital input pin.
3. Logic in the Arduino code determines if the duration of the signal indicates sleepiness.
4. Buzzer is triggered via an output pin to alert the driver.
• Non-intrusive: No need for video monitoring or image processing.
• Low cost: Inexpensive hardware suitable for wide deployment.
• Quick response: Real-time alerting helps prevent delayed driver reaction.
• Portable and Easy to Assemble: Can be built into a wearable device with minimal
components.
Page 8 of 16
fl
METHODOLOGY
1. Problem Analysis
Recognize the typical signs of drowsy driving, including:
Protracted eye closure (shut or blinking eyes for >2-3 seconds)
Nodding or forward leaning of the head
Such physical manifestations may be monitored through sensors to trigger
alarms when observed.
2. Component Selection
Important components are chosen on the basis of functionality, size, and
integratability:
Arduino Nano: Serves as the microcontroller to handle inputs and manage
outputs.
IR Sensor: Picks up changes in eye state (open or closed) or head position.
Buzzer: Used as an alarm to alert the driver.
Power Supply: Powered by a battery pack or USB plug.
3. Hardware Setup
The IR sensor is placed on eyewear or a headband to point at the driver's eye.
The Arduino Nano is interfaced with the IR sensor via a digital input pin.
The buzzer is interfaced with a digital output pin.
All the parts are kept close together to facilitate portability and ease of use.
4. Software Implementation
The Arduino is coded with the Arduino IDE.
The code repeatedly reads the output of the IR sensor.
Page 9 of 16
A timer is used to calculate the duration for which the sensor senses an "eye
closed" or "head down" state.
If the state lasts for a certain amount of time (e.g., greater than 2 seconds), the
buzzer is triggered.
5. Drowsiness Detection Logic
Normal State: IR sensor finds eye open → no action.
Warning State: IR sensor finds eye closed for more than X seconds
continuously → possible sleep.
Action State: If warning state continues, Arduino activates the buzzer.
As soon as normal condition is achieved, the buzzer is switched off and
monitoring continues.
6. Testing and Calibration
The system is tested under varying light conditions and user movements.
The sensor sensitivity and time threshold are tuned to reduce false alarms while
providing timely alerts.
7. Deployment
The final prototype is attached to a wearable device (e.g., glasses or headband).
Proven in simulated driving conditions to ensure reliability.
Page 10 of 16
Page 11 of 16
Circuit diagram
Page 12 of 16
RESULT
Page 13 of 16
FUTURE ASPECT
Although the existing design of the Anti-Sleep Alarm system with Arduino
Nano, IR sensor, and buzzer is straightforward, functional, and cost-effective,
advancements in the future can dramatically upgrade its functionality, precision,
and usability. The project can further develop in these ways:
1. Integration with Artificial Intelligence (AI)
Subsequent releases might include machine learning models to examine
intricate patterns in driver behavior, like blink rates, head turns, and even facial
cues.
An embedded AI system of modest size (e.g., using an ESP32 with Edge AI
capability) might enhance accuracy and decrease false positives.
2. Camera-Based Facial Recognition
More sophisticated models can leverage camera modules and computer vision
libraries (such as OpenCV or TensorFlow Lite) to track eye movement,
yawning, and facial features.
Real-time image processing would enable more accurate drowsiness detection,
particularly in varying lighting conditions.
3. Connectivity and Smart Alerts
Integration of IoT (Internet of Things) functionality can enable the system to
give alerts to a mobile app, emergency contact, or leet monitoring system in
case of recurring drowsiness.
Bluetooth or Wi-Fi modules can facilitate remote monitoring in commercial
fleet vehicles.
Page 14 of 16
4. Vibration Motor and Haptic Feedback
Future products might incorporate a vibration motor along with the buzzer to
provide unobtrusive but effective driver warnings—especially in public or
noise-restricted settings.
5. Integration with Vehicle Systems
The system may be integrated into the car's onboard diagnostics (OBD) to
automatically slow down the vehicle or activate cruise control upon detecting
sleepiness cues.
It may be complemented with lane departure warning systems and autonomous
braking for better safety.
6. Adaptive Alert Mechanisms
The mechanism may track the long-term drowsiness pattern of the drive and
adjust the sensitivity of the alert accordingly.
This would make the alarm system individualized, minimizing unwanted
disruptions while preventing accidents.
7. Wearable and Comfortable Designs
With advancing wearable technology, the anti-sleep system may be integrated
into smart glasses, headbands, or even earpieces so that it becomes less invasive
and more tolerable for extended periods of use.
Page 15 of 16
BIBLIOGRAPHY
Chary, P. Sandeep, et al. "ANTI SLEEP ALARM
1 FOR DRIVERS." Journal of Engineering
Sciences 14.06 (2023).
Mahesh, U., T. Guru Swamy, and B. Shaphan Scribe.
2 "EMBEDDED SYSTEM BASED ANTI-SLEEP
ALARM FOR DRIVERS USING
ARDUINO." MATERIAL SCIENCE 23.04 (2024).
Saranya, R., and R. Arun Kumar. "Vehicle accident
3 prevention using sensors." International Research
Journal of Engineering and Technology (IRJET) 4.10
(2017): 921-924.
Babu, T., et al. "Sleep Detection and alert system for
4 automobiles." Advances in Manufacturing
Technology: Select Proceedings of ICAMT 2018.
Springer Singapore, 2019.
Manochitra, M. S. V. "Sleep Sensing And Alerting
5 System For Drivers." SSRN Electronic Journal 4.6
(2017): 1-5.
Page 16 of 16