Instructables

Control any gadgets with your Brain! (Neurofeedback with Arduino Microcontroller)

You've Seen many cool gadgets on news like, controlling robot.
I've been pretty shaken up with that one. So after some 6 months of research, I made my own!
All the parts cost me less then 100$! Thats cool isn't it?


Materials:

- 1 MindFlex - 50$ <= Got mine from EBay!
- 1 Arduino Microcontroller <= Visit the official Aruino Site Here!
- Some Wires <= Duh! I got it from my old mashed up computer...
- A Personal Computer <= Everyone has it. Right?
- Some time

Software & Files:

- Arduino GUI <= Download Right Here!
- Arduino Brain Example Code <= Download at the bottom!

Tools:

- Soldering Iron <= You'll need it.
- Hot Glue gun <= Not REALLY needed, but we have to secure wires right?
- Drill <= Not really needed, its used to make a hole so wire can go through the case
- Other tools (Pliers, Wire Cutters, Wire Strippers, etc.) <= This will help ya!

Well, Thats about it! Lets move on!




 
Remove these adsRemove these ads by Signing Up

Step 1: Prepare your Arduino Software!

First, Make sure your arduino is connected to your computer with USB connector and
the Arduino GUI is installed.
I will assume that you already had experiance with uploading code into your arduino. If not, Check This guide!

When thats done, Open up the downloaded 'Brain' folder and click'Examples'. Then you will see 2 folders
For now, We will use the program 'BrainSerialOut'. So open the folder and Double-Click the
'BrainSerialOut.pde' file and upload it into your Arduino.

Thats all the software you will need!! :D

Helpful Notes: The 'Brain.cpp' and 'Brain.h' is a library for this program. Make sure the
'BrainSerialOut.pde' file is in the same folder with 'Brain.cpp' and 'Brain.h' or else it wont work.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Step 2: Time for hardware hacking!! - Opening your Headset

Picture of Time for hardware hacking!! - Opening your Headset
OK! Time for Hardware Hacking!!!! >:D

To hack our victim (aka Mindflex Headset), We need to open it. Well, Go get your screwdriver and start opening!
 
 
 
 

Step 3: Soldering some wires

Now our headset is opened, Examine your circuitboard and find the label named ' T '.
The ' T ' stands for Transmit. Which is the pin that sends us information.
There will be a little solder glob below the label ' T '. Solder a wire to the glob (look up for pictures!)

Once your done, solder a another wire to the ground solder glob(See picture for details).

You will have total 2 wires soldered total! Lets move on!
 
 
 
 
 
 
 
 
 
 
 

Step 4: Connecting wires to the Arduino

To get acess to our Headset here, what you'll need to do is to connect the wires that are coming
from the headset to the correct pin of our Arduino.

