hannu_hell
Published © GPL3+

'Gesture Bot' with Hand Gestures

A simple yet real size robotic hand ready for custom programming.

IntermediateShowcase (no instructions)6,458
'Gesture Bot' with Hand Gestures

Things used in this project

Hardware components

Arduino Mega 2560
Arduino Mega 2560
×1
Nema 23 Stepper Motor
×1
NEMA 17 Stepper Motor
OpenBuilds NEMA 17 Stepper Motor
×1
ES 9051 Servo / 4.1 g
×5
ES 3104 Servo / 17g
×5
TB6600 Stepper Motor Driver
×2
on / off switch
×3
T-Connector / Male
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1
Breadboard Power Supply Module
×1
Breadboard (generic)
Breadboard (generic)
×1
Capacitor 100 µF
Capacitor 100 µF
×10
12V White LED Set
×1
12V White LED Strip
×1
Bearing / 30mm OD
×1
M6 x 40mm Bolts and Nuts
×2
M6 x 22mm Bolts and Nuts
×6
M2.5 x 20
×4
M2.5 x 15mm Bolts and Nuts
×4
Flange Coupling / 8mm ID
×1
Flange Coupling / 5mm ID
×1
General Purpose Transistor NPN
General Purpose Transistor NPN
×2

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Plus Head Screw Driver
Minus Head Screw Driver
Allen Wrench
OpenBuilds Allen Wrench
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Custom parts and enclosures

Gesture Bot design files

These are the CATIA V5 design files for Gesture Bot and the respective repository for it.

Schematics

The Schematic Diagram

Gesture Bot schematic diagram

Code

Gesture Bot control via serial commands

Arduino
This code is just used to control the hand using keyboard command. It can be modified in the future to work with a blutooth, wifi module and control via an app. A custom remote or perhaps glove could also be used to control but for now i've just tested with the commands sent via computer keyboard.
#include <Servo.h>

Servo servo1;
Servo servo2; 
Servo servo3; 
Servo servo4; 
Servo servo5;
Servo servo7;
Servo servo6;
Servo servo8;
Servo servo9;
Servo servo10;

int servoPosA = 170;
int servoPosB = 160;
int servoPosC = 100;
int servoPosD = 100;
int servoPosE = 120;
int servoPosF = 100;
int servoPosG = 100;
int servoPosH = 100;
int servoPosI = 180;
int servoPosJ = 100;


int led1 = 24; // single led
int led2 = 25; // single led
int ledSet1 = 12; // LED SET
int ledSet2 = 13; // LED SET
int BUTTON = 22;
boolean buttonState = LOW;
int i;


int pulPin1 = 52;
int dirPin1 = 53;
int pulPin2 = 50;
int dirPin2 = 51;

void setup() {
  
  for (int q = 2; q < 14; q++){
  pinMode(q, OUTPUT);
  }
  pinMode(22, INPUT);
  pinMode(24, OUTPUT);
  pinMode(25, OUTPUT);
  for (int w = 50; w < 54; w++){
  pinMode(w, OUTPUT);
  }
  
  servo1.attach(2);
  servo2.attach(3);
  servo3.attach(4);
  servo4.attach(5);
  servo5.attach(6);
  servo7.attach(7);
  servo6.attach(8);
  servo8.attach(9);
  servo9.attach(10);
  servo10.attach(11);

  delay(4000);
  
  /* the following bit of code stops the hand from moving further more when the push button is pressed, once pressed moves to a certail number of steps for its origin*/

 while (buttonState == LOW){
  for (int e = 0; e < 1; e++){
  digitalWrite(dirPin1, HIGH);
  buttonState = digitalRead(BUTTON);
  digitalWrite(pulPin1, HIGH);
  buttonState = digitalRead(BUTTON);
  delayMicroseconds(5000);
  buttonState = digitalRead(BUTTON);
  digitalWrite(pulPin1, LOW);
   buttonState = digitalRead(BUTTON);
  delayMicroseconds(5000);
  buttonState = digitalRead(BUTTON);
  } 
}
if (buttonState == HIGH){
  for (int f = 0; f < 300; f++){
  digitalWrite(dirPin1, LOW);
  digitalWrite(pulPin1, HIGH);
  delayMicroseconds(10000);
  digitalWrite(pulPin1, LOW);
  delayMicroseconds(10000);
  }
  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  delay(2000);
}
Serial.begin(9600);
Serial.println("Please select a control hinge for the hand from the keypad");
}

