Inspiration

Each year, roughly 100,000 car accidents can be attributed to driving while tired. As sleep deprived students, we know how severely a lack of sleep can affect focus and concentration. We noticed that accidents due to drowsy driving is a very commonplace yet preventable problem. Our inspiration for Wake was the realization that commercial drivers, like truck drivers, can be especially succeptible to drowsy driving, as they are forced to drive up to 11 hours every day. Wake seeks to ensure that truck drivers do not drive past their limit and take breaks when needed.

What it does

We developed a system to alert commercial drivers when their brain emits alpha wave frequencies, which indicates deep relaxation and closed eyes, and upload the location of the drivers as well as their brain activity to a central website. In doing this, drivers are alerted to stay awake and find nearby resting spots while businesses can keep track of the drivers and their activity.

How we built it

Using an EEG , we recorded brain wave activity and coded a Raspberry Pi 3 to set off a buzzer and LED display when the brainwave frequencies were below 15 hertz (which is the frequency of an alpha wave) and remained at that frequency for 4 or more seconds (which is how long one can look away before increasing the liklihood of a crash). Our web app was built primarily in JavaScript and Python using React and Flask, as well as we used the Mapbox map-building API.

Challenges we ran into

One of the challenges we faced was getting the algorithm to indicate sleep. Due to the noise from the EEG data, the algorithm would consistently show "awake" despite having closed their eyes for more then 4 seconds. We fixed this by adjusting the time delay that indicates sleep as well as the maximum frequency that inidcated alpha waves. By adjusting one of these, we were able to give some "buffer" room that accounted for the noise. We also faced significant challenges with building all of our desired features within our webapp. While we had intended to have real-time brain wave graphs in addition to our map view, this became out of scope due to time constraints.

Accomplishments that we're proud of

On the hardware end, we are extremely proud of the communication between the pi, the EEG, and our alerting system as well as the live data visualization of the brain activity. We're also happy with how clean and interactive our webapp turned out.

What we learned

We learned how to characterize brain waves by their frequency and how the brain waves are able to reflect a person's alertness. We also learned how to transmit information wirelessly using wifi servers (flask), how to call map APIs, and some basic UI/UX.

What's next for Wake

Our next steps are developing a more compact EEG so that drivers can comfortably wear the headset with the mounted alert system on the dashboard of the vehicle. Additionally, we would like to improve our data collection method to reduce noise and have more consistent alpha wave detection. On the software side, we will continue to work on including more informative data analysis so that users can gain more insights from our tech.

Built With

Share this project:

Updates