top of page

How to make robot hand moving using muscle at your home

Circuit:

Download Programming:


#include <Servo.h>


#define THRESHOLD 150 //In order to determine the state of the hand (opened/closed)

#define EMGPIN 3 //Analog pin connected to Muscle Sensor V3 Board

#define LITTLEPIN 2 //Digital pin used by Little servo

#define RINGPIN 3 //Digital pin used by Ring servo

#define MIDDLEPIN 4 //Digital pin used by Middle servo

#define INDEXPIN 5 //Digital pin used by Index servo

#define THUMBPIN 6 //Digital pin used by Thumb servo


//Constants used to open and close the fingers

#define LITTLE 1

#define RING 2

#define MIDDLE 3

#define INDEX 4

#define THUMB 5


Servo servoLittleFinger; // Define servo fingers

Servo servoRingFinger; // Define servo fingers

Servo servoMiddleFinger; // Define servo fingers

Servo servoIndexFinger; // Define servo fingers

Servo servoThumbFinger; // Define servo fingers


int finger;


// Motion routines for handopen and handclose

void openhand(){for(finger = 1; finger < 6; finger++){openFinger(finger);}}

void closehand(){for(finger = 1; finger < 6 ; finger++){closeFinger(finger);}}


// You have to rewrite properly the functions to open and close the fingers

// according of your assembly

// In my case, middle and index fingers are opened when servo is at 170 degrees and the others when servo is at 0 degrees

// I have used Towardpro MG996R servos


void openFinger(int finger){

  if(finger==LITTLE){servoLittleFinger.write(0);} // Little finger

  else if(finger==RING){servoRingFinger.write(170);}// Ring finger

  else if(finger==MIDDLE){servoMiddleFinger.write(170);}// Middle finger

  else if(finger==INDEX){servoIndexFinger.write(170);}// Index finger

  else if(finger==THUMB){servoThumbFinger.write(0);}//Thumb finger

}


void closeFinger(int finger){

  if(finger==LITTLE){servoLittleFinger.write(170);} // Little finger

  else if(finger==RING){servoRingFinger.write(0);}// Ring finger

  else if(finger==MIDDLE){servoMiddleFinger.write(0);}// Middle finger

  else if(finger==INDEX){servoIndexFinger.write(0);}// Index finger

  else if(finger==THUMB){servoThumbFinger.write(170);}//Thumb finger

}


void setup(){

  

  Serial.begin(115200); //BAUDRATE set to 115200, remember it to set monitor serial properly (used this BaudRate and "NL&CR" option to visualize the values correctly)


  servoLittleFinger.attach(LITTLEPIN); // Set Little finger servo to digital pin 3

  servoRingFinger.attach(RINGPIN); // Set Ring finger servo to digital pin 5

  servoMiddleFinger.attach(MIDDLEPIN); // Set Middle finger servo to digital pin 6

  servoIndexFinger.attach(INDEXPIN); // Set Index finger servo to digital pin 9

  servoThumbFinger.attach(THUMBPIN); // Set Thumb finger servo to digital pin 10


}//end setup


void loop() {// Nothing to do here, all is done in the interrupt function


  int value = analogRead(EMGPIN); //Sampling analog signal

  if(value>THRESHOLD) //If the value of the sample is greater than THRESHOLD means that the hand has been closed

  {closehand();}

  else //Otherwise the hand is open

  {openhand();}

  Serial.println(value); //You can use serial monitor to set THRESHOLD properly, comparing the values shown when you open and close your hand

}


Demo Video


3,792 views9 comments

Recent Posts

See All

9 comentarios


========================================================================= =========================== FAKE INFORMATION ========================== ========================================================================= You have provided with the fake information, in video you used the ECG module but

in the schematic and also in the code you provide the information of EMG sensor =========================================================================

=========================== FAKE INFORMATION ==========================

=========================================================================

Me gusta

In video you used The ECG AD8232 module but in schematic you mention the EMG sensor is it work same, because the their prices are different


Me gusta

sir I wanted to make this project. can you provide all the stl file used on this project or can I purchase this project

Me gusta

Can i get the stl file of your 3d printed hand??

Me gusta
Contestando a

there is a right hand and a left hand do I need to print them both for one arm or this depends of which arm your going to wear in on


Me gusta

Dhinesh
Dhinesh
06 ene

Can I purchase this project from you

Me gusta
bottom of page