Control Any Gadgets With Your Brain! (Neurofeedback With Arduino Microcontroller)

103,985

291

35

About: I love SCIENCE. The world of knowledge. If you are reading this, You TOO will love SCIENCE
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!




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

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.

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!

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)

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!
 

Share

    Recommendations

    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Plastics Contest

      Plastics Contest
    • Optics Contest

      Optics Contest

    35 Discussions

    0
    None
    minaF2

    3 years ago

    Here's the same issue

    The mindflex only sends 26 signal strength and zero attn and med values... sometimes even 51... never drops to zero and no usable signal.., I've tried to connect the arduino to a laptop running off batteries , used a water/salt as a conductive solution, used a link from the arduino GND to my body .. always the same , never got a signal strength less than 26 , so i'll really appreciate any suggestion or even a clarification to what can be the issue and how to fix .

    1 reply
    0
    None
    SuhasS12minaF2

    Reply 1 year ago

    even i experienced the same....but i solved it by checking the voltage across T pin and gnd!.....if it varies from 3 to 2 then it is sendind the values to the computer and if not it isnt sending any data! To get that voltage just short T pin & any other adjacent pins which has 3.25 v for about 10 seconds. This worked for me....hope the same with you! :)

    0
    None
    ChristianB139

    1 year ago

    Awesome project.. just a couple of simple things that would have helped me getting it working quicker... 1) Find & replace "WProgram" with " Arduino" in scripts 2) make sure the rx input is unplugged when loading the code.

    0
    None
    AdeebR1

    2 years ago

    Hey which Arduino micro-controller did you used??

    0
    None
    ancymathai

    2 years ago

    Good project but,not at all working your code full of errors.
    Not getting response for the comments.......

    1 reply
    0
    None
    Kidhackerancymathai

    Reply 2 years ago

    the libraries call for a driver in the arduino called Wprogram.h and Wprogram.cpp

    just change the Wprogram to Arduino so it should look like this Arduino.h and Arduino.cpp

    0
    None
    Neiljams

    2 years ago

    This instructable is one of many of the same hack and is only for graphical visualization. Technically one could control a device using the wired hack but one would still need to connect the gadget to the robot. Oh ya if you controlled a robot where is that part. Some people are abke to follow directions pretty well

    0
    None
    dhepguler

    3 years ago

    Never worked for me... My mindflex only sends 26 power signal and zero attn and med values... sometimes even 51... never drops to zero and no usable signal... :) cecked out everything from Google but with no luck... any ideas?

    2 replies
    0
    None
    PrashanFdhepguler

    Reply 2 years ago

    That could probably be due to the mains filter configuration (power line noise). I've had the same problem (I got 51 and even 80), but once I configured the notch filter frequency jumper to 50Hz. It worked like a charm. It depends on the region. Also unplug any device connected to mains, as this would induce power line noise.

    0
    None
    dhepgulerPrashanF

    Reply 2 years ago

    yeah.. you are right... the problem is with mains voltage noise... I changed my setup... I used bluetooth to send brain data from ThinkGear and it worked like a charm... :)

    0
    None
    Kidhacker

    2 years ago

    and to kchugh

    you should be able to control something with ac power with a relay and the power source can come literally from a power cord

    0
    None
    Kidhacker

    2 years ago

    I was able to take this project and make a vex robot run forwards or backwards depending on how calm you are

    0
    None
    Robotic2001Robotic2001

    Reply 3 years ago

    Can I control a hexapod with SG90 servos with the MindFlex and how i didn't understand how you connect the robot with the MindFlex.
    Could you pls explain me this pls.

    0
    None
    kchugh

    3 years ago on Introduction

    hi

    I wanted to ask some questions

    1)can I control an AC motor from this gadget

    2)from where can we get the power source

    0
    None
    renxinhe

    3 years ago on Introduction

    Is there a way to increase the sample rate of the packets? Maybe like one packet every 10 ms?

    0
    None
    zsteinberg

    4 years ago

    Anybody have a pre written code that controls a gadget they could share, or would be willing to help?

    0
    None
    StrangeDos

    5 years ago on Introduction

    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.

    0
    None
    sourav639

    5 years ago on Introduction

    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....????