Elliot HicksConner Caruso
Published © GPL3+

3D-Printed Controllable Hand

This is a 3D-Printed hand that is controlled by servos and flex sensors.

IntermediateShowcase (no instructions)4,302
3D-Printed Controllable Hand

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Servos (Tower Pro MG996R)
×5
Flex Sensor
×5

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Sewing Kit

Story

Read more

Schematics

Schematic for one flex sensor and one Servo

This diagram shows how to wire the Arduino so that one flex sensor can control a Servo

Code

Code for the Hand

Arduino
This is the code that we used to control the hand using the servos and flex sensors.
#include <Servo.h>  // servo library



Servo servo1;
Servo servo2; 
Servo servo3;
Servo servo4;
Servo servo5;

const int flex = 0;
const int flex2 = 1;
const int flex3 = 2;
const int flex4 = 3;
const int flex5 = 4;


void setup()
{
  

  servo1.attach(9);
  servo2.attach(8);
  servo3.attach(7);
  servo4.attach(6);
  servo5.attach(5);
 
 Serial.begin(9600);

 
 
}


void loop()
{
  int servo1position;
  int servo2position;
  int servo3position;
  int servo4position;
  int servo5position;
  
  int flexposition;
  int flex2position;
  int flex3position;
  int flex4position;
  int flex5position;
  
  flex2position = analogRead(flex2);
  flexposition = analogRead(flex);
  flex3position = analogRead(flex3);
  flex4position = analogRead(flex4);
  flex5position = analogRead(flex5);
  
  servo1position = map(flexposition, 780, 870, 0, 180);
  servo2position = map(flex2position, 795, 885, 180, 0);
  servo3position = map(flex3position, 769, 880, 0, 180);
  servo4position = map(flex4position, 780, 840, 180, 0);
  servo5position = map(flex5position, 755, 855, 180, 0);
  
  servo1position = constrain(servo1position, 0, 180);
  servo2position = constrain(servo2position, 0, 180);
  servo3position = constrain(servo3position, 0, 180);
  servo4position = constrain(servo4position, 0, 180);
  servo5position = constrain(servo5position, 0, 180);
  
  servo1.write(servo1position);
  servo2.write(servo2position);
  servo3.write(servo3position);
  servo4.write(servo4position);
  servo5.write(servo5position);
  
  delay(200);
}

Credits

Elliot Hicks

Elliot Hicks

6 projects • 3 followers
Conner Caruso

Conner Caruso

3 projects • 1 follower
Thanks to SparkFun.

Comments