Inspiration

1/5 of traffic accidents are caused by drowsiness. The National Highway Traffic Safety Administration estimates that between 56,000 and 100,000 crashes are the direct consequence of drowsiness resulting in more than 1500 fatalities and 71,000 injuries annually. All four of us are united by having experienced crashes due to sleepiness as passengers or as drivers and that's why we wanted to build a non-invasive human-computer interface that improves security on the road.

What it does

MiSense is an earbud that measures brain activity (one-channel Electroencephalography /EEG) through one electrode placed in the ear. Thanks to wavelet analysis, it differentiates alertness and drowsiness stages and sends a music-alarm when detecting that the driver is drowsy to avoid an accident.

How we built it

We used the Neurosky Mindwave mobile one-channel EEG headset. We modified it so that the electrode is not placed on the forehead but inside the ear to make our device the least intrusive as possible. For the purpose of the early development we applied conductive paste on the electrode to improve the signal quality. The signals sent by the headset via bluetooth were captured and parsed to extract meaningful data (raw signal of EEG sampled each 2ms, plus computed EEG powers each second).

We then conducted multiple experiments to capture the mental state signals associated with drowsiness (beginning of falling asleep - easy this weekend - and eyes closing) and alertness (playing video games, watching engaging media and eyes opened).

All this data was gathered in a database that we analyzed with machine learning: we separated a train set and a test set and ran a Perceptron algorithm to classify between drowsy and alert stages, mainly based of the EEG Powers (delta, theta, alpha, beta, gamma).

We eventually wrote a piece of code receiving in real time the data from the headset, testing it with the previous algorithm, and playing music if the drowsy state is detected for a few seconds.

Challenges we ran into

  • Connecting the headset : finding the correct ports and setting baud rates took us a lot of time.
  • Signal noise: when doing the first experiments to collect data, the hundred PCs and thousands of people around us in the stadium caused a lot of noise and the signals were unreadable. So we had to move to a room with none around to continue with our experiments.
  • In-ear EEG : this is a very new area of research so we didn't find a lot of papers to help us filter and analyse the data. This means we had to run a lot of experiments to bebing to understand it ourselves and build our database from scratch.

Accomplishments that we're proud of

We ended up with a classifier of drowsiness/alertness stages from in-ear EEG data: we are only at 70% accuracy but considering that this is an entire new research area and that we based our algorithms only on data collected during the weekend, we are really proud of the result and hope it will have a tremendous impact on drivers' safety. We are confident we can improve it quickly with better data collection and optimisation of algorithms. We are also aware of the challenges coming due to the chocs and noise in the car.

What we learned

  • Filtering in-ear EEG signals
  • Conduct a machine learning project from scratch
  • Spend a whole weekend awake with a passionate team :)

What's next for MiSense

  • Mechanical design of the earbud and iterations (3d-printing)
  • PCB design
  • Improving signal filtering and machine learning algorithm (regression to measure the level of drowsiness)
  • Customer interviews with truck, bus and taxi driver + market analysis
  • Road trip SF-LA hitchhiking to test our prototype ;)
Share this project:

Updates