How to Make a Robotic Hand

by kkole0354 in Circuits > Arduino

76 Views, 1 Favorites, 0 Comments

How to Make a Robotic Hand

processed-2EA729A4-55D9-4354-8BBB-F54904D96A5A.jpeg

Today I will be explaining how to build a working robotic hand out of Styrofoam. This project is very cost effective and involves coding, building, and dealing with motors and Arduinos.

Supplies

Styrofoam (Preferably large pieces of it)

Wires and Breadboard

Battery and Battery Buckle

Rubber bands

Fishlines

Glue guns and utility knives

Arduino Board

Needle

Measuring the Hand

image_123650291.JPG

Materials Needed: Pencil, Styrofoam, Ruler

The first step to create the robotic hand is to measure out the hand. The way our group measured the hand is that we put my arm on the Styrofoam, then traced it out very accurately. After we traced it out, we measured the finger and noted the measurements down.

Cutting the Hand

image_123650291 (2).JPG

Materials Needed: Utility Knife

The second step is to cut out what we traced on the Styrofoam. We make sure that we cut the wrist, and then we cut the fingers. After we cut the wrist and fingers, we cut the fingers into 3 sections so they work like finger joints.

Adding Wires and Rubber Bands

image_123650291 (1).JPG

Materials Needed: Rubber Bands, Fishing lines, Hot Glue Gun, Paper Clips, Needle

After cutting the hand out, we have to add the wires and rubber bands to our hand.

We add the wires first to the hand. To add the wires, we use a needle and tie it to the fishing line.

We then thread the wire above the wrist and then through the fingers, and we do this for every finger.

After we do this, we use paper clips to secure the finger to the wrist so the the wire doesn't fall out.

Then, we add the rubber bands to the knuckle of each of the fingers. We cut the rubber bands into small pieces, then hot glue it to all the knuckles of each finger.

We finally hot glue the wire to the very top of the finger so that it does not fall out.

Adding the Motors

processed-629E1B54-9801-4D2F-9618-D2DC7DF12D50.jpeg

Materials Needed: Utility Knife, Arduino, Servos


To add the motors, we have to get our utility knife and make 2 small cutouts into the bottom of our robotic forearms for our servos so that the servos can fit inside the hand. After we create the cutouts, we ensure that the servos can fit in comfortably and then we hot glue the bottom of the cutout. After, we put the servos in it, and we do this to both servos. After we added the servos, we add hot glue to the bottom of the forearm and then we put the extra Styrofoam on to the forearm and glue it to the hand with hot glue. Finally after doing all of that, we add the Arduino to the extra Styrofoam and add all the wires to the pin.

Creating the Math Code

In the beginning of the code, we have to import the math library from our math code so that it recognizes the pi value.

After importing the math code, we have to get the float function so that we can identify the numbers.

After we add the float functions, we begin to add the actual equations which include multiplication(*), division(/), and addition (+). We then got the equations to work and calculate what we wanted the hand to do by saying something=(insert equation). Vrp=Lrp*Hrp*Wrp is an example. Vrp stands for volume of a rectangular prism. So in the code we are saying to get the volume of the rectangular prism it's equal to the length of the rectangular prism multiplied or * the height of the rectangular prism times the width of the rectangular prism.

Finally at the end of the code we added our print function which would write out our answers at the end where it would say "%2f"%. This is telling the code we need to get our number to the next two decimal places.

Here is the code below:

import math

Lrp = float(input("enter Length of Rectangular Prism: "))

Hrp = float(input("enter Height of Rectangular Prism: "))

Wrp = float(input("enter the Width of Rectangular Prism: "))

R = float(input("enter the Radius of the Truncated cylinder: "))

S1H1 = float(input("enter the first height of the first truncated cylinder: "))

S1H2 = float(input("enter the second height of the first truncated cylinder: "))

S2H1 = float(input("enter the first height of the second truncated cylinder: "))

S2H2 = float(input("enter the second height of the second truncated cylinder: "))

S3H1 = float(input("enter the first height of the third truncated cylinder: "))

S3H2 = float(input("enter the second height of the third truncated cylinder: "))

Rh = float(input("enter the radius of the hemisphere: "))

 

Vrp = Lrp * Hrp * Wrp

Vh = (math.pi * (4/3) * Rh**3)/2

Vs1 = R**2 * math.pi * (S1H1 + S1H2)/2

Vs2 = R**2 * math.pi * (S2H1 + S2H2)/2

Vs3 = R**2 * math.pi * (S3H1 + S3H2)/2

TV = Vs1 + Vs2 + Vs3 + Vh

Vwm = Vrp - TV

VC = math.pi * R**2 * Hrp

HS = (math.pi * (4/3) * Rh**3) /2

CwH = VC + HS

 

 print("volume of Rectangular Prism is %.2f"%Vrp)

print("volume of Hemisphere is %.2f"%Vh)

print("volume of section 1 truncated cylinder is %.2f"%Vs1)

print("volume of section 2 truncated cylinder is %.2f"%Vs2)

print("volume of section 3 truncated cylinder is %.2f"%Vs3)

