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.

Assistive Chessboard

Robert Kaufman, Rushi Patel, William Sun

Assistive Chessboard

Featured Project

Problem: It can be difficult for a new player to learn chess, especially if they have no one to play with. They would have to resort to online guides which can be distracting when playing with a real board. If they have no one to play with, they would again have to resort to online games which just don't have the same feel as real boards.

Proposal: We plan to create an assistive chess board. The board will have the following features:

-The board will be able to suggest a move by lighting up the square of the move-to space and square under the piece to move.

-The board will light up valid moves when a piece is picked up and flash the placed square if it is invalid.

-We will include a chess clock for timed play with stop buttons for players to signal the end of their turn.

-The player(s) will be able to select different standard time set-ups and preferences for the help displayed by the board.

Implementation Details: The board lights will be an RGB LED under each square of the board. Each chess piece will have a magnetic base which can be detected by a magnetic field sensor under each square. Each piece will have a different strength magnet inside it to ID which piece is what (ie. 6 different magnet sizes for the 6 different types of pieces). Black and white pieces will be distinguished by the polarity of the magnets. The strength and polarity will be read by the same magnetic field sensor under each square. The lights will have different colors for the different piece that it is representing as well as for different signals (ie. An invalid move will flash red).

The chess clock will consist of a 7-segment display in the form of (h:mm:ss) and there will be 2 stop buttons, one for each side, to signal when a player’s turn is over. A third button will be featured near the clock to act as a reset button. The combination of the two stop switches and reset button will be used to select the time mode for the clock. Each side of the board will also have a two toggle-able buttons or switches to control whether move help or suggested moves should be enabled on that side of the board. The state of the decision will be shown by a lit or unlit LED light near the relevant switch.

Project Videos