Brainwave Computing

Brainwave Computing

hackduke

The time is meow

Introduction

How do you control the internet with your brain? This is called Brainwave Computing. Some of the fundamental ideas behind this project that we had to code up for this Hackathon. I originally started with the idea to hook up a light sensitive resistor to the internet to determine whether the room is light or dark. Not bad to hook up sensors to the internet which is a critical piece of technology powering the IoT internet. I am really excited by the possibilities. We live in such interesting times! We had to gather up the basics for this project from the hardware lab which included an Arduino with Bluetooth Capabilities (Arduino 101 in my case), A NeuroSky Brainwave Starter Kit. You just need this plus a computer to get started.

Design Process

Here is the sensor that measures your brainwaves

Here is the sensor that measures your brainwaves

The first thing I had to do was find out how the two connect. I went ahead and looked online for an article that linked the Arduino and the Neurosky together so I can output the data to the serial console. My attempt at this was a lengthy and unsuccessful one. With the Arduino 101, I struggled a bit to get it work. Since it was the 101, I decided to go ahead and use the application that was included with the computer and connect it to bluetooth. This project could still work on the original Arduino Uno with a HC05. A document going over that is located Here. For this specific project, I don’t have to go this route BUT in some applications, it would be nice to have the headset directly interface with the Arduino. Anyways, with the headset connected to the computer, you can start having access to the headset data. Once I got here, this was exactly where the modifications start. With the stock app the give you, I want to take each of those individual inputs and pass those numbers to a website. Brainwave Computing could be an app that uses that data to do something with it.

Node JS and Software Integration

appnode

Here are the data packets saved by nodejs from the sensor

To get the computer hardware to talk to a web-server, we need an implementation of node js. NodeJS is a powerful JavaScript library that essentially allows computer hardware a direct line of communication with online websites. I started by accessing the node console and I looked on GitHub for a library that access the client and can turn that data into JSON format. After finding the libary, I decided to go ahead and launch the app to start collecting the data. What I do is save the .JSON file over with one block of new data whenever it receives a new packet. This self refreshing .JSON file is then sent and used in another program. Once you get to this point, you are halfway there. Feel free to pat yourself on the back.The next step in Brainwave computing is to build a notification based website that pushes your brain data back to you as notifications.

Website Integration with Push Notifications

push_conf

Notification Received. Your attention level is 75

Push notifications and the web interface inspired this project from the start so it was only natural that I use the data in this manner. Once we have that .JSON file with the brain sensor data, we can now push it to the web. I decided to go ahead an look for a simple push library in GitHub that allowed me to push notifications. I ended having to modify it to accept the new brain data value and pass it to the push server. The result was a system that allows you to receive your brain input in real time through website push notifications. In this demo, the only variable I found interest in is attention. So after I finished implementing it, this system can send you notifications of your attention level by a push request or automatically after a certain time interval. This is where I stopped with the project because this is what I originally intended to do.


Conclusions and Applications

This sensor belongs in a new class of BioSensors that can be used as computational input.
This data can be used to add creative elements to your app or product. This data can be also used to monitor the body’s rhythms and create better health/wellness apps. This can also be linked to powerful libraries like three-js or A-frame to involve players in a new level of interactive games. My goal this hackathon was just to retrieve the data and package in a way where it could be easily included in any web project you desire. The information this headset measures includes raw waves, brainwave bands, attention/mediation levels, eyeblinks, and signal status. I am more interested in the attention/meditation levels as a primary source of input.

Control Signals and Applications

Attention and Mediation controls provide immediate feedback. The neutral attention range is between 40-60. There are two ways to apply the brainwaves: voluntary and involuntary. Since the technology is relatively, this is the part that requires a bit more creative thinking. There are so much fields and applications for this headset, I wish I had more time with it. The next project I use with this is probably going to be with the Web’s premier 3D engine (A-Frame). 3D modeling with a headset like this is definitely something I am looking towards. Games, navigational tools can also be some other uses. I will do more research in this area and have it discussed in another article. Thanks for reading this and please leave a comment if you find this useful or you have any immediate ideas of the best ways to apply and use this tech.

Thank you the countless people and resources involved in the making of this project. I am truly blessed and couldn’t be more grateful. To all of you, Thank you from the bottom of my <3.

Leave a Reply

Your email address will not be published. Required fields are marked *