DIY $200 Robotic Hand

 

Instructions for building the hand:

 

Instructions for building the controller:

 

Here is the code for using the controller and hand together:

/* 
Robotic Hand Control System
Uses 4 potentiometers to control a robotic hand.
(The ring finger and little finger are controlled by 1 servo)
by Aaron Thomen (www.SurfingReality.com)
*/

#include <Servo.h> 
 
Servo littleandringfinger;  // create servo object to control a servo 
Servo middlefinger;
Servo pointerfinger;
Servo thumb;
 
int littlepot = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin 
int middlepot = 1;
int val1;
int pointerpot = 2;
int val2;
int thumbpot = 3;
int val3;

void setup() 
{ 
  littleandringfinger.attach(12);  // attaches the servo on pin 12 to the servo object 
  middlefinger.attach(11);
  pointerfinger.attach(9);
  thumb.attach(10);
}
 
void loop() {
  val = analogRead(littlepot);  // reads the potentiometer (0 - 1023)
  val1 = analogRead(middlepot);
  val2 = analogRead(pointerpot);
  val3 = analogRead(thumbpot);
  val = map(val, 0, 1023, 179, 0);     // map pot value to servo limits (0 - 180)
  val1 = map(val1, 0, 1023, 179, 0);
  val2 = map(val2, 0, 1023, 179, 0);
  val3 = map(val3, 0, 1023, 0, 179);
  littleandringfinger.write(val);  // sets the servo position to the mapped value
  middlefinger.write(val1);
  pointerfinger.write(val2);
  thumb.write(val3);
  delay(15);
}


Here is the code for testing the hand:


//Test for Robotic Hand
//Moves fingers one at a time
//by Aaron Thomen www.SurfingReality.com

#include <Servo.h> 
 
Servo littleandringfinger;  // create servo object to control a servo 
Servo middlefinger;
Servo pointerfinger;
Servo thumb;
 
int servostop = 0; //variables for positioning the servos
int servostart = 179;
int revservostop = 179;  //positioning for reversed servos
int revservostart = 0;

void setup() 
{ 
  littleandringfinger.attach(12);  // attaches the servo on pin 12 to the servo object 
  middlefinger.attach(11);
  pointerfinger.attach(9);
  thumb.attach(10);
}
 

void loop() {
  littleandringfinger.write(servostart); //moves servo to starting position
  middlefinger.write(servostart);
  pointerfinger.write(servostart);
  thumb.write(revservostart);
  delay(100);

  littleandringfinger.write(servostop); //moves servo to stopping position
  delay(1000);                           //gives servo time to do it's thing
  littleandringfinger.write(servostart); //moves servo back to starting position
  delay(1000);
  middlefinger.write(servostop);
  delay(1000);
  middlefinger.write(servostart);
  delay(1000);
  pointerfinger.write(servostop);
  delay(1000);
  pointerfinger.write(servostart);
  delay(1000);
  thumb.write(revservostop);
  delay(1000);
  thumb.write(revservostart);
  delay(1000);
}