Driver drowsiness and alcohol detection with ignition lock
Drowsy and drunk driving cause a large share of highway crashes in India, especially among truck drivers on night runs. A unit that watches eye closure and breath alcohol, warns the driver and blocks the ignition can prevent them.
- Parts
- ₹4,240
- Build
- 12 weeks
- Board
- Arduino Nano
- Objectives
- 6
Block diagram
- IR eye-blink sensor on glassesMeasures how long the eyes stay closed
- MQ-3 alcohol sensorChecks the driver's breath
- CameraCaptures a photo when the event happens+
- Arduino NanoRuns the warning and lock logic
- Buzzer and vibrationWake the driver
- RelayBlocks the ignition (motor in the model)
- LCDShows the reason
- 4G modemSends SMS alerts and calls over the mobile network+
Objectives
- To detect eye closure longer than 1.5 s and raise an alarm.
- To count blinks per minute and flag rising fatigue.
- To block the ignition when breath alcohol is above a set level at start-up.
- To measure detection and false alarm rates with five volunteers.
- To send SMS alerts through a 4G modem where no Wi-Fi is available.
- To capture and store an image automatically when an event is detected.
Parts and specifications
- Arduino Nano (CH340, Type-C)ATmega328P 16 MHz, 5 V logic, 8 analog inputs, small enough for wearables and helmets₹350Buy
- IR eye-blink sensor on a spectacle frame₹300
- MQ-3 alcohol sensorEthanol 0.04 to 4 mg/L in breath, heater 5 V 150 mA, analog and comparator outputs₹150Buy
- 5 V relay module (1 channel)10 A 250 V AC contacts, coil 70 to 80 mA, optocoupled input; many trigger at 3.3 V, check yours₹70Buy
- 16×2 LCD with I²C backpackHD44780, PCF8574 at 0x27 or 0x3F, 5 V, contrast trimmer on the back₹220Buy
- 12 V geared motor (engine in the model)12 V, 300 RPM, about 10 kg·cm, 0.3 A no-load and up to 3 A stall₹450Buy
- LM2596 buck converter4 to 40 V in, 1.25 to 37 V out, up to 2 A continuous (3 A peak), about 85% efficient₹90Buy
- A7670C 4G LTE module4G Cat-1 with 2G fallback, SMS, calls and data, works with any Indian SIM including Jio; 3.4 to 4.2 V, 2 A peaks₹1,500Buy
- LM2596 buck converter (set to 4.0 V for the modem)4 to 40 V in, 1.25 to 37 V out, up to 2 A continuous (3 A peak), about 85% efficient₹90Buy
- ESP32-CAM with OV2640ESP32 + 4 MB PSRAM + 2 MP OV2640 camera, microSD slot, needs 5 V 500 mA for stable Wi-Fi₹550Buy
Total about ₹4,240 at typical online prices. Tap a part for its pinout and datasheet notes.
Design calculations
A normal blink lasts 100 to 400 ms. Closure over 1500 ms is treated as a microsleep and triggers the alarm.
Normal is about 15 to 20 blinks a minute; a rise with longer closures (PERCLOS, the percent of time eyes are closed) shows fatigue. PERCLOS over 15% in a minute = warning.
Breath to blood ratio is about 1:2100. The legal limit of 30 mg/100 mL blood is about 0.14 mg/L in breath. Set the MQ-3 threshold from a calibration with a known ethanol vapour, and treat the result as indicative only.
Pin map
| Signal | Pin or connection |
|---|---|
| Eye-blink sensor OUT | D2 (interrupt) |
| MQ-3 AO | A0 |
| Buzzer (via relay or transistor) | D8 |
| Vibration motor (transistor) | D5 |
| Ignition relay | D7 |
| LCD SDA / SCL | A4 / A5 |
Firmware outline
- At start-up show 'Blow for 5 s' after the MQ-3 warms up; read the peak.
- If above the threshold, keep the ignition relay off and show 'Alcohol detected'.
- Else turn the relay on and start watching the blink sensor.
- Time each closure with the interrupt; above 1.5 s sound the buzzer and vibrate until the eyes open.
- Every minute compute blink rate and PERCLOS; show a 'Take a break' warning if high.
Test plan
| Test | Expected result |
|---|---|
| Eyes closed for 2 s | Alarm within 0.2 s of the 1.5 s mark |
| Normal blinking for 5 minutes | No alarm |
| Sanitiser swab near the sensor at start | Ignition blocked |
| Clean air at start | Ignition allowed |
| Five volunteers | Detection and false alarm rate |
These rows start your results table when you plan the project.
Viva practice
Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 5.
Make it yours
One or two upgrades for a mini project, two to four for a major one.
Build these first
Datasheets and sources to cite
- Hanwei MQ-3 datasheet
- Motor Vehicles Act 1988, section 185 (30 mg per 100 mL blood limit)
- MoRTH Road Accidents in India report
About this project
How much does the driver drowsiness and alcohol detection with ignition lock project cost?
About ₹1,950 for the parts in the base list: Arduino Nano (CH340, Type-C), IR eye-blink sensor on a spectacle frame, MQ-3 alcohol sensor, 12 V piezo alarm, Coin vibration motor, 5 V relay module (1 channel), 16×2 LCD with I²C backpack, 12 V geared motor (engine in the model), 12 V 2 A DC adapter, LM2596 buck converter.
How long does it take?
About 8 weeks for the base project, built on an Arduino Nano. Each upgrade adds time.
Which branches is it suitable for?
Electronics and Communication, Instrumentation, Mechanical / Mechatronics, Diploma (any electronics branch), as a mini or major project.
Which pins and design calculations does it use?
Eye-blink sensor OUT on D2 (interrupt); MQ-3 AO on A0; Buzzer (via relay or transistor) on D8. Worked calculations on this page: eye closure, blink rate, alcohol threshold.
How do I test it?
Eyes closed for 2 s: Alarm within 0.2 s of the 1.5 s mark. Normal blinking for 5 minutes: No alarm. Sanitiser swab near the sensor at start: Ignition blocked. Clean air at start: Ignition allowed. Five volunteers: Detection and false alarm rate.
What are the objectives?
To detect eye closure longer than 1.5 s and raise an alarm. To count blinks per minute and flag rising fatigue. To block the ignition when breath alcohol is above a set level at start-up. To measure detection and false alarm rates with five volunteers.
