Graphing Brainwaves with the Mindflex

The Mindflex is marketed as a concentration game. It’s a toy that connects to a fan and moves a ball through an obstacle course. While wearing the Mindflex, the power of the fan relates to the power of one’s concentration.

My friend Sterling and I changed the wiring to a USB connection in order to graph our brainwaves on a computer screen.

We used an Arduino to facilitate communication between the Mindflex and the computer.

What the Mindflex Can Do

The Mindflex works by sensing a voltage difference across several metal contacts. When playing around with the MindFlex, one gets a sense of the intensity of concentration. It turns out the Mindflex sensors pick up 7 different brainwave frequencies, not just one. By hacking it, we got access to all these pieces of data.

Ben’s Brain While Playing Violin
Sterling’s Brain While Juggling

There’s no limit to the sort of things could be controlled with the Mindflex once it’s hacked.

Troubleshooting

Before we managed to print these graphs, we ran into connection quality issues. The connection to the PC was affecting the Mindflex’s ability to sense a slight voltage difference in the brain. This was due to the PC being plugged into the wall outlet.

We fixed this problem by introducing a new component to the circuit, an Optoisolator, also known as an Optical Coupler.

The Optoisolator keeps the Mindflex and Arduino electrically isolated from each other. It does this by transferring data through an LED and a Photosensor instead of through a wire. Our connection quality improved greatly with this new addition.

We added LEDs for testing purposes as well as looking neat. We notice a worsened connection with red LEDs compared to green LEDs. Perhaps the voltage drop across certain LEDs interferes with the data transmission. A final product might want to exclude them.

Final Thoughts

For my first Arduino project, I’m happy with the results, but there’s a lot more the Mindflex could do. I would like to play an instrument controlled by one’s thoughts, or a video game that used the Mindflex as a controller. I also wonder if there’s any practical applications to these graphs. Would analyzing them help someone practice meditation?  Perhaps a Psychology study could be designed around using the Mindflex.

Resources

Here’s the program we used for gathering the input data from the Mindflex to the Arudino: https://github.com/kitschpatrol/Brain

Here’s the program for displaying the inputs over time in a graph on the computerhttps://github.com/kitschpatrol/BrainGrapher

My Future in California

Winter Bird Festival

I visited California to see my grandparents. The trip also took me to Cal Poly, San Luis Obispo. Seeing so many college students walking to class, I thought I might feel a sense of longing.

Instead I felt calm. Meeting with my ex-professors,  I thought they would have questions about why I left school. In reality, their questions were focused on my vacation. I excitedly explained my new plans to return.

I would take a couple classes back in Illinois. Then, at the end of the year, I would move back to California to finish my last class along with my senior project.

I told my plan to as many people as possible. Friends and family, advisers and professors, ex-coworkers and boss. One listener responded with a unique piece of advice:

“Don’t live in the wreckage of your future”.

I already understand not living in the wreckage of my past. Dropping out has transformed from a negative experience into a humbling one. Moving forward has become more important.

Which is why the advice surprised me. Could my intense focus on the future be harmful? I thought back to when I enrolled in a track to get a Master’s degree. When my plans fell through, I ended up falling down with them. I didn’t even earn my Bachelor’s.

For me, this advice is about not clinging too hard to a set path.  I ought to reconcile with the uncertainty of life. I might not end up in California in 2017. I might not get my degree before my 10 year school reunion.

I tried to internalize the advice and spent the rest of my trip in the present. Hiking up the hills, running down the beach, and visiting all the tourist shops. I ate good food with friends and family, and celebrated my 27th birthday, one of my most memorable yet.

Grandparents' House

Trek

Friends from Urbana

Winter Bird Festival

Birthday Dessert

Happy New Blog

My resolution for this year to to blog once a week. Writing my challenges in programming will be helpful to me as well as other programmers. I can be another voice in the chorus of programmers trying to conquer procrastination, anxiety, and focus problems. I like to read the more down-to-earth, realistic experiences that people face. It makes me calmer about my own progress in my career. Hopefully this blog will be this.

Also, writing itself has also been a challenge for me in the past. Even though I once called myself a good programmer, I never have called myself a good writer. One of the reasons I haven’t graduated was a Master’s thesis became an impassable wall. I’m not working on that thesis anymore but it’s never too late to be a writer.

I still want to get my Bachelor’s and that involves doing a senior project. A college in California called Cal Poly, which I dropped out of in 2014, is still where I want to return. The past two years then have been spent in Illinois, living at my parents house. I’ve worked several odd and end jobs, had some relationships, and changed slightly as a person but it’s difficult to say how much. Regardless, it’s 2017 and my priorities are shifting back to programming, graduating, and my career. Therefore…

  •  In one week I’m traveling to California. To see my grandparents, to see some friends, to visit iFixit, and to visit Cal Poly. I will talk to some ex-professors about finally doing my senior project. At the least, seeing the central coast will inspire me to work my butt off.
  • Once I’m back in Illinois I have a week until I start 2 classes at my local colleges. Mainly a class about Operating Systems, which is the last Computer Science class required for my Bachelor’s. Cal Poly has already approved it to transfer and count toward the degree that I put on hold 2 years ago.

I’ll let you know how it all goes.