Controlling things with your mind is awesome. Unfortunately, EEG headsets like the NeuroSky MyndWave are a bit too pricey if you just want to experiment. Last year, I wanted to see what I could control with my brain on a student's budget.

I came across FrontierNerd's Brain Hack tutorial, which gave me a good comparison of the EEG headsets and their capabilities. I tried out their tutorial and hacked a MindFlex headset using an Arduino. It was fun to do, but it still required a cable to be attached, limited mobility, and looked hacked together.

I had a serial bluetooth module HC-06 lying around and decided to see if I could integrate the two and skip the Arduino altogether. Turns out, it works almost as good as the commercially available NeuroSky MyndWave for a quarter of the cost, and looks completely unmodified!

Finally, I came across a wonderful open source application by Trent Brooks that forwards your EEG signals on via OSC so you can use it in your MAX/MSP, Processing, or other projects.

In this tutorial, I'm going to show you what to buy, what to solder, and how to get your Bluetooth EEG headset up and running.


This is a relatively safe and easy hack to pull off, especially because we're using a commercially available toy and adding a Bluetooth module to it. However, I do not claim to know how this device fully works and take no responsibility for any harm that this project may incur.

While browsing Instructables, I noticed that arpuss had put up a tutorial using the MindFlex and the HC-06 but goes several steps further to pull raw data from it by switching the MindWave chipset into a different mode by sending a series of hex codes at 57600 baud on boot-up. That's awesome! Check his post out here.

Step 1: Gather Parts

What you'll need:

Step 2: Open Up the MindFlex

There should be two sides to the headset. One side contains the batteries and the other contains the switch and electronics. You're going to want to open up the side that has the switch on it.

Remove the 4 screws on the black side of the headset to get access to the circuit board.

Once inside, you will also want to remove the 2 screws attaching the circuit board to the housing.

At this point, you can warm up your soldering iron, because you're going to need it in the next step.

Step 3: Solder

Look through the photos to make sure you have a good sense of what needs to be soldered. You'll only need to solder 3 wires, which connect to the Bluetooth module's GND (Ground), RXD (Receive), and VCC (Power) pins. The first two are on the front of the MindFlex PCB, and the last one is located on the back where the switch is.

For the curious, the TXD pin on the HC-06 is used for transmitting serial commands back, the State pin goes HIGH when on and used as a power indicator for an external LED or micro-controller, and the EN pin is used to reprogram the module with different names or baud rates.

Your Bluetooth module should come with a few female-female jumper wires. You can cut and strip them to solder on to the MindFlex, but just make sure that the plug lines up with the HC-06 properly. If your module did not come with jumper wires, you can solder spare wires to the MindFlex and the HC-06.

Technical details:

The Bluetooth module has a built-in power regulator and can take anywhere from 3.3v to 5v. This is perfect because the MindFlex takes 3AAA batteries at 1.5V each when fully charged, which provides about 4.5v. Soldering the VCC pin to the switch means that the Bluetooth module powers on using the same switch and power supply as the MindFlex. The MindFlex also communicates with the base station using a daughterboard that communicates via Serial UART. Soldering the "T" pin to the HC-06's RXD pin means that the Bluetooth module will siphon off the serial commands and pass it wirelessly over Bluetooth as if it was directly connected via a cable.

Step 4: Insulate, Test, and Repack

We're almost there. The next step is to insulate the board to prevent any shorts before you cram everything back into the case. Cover any exposed component or leads on the HC-06 with electrical tape. Check the photos, you should have something similar to my setup.

Put batteries into the other side of the headset and turn it on. The red LED on the outside of the headset should tell you that the headset is receiving power, and the lights on the Bluetooth module should tell you that the Bluetooth module is functioning properly. If not, immediately turn it off and check your wiring.

Once everything is working, arrange the Bluetooth module inside the case, replace the screws and you have a working single-channel Bluetooth EEG headset!

Next step will be getting it paired with your computer and reading brainwaves.

Step 5: Pair With Your Computer

It's time to pair this with your computer. I'm running OSX Mavericks 10.9 so your screens may look different if using an older version.

If you are using Windows, check this out for pairing instructions.

The default name of your Bluetooth module should be HC-06. I have modified the name of my module to MindWaveMobile using an Arduino. Check out this tutorial if you want to do that.