So what pin? Connect the wire that we connected to the ' T ' blob earlier to the Arduino pin RX,
and for the other wire, connect it to the Arduino Ground (I'll say it again, check out the pictures above)

Tips: The Arduino pin 'RX' stands for Receiver, which receives data from the headset.

Thats all! :D
 
 
 
 
 

Step 5: Test em' out!

So lets test this out!
First, connect the arduino to your computer with your USB cable. Then open up the Arduino GUI
and click the Serial Monitor (The logo thats has box with a lollipop sticking out on the top).


Attach your headset (Make sure you have batteries) and you will see bunch of data spitting out.
If it have numbers somthing like this:
0, 634, 5344, 5334, 78934, 6544, 63434, 9834, 3574, 30564, 67534

Then you have a good connection!
 
 
 
 
 
 
 
 

Step 6: Finishing it up.

Picture of Finishing it up.
Once we checked its working, Lets now finish this gadget up!
 
I drilled a small hole in the case so the wires can go through.
Also, I used some hot glue gun to secure wires and attatch the Arduino to the headset.

The final gadget with some finishing touches are shown above.
 
 
 
 

Step 7: Understanding the data!

Picture of Understanding the data!
Now lets examine the data this thing is spitting out!
The long number this spits out can be breaked down into this:

=> signal strength, attention, meditation, delta, theta, low alpha, high alpha, low beta, high beta, low gamma, high gamma

If you dont know what is gamma or alpha or you think this is toooo hard, check out the
wiki about brain signals here! (Also check the picture above)

Now lets make our Real-Life-Application(Well, sort of)!
 
 

Step 8: Our First Real-Life-Application (Sort of)

Picture of Our First Real-Life-Application (Sort of)
Now lets get in more deeply! How about creating a 'Attention Analyzer'??

Open up the 'Brain' folder, navigate to 'Examples' folder. And this time, goto the 'BrainTest' folder and click the 'BrainTest.pde'.
Now upload it to your arduino!

So what does it do? Well, If the person's (who is wearing the headset ) attention goes up, the blinking of the LED goes faster.
(Mentioning about the LEDs, The LED that blinks is built-in to the Arduino so you dont have to worry about adding a LED.)
The picture shoes Arduino's built in LED that will blink in this experiment.
 
 
 
 

Step 9: So what now?

So what now?

The title says that you can control anything with this gadget. Well, controlling a gadget can be break down into these steps:

Determine what brain data you will need => Examine the data by putting the headset on and thinking it => Get the data range
=> Write a Code => Make a circuit that turns the circuit ON/OFF with transisters => Connect the gdaget

I suggest that these steps can be performed by who has atleast 5 years of electronic experiance.
Brain data management to control any gadget is not easy as you think.

But for all the remaining people out there, There is some cool example programs all around the internet!
Like this cool Analyzer Program (Download Below) <- You may need to install the controlP5 library (Search Google)




Thanks for taking your time reading this instructables! God Bess!
 
zsteinberg21 days ago
Anybody have a pre written code that controls a gadget they could share, or would be willing to help?
StrangeDos9 months ago
Would it be possible to get the baseline reading from anywhere else other than the ears? Those ear clips do look kind of dorky.
My idea is to 3D print a cooler looking headset for the Mindflex pcb and sensors. More like the Force Trainer headset (which I couldn't get my hands on so I went for the Mindflex instead).

The Force Trainer seems to get the baseline readings from behind the ears. The Mindwave seems to omit one of the ear clips at least.
sourav6391 year ago
can we use the mindflex headset used here instead of mindwave headset as used in this- http://blog.makezine.com/2012/03/05/make-a-mind-controlled-arduino-robot/ ---
project....????
codegamc sourav63910 months ago
you can use any of the headsets, ive done it with 2, and my friend used a third. they all have T, but the data is just calibrated a little different so the values arent identical, but still totally unerstandable from one to another. that said, i dont know how the code compares for the mindflex data. try it, the y are cheaper too, no?
supermitch1 year ago
I already said, I'm getting a bunch of error messages. I noticed now though, there are only error messages for the libraries (Brain.h and Brain.cpp) and not the actual program (BrainSerialOut.pde) . It's fine but I need the libraries to work!
supermitch1 year ago
your brain.zip file isn't working. I got about a bazillion error messages when I tried verifying the sketch. and I do have the BrainSerialOut, Brain.cpp, and Brain.h documents in the same file.
supermitch1 year ago
and by the way, you should use spell-check. I am using this for the 3d printer contest.
supermitch1 year ago
pretty good. could use some work for less experienced hobbyists, but I can figure this stuff out. way better than other crap on instructables about neuroscience. overall, ***.
nerd74731 year ago
cool!!!
Hello I science your project is very nice Atlast we can see only led blinking and how can i add any object to O/P port and how can i control it?, Exaple how to connect fan in which port in arduino.
TylerBerzzz2 years ago
Hey man, that was a great instructable! I'm thinking about doing it but im completely unfamilliar with arduinos, yet i really would like to control electronics with my mind. I believe that you'd have to program the arduino specifically to what device you are trying to control and i have no idea how to do that. All im experienced in is programming on RobotC :/ you should make another instructable on you controlling something with your mind
I am looking for a way to make and use a BCI like this to control 'Hot Keys' for videogames (ex 1-0 on the top of the keyboard). Would this project work for that/would I need some more programs to make it work? could you point me in the right direction?
mysterion2 years ago
What an amazing project, your research paid off.
Technology like this is the next generation
Cheers and Thanks for the great read!
Thanks. How about a video?
iScience (author)  magicthegathering2 years ago
I hope you liked it!
I was thinking about that too. But I dont know :P
robot7972 years ago
were can i get a cheap sensor?
iScience (author)  robot7972 years ago
I got mine from Ebay for 50$. The MindFlex comes with the whole bunch of Game consoles as a kit which makes it more expensive (since we are only going to
need a EEG headset). I think there is some store out there that sells the EEG headset alone.

Cheers! And thanks for taking time to read this instructable!
iScience (author) 2 years ago
If you need any help, comment!!! Ill love to help!!!