Personally, I have a terrible attention span and can't study for more than a few minutes. Living in a world of distractions, with limitless entertainment is really hard, especially when school and classes went online. This isn't an isolated problem either, millions of students across the world are trying to study, but constantly find themselves find themselves distracted, be it in front of a youtube video, or scrolling through Tik Tok.

What it does

The project takes your EEG input from the sensor, and then tries to detect whether or not you are studying. If it detects that you aren't studying for an extended period of time, it tries to get you to go back to studying through any means possible. In an ideal scenario, I would have liked to attach a relay to a taser and have it shock me, but since I didn't have a taser, I used the next best kind of pain: peer pressure and verbal abuse!

If you aren't studying, it starts to yell at you to start working, and eventually just starts to insult you for being lazy and doing nothing. Since the audio is disconnected from your computer and emitted through a raspberry pi across the room, you can't just mute your audio to stop it, which makes the effort threshold to just mute it reasonably high.

Along with that, I built a web dashboard for you to keep track of your study and unfocused percentages, along with EEG visualizations. It also records your past data so you can look at it later, which is very helpful

Overall for this part, I've tried it for a few study sessions, and it was quite accurate, and helped me get back to work when I was distracted. If I had more time I would improve the neural network, but even with a relatively accurate neural network it managed to call me out and I started to focus. The dashboard also helps me visualize how I did for a study set, and save it so I can do better next time.

How I built it

I realized I had a mind game at home, and decided to see if I could get it to work with my computer. Many hours later and after a long search through weird crusty documentation, I found a hack that required to solder my arduino to 2 data pins on the inside of the board. I connected it with the arduino and got the serial data going to my computer.

From then on out, I started to gather data to train on my neural network by studying for a test, and watching YouTube videos. Once I got approximately 3000 data points, I got it to work with a neural network I built from scratch. After I got that to work, I realized that since I didn't have an optimizer for my loss, I wasn't able to train it well enough, so I switched to pytorch and got it to work with a general DNN. I used a DNN with a fixed view of the data instead of a RNN or LSTM because it was easier to train, less clunky, and less finicky. I eventually got a loss of 0.03 and 97% accuracy in categorizing whether I was studying or watching a YouTube video

For the last part, I hooked it up to my computer, got a little node server running on my RPI for TTS, and started inference! As soon as it detected 5 consecutive non-study classifications, the RPI starts to berate you for doing a terrible job at life.

Theres also a dashboard for statistics, and recording how well you've been studying and more thats built with react and the Web Serial API.

Challenges I ran into

  • I didn't know how to take things apart and solder, so that was a big one
  • I had to switch from a scratch neural network, because I needed an optimizer
  • Getting serial data working was a pain, as well as recording it seamlessly, which needed lots of error handling

Accomplishments that I'm proud of

  • Being able to classify data real time with a self built EEG
  • Getting everything to work in time
  • Making something I actually want to use when studying

What I learned

  • Serial I/O
  • Soldering and connections
  • Back propagation in scratch Neural networks
  • good insults against people, and how to make people start studying through them

What's next for Focusist

I really want to attach a taser to the raspberry pi so it could shock you every time you aren't studying. This would be amazing because there are real studies that show electrotherapy works, and I could build it at home. The best part about it would be that since there would be a causal relationship between distractions and pain, your brain would impulsively try to not be distracted even when there is no monitor. I also would love to try using a real EEG which would be amazing.

Share this project: