Pierre Fenrick
Published

Pelops' Hand

Using Wi-Fi and myoelectric technology, Pelop's Hand was designed as a low-cost prosthetic concept to emulate the squeezing of one's hand.

IntermediateFull instructions provided20 hours2,035
Pelops' Hand

Things used in this project

Hardware components

Photon
Particle Photon
×2
Dental floss
Acted as Finger Ligaments
×1
Servos (Tower Pro MG996R)
Prosthetic 'Muscle'
×2
2x4 Wood
made up our arm, and the palm
×1
tongue depressor
cut into thirds, each third composed a third of a finger
×1
duct tape
used to bridge the finger segments
×1
Adafruit MyoWare Muscle sensor
×1
Breadboard (generic)
Breadboard (generic)
×2
Jumper wires (generic)
Jumper wires (generic)
×1
AA Batteries
AA Batteries
×1
4xAA battery holder
4xAA battery holder
×1
Plastic straws
connected "ligaments" (dental floss) to fingers (tounge depressors)
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1
electodes
EMG sensor component
×3

Software apps and online services

Particle Pi
Particle Pi
ThingSpeak API
ThingSpeak API

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Drill
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Circuit Diagram

Code

Servo code

C/C++
Cloud subscribe servomotor control with signal pins A4 and A5.
#include "lib1.h"
const String key = "A5AFV9NYTTZV7GKS";

int servo1 = A5;  // registers variable to PIN
int servo2 = A4;
int led= D7;
int movement;


void setup() {
                            
   pinMode(servo1,OUTPUT);       //define output type
    pinMode(servo2,OUTPUT); 
    pinMode(led, OUTPUT);

 
    Particle.subscribe("start",servomoto);          // listen to cloud for sensor trigger
    Particle.function("move",move);  
                                                    // function to play with servoposition
    Particle.variable("movement",  &movement, INT);    // used to define cloud variable, read out later

}


void loop() {
         Particle.publish("thingSpeakWrite_", "{ \"1\": \"" + String(movement) + "\"," + "\"k\": \"" + key + "\" }", PRIVATE); // Publishes activity  to ThingSpeak
     
delay(1000);
}

 void servomoto(const char *event, const char *data)      // probably wrong, trying to read sensor photon, and react accordingly,

{ 
    movement=1;
    analogWrite(servo1,212);     //can use low or high with analog write, if not have the servo value enough to hold tension in wire
     analogWrite(servo2,212); 
     digitalWrite(led, HIGH);
     Particle.publish("thingSpeakWrite_", "{ \"1\": \"" + String(movement) + "\"," + "\"k\": \"" + key + "\" }", PRIVATE); // Publishes activity  to ThingSpeak
     
delay(1000);

        analogWrite(servo1,01);
         analogWrite(servo2,01);
         digitalWrite(led, LOW);
delay(7500);
         movement=0;
     
         
}


int move(String command) {

    if (command=="30") {
        analogWrite(servo1,43);
         analogWrite(servo2,43);
        
        delay(1000);
        analogWrite(servo1,1);
        analogWrite(servo2,1);
        delay(1000);
        analogWrite(servo1,0);
        analogWrite(servo2,0);
        return 1;
    }
    else if (command=="60") {
        analogWrite(servo1,86);
        analogWrite(servo2,86);
    
         delay(1000);
        analogWrite(servo1,1);
        analogWrite(servo2,1);
         delay(1000);
         
        analogWrite(servo1,0);
        analogWrite(servo2,0);
        return 2;
    }
    else if (command=="90") {
        analogWrite(servo1,128);
        analogWrite(servo2,128);

         delay(1000);
        analogWrite(servo1,1);
         delay(1000);
        analogWrite(servo1,0);
        
         
        analogWrite(servo2,1);
         delay(1000);
        analogWrite(servo2,0);
        return 3;
    }
    else if (command=="120") {
        analogWrite(servo1,172);
        
         analogWrite(servo2,172);
         delay(1000);
        
        analogWrite(servo1,1);
         analogWrite(servo2,1);
         delay(1000);
        analogWrite(servo1,0);
        analogWrite(servo2,0);
        return 4;
    }
    else if (command=="150") {
        analogWrite(servo1,212);
        analogWrite(servo2,212);
         delay(1000);
        analogWrite(servo1,1);
        analogWrite(servo2,1);
         delay(1000);
        analogWrite(servo1,0);
        analogWrite(servo2,0);
        return 5;
    }
    else if (command=="180") {
        analogWrite(servo1,255);
        analogWrite(servo2,255);
         delay(1000);
        analogWrite(servo1,1);
        analogWrite(servo2,1);
         delay(1000);
        analogWrite(servo1,0);
        analogWrite(servo2,0);
        return 6;
    }
    
    
    else {
        return -1;
    }


}

MyoWare Sensor Code

C/C++
Cloud publish senor code
const String key = "RC2WR9D1Z5G3NEJC";


int EMG = A0;           // defining the pin of use

int activity;           // variable to store measured emg output

int start;              // true/false value published to the cloud for partner photon to use




 char emgactivity;

void setup() {
    
    pinMode(EMG,INPUT);     // defines how A0 will be used
    
   Particle.variable("activity",  &activity, INT);    // used to define cloud variable, read out later


}





void loop() {
    
    activity = analogRead(EMG);         // tells photon to read A4 pin
    
    if (activity<=2500)                // Compares sensor output with the measured low activity level, actually 20mV, but not necessarily what pin A4 will read
    {
     
        
        delay(500);                     // short time period for recuring measurments
      
    }
    else if (activity>2500 & activity<5000)        // if sensor output is above low activity levels, will publish to this to the cloud 
    {
        Particle.publish("start","normalval", PUBLIC);    // creates incident
        delay(1000);                    // longer time period in order to allow servos to move
       
    }
    else {
        Particle.publish("large value","possible fault", PUBLIC);
    }
     
Particle.publish("thingSpeakWrite_", "{ \"1\": \"" + String(activity) + "\"," + "\"k\": \"" + key + "\" }", PRIVATE); // Publishes activity  to ThingSpeak

}

Credits

Pierre Fenrick

Pierre Fenrick

1 project • 2 followers
I am a former EMT, current Mechanical Engineering student pursuing a career where medicine meets technology.

Comments