Introduction: How to Build a Robotic Arm

Picture of How to Build a Robotic Arm

update: https://www.youtube.com/watch?v=BILiuqRmLRI

want to build the controller go to here

the video's:

http://www.youtube.com/watch?v=N9z7OQLlhrE

http://www.youtube.com/watch?v=jozshuI246o&feature=youtu.be

http://www.youtube.com/watch?v=onQIzR5C8qk

http://youtu.be/2mlR9QT1glo

https://www.youtube.com/watch?v=NkxTk2-RJ8A

http://youtu.be/FBZaummBF0s

making thee:
http://youtu.be/xH1IZFku0w0


hello everyone,

a while ago i was watching a program about a car factory, and they used robotic arm´s to put the car´s thogetter.
that was the moment were i got the idea of bulduig my one helping hand.
so a time ago i started building on this arm.
and now it is completed.
and i am conna show you how you can build one, or get you some idea´s.

to stared whit i whil sow you were it is build from;
for moving the robotic arm i used 6 servo´s
te body is build from 2mm lexan.
the statif is from a old disco ball (the part were the motor was mounted in)
and i used a distance sensor, and a 10mm led.

the brain is now a arduino, and a power circuit board.
the power it selve come´s from a computer power supply.


in this instructable i whil sow you how to build a robotic arm, and how to use the power supply
i hoop you enjoy it, and if you enjoy please vote for the contest´s

Who doesn't whant a thirt arm on their desk what can help you whit everything you want.
if you ask my it is a real enprovment to your lab.

and it cost less than $100 dollar :)

update in step 4, it now light's up in the dark :)

Step 1: Getting the Parts

Picture of Getting the Parts

oke let´s start building on this thing.
before we can start we need to get some part´s and plan´s.
what you whil need;


-6 servo´s (i used 2x mg946, 2x mg995, 2xf utuba s3003(mg995/mg946 is better then the futuba s3003, but they are much cheaper)) about 10 dollar a piece
-lexan 2mm (and a smal piece of 4mm) if you don´t have any, about 5 dollar for a nice piece
-distance sensor (hc-sr04) about 5 dollar
-10mm led (any color you like) 0,50 dollar
-stative (you need a box or someting like that to put your arm on) saved ;)
-claw(you can buy one on the internet) about 15 dollar

brain:

-arduino uno (i am working on my own comtroller, but arduino works fine) about 15 dollar
-power circuit board ( you need to make this, i come on this later, but it is not that spacial) free, you make it your self :)
-power supply (i used one from a old pc)  free!!
-pc to program the arm (when you are using a arduino you can use arduino developmer tool. whitch you can download from there site www.arduino.cc ) free (if you already have one)

you whil need some wire´s and basic tools
like a solder iron and solder. if you have them or lend them the are free to

now we got al the parts we can start building.

Step 2: Building the Body

Picture of Building the Body

Oke lets build the body, before we start i need to say that i have no drawing of it. I just did it out of my head. It principal is pritty simple
You have two rows of lexan to mount the servo's on tose long lexan pieces. And two rows to put the servo's in the rows whit two holes in it. and a U bracked piece on the end. The hand for the arm i jusy bought from the internet. I mounted almost everything whit screws. Becaus when you do somtimg wrong you can change it very eassy
the numbers behind the parts, can you find in the picture.
The lengt if the first part(1) is about 19 cm
And the second part(2) is about 17,5 cm
An the lengt of the front part(3) is 5,5 cm
For the rest it is a bit standaart just look what the besy demencions are for your robot, depents how big or small you want him. for the rest it doesn't realy matter what size you are using.

Now you probely have a idea of building your robitic arm.
The arm needs to rotate 180 degrees total. So we need to ad a servo under the robot. Make a hole in the box and put the servo in there. And screw the arm to the servo. I mount a ring(4) arount the servo so there was no distance between the box and the arm. You can do this if you need it.

To place the distance sensor i used a pice of 2mm lexan and screwed it to the robot hand. I also put a 10 mm led under the hand

You probely need a spring to help to servos for a better movement.

It is hard to explane how to build this, beceaus it is different for everyone. It just depents on the stuff you have/buy. For example if you have bigger servos you need other lexan parts.
And you need to calibrate your robot so it is straight. And whit other parts it is diffrent(so it is not shaking and has a nice movement).
If it is shaking you can ad some weight to the arm. This probely solve the problem

When you build your one body you need to make the servo motor wires longer. Just grap some wire (i used a internet cable whit´s i cut open) and solder 3 pin headers to it. Some heatsinking over it and stick it in the conector. and make a other female connector on the other side. to connect it to the power supply board.

Now we have the body we can move on to the brain :)

Step 3: Using the Robotic Claw

Picture of Using the Robotic Claw

for the installing of the robotic claw, you need;
a servo(can be a futuba s3003 (or another standaard servo) mg995 or mg946 wil work the best))
and you need some screws

so what do you do.
you take a servo bracked and cut it until it fits in the robotic claw.
than you need to use two smal screws to put it in place.

next you take the servo and twist it al the way to the left
now you need to close the claw.

now you are able to put the servo in place with 4 bolds, make sure the servo is al the way twisted to the left
and that the claw is closed when mounting the servo in.
or the claw won't open at all.

now you can plug the servo in to a arduino or a servo tester
if you did it al correct you have now a succes operating robotic claw


make sure that the bolds on the moving parts are not over tightened
or it won't work great.

Step 4: Hardware Update

Picture of Hardware Update

i made a lite update to the robotic arm.
i insert some lights what lights up in the dark.
i used a simple circuit what is really easy to make.

http://www.youtube.com/watch?v=N9z7OQLlhrE

the only thing you need to do, is to find a place to put you led's in.

circuit;
if you prefer you can change the R1 resistor by a 100k ohm potenionmeter.
so it wil light up with more or less light.
and for R2 i used a 118 ohm resistor what works fine wily using 7 led's

if you whant a contra effect you just change R1 with the LDR and it wily light up in the light
and sut's down in the dark.


so the parts;
-R1 100k ohm ressistor
-R2 118ohm ressistor
-bc547 transistor
-LDR
-7 led's 5mm(can be any color)
-on/off switch

Step 5: The Brain

Picture of The Brain

For the brain i used a arduino. Until i finised my one controller.

I used a conector from a pc module to connect the powerboard whit the power supply
If you connect red and blank to a multiemeter
You wil see 5v (for the servos and the distance sensor)
And whit yellow and black you get 12v (for the arduino)
What i did is pritty simple
I made 5 servo connectors, solder the positive in parall to 5v and negative to ground
I did the same whit the ds sensor

Then i solder some pinheaders and connected the signals pins of the servos to they pinheaders and the 2 middel pins from they sensor also.
Now we can connect it whit the arduino by using some jumpers
it doesnt matter whits pin you connect it on the arduino. As long as you say in your program that you connected it to that pin.

On the powerboard i also ad a led to indicate the power is on. Just add a 100 ohm ressistor to 5v, and the other and of the led to ground. And your done. :)

the 10mm led on the robot is just connected the the arduino, a ressistor of 100 ohm goes from pin 13 to the positive pin from the led and  the negative goes to ground.
you can turn it on and off in you program.

i used 5 servo connector´s for 6 servo´s, beceaus the 2 servo´s on the bottem are using the same signal. you need to solder those wires to getter, and plug them in to the power board

we need some power now, don´t use a adapter for this, it just can´t handel the power what the arm needs.
use a pc power supply, just connect the green wire whit a black wire. and the powersupply run´s and give´s you power.
if you don´t connect these wire´s nothing happend, you need to bind these wire´s together.

the signal pins from the servo motors, can you just plug in to a pwm channel on your arduino. that are the pins whit this before it ~
the distance sensor can you plug in to pin 6 and 7. and the led to 13 and ground. that are al the pins that you need to use.
it doesn´t matter how you cennect the servo´s as long as this symboly ~ stands for the pin number. 

Now you can program the arduino
Make sure you turn the powersupply off before pluging the usb cable in.
And remove the usb when you want to test your code on your robotic arm.
otherwishe the aruido gets 5v from the usb and 12 from the power supply
and the power of the usb goes in to the powersupply and the powersuppply whil sut down (for security ressons).

The phone connector you can see on the picture is just a connector for the distance sensor. But you can use any connector you like. 

like you can see in the scematic, i ad a Potentiometer to control the servo. the only thin you need to do is to repeat this whit 5 signals voor the 6 servo´s. the pot is not nessersery but the code won´t work if you dont ad the Potentiometer´s.
the other 5 Potentiometer can you just plug in to anolog pin 0,1,2,3 and 4

Step 6: Program and Using

Picture of Program and Using

You can simply write a code c++
For example you can say

myservo.writeMicroseconds(somthing between the 0 and 3000)

This way you can make a nice movement.
i will uplode a video for more details soon.
And if you are better you can use the distance sensor and let him react to that(see the next step).


I used 5 Potentiometer to control the arm(if you want you can use 1 potentionmeter and two joysticks,if you have them). the scematic can you find in the previos stap. the code can you find here.
just plug everything in and have some fun.

Here are some video's of the arm im working
I hope you like it. And have an idea about making you own.

the video's:
http://www.youtube.com/watch?v=N9z7OQLlhrE

http://www.youtube.com/watch?v=jozshuI246o&feature=youtu.be

http://www.youtube.com/watch?v=onQIzR5C8qk

https://www.youtube.com/watch?v=NkxTk2-RJ8A

http://youtu.be/2mlR9QT1glo

http://youtu.be/FBZaummBF0s

making thee:
http://youtu.be/xH1IZFku0w0

Sorry if my englisch wasn't that good, but i do my best.

In the video's you whil see the robotic arm how it is now. i had to change my desing a couple of times and replace parts. And servo's beceaus the servos i used in The begining, were to weak you need to use a mg995 or mg946, only the servo for the hand and to rotate the arm, can be a cheap servo (futuba s3003), but a mg995 or mg946 would by better

the code.


// Controlling a servo position using a potentiometer (variable resistor)
// modified by Attila Tullner
//10k ohm potentiometer

#include



int led = 13;
Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;
Servo myservo5;

int potpin = 0; // analog pin used to connect the potentiometer
int potpin1 =1;
int potpin2 =2;
int potpin3 =3;
int potpin4 =4;
int val; // variable to read the value from the analog pin

void setup()
{
myservo1.attach(3);
myservo2.attach(5);
myservo3.attach(9);
myservo4.attach(10);
myservo5.attach(11);
pinMode(led, OUTPUT);
}

void loop()
{ //servo 1 analog pin 0
val = analogRead(potpin); // reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
myservo1.write(val); // sets the servo position according to the scaled value
delay(15); // waits for the servo to get there

val = analogRead(potpin1); // servo 2 analog pin 1
val = map(val, 0, 1023, 0, 179);
myservo2.write(val);
delay(15);

val = analogRead(potpin2); // servo 3 analog pin 2
val = map(val, 0, 1023, 0, 179);
myservo3.write(val);
delay(15);

val = analogRead(potpin3); // servo 4 analog pin 3
val = map(val, 0, 1023, 0, 179);
myservo4.write(val);
delay(15);

val = analogRead(potpin4); // servo 5 analog pin 4
val = map(val, 0, 1023, 0, 179);
myservo5.write(val);
delay(15);
}

Step 7: Programming With the Distance Sensor

Picture of Programming With the Distance Sensor

this is probely the greatest thing of the robotic arm
it has a distance sensor, and it can react to that
i wil sow you how you are able to program that by you own.

it is written in c++
the first thing you see is this

#define trigPin 7                            //toevoegen aan code
#define echoPin 6        
#define led 13
#include <Servo.h>

now we are including the servo's, led, and the distance sensor to the code. you don't have to change anything on here.

after that you see this;

Servo myservo1;                             //naam geven
Servo myservo2;
Servo myservo3;
Servo myservo4;     
Servo myservo5;

now have we give al the 5 signals(6 servo's) a name(can be anything you like)

next;

void setup() {
  Serial.begin (9600);
  pinMode(trigPin, OUTPUT);                   //aanstluiting op arduino
  pinMode(echoPin, INPUT);
  pinMode(led, OUTPUT);
  myservo1.attach(3);
  myservo2.attach(5);
  myservo3.attach(9);
  myservo4.attach(10);
  myservo5.attach(11);

}
now we are telling the arduino to which pin the servo's and distance sensor are connected, again you don't have to touch this

next;

void position1(){                          // positie 1
   
    digitalWrite(led, HIGH);      // led goes on
    myservo2.writeMicroseconds(1300);
    myservo3.writeMicroseconds(1300);
    myservo4.writeMicroseconds(800);
    myservo5.writeMicroseconds(1000);
    }
this is something you can change, i made a position and call this position1. now i  can use this position later on in my code.
if you want an other movement, change the numbers between the () to something between the 0 and 3000.

after;
void position2(){                             //positie 2
     
      digitalWrite(led,LOW);       // led goes out
      myservo2.writeMicroseconds(1200);
      myservo3.writeMicroseconds(1300);
      myservo4.writeMicroseconds(1400);
      myservo5.writeMicroseconds(2200);
}
this is the same as before only this is my position2, now you can modified the position's and add more if you want.

then you see this;

void loop() {
  long duration, distance;
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2) / 29.1;

now the real code start working, don't touch this part this is just something to set the distance sensor up.

and then;

if (distance <= 30) {                     //do positie 1
  position1();
}
  else {
  position2();                              //do positie 2
}
 
   if (distance < 10) {
      myservo5.writeMicroseconds(2200);       //open klauw
}
  else {
  
     myservo5.writeMicroseconds(1000);          //sluit klauw
}
-------------------------------------------------------------------------------------
now you can add a movement to a distance. you do that this way.
if(distance <=30){  //you are now saying, if the distance is less or is 30 cm. he goes to position1
position1();    //the arm mow does everything you put between those brakeds { }
}

else{            //  if the distance is greater than 30 cm it does position2
position()2    // it does now everything you put between tose brakeds { }
}

now you can ad this whit every distance you like, and let him do anything you like.


the lest part of the code.

if (distance > 30 || distance <= 0){
    Serial.println("Out of range");             //buiten berijk, als het groter dan 30 of kleiner dan 0 is
   
  }
  else {
    Serial.print(distance);
    Serial.println(" cm");                     //distance in cm
  
  
  }
  delay(500);                                      //wacht 0,5 seconde
}

you don't have to change anything here, the only thing could be that you change "cm" into "inch" but i haven't tried that yet. so i don't now or that will work great.


i hope you now al understand  how you can make your one movement to a distance.

have fun with you robotic arm

Step 8: Future

Picture of Future

i work on more code´s to get a better robotic arm, when i have new code´s i wil upload them.
the software can do the big thing, you can let him do anything you like
can be realy handy. but it is on you to desside what to do whit it.
i have now everything mounted inside the box, so no lose wire´s anymore.
you can control the arm now by using some potionenmeters or with the disstance sensor

and if you don't now were this arm is good for. 
think again.

program him so it can brush you theet, or make your coffee
who doesn't whant that, so start building today.
and get a cheap buttler ;)




Step 9: Vote and Search

Picture of Vote and Search

If you like this instructable.
Please vote for the make your lab, and hacking hardware contest.
and follow my

If you have any comments please leave them behind

i hope you have now some good idea's about building your own robotic arm.

thanks for reading (or just watching the picture's)

Comments

Mohammed Nasir khan (author)2017-08-02

what is the proper application of it ?????

jjack10 (author)2017-01-10

may i get the c code ?

WarCatss (author)jjack102017-07-27

If you use an arduino, it's the same as described and it's C++ , it's very very similar to C

KushalD2 (author)2017-03-05

hey man great project.I'm trying to build the same but the two servos connected at bottom are not in sync.any suggestions.

btw im using two mg995 there.

WarCatss (author)KushalD22017-07-27

I think you just need to do something like a reverse on one of your servos like this:

servo1.writeMicroseconds(position);

servo2.writeMicroseconds(3000 - position);

clue1me (author)2017-05-31

Hey!! Could you provide the clear picture or a sketch of how you placed your servo motors.

Jeremy galland (author)2016-10-05

Hi can someone explain me what is the power circuit board and where I can buy one. very nice robot :-)

ViditG1 (author)Jeremy galland2017-03-11

It's a printed circuit board, the author's English ain't very good (no offense meant), you can buy one at a sparkfun https://www.sparkfun.com/products/11021

PridhviM (author)2016-12-21

It's a printed circuit board, not a powered circuit board. You're killing me right now. Otherwise, this seems like a great tutorial. Seriously though, I'm dying right now. The powering is killing me. Several interesting applications could be outside; however, one would need to waterproof the entire design. Any recommendations?

amadeusz_trzaska (author)2015-11-19

Can i use onle the mg995 servos??? Will it work? How you have combined the parts 1,2,3 with each other? Can you send me some fotos? My email amadeusz.trzaska@gmail.com

005735 (author)amadeusz_trzaska 2016-11-18

yes you can. the only difference should be how strong the servo is.

ahdx' (author)2016-10-13

Hello, can you show the arm´s layout please?

Thank you

izlank (author)2016-10-04

can you show the arm's layout? i need it

skjfj c (author)2016-09-29

ow lon does i take

styles1 (author)2016-03-28

can we use any other servos ?

Jojo_mohd248 (author)2016-03-26

How long did it take u to do the whole thing?

Kokem (author)2015-12-19

man that is totaly awesome but i wanna it to record and repeat motion do u know how plss answer :)

amadeusz526 (author)Kokem2016-01-20

http://letsmakerobots.com/robot/project/micro-servo-robot

amadeusz526 (author)2015-12-28

Will it work with arduino leonardo?

RiteshYadav (author)2015-11-30

these

RiteshYadav (author)2015-11-30

can you please provide me its dimension of all parts as I am a bit confused and specially the gripper. also can it be made out of these geared motors rather than servo.

omodolor.stevedan (author)2015-10-18

i made template for this particular project with autocad, if you want it tell me

Can you please e mail me one.