print("Total volume of truncated cylinders and hemisphere is %.2f"%TV)

print("volume of wasted material is %.2f"%Vwm)

print("volume of cylinder is %.2f"%VC)

print("volume of cylinder with hemisphere is%.2f"%CwH)

Creating the Tech Code

We created the tech code using Tinkercad and I will explain how it works below.

The fire step in the code makes us include the servo library, which in turn allows Arduino to access and control the servo motors.

Then the next line of code is the code identifying the separate fingers, which allows for us to actually turn the fingers.

Then we added the void setup code. This makes it to where the Arduino can tell what pin each of the fingers will be connected to and the reason we did this is to make sure the Arduino knows what finger it is going to move.

Afterwards, we began creating the entire code using ".write", which makes data respond to a request, and then we did a (180) to turn the servos to 180 degrees with 0 not being folded or resting and 180 meaning fully closed.

We also experienced one problem in this code and that was that we needed a loop as without we would experience errors.

Here is the code below:

#include <Servo.h> //include the servo library


Servo thumb; //create a servo for the thumb

Servo index; //create a servo for the index

Servo middle; //create a servo for the Middle

Servo ring; //create a servo for the Ring

Servo pinky; //create a servo for the Pinky



void setup()

{

 thumb.attach(3); //plugged into pin 3

 index.attach(5); //plugged into pin 5

 middle.attach(9); //plugged into pin 9

 ring.attach(10); //plugged into pin 10

 pinky.attach(11); //plugged into pin 11

 

}


void loop()

{

}


void Peace()

{

 thumb.write(180); //turn servo to 0º

 index.write(0);//turn servo to 0º

 middle.write(0); //turn servo to 180º

 ring.write(180);//turn servo to 180º

 pinky.write(180); //turn servo to 0º

 

}


void shaka()

{

 thumb.write(0); //turn servo to 0º

 index.write(180);//turn servo to 0º

 middle.write(180); //turn servo to 180º

 ring.write(180);//turn servo to 180º

 pinky.write(0); //turn servo to 0º

}


void rocknroll()

{

 thumb.write(0); //turn servo to 0º

 index.write(0);//turn servo to 0º

 middle.write(180); //turn servo to 180º

 ring.write(180);//turn servo to 180º

 pinky.write(0); //turn servo to 0º

}


void Fingergun()

{

 thumb.write(0); //turn servo to 0º

 index.write(0);//turn servo to 0º

 middle.write(180); //turn servo to 180º

 ring.write(180);//turn servo to 180º

 pinky.write(180); //turn servo to 180


}


void one()

{


 thumb.write(180); //turn servo to 0º

 index.write(0);//turn servo to 0º

 middle.write(180); //turn servo to 180º

 ring.write(180);//turn servo to 180º

 pinky.write(180); //turn servo to 0º


}


void two()

{

 thumb.write(180); //turn servo to 0º

 index.write(0);//turn servo to 0º

 middle.write(0); //turn servo to 180º

 ring.write(180);//turn servo to 180º

 pinky.write(180); //turn servo to 0º


}


void three()

{

 thumb.write(180); //turn servo to 0º

 index.write(0);//turn servo to 0º

 middle.write(0); //turn servo to 180º

 ring.write(0);//turn servo to 180º

 pinky.write(180); //turn servo to 0º


}


void four()

{

 thumb.write(180); //turn servo to 0º

 index.write(0);//turn servo to 0º

 middle.write(0); //turn servo to 180º

 ring.write(0);//turn servo to 180º

 pinky.write(0); //turn servo to 0º


}


void five()

{

 thumb.write(0); //turn servo to 0º

 index.write(0);//turn servo to 0º

 middle.write(0); //turn servo to 180º

 ring.write(0);//turn servo to 180º

 pinky.write(0); //turn servo to 0º

 

}


void reset()

{

 thumb.write(180); //turn servo to 180

 delay(1000); // wait one second

 thumb.write(0); //turn servo to 0

 delay(1000);//wait one second

 index.write(180); //turn servo to 180

 delay(1000); // wait one second

 index.write(0); //turn servo to 0

 delay(1000);//wait one second

 middle.write(180); //turn servo to 180

 delay(1000); // wait one second

 middle.write(0); //turn servo to 0

 delay(1000);//wait one second

 ring.write(180); //turn servo to 180

 delay(1000); // wait one second

 ring.write(0); //turn servo to 0

 delay(1000);//wait one second

 pinky.write(180); //turn servo to 180

 delay(1000); // wait one second

 pinky.write(0); //turn servo to 0

 delay(1000);//wait one second

  

}

  

void pinch()

{

  thumb.write(0); //turn servo to 0º

 index.write(180);//turn servo to 0º

 middle.write(0); //turn servo to 180º

 ring.write(0);//turn servo to 180º

 pinky.write(0); //turn servo to 0º

}



Finished!

processed-4CBA4AB5-32D1-4DE9-A805-B61B154B48CA.jpeg

You have now finished creating your OWN robotic hand using Styrofoam. I hope you have had fun and learned new things about coding, building, and robotics.