The default passcode for the HC-06 should be '1234'.

Step 6: Read Data Using BrainWaveOSC

Download Trent Book's BrainWaveOSC for your platform and unzip it to a folder.

Before you run the application, you'll need to do is identify how your system sees your bluetooth device.

Windows Users:

You need to find the COM port that the bluetooth device is attached to. I'm not running windows, but this may help.

Mac users:

The easiest way to find this is to open up your terminal and type in ls /dev/tty.*

This will give you a list of serial devices detected by your system. Your should look like /dev/HC-06-DevA

Once you find your device, open up the settings.xml file located in the Data folder of BrainWaveOSC.

The 4th line should read something like COM6 in between the tags. Change that to your device string that you found earlier. It should look like /dev/HC-06-DevA

Open up BrainWaveOSC and watch your brainwaves!

After you open the application, it should start with a red panel on the left and turn green once it starts receiving data. That's it, you are reading your brainwaves from the prefrontal cortex of your brain, which usually deals with logic!

About EEG and how this all works:

EEG stands for Electro Encephalography, which basically it means it reads small changes in electrical activity in your brain as your neurons fire. This is usually represented in a series of frequency bands, also called power bands. You may have heard of them: Delta, Theta, Alpha, Alpha, Beta, and Gamma waves. These frequencies have been known to correlate with activities such as blinking, sleep, stress, and so on if you observe them over a long period of time.

What can it do?

Most of the time, your power bands are going to be all over the place and probably not make any sense. Your brain is extremely complex and this device is a very simple EEG reader. It's called a single-channel dry sensor because it only has one node attached to your forehead and doesn't take any conductive gel to connect. You may have seen much more complex versions of this in hospitals with over 40 sensors located all over.

However, NeuroSky - the manufacturer of the chip inside the MindFlex - has implemented mystery algorithms that can "learn" at least two things about you. Your Attention level and Meditation level. The chipset spits out values for these between 0 and 100. This means that your Attention level goes up when concentrating really hard on say, a math problem. Or raising your Meditation level by closing your eyes and relaxing your mind.

We can use Attention and Mediation to do some cool things, like triggering an action whenever one of those exceeds a preset threshold.


I've posted another Instructable here to show you how to use the OSC messages to throw a Hadouken in Street Fighter. Enjoy! :)

About BrainWaveOSC:

This program is written in OpenFrameworks by Trent Brooks and is used to parse the data coming from EEG headsets and rebroadcast the values back out through OpenSoundControl (OSC). This makes it easy to pass EEG data to other applications for creative purposes like controlling a quadcopter.

