Project

# Title Team Members TA Documents Sponsor
76 Driver Fatigue System
Julio Cornejo
Vincent Ng
Maanas Sandeep Agrawal design_document1.pdf
final_paper1.pdf
proposal1.pdf
video
Driver Fatigue System

Team Members:
* Julio Cornejo (jcorne23)
* Vincent Ng (vng20)

**Problem**

When driving for prolonged amounts of time, some key body movements and facial changes can be made due to drowsiness. The drowsiness, if unmonitored, can pose dangerous conditions for other drivers and the drivers themselves. Intoxication while driving is also a rampant issue; there is no universal breathalyzer that prohibits driving based on BAC. I propose this device that uses facial recognition and eye-level detection sensors and cameras to detect symptoms of fatigue along the road while also prohibiting intoxicated drivers from proceeding to drive. This device can monitor head position, yawns, and register long blinks. It can also track the driving duration and eventually register all these symptoms if it detects fatigue. Once enough triggers are set, an app interface can assess your tiredness or driving incapability via Wifi transmission. It can suggest and locate the nearest rest stop or call emergency contacts (set by the user). When certain drowsiness scores are reached, the user's BAC and live drowsiness rating will be displayed with in-house buzzer systems.

**Solution**

The system revolves around an algorithm that makes use of a variety of sensors and cameras. One is a breathalyzer that measures the blood alcohol concentration of the driver. Using the software, we monitor the live value and set triggers to call emergency contacts and monitor until a safe concentration for resumable driving. Drowsiness and tiredness can be detected in various ways ranging from yawn frequency, long blinks, and head tilts. They happen suddenly. Most traditional cars use your position in a lane to track tiredness. Tracking head movement and analyzing the face for more key indicators precisely provides more information that can be essential to identify when a driver needs to step away from the wheel and request a ride elsewhere. The PCB can be housed in a small, compact shape like a cube that sits over any dashboard with detachment features to trigger the BAC sensor correctly.

**Solution Components:**

**PCB Controller:**

The device will have operable buttons to measure and clear the sensor and turn on the components and precise data for use. ESP32-S3 is the microcontroller intended for this project since the WiFi connection is crucial.

**Sensor and Device Subsystem**

* OV2640 Camera Module (For eye & head movement detection)
* BNO055 IMU (For head tilt & movement tracking)
* DFRobot Gravity MQ-3 Sensor (For BAC detection)
* OLED DISPLAY (e.g., SSD1306) displays live-drowsiness score calculation and BAC reads.
* BUZZER (if there is a significant change in the drowsiness measure, we ring a buzzer for the first tier of detections).

**Power Subsystem**

Power Management (Li-ion battery) - A rechargeable lithium-ion battery for a recommended runtime of about 10 hours would suffice for long drives.

**Algorithm**

The most ethic-heavy aspect of this project is to design a rationale and fair approach to assess and set triggers for the alerts. Setting criteria for calculating a drowsiness score for periodic yawns, blink duration, and rampant head movements. Not to mention, algorithmically, we have to assess what constraints from the sensors classify a yawn or blink, which can be difficult depending on the light settings. The goal is to be processed within the ESP32-S3 as the algorithm's in-house computation, with the possibility of an out-of-PCB Raspberry PI for additional computation power (if necessary).
To capture blink frequency/length, we will be utilizing Haar cascades, or some sort of pretrained model if we decide to implement the raspberry pi for processing. For drowsiness detection, we will be implementing an Eye Aspect Ratio algorithm to check if the drivers eyes are closed and blink frequency/length will be tracked based on how many frames are in the eye closed EAR threshold and how many frames are in the eyes open EAR threshold.


**Sample Weighted Calculation (idea):**

Fatigue Score = (Weight1 * Blink Score) + (Weight2 * Yawn Score) + (Weight3 * Head Movement Score)
For example, Blink Score could be calculated as:
* Blink frequency (e.g., 0-5 blinks/min → score 0-50).
* Blink length (e.g., >500ms → score 0-50).
* Final Drowsiness Level:
- Score 0-30%: Alert (Buzzer or immediate audio alert)
- Score 30-60%: Warning
- Score 60-100%: Fatigued (Follow user designated-procedure)


**User Interface & Connectivity**

The PCB would send data via WIFI from the microcontroller through the ESP-32. Using HTML and CSS, we can design a mobile application that includes charts and emergency functionality to follow procedures like assigning and calling emergency contacts once a drowsiness or BAC threshold is reached. The focus is on a mobile application, as a driver usually has that in hand.

**Criterion for Success**

1. Accurate measurement of BAC levels: The device should be able to measure the BAC levels of the driver accurately. Having a professional police-enforced measure for comparison can help calibrate.

2. Effective detection of yawns, blinks, and tilting heads: The device should be able to classify and count how many yawns and blinks occur in timed driving intervals while actively updating and displaying the tiredness score for the driver to be wary. We can test this with varying yawn lengths and close-eye durations.

3. Fair Algorithm: The design is intended to save lives. We want the user to be able to set up a procedure when a threshold is set up. This can be calling driving services or an emergency contact once a BAC exceeds this.

4. Updated interface: The web interface should reflect updates and show graphic analytics to predict better when tiredness occurs and optimal driving times for all safety.

Digitizing the Restaurant with Network-Enabled Smart Tables

Andrew Chen, Eric Ong, Can Zhou

Featured Project

# Students

Andrew Chen - andrew6

Eric Ong - eong3

Can Zhou - czhou34

# Problem:

The restaurant industry relies on relatively archaic methods of management and customer service. Internal restaurant computer systems are limited and rely on staff members to monitor customer status. Restaurants lack contact-free transactions for clientele.

# Solution Overview:

Our solution to this problem is to develop a standalone LAN restaurant network system to manage customer status and occupancy for restaurants without the need for personnel to monitor it manually. Along with this, to accommodate for contact-free interactions, we propose a system for payment methods. To address customer preferences, we will provide height accommodation built into the table for different types of people.

# Solution Components:

[Self-adjusting Customer Height Accommodation] - The table will be held up with a linear actuator, thus allowing for the overall height to be adjustable. The table will adjust its height accordingly to the customers’ heights once they sit down. We plan to make the table adjust the table’s height by measuring the distance between the bottom of the table with the customer’s knees when they are sitting down using ultrasonic sensors.

[NFC Payment and Card Reader Payment] - The table will have NFC reader and magstripe reader for contactless delivery. The payment data will be sent to the centralized hub for processing and confirmation.

[Table Pressure Sensor] - The status of a table will be gauged based on the amount of weight on the physical table itself. An occupied (or even just an unoccupied and dirty table) will be marked as such since the weight of excess food, water, plates, and whatever else the customer may bring will be measured by this pressure sensor.

[Computer Mesh Network] - We plan to create a mesh network of raspberry pi’s to track the status of tables in a restaurant. This network will communicate via some form of wireless communication (Wi-FI, bluetooth, or Zigbee).

# Criterion for Success:

This project seeks to create a solution in which restaurants can minimize customer interaction with features that accommodate individual needs, such as the height of the table and payment methods. This project will be considered successful with a working prototype that includes features that may be included in an actual restaurant setting.

Project Videos