Introduction: How to Hack EEG Toys With Arduino

Picture of How to Hack EEG Toys With Arduino

i had heard a few years back about the ability of hooking up toy EEGs so you can interface them with your computer. 

I was reminded of this for a project i wanted to do for a class (instructable coming soon ;-)), and i also found a "Star Wars force trainer" on amazon for 30 bucks. 

Here is the simple step by step instructions on how to turn a force trainer into a working EEG you can see with your computer. 

special thanks to frontier nerds for the initial code and the hack of a similar toy. 

Step 1: What You'll Need

Picture of What You'll Need

- Arduino, any kind will do
- Star Wars Force Trainer toy
- A computer running processing and the arduino development enviroment
- solid core wire
- basic soldering supplies

Step 2: Modding the Force Trainer

Picture of Modding the Force Trainer

After you're done messing with the force trainer (its a pretty cool toy), open it up.

You'll be looking for two spots, the ground and a pin labeled "t". make sure the solder doesn't get on any other pins and solder two wires, one from the ground and one from the t pin.

Once that is done, drill a small hold in the force trainer case and feed the wires through. 

Step 3: Programming the Arduino

Picture of Programming the Arduino

Next you want to program the arduino. This code will take the data from the force trainer and spit out some pretty numbers. We will go over what the numbers mean in a later step.

Here is the code: Arduino Brain Library

Install that library and load the serial out example, verify you are getting data from the serial monitor. 

Now you are ready to combine the arduino and the force trainer. 

Step 4: Hooking Up to the Arduino

Picture of Hooking Up to the Arduino

Next, its time to wire the arduino up to the force trainer. Take the wire from ground and wire it to GND on the ardunio, and take the "t" pin wire and plug it into pin 0 (or RX)

I used some zip ties to keep the arduino attached to the top of the force trainer.

Step 5: Visualizing the Data

Picture of Visualizing the Data

Got it all hooked up? seeing a bunch of numbers? you're doing well. Now get processing running to visualize your data. 

Download this set of code and install it:
you'll also need this library to run the processing code:

Once that is running on your computer, you should see a graph pop up. Hook up your arduino to the computer and you should see some pretty graphs! (see picture)

The force trainer gives you 11 values in this order:
Connection quality, Attention, Meditation, Delta, Theta, Low Alpha, High Alpha, Low Beta, High Beta, Low Gamma and High Gamma. 

At first the attention and mediation values will be zero, but once it gets warmed up they will start bouncing around. Try concentrating on things to get the attention up. See what doing different tasks do to get the levels up or down. 

Step 6: Next Steps

Picture of Next Steps

Now you have a bunch of data you can work with to make your own projects. For me its going to take a bit of time understand the values in such a way so i can hook things up. The possibilites from here are endless. brain controlled pianos? Telepathic tweeting?

I'd love to see your projects from this set up. If you have any suggestions, post them in the comments!


jonam713321 (author)2017-07-15

I have made all the connection as per the advice. And also loaded the code to the Arduino UNO, but im not getting any data on Serial monitor...!. please HELP urgent.

ΝικόλαςΚ1 (author)2017-02-16

I have a HUGE problem ..i can't receive data....i connected the Transmit pin on the receiver pin on the arduino....and the ground from battery to ground....i load the code but nothing happen...Any ideas?

T0BY (author)2016-12-03


milomir (author)2016-09-08

i have problem to download software,can somebody explain to me how to do it?

RamiroL5 (author)2016-09-06

a mouse control would be awesome

theoriginalrage (author)2015-10-02

Seeing you stare at the computer screen while wearing it makes me wonder if you could scroll with it. That would be awesome.

AF6YS (author)theoriginalrage2016-09-06

That would be an awesome use of brain power. DARPA (Defense Advanced Research Projects Agency) has done research on thought control between military hardware (fighter jets) and pilots may actually include surgical intervention. Implants of sensors to control flight and or weapons.

I'm reminded of the Clint Eastwood movie FireFox, has thought control weapons systems, but he has to THINK in Russian! Excellent movie, regardless of of the reality of the state of the art of "thought control weapons systems!"

mastallama made it! (author)2016-04-29

Good times!

pr0cesor (author)2016-04-02

Hi instead of Arduino I will use a HC-06 Bluetooth module that would connect directly to the computer via a bluetooth mini-usb dongle connected with HC-06. But my question is how then can I use the brain grapher in processing in order to read the data from the headset to the computer? I saw an article about OSC that it's possible to use OSC readings in processing. But I don't know what should I modify in the codes to make it work with the brain graph.pde. Any advice? THx

maheshdelhi58 (author)2016-01-30

I guess some people are getting errors because they hooked up the RX and TX pins of the arduino to the 't' and GND while uploading the program to the arduino

lucasthebear (author)2015-11-11

I got this error

Arduino: 1.6.6 (Mac OS X), Board: "Arduino/Genuino Uno"

Multiple libraries were found for "Brain.h"

