How to hack EEG toys with arduino

 by frenzy
Featured
brain1.jpg
DSC_0051.JPG
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. 


 
Remove these adsRemove these ads by Signing Up
1-40 of 53Next »
kingvicc says: Apr 21, 2013. 1:28 AM
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!
Screen Shot 2013-04-21 at 1.27.31 AM.png
danielemur says: Apr 11, 2013. 2:41 PM
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 says: Mar 24, 2013. 6:21 PM
AHHHHHHHH THE BRAIN TEST ARDUINO EXAMPLE SAYS


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
scci in reply to theassassinpigApr 2, 2013. 9:32 AM
make sure you have the brian library declared
theassassinpig says: Mar 24, 2013. 6:23 PM
READ the readme
leonvaldez says: Dec 14, 2012. 7:40 AM
"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 says: Dec 11, 2012. 12:36 AM
Same problem here
scci says: Dec 10, 2012. 1:16 PM
HELP????

Hey , it says serial does not run in 64 bit mode when i try to play it, suggestions???
DeusXMachina says: Sep 15, 2011. 5:09 PM
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 in reply to DeusXMachinaOct 18, 2012. 5:59 PM
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 in reply to somnonautOct 19, 2012. 5:56 AM
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 in reply to DeusXMachinaOct 19, 2012. 6:52 AM
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 says: Sep 16, 2011. 1:04 PM
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 in reply to iamdenteddiskOct 18, 2012. 5:57 PM
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.
Fairlane says: Oct 24, 2011. 3:07 PM
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.

IMG_2580.JPG
adamsunny in reply to FairlaneMay 28, 2012. 10:43 PM
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.
adamsunny says: May 26, 2012. 5:17 PM
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 says: Mar 10, 2012. 2:46 AM
My contribution to the community, Mindflex Duel hack, 50Hz conversion, and output raw.

http://morloklabs.blogspot.com/2011/12/mindflex-duel-hacking-conversion-50hz-y.html
yepanothergeek says: Feb 21, 2012. 10:27 AM
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???

YAG
ThePablo69 says: Feb 9, 2012. 5:32 PM
I am going to see if I can attach this to one of those t-shirt equalizers. An EEG t-shirt haha :D
krisimpossible says: Jan 10, 2012. 9:44 PM
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!
valexander2 says: Dec 6, 2011. 1:12 PM
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~
blackbeardlion in reply to valexander2Dec 9, 2011. 5:22 AM
seems to be a defective brain
kolp says: Nov 30, 2011. 3:38 PM
Help Needed: Does anyone know how to make a EEG/windows laptop interface that would allow one to record P300 brainwave "latency" (speed) and "amplitude" (power) readings using the oddball paradigm evoked potential? There are university neuro labs with big-time equipment to take such measurements. Someday maybe there will be a simple IPAD application. Thanks, guys.
tox1cchicken says: Nov 6, 2011. 1:46 PM
would anyone feel like making me one of these? I'm trying to do some research on Binaural Beats. and would like to have a "EEG" that doesn't break my bank.
iMan1 says: Oct 8, 2011. 12:52 PM
Hi, so this is REALLY great, except that when i run the processing code, it says, ArrayIndexOutOfBoundsException: 0 in the following line of code:
serial = new Serial(this, Serial.list()[0], 9600); please help!
esqeezme says: Oct 2, 2011. 5:39 PM
This is my first time working with Arduino. I managed to make all connections and see lines of three number values scrolling in the serial monitor window when running serial out example. I need help getting the graphs to pop up. Step by step instructions would be great. Also, should there be more than three values displayed in the serial monitor? Thanks for a great project.
rrostine in reply to esqeezmeOct 7, 2011. 11:50 AM
This stumped me at first, too. I realized that he means you should load that visualizing code to Processing. You can download it here: http://processing.org/ You load the code and run it much the same way as you would Arduino. Also, you'll probably have to create a sketchbook folder called "libraries" for the library (controlP5) you'll need to run it. Mine went to: /Users/*myname*/Documents/Processing/Libraries. You can see where your sketchbook folder location is by checking your preferences in Processing. Hope that helps!
esqeezme in reply to rrostineOct 8, 2011. 9:21 AM
Thanks for the quick response. I must be doing something wrong. I keep getting errors. I hate to ask but, can you give me an "idiot-proof" step-by-step instruction list? I understand if this is too much, I am very new to Arduino but would like to sue this set-up.
Thanks
to'barr says: Oct 2, 2011. 8:42 PM
so can re reverse this and put signals into the brain?
meztek says: Sep 30, 2011. 8:11 PM
Wow! As soon as I saw this, I simply had to give it a try. Brain wave reading is one of those things I've always wanted to do.

