Video of the bicep and tricep controlling the rotation of a servo

Materials

  • sEMG Circuit x 2 (Bicep and Tricep Inputs)
  • sEMGs + alligator cords
  • Continuous Servo Motor
  • Arduino Mega2560
  • Serial Connection with the Computer (Arduino IDE + MATLAB)
  • Power Supplies (+9V, -9V, +5V)

A serial data connection was established between MATLAB and the Arduino Mega2560 in order to record data into graphs. The data recorded into MATLAB was real-time, meaning, the graphs were recording the data points immediately after the sample was taken. The method used to determine which direction the servo rotates was determined by a Threshold Method.

The threshold method is described in code below:

  //diff_voltage = bicep_voltage - tricep_voltage
  //Move up
  if (diff_voltage > 0.3){
    myservo.write(75);
  }
  //Move down
  else if (diff_voltage < -0.3){
    myservo.write(120);
  }
  //Rest
  else {
    myservo.write(95);
  }
  delay(500);

This method looks at what point on the graph the difference voltage (bicep – tricep) is and sends a signal to the servo indicating the direction of movement.

The graphs shown below, show the bicep, tricep, and the difference between the bicep and the tricep.

Download – EMG Signal Graphs

From looking at the “Bicep – Tricep” graph, when the user is flexing his or her arm, the voltages are generally more positive. However, when the user is straightening his or her arm, the voltages are generally more negative. At rest, the user has a voltage difference closer to zero. Since, there is a noticeable ripple voltage, there are some small inconsistencies with how the servo moves. In order to handle this issue, we took the RMS (root-mean-square) of a certain range of values through our analysis.

The graphs shown below, show the different RMS graphs based on the original “Bicep – Tricep” graph. For example, the RMS10 graph represents for every 10 values an RMS value is taken.

Download – RMS Graphs

The graphs below show the servo moving graphs. Where +1 is when the arm is being flexed, -1 is when the arm is being straightened, and 0 is when the arm is at rest.

Download – Servo Moving Graphs

One can conclude from the graphs that the RMS values would theoretically have better consistency with moving the servo.

1 comment

  1. Thanks for pulling this off in a few days.
    Nathalia

Leave a Reply

Your email address will not be published.