Inspiration

We all have an interest in improving everybody's quality of life, and thought developing a real-time detection system would be an awesome way to spend a weekend.

What it does

Kōan reads the user's brainwaves via a Muse headband and then displays the data, both live and historical, on a solid web-based app. It also provides an SMS alert system to warn users about impending panic attacks based on activity being read, with the capability to get in touch with an emergency contact for help.

How we built it

A Python server directly interfaced with the Muse headband, preprocessing the data and depositing it into Firebase. Firebase's real-time API was used with Javascript and HTML to build the front-end displaying important information about the user's brain activity. We created a small Node.js application, hosted on Linode, which acted as a webhooks engine for Firebase, so that alerts could be triggered when certain criteria were detected. These alerts pinged a Rails server, which interfaces with Twilio in order to provide the realtime text messaging alerts.

Developing the entire system with small microservices allowed each person in the group to develop in a language that they were familiar with, as well as learn with others in conjunction.

Challenges we ran into

Dealing with the firehose of data coming out of the Muse headband was a challenge. It produces data points at a rate of 10Hz, for over 10 different metrics, which was all delivered to Firebase. Working with all this data was a challenge, as analyzing all this data for the warning signs of panic attacks was hard.

Accomplishments that we're proud of

We built an app that has significant potential to positively affect people who have suffer from mental issues such as panic attacks, and learned a lot about new technologies in the process.

What we learned

Real time data processing, low-level protocols, how to integrate many microservices.

What's next for Kōan

Kōan is a proof of concept that shows this sort of product is both viable and useful. The next step is to make something like this accessible for everyone.

Share this project:

Updates