void loop() {
servoPosA = constrain(servoPosA, 80, 170);
servoPosB = constrain(servoPosB, 90, 180);
servoPosC = constrain(servoPosC, 100, 150);
servoPosD = constrain(servoPosD, 100, 150);
servoPosE = constrain(servoPosE, 75, 160);
servoPosF = constrain(servoPosF, 100, 150);
servoPosG = constrain(servoPosG, 85, 170);
servoPosH = constrain(servoPosH, 100, 150);
servoPosI = constrain(servoPosI, 10, 180);
servoPosJ = constrain(servoPosJ, 100, 150);



while (Serial.available() > 0){
  
  char hand_move = Serial.read();
  if (hand_move == 'a'){
    Serial.println("Selected finger - LITTLE FINGER_LOWER HINGE_OPEN");
    for(int i = 170; i>80; i--){
    servo1.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == 'z'){
    Serial.println("Selected finger - LITTLE FINGER_LOWER HINGE_CLOSE");
    for(int j = 80; j<170; j++){
    servo1.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
    if (hand_move == 's'){
    Serial.println("Selected finger - RING FINGER_LOWER HINGE_OPEN");
    for(int i = 180; i>90; i--){
    servo2.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == 'x'){
    Serial.println("Selected finger - RING FINGER_LOWER HINGE_CLOSE");
    for(int j = 90; j<180; j++){
    servo2.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
    if (hand_move == 'q'){
    Serial.println("Selected finger - LITTLE FINGER_UPPER HINGE_OPEN");
    for(int i = 150; i>100; i--){
    servo3.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == '1'){
    Serial.println("Selected finger - LITTLE FINGER_UPPER HINGE_CLOSE");
    for(int j = 100; j<150; j++){
    servo3.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
    if (hand_move == 'w'){
    Serial.println("Selected finger - RING FINGER_UPPER HINGE_OPEN");
    for(int i = 150; i>100; i--){
    servo4.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == '2'){
    Serial.println("Selected finger - LITTLE FINGER_LOWER HINGE_CLOSE");
    for(int j = 100; j<150; j++){
    servo4.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
    if (hand_move == 'd'){
    Serial.println("Selected finger - MIDDLE FINGER_LOWER HINGE_OPEN");
    for(int i = 160; i>75; i--){
    servo5.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == 'c'){
    Serial.println("Selected finger - MIDDLE FINGER_LOWER HINGE_CLOSE");
    for(int j = 75; j<160; j++){
    servo5.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
    if (hand_move == 'f'){
    Serial.println("Selected finger - INDEX FINGER_LOWER HINGE_OPEN");
    for(int i = 170; i>85; i--){
    servo6.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == 'v'){
    Serial.println("Selected finger - INDEX FINGER_LOWER HINGE_CLOSE");
    for(int j = 85; j<170; j++){
    servo6.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
    if (hand_move == 'e'){
    Serial.println("Selected finger - MIDDLE FINGER_UPPER HINGE_OPEN");
    for(int i = 150; i>100; i--){
    servo7.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == '3'){
    Serial.println("Selected finger - MIDDLE FINGER_UPPER HINGE_CLOSE");
    for(int j = 100; j<150; j++){
    servo7.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
    if (hand_move == 'r'){
    Serial.println("Selected finger - INDEX FINGER_UPPER HINGE_OPEN");
    for(int i = 150; i>100; i--){
    servo8.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == '4'){
    Serial.println("Selected finger - INDEX FINGER_UPPER HINGE_CLOSE");
    for(int j = 100; j<150; j++){
    servo8.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
    if (hand_move == 'g'){
    Serial.println("Selected finger - THUMB_LOWER HINGE_OPEN");
    for(int i = 180; i>10; i--){
    servo9.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == 'b'){
    Serial.println("Selected finger - THUMB_LOWER HINGE_CLOSE");
    for(int j = 10; j<180; j++){
    servo9.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
    if (hand_move == 't'){
    Serial.println("Selected finger - THUMB_UPPER HINGE_OPEN");
    for(int i = 150; i>100; i--){
    servo10.write(i);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == '5'){
    Serial.println("Selected finger - THUMB_UPPER HINGE_CLOSE");
    for(int j = 100; j<150; j++){
    servo10.write(j);
    delay(25);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
    }
     
  }
  if (hand_move == '-'){
    Serial.println("Selected ELBOW_UP");
    for (int f = 0; f < 50; f++){
    digitalWrite(dirPin1, LOW);
    digitalWrite(pulPin1, HIGH);
    delayMicroseconds(10000);
    digitalWrite(pulPin1, LOW);
    delayMicroseconds(10000);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
     
    }
  }
  if (hand_move == '+'){
    Serial.println("Selected ELBOW_DOWN");
    for (int g = 0; g < 50; g++){
    digitalWrite(dirPin1, HIGH);
    digitalWrite(pulPin1, HIGH);
    delayMicroseconds(10000);
    digitalWrite(pulPin1, LOW);
    delayMicroseconds(10000);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
     
    }
  }
  if (hand_move == '/'){
    Serial.println("Selected WRIST_ANTICLOCKWISE");
    for (int f = 0; f < 200; f++){
    digitalWrite(dirPin2, HIGH);
    digitalWrite(pulPin2, HIGH);
    delayMicroseconds(3000);
    digitalWrite(pulPin2, LOW);
    delayMicroseconds(3000);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
     
    }
  }
   if (hand_move == '*'){
    Serial.println("Selected WRIST_CLOCKWISE");
    for (int g = 0; g < 200; g++){
    digitalWrite(dirPin2, LOW);
    digitalWrite(pulPin2, HIGH);
    delayMicroseconds(3000);
    digitalWrite(pulPin2, LOW);
    delayMicroseconds(3000);
    char stop_sense = Serial.read();
    if (stop_sense == '.'){
      break;
      }
     
    }
  }
  

  
 }

}

Gesture Bot serial command code

This code allows the user to control gesture bot using the serial commands.

Credits

hannu_hell

hannu_hell

3 projects • 8 followers
I am a mechanical engineering student. I love all things mechanical, electronic in the binary world of computers.

Comments