Myoware Musle Sensor

Haiii all.

Actually i have a problem with my MyoWare sensor. Why my sensor keep detect signal even im not place on my bisep??

Do i need to adjust the gain? suppose that in relax muscle condition, the signal will be 0. if i flex the bisep, should have reading. but in my case. in relax condition, i still get reading value.

im sorry for my broken English

Hi FirdauzADAM,

The behavior you are seeing may be the result of the black reference electrode floating. That can leave the entire sensor in a floating state and will cause the sensor to constantly output a HIGH sensor value. Does the sensor behave normally when you attach it to a muscle group for testing? If it does, I would not worry about that value floating and reporting HIGH when not connected to anything.

#include <Servo.h>

// header for controller servo

Servo servo; //keeping name of servo SERVO itself

int EMGvalue =0;

#define FLEXI A0

int flexi;

int pflexi=0;

void setup()

{

Serial.begin(9600);

pinMode(A1,INPUT);// voltage divider value input

pinMode(3,OUTPUT);// PWM output to servo

servo.attach(3);// telling where signal pin of servo attached(must be a PWM pin)

servo.write(35);

}

void loop()

{

EMGvalue = analogRead(A1); //read analog value from sensor

Serial.print(“EMG:”);

Serial.print(EMGvalue);

//servo.write(EMGvalue); //to avoid initial positioning of servo we need to neutralize the default voltage provided by voltage divider( setting servo position based on ADC result)

if (EMGvalue>=900){

servo.write(35);

delay(500);

servo.write(50);

delay(500);

servo.write(60);

delay(500);

servo.write(90); // set maximum servo

delay(500);

servo.write(60);

delay(500);

servo.write(50);

delay(500);

servo.write(35);

delay(500);

}

if (EMGvalue<900){

servo.write(0);

}

flexi = analogRead(FLEXI);

Serial.println();

Serial.print(“analog=”);

Serial.println(flexi);

pflexi = (flexi-425)*100/(515-425);

Serial.println();

Serial.print(“FLEXI:”);

Serial.print(pflexi);

Serial.print(“%”);

Serial.println();

delay(1000);

}

This is my coding sir.

  • emg to 3.3v
  • emg to GND

signal to what pin??

can you help?

okay. im done. but my sensor not stable.

SparkFun Support cannot help debug any custom code here but the [User Manual for the MyoWare can help you with the connections to your Arduino.

In regards to the unstable signal there are a few things to account for. First, the [electrode pads we have for use with the MyoWare Muscle Sensor are single-use only and repeated use of the same electrodes will result in erratic behavior from the sensor. Second, make sure the electrodes are placed properly. There are some helpful tips for assmbling the shields and other troubleshooting steps in [these two comments from the guide for the MyoWare Kit. Finally, you can try adjusting the gain potentiometer but it is recommended that users get the sensor working reliably before adjusting that setting.](Discuss Tutorial: MyoWare Muscle Sensor Kit - SparkFun Learn)](https://www.sparkfun.com/products/12969)](https://cdn.sparkfun.com/assets/a/3/a/f/a/AT-04-001.pdf)