<p>HI,</p><p>i have hc05 bluetooth module and neurosky mindwave black headset i need help in connect headset with hc05 and get data can you please help </p>
<p>Hi,</p><p>Great info and awesome insutructable. I had a question. I cannot get my blue tooth to connect all the time. It will connect and then disconnect every 10 seconds or so. It also does not send any data to the .csv. I got one test to work but after that it has not. Is that my computer, the program or the bluetooth you think?</p><p>Any help would be awesome,</p><p>Thanks!</p>
Hey George,<br>It's hard to tell what would be failing, but if it's disconnecting and reconnecting, it might be the bluetooth module or your computer. It's possible that the bluetooth module might not be getting enough power. Usually wireless transceivers draw different amounts of power depending on its state. So when it's attempting to transmit, it's possible that it's trying to draw too much power.<br><br>I don't believe that the power source that you are tapping into on the bluetooth headset is regulated either. I would try connecting a separate 3.3v battery pack to the bluetooth module to see if it will stay on. Just remember to remove the positive (+) pin from the EEG headset.<br><br>Hope that helps!
<p>My headset works wit no device, plz help.</p>
<p>Why would you have to disconnect the + pin from the EEG headset, that makes no sense</p>
<p>Hello, i tried to do that and it's still not working...</p><p>maybe it is a problem from os x? i'm running el capitan</p><p>Thank you!<br></p>
<p>I cut the power trace to the Mindflex radio power pin, and route power to either the HC-05 or to the radio from a switch. The power is to the HC-05 is also supplied to the B1 pin on the TGAM1 module to switch to 56700 baud (the HC-05 is also set to 57600 baud for raw data transmission) See photo.</p>
<p>Hi! </p><p>I have exactly the same problem. Did you solved it somehow?</p><p>Thank's!!</p><p>Greetings !</p>
<p>Ok, i have been doing some research today, and i know why its not working... You can only use this bluetooth modules with older mac's (2010 mac's or so), its a problem from the intern bluetooth that does not accept the hc-06. You can make it with a pc or an old mac, even with an android smartphone.</p>
<p>Hello, I am having problems with the HC-06 module. It keeps reconnecting and disconnecting from my mac and PC. I have tested the voltage on the multimeter and it stays stagnant at 3.35V. Is this the problem, or is it something else.</p>
<p>More info: Inside the headset, if I measure the voltage it reads 3.24V, is power the problem?</p>
<p>I've posted another Instructable showing how to throw a Hadouken using OSC messages from this tutorial. It's written for absolute beginners and you don't need to know how to program. Enjoy! :)</p><p><a href="https://www.instructables.com/id/Throw-fireballs-with-your-mind-using-OSC-and-Proce/" rel="nofollow">https://www.instructables.com/id/Throw-fireballs-wi...</a></p>
<p>Hello, I am having problems with the HC-06 module. It keeps reconnecting and disconnecting from my mac and PC. I have tested the voltage on the multimeter and it stays stagnant at 3.35V. Is this the problem, or is it something else.</p>
hi <br>bro i am Naveen from New Delhi .I am a robot make here ...I need help to control robot by brain waves only so i need your personal facebook ID....send me message on my facebook ID kaurpreet50005@gmail.com thats my fb ID....
<p>HC-06 is not working, it disonnects until 60 seconds connection &iquest;How did you do it? I can't believe your hc06 module works well but mine not, i have tried the connection with two different hc06 and its always giving the same problem... </p>
<p>Hello guys</p><p>could you help me please? since I'm trying to develop an application using attention and meditation levels could you me explain please which differences we have for these signals when TGAM chip works in 9600 baud mode (so 1 data packet every second if I'm not wrong) or in raw mode, 57600 baud? <br>Let's say...since my application will use only attention and meditation values and not the other brain waves is it necessary or better to switch to 57600 baud mode or I can &quot;stay&quot; with my default setting 9600 boud one? <br>what are the advantages of using these two values (att/med) in the second case (57600 baud mode)?</p><p>Thank you very much for your help !!! <br>thanks again and regards <br>Lo</p>
<p>Man this is the best tuto about EEG + Bluetooth I found so far, the rest was not clear to me at all but this is clear as crystal. Nice job man. Tho I have a question. Is it possible to visualize the brainwaves in Processing as a graph like in this link you provided http://www.frontiernerds.com/brain-hack instead of BrainWaveOSC ?? If it is possible how can I do it? The other tutorials only show how to use Processing with the arduino, I didn't see any tuto yet on how to use the graphs directly without an arduino. Thank for the feedback. Cheers</p>
<p>Hi! I don't really know much about any of this but this does seem extremely useful for a project I would like to work on. But I have a question. Is there any way to get concentrated signals from an EEG easily?</p>
<p>Works great. Thanks for the instructable!!!</p>
<p>Hi! Thanks for the great tutorial. I soldered my Bluetooth to the Mindflex board and checked the wiring with a multimeter, which reads 4.4 volts, but the Bluetooth still will not power on. It works fine with other batteries by itself. Do you have any idea what the problem could be? Also the Bluetooth when powered by an external power source is seen by my phone and is connected, but will not work with mindflex apps. Do you have any ideas about what to do?</p>
<p>Hey! Thanks for the awesome tutorial. I followed your steps and can now see and save (csv) my brainwaves, but what I really want to do is somehow get them to play sounds. I've seen a couple of projects of that sort, but can't find any easy to follow tutorials. Any ideas?</p>
<p>Awesome idea! Are you looking to play sounds when something hits a certain threshold, or were you trying to synthesize sounds dynamically based on the EEG power bands?</p><p>In either case, I would recommend starting another Processing sketch that could read the OSC messages coming from Trent Brook's BrainwaveOSC. Here's a great primer on sending/receiving messages via Processing and OSC. <a href="http://learning.codasign.com/index.php?title=Sending_and_Receiving_OSC_Data_Using_Processing" rel="nofollow">http://learning.codasign.com/index.php?title=Sendi...</a></p><p>From there, you write some logic to check if some of those values exceed a certain number and play a sound using Processing's built-in audio library: <a href="https://processing.org/reference/libraries/sound/SoundFile.html" rel="nofollow">https://processing.org/reference/libraries/sound/S...</a></p><p>If you want to take it a step further and generate some funky synthesized sounds based on the input, you could use their built-in Minim library as well. This tutorial is a bit old but should still work. </p><p><a href="http://www.cs.du.edu/~leut/1671/09_Fall/ProcessingNotes8.pdf" rel="nofollow">http://www.cs.du.edu/~leut/1671/09_Fall/Processing...</a></p><p>The only difference is that Processing now includes Minim as a part of their application, so you don't need to import it.</p><p>Hope that sets you down the right path. :)</p>
<p>Oh and ideally, I wanted to do dynamic sounds. Like map certain inputs from the EEG device to instruments/ sounds, playing them according to the input value. </p>
<p>Thanks a lot for the links! I'll go through them in a bit.<br><br>But I'm a complete programming rookie so I just hope I can figure things out! :)</p>
<p>Amazing! I have been doing a lot of wireless arduino projects, and yours is really impressive. Can you please help me with buying a mindwave headset and also if there is any way to generate signals to control relays?</p><p>Thanks in advance </p>
Hello Sir, Can we access wirelessly a brain?If so then we can make the brain patients perfect and also the correct criminals by erasing the bad thoughts .<br>I am a civil engineering student .Please guide me.
Sorry , that is to correct criminals and make them a good person.a.I want to remove crime from the world with the help of science.
<p>Awesome Instructable!</p><p>Can you update the link for the 30w soldering device? </p><p>Thanks :)</p>
<p>Any soldering iron will do, but here's one on Amazon: http://www.amazon.com/Mag-Torch-MT-630-Corded-Solder/dp/B00KXX6RLA/ref=sr_1_1?ie=UTF8&amp;qid=1423785980&amp;sr=8-1&amp;keywords=30w+soldering+iron</p>
<p>Oooo mind control! That's an awesome hack, thanks for sharing!</p>
<p>Thanks! It's my first instructable, but more to come!</p>
<p>/I see S.Brin on the photo... Is that correct?)</p>
<p>That would be Jakob Marsico (http://jmarsico.com/). He's an amazing tangible interaction designer and engineer.</p>
<p>I love the idea that you were able to stuff the BT module inside the box, and added that option to my Instructable. :-) Thanks for linking to mine. I linked to yours, too.</p>
<p>Have you had any problems with heat, given the very tight fit?</p>
<p>No heat issues so far, but I haven't made any measurements. I've had this running for hours with no problems or noticeable warmth coming from the casing. I'm also running at the default 9600 baud, so I'm not sure if it would heat up at the higher baud rate.</p>
<p>Thanks! I wouldn't expect 57600 to be much warmer. Probably most of the heat is coming from the CPU time on the FFT calculations, and the chip is doing the same amount of calculations at the default rate, just not sending as much of the data out.</p>
<p>Thanks! I would've never figured to send 6 hex bits to switch it to mode 02. I'm going to have to solder on that missing receive pin and try it out.</p>
With a more expensive serial-to-BT module, you can set baud rate to 9600, send 02 (I got the number from the official documentation for the Neurosky chip), and switch back to 57600. But with the HC-06, my trick seems to work 100% of the time--the app is set to retry if the first transmission doesn't switch modes, but it never has to. But that may differ from module to module.
<p>I brought a MindFlex product and realized it is fake, it gives same signal even if I put it on my knee. I suggest you to read more about it before you buy one.</p><p>@Authors, Thank you for your effort, its unfortunate that these companies are making money from our curiosity with fake stuff.</p>
<p>No.</p><p>If you turn on raw mode (as in my Instructable: <a href="https://www.instructables.com/id/Mindflex-EEG-with-raw-data-over-Bluetooth" rel="nofollow">https://www.instructables.com/id/Mindflex-EEG-with-...</a> ), you can see proper looking brainwaves, with nice peaks when you blink your eyes or wiggle your ears (if you can do that). If you connect the electrodes to your chest around your heart (at your own risk!), you can see noisy but correct ECG patterns. So obviously the data isn't fake--it's reacting to my body exactly as you'd expect.</p><p>The device is based on the NeuroSky ThinkGear ASIC, and NeuroSky does have research papers on it. It may not be a great EEG, but it does work.</p><p>In non-raw mode, all you get is power spectrum data, plus NeuroSky's proprietary Meditation and Attention numbers. The latter are based on some kind of pattern recognition (they say that it's based on both the frequency and time domains) based on when they measured EEGs of subjects asked to do meditation- or attention- tasks. I dislike proprietary data, but some very informal testing suggests that the proprietary stuff does have some validity. When my daughter played video games wearing the headset, there were plausible regularities in the meditation and attention indicators. When the game got harder, the attention indicator went up, and when she started having a conversation while playing, the attention indicator went down.</p><p>It's unsurprising that it reacts to your knee. Your knee is full of changing electrical potentials, plus environmental EM noise, plus the electrical potentials for moving it. And of course the power spectrum of that signal will still carry data. If you clip the earclips to flaps of skin, and put the main electrode on the front of the knee, and then straighten the leg, you see a lovely clear electrical signal from the activation of the knee muscles.</p><p>You can see all the raw captures I mention above in the &quot;Sample data&quot; step of my Instructable (linked above).</p>
Thanks for the detailed reply. I hacked two Mindflex devices and soldered/connected to PC and not able to get any meaningful data (maybe I was not looking at the right place, I dont know). I was not intereted in eye blink data and ear wiggle my main interest was to get the real brain waves which was not consistent(it was alot like random signal. After 2 weeks of messing with it I giveup.<br><br>And thanks for letting me know about the knee is full of changing electrical potentials I was not aware of that.<br><br>I will take a look at it again, Thank you.
<p>First, for your safety's sake, I hope your computer is a battery-powered laptop unplugged from mains if you have the device connected by wire to the computer. You don't want a surge while you're wearing the headset.</p><p>Second, are you getting proper packets from the device, as per the developer docs: <a href="http://developer.neurosky.com/docs/doku.php?id=thinkgear_communications_protocol" rel="nofollow">http://developer.neurosky.com/docs/doku.php?id=thi...</a> ?</p><p>The packets should start with 0xAA, 0xAA, .... If you're using the default 9600 baud mode, there should be one packet per second.</p><p>If the answer to the first two is yes, then I suggest you switch to looking at raw data as in my Instructable, and then do an FFT to get the power spectrum data you want. (You can start with my Brainflex java code. It has some FFT stuff commented out.)</p>
<p>Thanks for the safety tip. </p><p>I don't remember the packets data, it was default baudrate 9600. I will look into it with a fresh perspective. </p>
<p>If you have a function generator (there are many Android apps for it via the headphone jack), you could send some sine waves to the headset in frequencies between 5 and 50 Hz. Just make sure they are extremely low voltage, less than a millivolt (use a voltage divider, unless you have a function generator that can go so low), since I think the ThinkGear chip's range is about 1mV (I haven't checked).</p>
<p>Prakis, I'm glad that you did some experimenting on your own. What you discovered was that <strong>EEG</strong> (Electroencephalography, the measurement of your brainwaves) , <strong>ECG</strong> (Electrocardiography, the measurement of your heart contractions), and <strong>EMG</strong> (Electromyography, the measurement of your muscles) all function in a similar way. Notice that all of them are prefixed with Electro?</p><p>As arpruss mentioned, this device measures small electrical changes in your body through the skin. What you're seeing are those changes, in addition to some noise and electromagnetic interference. When you placed the sensor on your knee, you effectively turned this into an <strong>EMG </strong>device. If tuned to the right frequencies and placed in the locations, you would get a much better <strong>EMG</strong> response. <strong>EMG</strong> devices such as the Myo Armband (<a href="https://www.thalmic.com/en/myo/" rel="nofollow">https://www.thalmic.com/en/myo/</a>) could also be used as an interface!</p><p>arpruss's method of testing is much more scientific and he has posted a great explanation about it.</p>
<p>Thank you AndreLe, I learned something new today.</p>
<p>that's awesome</p>

About This Instructable




Bio: Hi, I'm a designer, hacker, and tinkerer that loves to dive head-first into new things and teach people how not to make the same ... More »
More by AndreLe:Throw fireballs with your mind using OSC and Processing Adding Bluetooth to an EEG headset for mind-controlled projects 
Add instructable to: