Introduction: 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
- 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
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
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
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
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: http://github.com/kitschpatrol/Processing-Brain-Grapher/zipball/master
you'll also need this library to run the processing code: http://www.sojamo.de/libraries/controlP5/
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
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!

Participated in the
4th Epilog Challenge
1 Person Made This Project!
- mastallama made it!
87 Comments
5 years ago
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.
Reply 2 years ago
for me i was using a modded force trainer II and after changing 9700 in the serial.begin(9700) I just changed it to 57600 so it would instead read serial.begin(57600)
Tip 2 years ago
درباره eeg بیشتر بخوانید:
https://wiki.redronic.com/
Question 3 years ago on Introduction
Any tips for hooking it up to a mac?
7 years ago
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
Reply 4 years ago
Thanks - helped a little bit but my program still doesn't run
4 years ago on Step 6
Very nice writeup! Thanks!
We had trouble with the software you suggested, and re-wrote it to use the Arduino Serial Plotter (which is now built into the Arduino IDE). The Star Wars Force Trainer II also used a faster 57600 baud link, and that may be part of why there are difficulties with the library code you suggested (if you don't go to all trouble to do "cooperative multitasking," the way we did in our re-write). Looking at the graph you show above, it sure looks like you were hitting some of these problems, causing *all* the graphs to periodically drop to zero <oops>, so you *might* want to give the code below a try.
I can see from the comments that some folks *tried* to run at 9600 baud, and that just won't work no matter what (at least with Force Trainer like the one we purchased). We also added buttons to select which band you wish to graph/watch, which makes for a cute display. (a tiny edit to the startup code in the rewrite can change the default, if you really want to see all the graphs at the same time, and you don't want to bother hooking up the 10 pushbutton switches).
If other folks want to take a look, visit: https://github.com/JimRoskind/NeuroskyHacking/
Reply 4 years ago
How should I connect the code to my Force Trainer II? Sorry I'm a beginner
Question 4 years ago
Thanks for the instructable!
I have a Force Trainer II, I've done the soldering and uploaded the code to the Arduino, connected the T pin to the RX(0) Arduino pin and the battery ground cable to the Arduino ground. Still, I don't get any updates on the serial interface - readCSV() always returns 200,0,0 and readErrors() is empty.
How is the neural circuit supposed to be powered? Does the Arduino USB power suffice? Or is the 1.5 AAA battery still required? Do I have to connect the positive battery cable to the Arduino 3.3V or 5V power supply?
Answer 4 years ago
I have the exact same problem. Did you ever manage to solve it?
6 years ago
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
Reply 4 years ago
I'm going down the same route, since the Force Trainer 2 has bluetooth integrated into it.
Although long term, I will likely integrate to some intermediate layer, such as an Arduino so I can control devices with it, in the short term, I want to first look at the data being collected, and then possibly work up an application to aid in maintaining the desired brainwave state. And that's a lot easier to do on my desktop than it is with an arduino.
6 years ago
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?
6 years ago
Amazing!
6 years ago
i have problem to download software,can somebody explain to me how to do it?
6 years ago
a mouse control would be awesome
7 years ago
Seeing you stare at the computer screen while wearing it makes me wonder if you could scroll with it. That would be awesome.
Reply 6 years ago
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!"
https://youtu.be/sYh9_QmNwRA
7 years ago
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 http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
7 years ago on Introduction
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...