# Project export: SomniWatch

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 12.0
- Tagline: SomniWatch helps prevents the over 600 drowsy driving related fatalities each year, equipping the 78-92% of cars and other vehicles with a low-cost solution to ensure drivers stay awake on the road.
- Devpost: https://devpost.com/software/somniwatch
- GitHub: not linked
- Video: https://www.youtube.com/embed/M-RFISbNtuo?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: contributor stats unavailable

## Devpost submission (written by the team)

### Inspiration

Right after AP exams, Xieshi did not realized how tired he was and drove on the freeway to his research lab. He nearly fell asleep on the wheel, resulting in him not realizing a slowdown ahead and almost rear-ending another car. Many others share similar experiences, despite wider adoption of attention tracker technologies in expensive cars.

### What it does

SomniWatch is a wearable device that detects when its user is in danger of falling asleep using infrared temperature sensors, accelerometers, and heart rate sensors. Research has found that heart rate decreases by 10%, and temperature at extremities increase by up to 1 degree C during the process of falling asleep. These tiredness signals, combined with motion detection for nodding off (microsleeping) allows us to alert the user in a timely and accurate manner.

### How we built it

There are two parts to the design, one for biosensors and the other for motion. We implemented the biosensors corcuit on the breadboard, then we then had our very tired members strap the accelerometer to their head and start nodding off. We used that data to train a classifier model using Edge Impulse. Finally, we uploaded the classifier library to the microcontroller. Both circuits are eventually powered by a power bank.

### Challenges we ran into

We ran into significant challenges collecting sufficient data for our ML models, and it was difficult to adjust the sensitivity for motion such that it minimizes false positives while still detecting microsleeps.

### Accomplishments we're proud of

We are happy that we could finish a project incorporating both software and hardware. Seeing that our research into heart rate and skin temperature turn out exactly the way we expect and learning how to integrate the different components together felt rewarding.

### What we learned

We learned how to develop apps with Swift, use Edge-Impulse to train a classifier model, and use accelerometers for collecting data. We learned how to collaborate with team members with different areas of expertise.

### What's next

We plan on improving the algorithm further and explore the potential of turning the prototype into a commercial product

## README (from the GitHub repository)

No README available.

## Detected evidence (automated analysis)

No repository was indexed for this project. Claimed technologies below could not be checked against code.
- Swift (language) — claimed on Devpost, not found in the code

## Codebase structure

No repository index available.

## Key source files

No repository index available; no source files included.