Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
Gabry295
Published © GPL3+

How to Make a Remote Controlled Robotic Hand with Arduino

A robotic hand that emulate the movement of your hand wirelessly through a glove with sensors.

IntermediateShowcase (no instructions)79,798
How to Make a Remote Controlled Robotic Hand with Arduino

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Arduino LilyPad Main Board
Arduino LilyPad Main Board
×1
XBee S1 (trace antenna)
×2
SparkFun XBee shield
×1
SparkFun Xbee Shield for Lilypad
×1
LilyPad FTDI Basic Breakout - 5V
SparkFun LilyPad FTDI Basic Breakout - 5V
×1
Flex Sensor 2.2"
×5
47 kOhm resistor
×5
AAA battery
×3
3xAAA battery holder
×1
9V battery (NiMh rechargeable)
×1
Robot Shield
×1
5V servomotor
×5

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Drill (generic)
Angle grinder (generic)
Mini drill (generic)
Welding machine (generic)
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Glove Circuit

Circuit to realize for the sensors glove

Robot hand circuit

Circuit to realize for the robot hand

Code

Untitled file

Arduino
/*
Flex Glove

Created by Santin Gabriele, 2014
I.T.S.T. "J. F. Kennedy", cl. 5^A EA
Thanks to Elias De Lamper for suggestions to improve this program!
*/

int ResThumb   = A4;  // Variables of the analog read form the flex sensors connected to the analog pins of Arduino LilyPad
int ResIndex   = A3;  
int ResMiddle  = A2;
int ResAnnular = A1;
int ResPinky   = A0;

int OpenedThumb   =0; // Variables of the values when the hand is completely opened
int OpenedIndex   =0; // This is needed for a continuous calibration
int OpenedMiddle  =0;
int OpenedAnnular =0;
int OpenedPinky   =0;

int ClosedThumb;      // Variables of the values when the hand is completely closed
int ClosedIndex;      // We can't set it to zero since that the minimum value reached
int ClosedMiddle;     // in the analog read never reach zero. We'll assign the value of
int ClosedAnnular;    // a first analog read, then the program in the loop will
int ClosedPinky;      // automatically  assing lower values

int thumb   =0;       // Variables of the values to send
int index   =0;
int middle  =0;
int annular =0;
int pinky   =0;


void setup()
{
  Serial.begin(9600);   // Activating serial communication, XBee Series 1 are pre-programmed at 9600 baud/s
  
  pinMode(ResThumb,   INPUT);   // The variables of the sensor are set as input
  pinMode(ResIndex,   INPUT);
  pinMode(ResMiddle,  INPUT);
  pinMode(ResAnnular, INPUT);
  pinMode(ResPinky,   INPUT);

  ClosedThumb   = analogRead(ResThumb);
  ClosedIndex   = analogRead(ResIndex);  
  ClosedMiddle  = analogRead(ResMiddle); 
  ClosedAnnular = analogRead(ResAnnular);
  ClosedPinky   = analogRead(ResPinky);  
}

void loop()
{
  thumb   = analogRead(ResThumb);  
  index   = analogRead(ResIndex);  
  middle  = analogRead(ResMiddle); 
  annular = analogRead(ResAnnular);
  pinky   = analogRead(ResPinky);  
  
  if(thumb   > OpenedThumb)   // Calibration reading and setting the maximum values. This needs you to completely open your hand a few times
  OpenedThumb   = thumb;
  if(index   > OpenedIndex)
  OpenedIndex   = index;
  if(middle  >  OpenedMiddle)
  OpenedMiddle  = middle;
  if(annular > OpenedAnnular)
  OpenedAnnular = annular;
  if(pinky   > OpenedPinky)
  OpenedPinky   = pinky;
  
  if(thumb   < ClosedThumb)  // Calibration reading and setting the minimum values. This needs you to completely close your hand a few times
  ClosedThumb   = thumb;
  if(index   < ClosedIndex)
  ClosedIndex   = index;
  if(middle  < ClosedMiddle)
  ClosedMiddle  = middle;
  if(annular < ClosedAnnular)
  ClosedAnnular = annular;
  if(pinky   < ClosedPinky)
  ClosedPinky   = pinky;
  
  thumb   = map(thumb  ,ClosedThumb  ,OpenedThumb  ,0,180);  // The analog read has to be readapted in values between 0 and 180 to be used by the servomotors.
  index   = map(index  ,ClosedIndex  ,OpenedIndex  ,0,180);  // The minimum and maximum values from the calibrations are used to correctly set the analog reads.
  middle  = map(middle ,ClosedMiddle ,OpenedMiddle ,0,180);
  annular = map(annular,ClosedAnnular,OpenedAnnular,0,180);  
  pinky   = map(pinky  ,ClosedPinky  ,OpenedPinky  ,0,180);
  
  Serial.write("<");      // This character represent the beginning of the package of the five values
  Serial.write(thumb);    // The values are sent via the Tx pin (the digital pin 1)
  Serial.write(index);  
  Serial.write(middle);  
  Serial.write(annular);
  Serial.write(pinky);
  
  delay(30);
}

Codebender

https://codebender.cc/sketch:59559

Codebender

https://codebender.cc/sketch:55013

Codebender

https://codebender.cc/sketch:56264

Codebender

https://codebender.cc/sketch:55014

Credits

Gabry295
2 projects • 44 followers

Comments