So I have a properly hacked headset and the graph program works on my computer. However, when I connect the headset to my computer, only attention and meditation give values. The other columns of the graph remain empty.

Any suggestions? How can I fix it?
jmellen says: Sep 26, 2011. 9:22 AM
I wonder if this process would work with the NEO alarm clock sensor. I bought one a while back (poor choice) and it might get higher resolution results. Assuming that more $$$ = better info but I could be wrong. The sensor is wireless but I'm guessing encrypted.
jaymztheking says: Sep 22, 2011. 1:37 PM
I'm curious to see if you are able to train yourself to manipulate the various wave measures independently. My initial suspicion is that we only have one variable (concentrating and unconcentrating) which doesn't leave us with much. But if we can train our brains to increase/decrease alpha, gamma, theta, et al waves independently, then screw tetris we can make mind controlled quadcopters.
eecharlie says: Sep 15, 2011. 11:35 AM
Not to be a wet blanket, but there's a safety oversight here that is very important to be aware of. Have you noticed that every consumer EEG toy on the market is wireless? Not a single one has a cable to your computer, which might be annoying but imagine at how much higher bandwidth you could record signals from the brain. Why is this?

The GNU OpenEEG project has a fairly clear explanation and warning on this, and states unequivocally that you should never build a system that has both electrodes in contact with your head and a connection to an AC mains supply (however indirect):
http://openeeg.sourceforge.net/doc/WARNING.html
It's not only that the EEG electrodes could potentially electrocute you if you made an amazing mistake, but (much more likely) that if you happened to electrocute yourself via AC mains in some other way while wearing the EEG, then the AC current would be highly likely to travel through your brain on its way to ground via the EEG system. That would be very bad.

You'll find an abbreviated version of this warning in the hardware hack instructions by the author of the Arduino Brain Library: http://frontiernerds.com/brain-hack

A friend of mine makes an Arduino variant with built-in Zigbee communication capabilities that might be a good substitute for this application, allowing the EEG measurement circuit to be battery-powered and wireless, although I have not investigated thoroughly: http://www.logos-electro.com/zigduino/

A much quicker fix is to only use this system with a laptop (that is not plugged in).

Frenzy, I think you'd be doing a favor to the community if you added these caveats to your instructable for those who don't read all the comments.
Pazzerz in reply to eecharlieSep 15, 2011. 5:20 PM
Does any part of the main board of the computer have mains voltage?
willrandship in reply to PazzerzSep 15, 2011. 7:54 PM
Well, technically all of it does, just regulated.

You don't really need it wireless, you can just use an isolator (which fails open, so no electrocution) for the data line, and use batteries to power the arduino. That way nothing can happen.

But then, the whole issue is really paranoia. Just because the health risk is higher when it does fail doesn't mean it'll fail more often.
Pazzerz in reply to willrandshipSep 16, 2011. 6:12 AM
The correct answer is "No". That regulated power is DC, not AC, it is plus and minus 12 and 5 volts and nowadays I believe even regulated to 3 or less for certain components. I've had my bare hands touching the bare wires on a live board before.... and nothing happened. On top of that, you have a port that the 'EEG' goes through, which has its own safety measures, then you have to go through the arduino board. Doesn't sound like a big safety hazard to me. Quite frankly, the safety measures that most engineers want you to take in regard to communications ports is for the safety of the port and internal electronics, because they burn out faster than a light bulb on a paint mixer. Personally, from lots of experience I wouldn't worry too much about the 'safety' factor on this one. If you must, use an emitter/collector LED setup (comes in a single package) and isolate with light!

I must agree, though, there is a lot of paranoia about very many of the projects listed on this sight, thanks to a lot of dubious lawsuits on commercial products, including hot Mickey D's coffee. A simple, 'Do this at your own risk' disclaimer is sufficient. Apparently the author is still around and kicking, so I wonder what the fuss is really all about. Eh?
willrandship in reply to PazzerzSep 16, 2011. 6:16 PM
For commercial EEG products, they actually require a $9000 license from a test for ability for power surges to alter the connections hooked to the electrodes. Paranoia for sure, but still necessary.

An "at your own risk" wouldn't hold up too well against a dead person, or a vegetable, which is what you'd be dealing with in a bad situation.
azigta says: Sep 15, 2011. 2:42 PM
Please, could you report on progress with this project, updating in the instructable your progress? This is awesome!
mikeasaurus says: Sep 12, 2011. 8:44 PM
Rad! How long before mind controlled NES Tetris is set up?
1-40 of 53Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!