Used: /Users/lucascoding/Documents/Arduino/libraries/Brain

Not used: /Users/lucascoding/Documents/Arduino/libraries/Brain-master

Sketch uses 4,686 bytes (14%) of program storage space. Maximum is 32,256 bytes.

Global variables use 748 bytes (36%) of dynamic memory, leaving 1,300 bytes for local variables. Maximum is 2,048 bytes.

avrdude: ser_open(): can't open device "/dev/cu.usbmodem1a21": No such file or directory

ioctl("TIOCMGET"): Inappropriate ioctl for device

Problem uploading to board. See for suggestions.

This report would have more information with

"Show verbose output during compilation"

enabled in File > Preferences.

AeronR (author)2015-06-26

there is a new fangled eeg called emotiv, they have a great ted talk. You might be able to create specific patterns by visualizing something. if this creates a repeatable brainwave state you could use that frequency pattern to trigger certain commands. Thats how Emotiv does it anyway. they also have an algorithm to flatten out the folds in the brain. This is because everyone's folds are different...

wavelet_spaghetti (author)2014-10-20

Fantastic work, awesome processing scripts. I'm trying to write my own, slowly getting there.

I hear you wavelet, i'm in the same boat.

karimm1 (author)2014-10-19

my brother is a handicap he dosn't do any thenk but he now wathe we toking about and he anderstand move his ayes pleas need help contacte me

gimail or google+:

my email :

theassassinpig (author)2013-03-24


BrainTest:9: error: 'Brain' does not name a type
BrainTest.pde: In function 'void loop()':
BrainTest:26: error: 'brain' was not declared in this scope
BrainTest:34: error: 'brain' was not declared in this scope

make sure you have the brian library declared

ssarthak598 (author)Nick_Tesla2014-09-07

Hello, i am also getting the same error. did your error resolve?

kingvicc (author)2013-04-21

After browsing through the frontier nerds' post, I noticed the comparisons between the force trainer (seen in this instructable) and the mindflex. The article mentions that while the mindflex has EEG Power Band Values, the force trainer does not. What exactly does that mean? Which one would you recommend? If they're the same I'd go with the force trainer ($30 cheaper on amazon), but again I'm not really sure what the differences are in terms of features and things we can tap into. Thank you in advance! Can't wait to try this instructable out this summer!

The Frontier Nerds post has some great information, but they do say you can't get full raw EEG data from the MindFlex. I have managed to do this by making some extra changes to the TGAM1 board that is inside the headset. Basically, you will see a port called B1 on the board, and there is a 10K resistor connecting this to GND. If you remove this and replace it with a 10K resistor to VCC then you get full EEG data at 57600 baud, rather than just the summary values at 9600 baud that you get normally.

nah89 (author)ideationnetworks2014-07-06

Could you elaberate more on where it is? I can't find B1 for the life of me.

ideationnetworks (author)nah892014-07-07

there's a picture here...

bryce910 (author)2014-02-17

I just saw this and it looks awesome! I actually have the star wars force trainer and am going to see what I can get working.

rinsonnraj (author)2014-02-05 for more details on eeg robot control

Fairlane (author)2011-10-24

Ok so I originally get the 11 values when I first turn on the Force Trainer headset, however then I can only get the Attention, Meditation, and Connection Status information. Interestingly, if I turn the headset on and off continuously, the Brain Serial Output (Arduino Serial Monitor) shows 11 values again and again. It seems that after the initial check only 3 values are sent. Can you confirm? here's the pic of my hardware mod.

solomondg (author)Fairlane2014-01-19

The Force Trainer, unlike the Mindflex, only outputs the 3 values, not all 11.

adamsunny (author)Fairlane2012-05-28

I'm having the same problem - I can get the Attention and Meditation values to come up in a live feed and graph, but I can't get any of the other values (brain waves) to feed in except for the initial output when I first turn on the unit.

gerjimi (author)adamsunny2013-09-17

Any solution on this? I have the exact same problem. First read has all the values, but thereafter there is only 3.

Fairlane (author)gerjimi2013-09-17

I never heard back regarding this.

Matienzo (author)2013-11-15

Hi there
I keep getting 200,0,0 as the only values and I’ve already checked the connection with other wires and it seems fine. Numbers don’t lie so I'm doing something wrong. Here is what I get from first line to the sixth:
And so on..

I’m getting the data directly from the EEG chip (pin “t”) to the RX in my arduino and also sharing the ground.
Any clue?

krisimpossible (author)2012-01-10

I've successfully made one of these before, but am having the same problem as Fairlane--the repeated monitor output is:

[0] "200"
[1] "0"
[2] "0"

Does anyone have any info on this problem? Any info would be great!

gerjimi (author)krisimpossible2013-09-21

Where you able to resolve this issue? I am getting the same problem here. At the beginning I got only the 3 first readings ok but now they are showing 200, 0, 0 and I am not getting any of the other readings.