can i have a copy of it?

Me too

okay, i will give you the foto version, i cut it with laser, advise dont use this servo mentioned if you want it to be as big as it is now because you are going to have a lot of problems, i advise you to get better servos, i used this servos and it was a problematic

Thank you so much

hope i helped

siddhant maurya (author)2015-11-18

[robotic arm home made - YouTube]. Have a look at it! https://m.youtube.com/watch?v=rnFP42gii4k

RishikeshC (author)2015-10-15

I want to make it but I can't understamd the code whole
Could you put the entire code in one place that would be very helpful thank you

videosforeverything (author)2015-09-15

You have great project , so please make an update info with better information , like how to make the body , how to connect cables step by step , the circuit etc, this woulb be better for someone to make your project.

Hello,

Thanks for the advice, I am thinking to update the project for a while now. The only down side is that it takes a lot of time, with isn't a real problem, but it is hard to spend time you don't have. I wil take a look for making a update, or a new intractable with instruction that are more clear.

Furthermore, I have to admit that this intractable isn't the clearest one around... anyway I was only 16 when I made it, so therefor it contains a lot of up and down sides. As soon as I have some spare time left, I will look at updating my design.

Thanks for the advice,

Deattila

SudheerK1 (author)2015-08-15

I want to make an arm of total length about 100 cm can you please tell me how much torque motors i should use at the base instead of 11kgf-cm motors which you used for about 50 cm length

SudheerK1 (author)SudheerK12015-08-15

i am thinking of using acrylic glass as the body

Science102 (author)2015-08-01

How much weight could this robot arm lift?

HiroH (author)2015-03-03

wow. this tech is off the hooks!

omodolor.stevedan (author)2015-01-10

which code did you use, the arduino code o c++

omodolor.stevedan (author)2015-01-10

how much does it cost in total and please can you send me the sizes of the structure, i would to build it for my school's project

VijayK4 (author)2015-01-04

Hi Attila,

Thanks a lot for detailed instructions on building this project. It's easy for me to figure out software & electronics part but I would really appreciate little more help on building the robotic arm hardware part.

Can you please either share few more pictures or small video of robotic arm showing where/how all servos & arms are attached to each other? (as well as how 2 servos in the base are attached to arm)

thanks in advance

psycho.maggot (author)2014-12-22

Could you give me the clear picture of the servo inside the box?.. i want to know how you placing that servo. thanks.

drknoodles (author)2014-12-10

do you have a template for the body or did you just buy it somewhere?

deattila (author)drknoodles2014-12-11

i made the body out of lexan(plastic glass) but i do not have a template of it. i simple drew it on the lexan and cut it out. and the black box under need the arm, comes from a old disco ball. that was the part were the brushel was placed, to rotate the disco ball. but you can you any kind of box for it.

i hope this helps

psycho.maggot (author)2014-12-01

Could i using the same 6x Servo TowerPro SG90 ?.. or did need a change in code?.. because

futuba s3003 was hard to find in my country :(

deattila (author)psycho.maggot2014-12-02

no that would work just fine.

you shouldn't come across any problems.

psycho.maggot (author)deattila2014-12-03

so its possible right if i using 6x Servo TowerPro SG90?. here the link:

http://datasheet.sparkgo.com.br/SG90Servo.pdf

deattila (author)psycho.maggot2014-12-03

yes and no, it would work. because, it are simple servo's.

no, because, it are micro servo. and they have a really small torch. you can use them, but your arm needs to be much lighter and smaller. if you really want to use those servo's.

i recommend you to get servo's that have a higher torch, and metal gears.

hope it helps.

psycho.maggot (author)deattila2014-12-04

thank you for your clear answer. i think i should using higher servos as you said "to get servo's that have a higher torch, and metal gears." i know the sg90 was little than TowerPro MG995 but sg90 more cheaper. one more answer, could you give me the clear picture of the arm?. the specific of making that hand. thank you.

ali_takewan (author)2014-12-02

Hello,Special thanks for your efforts, I really want to build your robot, but I need your help.can you send to me mechanical design and sketches of this robot arm?

my email: ali_takewan@yhaoo.com

john.monica.5 (author)2014-11-01

What is the total weight of your robotic arm?

deattila (author)john.monica.52014-12-02

not sure? but it is as light as possible.

especially the end of the arm, were the gripper is.

jou wil need to save as much weight as you can, so the servo's don't have to handel that much force.

About This Instructable

252,568views

234favorites

License:

More by deattila:Control Your Robotic Arm, The Cool WayEasy and cool clap Switch. Everybody Can Make ThisHow to build a robotic arm
Add instructable to: