Escolar Documentos
Profissional Documentos
Cultura Documentos
Login (/account/login)
(/tag/type-id/) | Sign
Create
Up (/account/gopro?sourcea=header&sourceaUrl=/id/Control-A-Computer-With-Your-Mind/?ALLSTEPS)
(/about/submit.jsp)
Contests
Community (/community/)
let's make (/contest/)
(/)
(/)
(/id/intel/)
(/tag/type-id/category-workshop/channel-gardening/?sort=FEATURED)
(/tag/type-id/category-outside/channel-bikes/?sort=FEATURED
(/tag/type-id/category-technology/channe
License:
505 favorites
gigafide
(/member/gigafide/)
Youtube Channel
(http://www.youtube.com/gigafide)
(/member/gigafide/)
Follow
217
More by gigafide
(http://cdn.instructables.com/FQY/2MYT/I8WW10PM/FQY2MYTI8WW10PM.LARGE.jpg)
(/id/Spooky-Interactive-
Controlling your computer with your mind definitely seems like something still out of
a sci-fi movie, but mind control is actually a relatively easy and cheap thing to
accomplish. Using a cheap EEG toy, let's use the power of our mind to send
commands to our computer. Theres a lot to do, so lets start tinkering
Projections)
(/id/Motion-ControlledUltrasonic-Lamp)
(/id/Google-Maps-ExerciseBike-Virtual-Bike-Ride)
Tags:
arduino (/tag/type-id/category-technology/keyw ordarduino/)
mind (/tag/type-id/category-technology/keyw ordmind/)
control (/tag/type-id/category-technology/keyw ordcontrol/)
sourcea=removeads&nxtPgName=Control+A+Computer+With+Your+Mind%21&nxtPg=/id/Control-A-Computer-With-Your-Mind/?
ALLSTEPS)
Related
This Instructable is based on a video series I did a while back. So for those of you
that are video learners, please check it out and support my channel! For those of
you that like the written step by step instructions, on to step two!
(http://cdn.instructables.com/FQK/63Y0/I8WW10N2/FQK63Y0I8WW10N2.LARGE.jpg)
(http://cdn.instructables.com/FD8/FLG4/I8WW10N3/FD8FLG4I8WW10N3.LARGE.jpg)
Here's the parts you need and the approximate prices at the time of writing this
post.
1. Star Wars Force Trainer (http://www.toy-a-rama.com/198_page_821579.htm)
(or other EEG headset (http://store.neurosky.com/collections/eeg-headsets)) =
$40
2. Arduino Uno (http://www.banggood.com/Wholesale-Arduino-Compatible-R3UNO-ATmega16U2-AVR-USB-Board-p-68537.html)= $7
3. Hard drive jumper = scavenged for free (or 0.35
(http://www.karlssonrobotics.com/cart/jumper-2-pin/?
gclid=Cj0KEQjwlYqoBRDajuaTvsyq1PQBEiQAEhSjnCONiNmTrC7I9RMSV9sNs
LWueIZGrkbT7-9p4s9GAPcaAhG98P8HAQ) if you can't scavenge)
Total is approximately $50
(http://cdn.instructables.com/FSN/AJ2W/I8WW10N9/FSNAJ2WI8WW10N9.LARGE.jpg)
(http://cdn.instructables.com/FPB/M461/I8WW10NA/FPBM461I8WW10NA.LARGE.jpg)
(http://cdn.instructables.com/FF5/SOCF/I8WW10N7/FF5SOCFI8WW10N7.LARGE.jpg)
In order to use the brain waves that the Star Wars Force Trainer receives, we need
to take it apart and connect to it. All we will need is the headset. The ball tube will
not be used for this project. One of the best things about this project is that it still
functions as a toy even after youve hacked it. So you dont have to worry about not
being able to play with it again once youve taken it apart.
1.
2.
3.
4.
5.
6.
On the headset, remove the batteries and the screws that hold the top plate on.
Locate the Neurosky EEG board, as pointed out on the left.
Solder(http://cdn.instructables.com/FD8/PHMP/I8WW10NB/FD8PHMPI8WW10NB.LARGE.jpg)
a wire to the T-Pin on the EEG board.
Solder a second wire to the Ground terminal on the battery case.
Drill or carve a small hole in the plastic casing that the wires can run through.
Put a small dab of hot glue on the wires after running them through the hole to
hold them in place.
Now youre headset should be ready for outputting data! Replace the batteries and
ensure everything is still working, and then screw the top casing back on. The next
part is connecting an Arduino to the headset to collect the data!
(http://cdn.instructables.com/F3C/0MK8/I8WW10NC/F3C0MK8I8WW10NC.LARGE.jpg)
(http://cdn.instructables.com/FMV/W4G9/I8WW10ND/FMVW4G9I8WW10ND.LARGE.jpg)
(http://cdn.instructables.com/FCF/UQ4F/I8WW10NE/FCFUQ4FI8WW10NE.LARGE.jpg)
(http://cdn.instructables.com/F8X/YOL7/I8WW10N4/F8XYOL7I8WW10N4.LARGE.jpg)
The next step is to get the EEG data from the headset onto our computers. In order
to do this, we need something that will convert it from raw data coming from wires to
readable data coming through USB. Well be using an Arduino for this. And heres
the steps well need to take to connect it all.
1. If you like, you can fasten the Arduino to the top of the headset using tape or
zip ties.(http://cdn.instructables.com/FG3/MK1T/I8WW10NF/FG3MK1TI8WW10NF.LARGE.jpg)
2. Connect the T pin wire from the headset to the RX pin on the Arduino.
3. Connect the Ground wire from the headset to a Ground pin on the Arduino.
4. Using a USB cable, connect the Arduino to your computer.
5. Download and install the Arduino software version 1.0.5.
6. The software doesnt work with any newer versions.
7. Before starting up the software, download and install the Arduino Brain library.
You want to place it in your Arduino Libraries folder.
8. Startup the software and load up the test program by going to File > Examples >
Brain > BrainSerialTest
9. Upload it to the Arduino (you may have to temporarily remove the RX wire in
order to do this)
10. Open up the serial console, put the headset on your head, turn it on, and see
what results you get!
11. The first number is the signal strength, the second is the attention value, and the
third is the mediation value.
***PLEASE NOTE*** If you continuously get a 200,0,0 as your status, this may be
due to a grounding issue with the headset. If you are using a laptop, unplug it and
let it run off of battery while your headset is plugged in to see if it fixes the issue.
(http://cdn.instructables.com/F0T/1MQ3/I8WW10MY/F0T1MQ3I8WW10MY.LARGE.jpg)
Unfortunately, in its purchased state, the Arduino Uno R2 and R3 cannot emulate a
keyboard and send keyboard commands to a computer. The Arduino Leonardo
(http://arduino.cc/en/Main/arduinoBoardLeonardo) can do this, but it would be ideal
if we did not have to purchase another Arduino just to simulate keystrokes. Luckily,
this tutorial by Kevin DeMarco (http://www.kevindemarco.com/2014/01/02/arduinouno-as-a-usb-hid-interface/)shows us a workaround that allows an Arduino Uno R3
and R2 to emulate a keyboard by resetting the Atmega chip.
If you are using Windows or Mac, you can follow the similar steps listed here
(http://arduino.cc/en/Hacking/DFUProgramming8U2).
Here are the steps for linux:
1. Place the hard drive jumper on the reset and ground Arduino pins as shown in
the image to the left.
2. Power on the Arduino by plugging it into your computers USB port.
3. Once you see the Arduino receive power, wait a few seconds and then remove
the jumper from the pins. This should place the Arduino in reset mode, and we
can now upload our own firmware.
(http://cdn.instructables.com/F8V/1G57/I8WW10MZ/F8V1G57I8WW10MZ.LARGE.jpg)
As mentioned in the previous step, with the Arduino in reset mode, we can upload
our own firmware to the Atmega chip. Why would we want to do this? Because it
will allow us to have the Arduino act as an HID keyboard. So heres the steps to get
started:
4. Download and unzip the custom firmware we will need for this project. This zip
file contains two hex files: Arduino-keyboard-0.3.hex and Arduino-usbserialuno.hex
1.
wget http://www.tinkernut.com/demos/arduino_hid/arduino_hid.zip
2.
unzip arduino_hid.zip
5. Use the DFU programmer to erase the chip, upload a new firmware, and reset
the chip. For this example, we will just upload an Atmega16u2 version of the
USB firmware.
1.
2.
3.
With the new firmware uploaded, you now have to power-cycle the Arduino. You
can do this by simply unplugging it and plugging it back in.
Vote!
by gigafide (/member/gigafide/)
Download (/id/Control-A-Computer-With-Your-Mind/?download=pdf)
(/id/Control-A-Computer-With-Your-Mind/)
Collection
(http://cdn.instructables.com/FMJ/PKNV/I8WW10N0/FMJPKNVI8WW10N0.LARGE.jpg)
We now know how to flash the firmware, so now we need to make it act like a
keyboard. So the first thing we need to do is write a simple program for the Arduino
that sends keystrokes to the serial console. How we send a keystroke? By using
this list of HID keyboard codes
(http://www.freebsddiary.org/APC/usb_hid_usages.php) to find the character you
want to send. Below is the sample code provided by Kevin DeMarco
(http://www.kevindemarco.com/2014/01/02/arduino-uno-as-a-usb-hid-interface/):
I Made it!
8 Steps
Favorite
Share
uint8_t buf[8] = {
0 }; /* Keyboard report buffer */
void setup()
{
Serial.begin(9600);
randomSeed(analogRead(0));
delay(200);
}
void loop()
{
delay(5000);
buf[0] = 0;
buf[2] = 0x15; // letter R
Serial.write(buf, 8);
releaseKey();
}
void releaseKey()
{
buf[0] = 0;
buf[2] = 0;
Serial.write(buf, 8); // Release key
}
Check this code for errors and then upload it to the Arduino. Now all thats left to do
is follow the same steps as in steps 2 and 3 to upload the Arduino Keyboard
firmware. Briefly, here are the
1.
2.
3.
4.
5.
(http://cdn.instructables.com/FTU/YSB9/I8WW10N1/FTUYSB9I8WW10N1.LARGE.jpg)
(http://cdn.instructables.com/FIL/JKOQ/I8WW10NK/FILJKOQI8WW10NK.LARGE.jpg)
The last step is to connect our EEG headset to the Arduino and edit the Arduino
code so that it sends a keyboard command everytime our Brain data reaches a
specific value. We can do this by opening up our Arduino code from the
Homemade Mind Control TV Remote (http://www.tinkernut.com/?p=9305) tutorial
and removing all the code references to the IR LED and commands and then
replacing them with our new keyboard commands. The final code should look
something similar to this:
#include <Brain.h>
Brain brain(Serial);
long interval = 500;
long previousMillis = 0;
int medValue;
uint8_t buf[8] = { 0 };
void setup() {
Serial.begin(9600);
randomSeed(analogRead(0));
delay(200);
}
void loop() {
if (brain.update()) {
Serial.println(brain.readCSV());
medValue = brain.readMeditation();
}
if(brain.readSignalQuality() == 0) {
if (medValue < 50) {
buf[0] = 0;
buf[2] = 0x17; // letter T
Serial.write(buf, 8);
delay(40);
releaseKey();
buf[0] = 0;
buf[2] = 0x0C; // letter I
Before we can upload it to the Arduino, however, we need to convert the Arduino
back into USB mode, so repeat Steps 2 and 3 for that.
And finally, once you have it uploaded to your Arduino, you will need to repeat step
4 to convert your Arduino back into keyboard mode.
If everything is successful, once you have your headset on and plugged into your
computer, once your meditation value drops below 50, you should see your
keyboard commands executed on the screen!
1-40 of
42
I Made it!
Add Images
Make Comment
Next (http://www.instructables.com/id/Control-A-Computer-With-Your-Mind/?
&sort=ACTIVE&limit=40&offset=40#DISCUSS)
Stan1y (/member/Stan1y/)
2 days ago
Reply
If you made it emulate a usb mouse left /right, up/ down, left and right click it would
code and be able to interface with almost any normal PC or mac soft
ware
(/member/Stan1y/)
need less
Zulubo (/member/Zulubo/)
7 minutes ago
Reply
Hahah! I actually have this toy already! Time to put it to good use...
(/member/Zulubo/)
jerbs (/member/jerbs/)
33 minutes ago
Reply
I've created an EEG with my Mind Flex before (http://frontiernerds.com/brainguessing this tutorial should work for the Mind Flex as well?
(/member/jerbs/)
hack), I'm
zcheek (/member/zcheek/)
2 hours ago
I had no idea you had an Instructables account!! I've been following you on
for a long time. Well, congreatulations on this build and also
congradulations because you now have a stalker on both sites. LOL
(/member/zcheek/)
YouTube
Reply
jiovine (/member/jiovine/)
9 hours ago
Reply
Hello,
(/member/jiovine/)
I like your project. I'm wondering if it can be ported over to a PIC microcontroller.
Do you know what the raw data signals are from the T pin wire? I go the idea it
might be serial data output from this statement :
***PLEASE NOTE*** If you continuously get a 200,0,0 as your status,
Thanks,
John
jiovine
7 hours ago
Reply
(/member/gigafide/)
attention, and
jiovine (/member/jiovine/)
gigafide
3 hours ago
Reply
Yes thank you for that information. But do you know how the numbers are
T pin wire? Is it a serial output? If so do you know the baud
rate and protocol?
Thanks,
John
jiovine (/member/jiovine/)
gigafide
4 hours ago
Reply
Yes, thank you for that, but how are those numbers coming off the T pin
Is it serial data? If so, do you know the baud rate, and protocol?
wire?
(/member/jiovine/)
perfo (/member/perfo/)
4 hours ago
Reply
A nice ible thanks... it got me thinking (pun intended). How many different signals
can you detect reliably. For example could I set something up with eight states
(/member/perfo/)
and reliably pick one of those states using this set up ?
Like a remote control car for example if you have speed +- turn left right ie just
digital states but you would need them to be repeatable and reliable?
I would also be trying to do it with a raspberry pi, mainly as I have a few of them..
Thanks
ThomasL2 (/member/ThomasL2/)
yesterday
Reply
This is awesome! I'm beyond impressed. Question for you. The Star Wars Force
sold out at the store link provided. Looks like it's running for about $85
everywhere else. So I'm looking to purchase an EEG headset from Neurosky
(The MindWave Mobile Starter Kit). Would the instructions to complete this
project be the same or quite different/ more complex using the Neurosky unit?
Thanks!
(/member/ThomasL2/)
Trainer is
dick55 (/member/dick55/)
ThomasL2
4 hours ago
Reply
ThomasL2
7 hours ago
Reply
Yes. The Neurosky headsets all use the same chip, and they have the
benefit of providing more data. The Force Trainer only provides 3
values (connection, attention, mediation), but the newer Neurosky
headsets provide at least 6 different values. This tutorial will still work for
connecting to those as well.
(/member/gigafide/)
added
5 hours ago
Reply
5 hours ago
Reply
GregQ (/member/GregQ/)
...they make u lift up big rocks with the power of your brain
(/member/GregQ/)
yesterday
Reply
Just4Fun
6 hours ago
Reply
Thanks
(/member/gigafide/)
for the vote! It's kind of difficult to do specific controls with this unit,
mainly because it's so hard to maintain specific meditation or attention
values. The interference I received was based primarily on what computer
I used and whether it was grounded or not. I had more connection issues
on my Mac laptop than my Windows laptop, and I had more connection
issues with my Windows laptop than my Linux laptop. That has more to do
with the hardware than the OS, but the point is that it took a lot of trial and
error to figure out what worked best.
Epic 8 mm (/member/Epic+8+mm+/)
yesterday
Were you able to get this to function as a full keyboard? Or does it only have
control of a couple of commands?
(/member/Epic+8+mm+/)
Reply
Epic 8 mm
7 hours ago
Reply
You can set parameters to control as many functions as you need. But the
unit, is that it's hard to train your mind to hit
specific values consistently.
(/member/gigafide/)
difficulty, especially with this
arpruss (/member/arpruss/)
11 hours ago
Reply
My apologies if you mentioned this and I missed it, but for safety, you really don't
want the headset to be connected by wire to a computer plugged into the AC.
(/member/arpruss/)
Plus this will probably increase the electrical noise. You could use a Bluetooth
board (the headset should have enough power for an HC-06 and then you can
skip the Arduino) as in some other Instructables (including one of mine) or you
could just use an unplugged laptop (though the electrical noise may be an issue).
gregjd5000 (/member/gregjd5000/)
arpruss
10 hours ago
Reply
arpruss (/member/arpruss/)
gregjd5000
8 hours ago
Reply
gregjd5000 (/member/gregjd5000/)
arpruss
7 hours ago
Reply
(/member/gregjd5000/)
brain signals, using
As for the interference from touching your laptop: I suspect that the
interference is because you are measuring bodily signals while effectively
grounding your body. While this doesn't completely kill your measurement
because of the ~500kOhm resistance path, it relocates the reference
point (the ground) from on your head to somewhere far from your head.
So the signals you measure no longer are from point to point on your
head but from your head to the end of your arm. Depending on the
configuration of the sensor, you may also introduce a ground loop that will
cause additional noise.
schabanow (/member/schabanow/)
arpruss
9 hours ago
Reply
(/member/schabanow/)
You'll be safe
Tamashii32 (/member/Tamashii32/)
9 hours ago
Reply
7 hours ago
Reply
what if you just have a really, really, really short attention span
(/member/Tamashii32/)
Tamashii32
bombastinator (/member/bombastinator/)
11 hours ago
Reply
Claiming you're controlling it "with your mind" is a cute magic trick, but that's not
what you are actually doing. The problem is there are muscles all over the front of
(/member/bombastinator/)
your head, and their electrical signals are orders of magnitude greater than those
your brain makes. Any sensor placed over a muscle, even a tiny one will register
only the movement of that muscle. ALL of your sensor points are over muscles.
What you are actually doing is small muscle biofeedback. Nothing wrong with
that. It works. But it's not mind control any more than if you moved something with
your arm. It just looks like it is.
DennisF (/member/DennisF/)
bombastinator
8 hours ago
Reply
I wonder if it really makes any difference when you consider how it's to be
that if this device can be configured to emulate a keyboard, it
could potentially emulate a pointing device or game controller. I'm thinking
about how this could be mashed with a VR headset.
(/member/DennisF/)
used. I think
I'm not too crazy about this (yet) as I remember how it felt to be connected
to a EKG. The glue works too well and removing the pads was painful
when it ripped out the hair on my arms, chest and legs. Not very nice. I'd
have to know more about the sensors before I'd be willing to put them on
my head.
masczone (/member/masczone/)
bombastinator
10 hours ago
Reply
You are incorrect. EEG leads are designed to pick up brainwaves. Even
over muscles on the head. It is true however that muscle activity can
(/member/masczone/)
interfere with signal. But brain waves have different signal.
For example. In my job we place people on EKG machine and it picks up
a PQRS signal for the heart even if you are moving. These leads are not
placed over the heart but on LA, RA, LL, RL.
Frank30509 (/member/Frank30509/)
Reply
jamericanfreddy. (/member/jamericanfreddy./)
9 hours ago
Reply
good project,i made a design using epoc EEG headset for my robot design
(/member/jamericanfreddy./)
http://sheppard.ru/articles/fe/brain/index.shtml - about 10
yers ago with invasive data-pins
10 hours ago
Reply
(http://cdn.instructables.com/F5C/2ABS/I916CEHI/F5C2ABSI916CEHI.LARGE.jpg)
justin.tuttle.31 (/member/justin.tuttle.31/)
15 hours ago
Reply
This is nice! Just a thought...I wonder if it would be possible to send the keyboard
phone, or phone application? If this is possible you might also be
able to use auto-correct of preemptive text to construct sentences. To make the
code simple, maybe all letters could be categorized into numbers 0-9, just like old
flip phones were when texting, you would have have to press the number "2",
three times to get the letter "C". I think a more challenging part about this would
be that you would have to be able to get 10 different brain signals/readings to
distinguish between each number category, this might be pretty challenging/not
possible if you are not able to read your brainwaves while the arduino is being
used as a keyboard. But maybe with the addition of the Leonardo it could? Just
ideas, very nice project and instructable....
(/member/justin.tuttle.31/)
signal to your
umbra_fulmen (/member/umbra_fulmen/)
yesterday
Reply
can you make it so it can do each letter of the alphabet or is it not accurate
each letter of the alphabet it wouldn't be hard to put a caps
lock function; caps lock would be better than a shift function because instead of
52 functions you have to remember it would only be 27 functions you would have
to remember, but you would have to remember to enable and disable caps lock
(/member/umbra_fulmen/)
enough? if it can do
ngnak (/member/ngnak/)
yesterday
Reply
2 days ago
Reply
KNEXnCoding (/member/KNEXnCoding/)
Wow, you made this sound so easy. This is actually really amazing.
(/member/KNEXnCoding/)
skygaunt (/member/skygaunt/)
2 days ago
Reply
2 days ago
Reply
(http://cdn.instructables.com/FGW/R5Z6/I8UV1Q2I/FGWR5Z6I8UV1Q2I.LARGE.jpg)
McTapeNinja (/member/McTapeNinja/)
Sweet, I've actually thought about this for replacement of limbs, iron man armor :|
and other things, I'm seriously considering trying this
(/member/McTapeNinja/)
iceberg742 (/member/iceberg742/)
2 days ago
Reply
Well done bud. One thing that comes to mind (pun intended) could you use this to
control a usb robotic arm though the computer?
(/member/iceberg742/)
ayan1992 (/member/ayan1992/)
2 days ago
Reply
2 days ago
Reply
huuuuuu am amezed
(/member/ayan1992/)
pabdullah (/member/pabdullah/)
1-40 of
42
Next (http://www.instructables.com/id/Control-A-Computer-With-Your-Mind/?
&sort=ACTIVE&limit=40&offset=40#DISCUSS)
I Made it!
Add Images
Make Comment
About Us
Find Us
Facebook (http://www.facebook.com/instructables)
Advertise (/advertise/)
Youtube (http://www.youtube.com/user/instructablestv)
Contact (/about/contact.jsp)
Twitter (http://www.twitter.com/instructables)
Jobs (/community/Positions-available-at-Instructables/)
Help (/id/how-to-write-a-great-instructable/)
Resources
Pinterest (http://www.pinterest.com/instructables)
Google+ (https://plus.google.com/+instructables)
enter email
Tumblr (http://instructables.tumblr.com)
Join!
Mobile
Terms
(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721)
|
Artists of
inService
Residence
(http://www.autodesk.com/artist-in-residence/home)
English
Privacy
(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
Gift ProStatement
Account (/account/give?sourcea=footer)
Legal
Notices
& Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site (http://m.instructables.com)
Forums
(/community/)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
Answers (/tag/type-question/?sort=RECENT)
2015 Autodesk, Inc.
Sitemap (/sitemap/)
Android
(https://play.google.com/store/apps/details?
id=com.adsk.instructables)
iOS
(https://itunes.apple.com/app/instructables/id586765571)
Windows
(http://apps.microsoft.com/windows/enus/app/7afc8194-c771-441a-959054250d6a8300)