Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Food Living Outside Play Technology Workshop

Mind Controlled Robotic Arm


by LeelaKrishna on May 5, 2014

Table of Contents

Mind Controlled Robotic Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Mind Controlled Robotic Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 2: Contruction of Inmoov Robotic Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 3: Powering Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 4: Coding for Robotic Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 5: Mind Control Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 6: Training the arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Step 7: Make it work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

http://www.instructables.com/id/Mind-Controlled-Robotic-Arm/
Intro: Mind Controlled Robotic Arm
This is a project I did for my Google Science Fair Entry. Please check it out and vote for me when it becomes available.

This is a video of the hand being controlled by the brain opening and closing:

More videos will be on as soon as I get them uploaded

Today, millions are suffering due to the lack of a functional arm preventing them from doing things we take for granted. Until about five years ago, the idea that these
people could have a prosthetic arm that wouldn’t just serve for aesthetic reasons, but instead would act as a way for them to regain functionality with natural control via
the brain seemed highly far-fetched. Recently, groundbreaking ways to do just that have been successfully developed. These systems, still in development, either
connect to existing neurons or to electrodes implanted into the brain to decode the signals from the brain and use them to control a robotic arm. Although they are a great
way to help the disabled, these new systems are very costly to develop. The surgery required is very complicated and costly. The robotic arms that these systems use
are also extremely pricey. The whole system requires hundreds of thousands to millions of dollars to develop. I wondered If I could develop a system that is affordable to
most of those who need it. After doing research, I discovered alternative ways to achieve the task which employs different technologies and components for a fraction of
the cost. This robotic arm based on the Inmoov project costs less than $200 dollars for its construction and the brain interface uses a $300 headset from Emotiv. Overall
this $500 price tag is almost nothing compared to the hundreds of thousands to millions of dollars required for the current technology. This will successfully enable many
more people in need to be able to utilize the available technologies to its fullest potential and restore not only their limbs, but also their lives.

http://www.instructables.com/id/Mind-Controlled-Robotic-Arm/
Step 1: Materials
Robotic arm:

All the parts required to build the Inmoov arm which can be found at Inmoov.fr
The robotic arm I made is partly different from this but it can be made without them. For cost efficiency, I do although use different servos which I explain in the next step

Control system:
Emotiv EEG Headset+software

Step 2: Contruction of Inmoov Robotic Arm


In the beginning, I had plans to design and build my own robotic arm that would have every function of a regular human one. Because I would be using my public
library’s 3d printer and I didn’t have one of my own, I would have been unable to prototype regularly make changes through testing. When I came across Inmoov, an
open source 3d printed humanoid project, I had decided the best path would be to make and use an iteration of its arm. The arm part of Inmoov acts very similar to a
human’s and would be very helpful. I used its design as a base making changes to have it fit my function. I had also used different parts in the case of some servo
motors where I could find ones very similar from different sources for about half the price. I coded each degree of motion to correspond with two buttons on the keyboard,
one for each direction. When one of these buttons is pressed, the arm moves in that direction for however long it is held.

I will not go into much detail here on how to build the robotic arm due to the fact that it is covered well on Inmoov.fr

You can get the files for the 3d printed pieces here:
http://www.thingiverse.com/thing:17773
http://www.thingiverse.com/thing:65274
http://www.thingiverse.com/thing:30654
http://www.thingiverse.com/thing:40040

Instead of the HB802 servos use these: http://hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=21821


they are much cheaper but just as good

http://www.instructables.com/id/Mind-Controlled-Robotic-Arm/
Step 3: Powering Arm
I used a 5000 mah 7.2v 2s Li-po battery which I bought off of Hobbyking which I duct taped onto my project enclosure. I also used a 20a sbec to bring the voltage down to
the 6v that the motors can use. To control the whole arm, I used an Arduino Mega although a Uno will do just fine.

Step 4: Coding for Robotic Arm


For this code, the thumb-pinky is attached to pin 2-6 respectively
the writs is connected to 6, bicep piston to 7, bicep rotational to 8, shoulder piston to 9 and shoulder rotational to 10;
To move the pinky in use q and to move it out use a. The two letters to its right (w and s) control the ring finger and so on so forth until the t and the g which control the
thumb. C closes every finger and v opens every finger. Y and H control the wrist, U and J the Bicep up and down. I and K control the bicep rotation. O and L control the
shoulder up and down. P and ;(semi colon) contorl the shoulder roation.

The Code I used is as follows:

#include <Servo.h>
//Ser servospu
Servo pinky;
Servo ring;
Servo middle;
Servo index;
Servo thumb;
Servo wrist;
Servo bipiston;
Servo birotate;
Servo shorotate;
Servo shopiston;
char val;
int ppos = 0;
int rpos = 0;
int mpos = 0;
int ipos = 0;
int tpos = 0;
int wpos = 180;
int bppos = 0;
int brpos = 65;
int srpos = 0;
int sppos = 0;
void setup()
{
//Show which servo is connected to which pin
pinky.attach(6);
ring.attach(5);
middle.attach(4);
index.attach(3);

http://www.instructables.com/id/Mind-Controlled-Robotic-Arm/
thumb.attach(2);
wrist.attach(6);
bipiston.attach(7);
birot.attach(8);
shopiston.attach(9);
shorot.attach(10);
//set all servos to open position
pinky.write(0);
ring.write(0);
middle.write(0);
index.write(0);
thumb.write(0);
wrist.write(180);
bipistion.write(0);
birot.write(0);
shopiston.write(0);
shorot.write(0);
Serial.begin(9600); //start serial output at 9600
Serial.println("WE WORK!!");
}
void loop()
{
if (Serial.available()) {
val = Serial.read();
if (val == 'q') {
ppos = 180;
pinky.write(ppos);
}
if (val == 'a') {
ppos = 0;
pinky.write(ppos);
}
if (val == 'w') {
rpos = 180;
ring.write(rpos);
}
if (val == 's') {
rpos = 0;
ring.write(rpos);
}
if (val == 'e') {
mpos = 180;
middle.write(mpos);
}
if (val == 'd') {
mpos = 0;
middle.write(mpos);
}
if (val == 'r') {
ipos = 180;
index.write(ipos);
}
if (val == 'f') {
ipos = 0;
index.write(ipos);
}
if (val == 't') {
tpos = 180;
thumb.write(tpos);
}
if (val == 'g') {
tpos = 0;
thumb.write(tpos);
}
if (val == 'y') {
wpos = 0;
wrist.write(wpos);
}
if (val == 'h') {
wpos = 200;
wrist.write(wpos);
}
if (val == 'c') {
ppos = 180;
pinky.write(ppos);
ring.write(ppos);
middle.write(ppos);
index.write(ppos);
thumb.write(ppos);
}
if (val == 'v') {
ppos = 0;
pinky.write(ppos);

http://www.instructables.com/id/Mind-Controlled-Robotic-Arm/
ring.write(ppos);
middle.write(ppos);
index.write(ppos);
thumb.write(ppos);
}
if (val == 'u') {
bppos = 90;
bipiston.write(bppos);
}
if (val == 'j') {
bppos = 0;
bipiston.write(bppos);
}
if (val == 'i') {
brpos = 90;
birot.write(bppos);
}
if (val == 'k') {
brpos = 0;
birot.write(bppos);
}
if (val == 'o') {
sppos = 90;
shopiston.write(bppos);
}
if (val == 'l') {
sppos = 0;
shopiston.write(bppos);
}
if (val == 'p') {
srpos = 90;
shorot.write(bppos);
}
if (val == ';') {
srpos = 0;
shorot.write(bppos);
}
}
}

Step 5: Mind Control Interface


This is the most important part of the system which makes it interesting.

Looking a the available choices, the EEG headset and the EKG sensors seemed to be the only methods of control which allowed for a low budget and didn’t require
surgery. Of these two, I saw the EEG headset as the clear preferable method. The EKG sensors require muscle contractions the area above the prosthetic. First of all,
this restricts it to people who still can control that muscle which rules out anyone who is disabled due paralysis or something similar rather than amputation. It also means
that without nerve rerouting, not all of the arm can be controlled. Of the EEG headsets, the one that stood out to me was the 300 dollar Emotiv EPOC headset due to its
14 sensors that can pick up cognitive thought compared to the cheaper ones that only sensed concentration levels.
To control the robotic arm with this device, I had the program track my brainwaves as I imagined the possible positions of my arm. To train it with my mind, I gave it many
sets of information of my brainwaves. This way, when it sees those patterns again, it know which position I was imagining. Originally I had imagined the movement itself
but this proved to be difficult to recognize because it was a set of thoughts rather than one continuous thought. After it was able to detect each though, I had programmed
it to type a letter for that thought that corresponds with the one programmed into the the arm. This letter would then be entered into a communication port which went to
the robotic arm.

http://www.instructables.com/id/Mind-Controlled-Robotic-Arm/
Step 6: Training the arm
To get the eeg headset to recognize the motions I tricked the Emotiv Control panel into thinking my thoughts of one of the actions as the preset 'bringing an onscreen
cube forward" I set up a different preset function with a direction for each degree of motion. (Look at pictures to understand). After each motion is set up and you give
enough data for it to consistently detect your thoughts, go into Emokey and set up rules. Each rule should have a condition as one of the cognitive thought motions that
you trained and an output key that is held corresponding to the letter that is programmed for that motion. For mine, instead of training each finger, I trained the thoughts of
close and open.

Image Notes Image Notes


1. Set to one of these and train one motion for each of them. Do many sets of 1. Set up rules and have a key for each of the motions you trained
training until you have a consistent thought tracking 2. Set up the condition here based on which one you trained
2. Instead of training each of these to the motion it tells you to, train them with
http://www.instructables.com/id/Mind-Controlled-Robotic-Arm/
different motions of the arm. You should give each motion a large set of data
through training sessions until it can consistently track your thoughts

Step 7: Make it work


Launch a serial communication port at 9600 baud rate with the arduino via Putty. Put on the headset and turn Emokey on. Click into Putty so that any key entered by
Emokey goes into the comunication port. Thats it! Imagine the thoughts you trained and see them at work coming to life.

Related Instructables

Fun with an
DIY Prosthetic Arduino, or how
Mr Roboto by Sculpture Robot
Hand & Forearm I learned to love Arduino Robot
(Voice sparten11 (Part 5 of 9):
DIY Robotic myrobotlab Arm by yhtomitsy Making a
Hand Controlled Controlled) by software... by Robotic Arm
by a Glove and Mizchief100 nomasfilms with Chainsaw
Arduino by & Sawzall Axe
dschurman (video) by
morganrauscher

Advertisements

Comments
2 comments Add Comment

audreyobscura says: May 5, 2014. 11:23 PM REPLY


Awesome - will you let me know if you decide to share your circuit diagram? Thanks!

Audrey

thebear1 says: May 5, 2014. 10:48 PM REPLY


very good job on this keep up the good work you are doing

thanks for sharing this

http://www.instructables.com/id/Mind-Controlled-Robotic-Arm/

You might also like