ideationnetworks (author)gerjimi2013-10-08

200 means there is an issue with the connection. You will not see eSense values (attention/meditation) unless you have 0 where you have 200.

danielemur (author)2013-04-11

How would this compare to other EEG devices, specifically the Neurosky Mindwave? Would the sampling rate (I think that's what it's called) be less, or would it be significantly less accurate? Lastly, could this be used to measure sleep cycles of a person?

theassassinpig (author)2013-03-24

READ the readme

leonvaldez (author)2012-12-14

"Fairlane says: Oct 24, 2011. 3:07 PMReply
Ok so I originally get the 11 values when I first turn on the Force Trainer headset, however then I can only get the Attention, Meditation, and Connection Status information. Interestingly, if I turn the headset on and off continuously, the Brain Serial Output (Arduino Serial Monitor) shows 11 values again and again. It seems that after the initial check only 3 values are sent. Can you confirm? here's the pic of my hardware mod."

I'm having the same problem and I already made my own program using the brain.cpp functions and it cant get me the values. I thought maybe I damaged the eeg chip when i was soldering it, but I just put all the pieces together and check if the toy was working properly and it was. Also, I start my own serial reading code and I'm getting serial numbers, but I just need a reference to interpret correctly the data.

I would appreciate if somebody know how to solve the problem with the original code. It would save a lot of my hobby time

leonvaldez (author)2012-12-11

Same problem here

Nick_Tesla (author)2012-12-10


Hey , it says serial does not run in 64 bit mode when i try to play it, suggestions???

DeusXMachina (author)2011-09-15

I could have used this 'ible about six month ago. I have the Mindflex and I ended up getting the Neurosky Mindset, which is basically a version of the Mindflex headset streamlined for getting the FFT information. At a cost of $200. Yours does pretty much the same thing. But the Mindset is wireless, which is nice :)

somnonaut (author)DeusXMachina2012-10-18

What do you do when you desire a different derivation of EEG than FPz to A1? Can the user plug in different electrodes to use in the Mindset? Or do they have to use that stupid arm on the forehead?

DeusXMachina (author)somnonaut2012-10-19

You really don't have many options. I'm not an electrical engineer, but from what I've read from those who have taken the Neurosky EEG platform (which is the basis for Mindflex and the Mindset) apart, is that they use an active electrode with onboard signal processing.

It seems to me it would be easier to build your own EEG than to try to modify the Mindset to accept multiple electrodes.

I've stuck the Mindset to other parts of my scalp, which is awkward because of the armature, and tend to just get squirrely results and poor signal.

somnonaut (author)DeusXMachina2012-10-19

What do you suggest for a starter to begin desiging an arduino and learning the intrinsics of the coding, which I really have a tough time with.

iamdenteddisk (author)2011-09-16

a truely wonderfull iable, I love it. Also I wouldn't worry about the mains shock warning. As an EE I see it is possible for it to be hazardous but not likely.

I just wouldn't use it while taking abath licking an extension chord and making toast. Geez with these safety finatics these days we will soon have to install bumbers and airbags on our kids to keep them from getting hurt by playing together..somewhere you just got to come to terms we will all eventualy get it, untill then have fun..Kudos with the proj!

somnonaut (author)iamdenteddisk2012-10-18

How about in the rain, or when sweaty and touching a ground TV cart. C'mon, the risk of electocution is there. I got shocked by an improperly grounded hospital bed once while performing a sleep study on someone.

adamsunny (author)2012-05-26

If you check out the demo video for the Emotiv Epoc, that is probably the closest you'll come to controlling a videogame with your mind. Their demo video shows a man learning to rotate a virtual cube in various directions and making it disappear and reappear on screen. The Epoc has more sensors than the NeuroSky, but it's about three times the price (NeuroSky $100 / Epoc $300), too, and their proprietary software is extremely expensive.

morlok (author)2012-03-10

My contribution to the community, Mindflex Duel hack, 50Hz conversion, and output raw.

yepanothergeek (author)2012-02-21

Ok, I'm new here - does the author reply to these, or how does one get his attention?

Being a PIC micro person myself, I was inquiring what the baud rate is - 9600, 8 data, 1 stop bit???


ThePablo69 (author)2012-02-09

I am going to see if I can attach this to one of those t-shirt equalizers. An EEG t-shirt haha :D

valexander2 (author)2011-12-06

C:\Users\Vincenzo\Documents\arduino-1.0-windows\arduino-1.0\libraries\Brain/Brain.h:14: note: Brain::Brain(const Brain&)
BrainSerialOut.cpp: In function 'void loop()':
BrainSerialOut.pde:-1: error: 'class Brain' has no member named 'update'

I keep getting this error in Arduino and I don't know what it means. Please help?

Thanks you~

seems to be a defective brain

About This Instructable




Bio: I'm a full stack web developer focusing on security and privacy.
More by frenzy:Make a WreathVegan ThanksgivingWireless DeadDrop
Add instructable to: