luiz_coppini
Published

Mechanical gripper prosthesis with myoelectric sensor contol

Print a mechanical prosthetic grip on your 3D printer and use a myoelectric sensor to control it.

IntermediateWork in progress189
Mechanical gripper prosthesis with myoelectric sensor contol

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
MyoWare Muscle Sensor Development Kit
SparkFun MyoWare Muscle Sensor Development Kit
×1
Grove Shield for Arduino Nano
Seeed Studio Grove Shield for Arduino Nano
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×4
9V battery (generic)
9V battery (generic)
×2
9V Battery Clip
9V Battery Clip
×2
Jumper wires (generic)
Jumper wires (generic)
×1

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Hot glue gun (generic)
Hot glue gun (generic)
nylon thread roll

Story

Read more

Custom parts and enclosures

Mechanical Gripper CAD

Modeling of mechanical gripper parts in Solid Works.

Schematics

Example of functionality

Example of functionality 2

Example of functionality 3

Myoeletric sensor schema.

project overview

Ordination of servants

As per project code

Battery connection pic1

Battery connection pic2

Myoelectric sensor connection

Arduino connection

Order of muscle connectors

Place one electrode in the middle of the muscle body, connect this electrode to the RED snap connector.

Place a second electrode at one end of the muscle body, connect this electrode to the GREEN snap connector.

Place a third electrode on a bony or non-muscular part of your body near the targeted muscle, connect this electrode to the YELLOW snap connector.

Code

control mechanical gripper by myoelectric sensor

C/C++
#include <Servo.h>

//Threshold for servo motor control with muscle sensor.
//You can set a threshold according to the maximum and minimum values of the muscle sensor.
#define THRESHOLD 200

//Pin number where the sensor is connected. (Analog 0)
#define EMG_PIN 0

//Define Servo motor

const int servoPinA = 4;
Servo servoA;

const int servoPinB = 5;
Servo servoB;

const int servoPinC = 6;
Servo servoC;

const int servoPinD = 7;
Servo servoD;

bool openProt = true;

/*-------------------------------- void setup ------------------------------------------------*/

void setup() {

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

  servoA.attach(servoPinA);
  servoB.attach(servoPinB);
  servoC.attach(servoPinC);
  servoD.attach(servoPinD);// damos um "start" nos pulsos do servomotor, associando o pino de controle com a gerao de pulsos promovida pela funo e mtodo - "servo.attach()"


  servoA.write(90);        // Definimos o ngulo inicial do servo em 90 graus (posio central do servomotor)
  servoB.write(90);
  servoC.write(90);
  servoD.write(90);
}

/*--------------------------------  void loop  ------------------------------------------------*/

void loop() {

  //The "Value" variable reads the value from the analog pin to which the sensor is connected.
  int value = analogRead(EMG_PIN);
  Serial.println(value);

  if (value > THRESHOLD) { 
    
    Serial.println("abrir");
      closeGripper();
    } else {
      openGripper();
    }

  //If the sensor value is GREATER than the THRESHOLD, the servo motor will turn to 170 degrees.

}

void openGripper() {

  servoB.write(150);
  servoC.write(0);
  delay(500);
  servoA.write(150);
  servoD.write(0);

}

void closeGripper() {

  servoB.write(0);
  servoC.write(150);
  delay(500);
  servoA.write(0);
  servoD.write(150);
}

Credits

luiz_coppini

luiz_coppini

2 projects • 0 followers

Comments