# Specific 3D Printing Applications / Fields / Conferences > 3D Printing in Robotics >  Mind controlled Prosthetics Project

## Geoff

Heya!

Like most good ideas you have, it often pays to google it before you shout "Eureka!!" turns out some kid in India did EXACTLY what I am about to describe, only with a crudely made hand, but still.. he beat me to it, by a year or so... lol..  but I didn't let that stop me.  :Stick Out Tongue: 

Well, this is my story. A while back I saw a Star Wars toy that came with a brainwave scanner that let you control this little foam ball travelling up and down a tube, which is basically a fan blowing air and is controlled by the users Alpha/Beta waves. The idea was you "use the force" to control the ball. Here is a video of one in action..  I looked into the tech behind the headset. Turns out they were available but a little expensive for a hobby project. So I waited until the price was reasonable (currently about $100) and bought myself one. It's called a Mindwave kit by Neurosky. 

At first I admit I had nothing but fanciful science fiction ideas... but as I made a few prosthetic hands and robotic hands, I started looking into whether you could interface this headset with something that a simpleton like myself could understand. My programming skills extend to mostly english based languages.. basic, Pascal, mono... I was never very C friendly (visual C maybe... ) but anyway, I did actually find exactly what I was looking for.  I am currently at the stage where I am starting to interface servos with this. Ideally I would like to take several streams from the headset and control the robotic Inmoov hand with it, or that is the desired final outcome.

All the prosthetics out there at the moment usually rely on some form of muscle involvement to make the actuator retract or open, but what if they have no muscle control, or no arm at all (like one of the people I work with that lost his arm in a car accident) ??

So, thought control. Is it possible? is it hard? could I even come close to getting something like that to work? well.. you never know if you never try.

P.S This is also a tutorial. If you want to get into controlling robots with your mind, I suggest you read on!  :Smile:  I am going from step 0 to step 10 today....
*
First* you need the above Headset. *Make sure it is for your country!!!!* I got mine off Ebay.

Neurosky Headsets in America run at *60hz!*
Neurosky Headsets in Asia/Australia  run at *50hz!* 

No, not joking. Make sure you get the right one, apparently our brains work differently says the company (hey... don't shoot the messenger...  :Stick Out Tongue: ) Luckily I did my research first.

Everything in this thread I learned from here
The support for this thing is pretty good, once I finish this project I will use the headset for game development most likely, it has great Unity support.




> Parts you will need to interface to the Arduino:
> 
> 
>  MindWave Mobile Arduino *(I used a UNO, you can use whatever you want, 2560 is ok also)* BlueSMiRF Silver/Gold, https://www.sparkfun.com/products/10269 Terminal software, such as CoolTerm, RealTerm, or Terminal Arduino development environmentBluetooth dongle, if your computer does not have internal bluetooth capabilities
> 
> 
> And for the First experiment they suggest you will need the above and:
> Avago HDSP-4832 10-Element LED bar graph array 4 75Ω resistors 6 47Ω resistors Breadboard 12V Power Source (included with Arduino Board)


*In a nutshell?*

What we are doing is reading the basic values from the headset, sending them to a Bluetooth modem attached to the arduino. In the example, it uses a LED bar that goes from Red to green - the more relaxed you are the more green, focus on something and it goes into the Red.

The code can be found here

So far I have successfully managed to get it all working  :Big Grin:  :Wink:  :Smile:  

Once again, this is simple if you follow the tutorial on this page step for step. Do not miss anything. 

_The most challenging part to be honest was resetting the Bluetooth modem's pair password to match the headset!!! _ everything else was pretty easy and I have to say pretty basic. 

The headset also Bluetooths to your Iphone and there are several apps you can test it out with, these really do seem to capture alot of data that's floating around up there. 

My daughter was helping me test it, I said "Think of a blank empty space.." 
My wife yells out "Daddy's head!"

Laughter follows...  :EEK!: 

Anyway, this is the current mess of spaghetti. ..



Circuit is VERY simple... 

Bluetooth modem GND/VCC to arduino, BT modem TX to Arduino RX, close the circuit / short RTS/CTS 

The HDSP 4832 LED , *the + Positive side is the one with the writing...* 



Before you Edit the Pairing code as below, MAKE SURE you know your Mindwave headset's MAC address. Pair the headset to your computer, then in windows it is in the devices/printers section of windows, right click, properties,  select hardware tab)




> So how do you sort out the Bluetooth modem's pairing? the below example borrowed from neuroskys tutorial... 
> 
> 
>  Once you power up your Arduino board and have the BlueSMiRF connected, you will see a red LED blink on your BlueSMiRF module. Pair the BlueSMiRF to your computer.  It will appear, as similar to, RN-42-5922.
>  The Default Baud Rate is 115200  Open your Terminal Software, and connect the BlueSMiRF.  The LED will turn green when it's connected.
>  This may take a few tries. You can power cycle the Arduino if you experience issues.  Be sure to enable “Local Echo” to be able to view your input commands.   To put the BlueSMiRF into COMMAND mode, type $$$.  Please reference this website: http://www.sparkfun.com/datasheets/W...uetooth-um.pdf
>  If successful, you will see “CMD”  Type: D
>  You will see the current configuration of the BlueSMiRF.  Now type: SP,0000
>  This will change the pincode from '1234' to '0000'  Now type: SM,3
> ...



*To be continued very very soon..

I am currently trying to get a solid enough activation of the servo, still is very jittery to mark any success.

Keep you posted!!


EDIT

 where did all the pictures go  ouch

*

----------


## Bassna

Wow lol, that's really cool. That is something that would change the world  :Wink:  I hope it goes good for you. It seem's a bit much for me to figure out still :P Keep us posted!

Side note - who would have thought that we have different brain wave frequency's in different countries o.O

----------


## gjhutty

This is a really neat project. It kind of reminds me of OpenBCI. I'm definately going to give this thread/instructable a shot!

----------


## Melodicpinpon

Hi, 

I have been studying the development of a 3D printed myo-electric prosthesis.
These EEG sensors are EMG capting the forehead muscle.
A good EMG sensor cost 350€, a low cost one 50€ but there is no potentiometer to adjust the sensibility, and it suffers much because of elecrostatic interferences.
If you have more accurate information about these sensors, please let me know.

Best regards, 

g.

----------


## raysspl

Mind blown. Looking forward to how this progresses.

----------


## mariafleming

Hm, this project is really interesting. Do you know when it will become real?

----------


## Geoff

> Hm, this project is really interesting. Do you know when it will become real?


The big shots have already used similar things but they are implanting them directly into the brain. 

The best I have managed to do is make a robotic hand open when you think happy thoughts and close when you think bad or angry thoughts.

They refer to these as "Focus" and "Relax" but really, after now several years playing with it I find it much more accurate when simply thinking Happy or Sad.

----------

