Contents

Interfacing EMG Muscular Signal Sensor with Arduino

EMG Muscular Signal Sensor Features

In medical research, measuring the activity, contraction and expansion of muscles is important. The EMG muscle sensor measures the muscle activity and produces a signal to show the amount of expansion and contraction. Therefore, the output depends on the amount of activity in the selected muscle. 3 Green, red and yellow electrodes connect to the module for transmitting electrical signals from the muscle motion.

Features:

  • Small Form Factor
  • Specially Designed for Microcontrollers
  • Adjustable Gain using onboard potentiometer
  • 5mm Connector

Applications:

  • Video games
  • Robotics
  • Medical equipment

EMG Muscular Signal Sensor Pinout

This module has 5 pins:

  • Vs+: Positive power supply
  • GND-BAT: Ground Battery
  • Vs-: Negative power supply
  • SIG: Analog output
  • GND: Ground

You can see the pinout of this module here.

Required Material

Hardware component

Arduino UNO R3 × 1
EMG Muscular Signal Sensor × 1
Male to Female jumper wire × 1

Software Apps

Arduino IDE

Interfacing EMG Muscular Signal Sensor with Arduino

Step 1: Circuit

Electrode Connection:

The three electrodes are used to transmit muscle signals. Each electrode must be in the proper position for better function.

Once you have decided which muscle to monitor, connect them as follows:

  • Green electrode: Place this electrode on the middle of the desired muscle
  • Red electrode: Place this electrode at the end of the desired muscle.
  • Yellow electrode: Place the last electrode on a bony or non-muscular part of the body near to the desired muscle.

For example, to evaluate the forearm muscle, you can place electrodes on your hand as follows:

Power Supply Connection:

We use two power supplies or batteries to generate +Vs and -Vs. First connect the negative side of first battery to positive side of second battery, as shown below. This creates an electric ground for power supply.

 So, the positive side of first battery becomes +Vs and the negative end of the second battery becomes -Vs.

The following circuit shows how you should connect Arduino to EMG sensor. Connect wires accordingly.

Step 2: Code

Upload the following code to Arduino.

   /*
  EMG-Muscular-Signal-Sensor
  made on 26 Jan 2021
  by Amir Mohammad Shojaee @ Electropeak
  
Home
*/ void setup() { Serial.begin(9600); } void loop() { Serial.println(analogRead(A0)); }

We want to observe the changes in analog output signal of the module as the forearm muscle expands and contracts. To do this, open the Serial Plotter and see the output signal.

The image below shows the output changes.

Liked What You See?​
Get Updates And Learn From The Best​

Comments (14)

  • sukaina Reply

    i want arduino code of feature extraction for emg signal pleeez!
    note: i use above sensor muscle sensor V3 (outputs filtred ,rectfired signal)

    January 21, 2022 at 12:31 am
    • Mehran Maleki Reply

      Hi.
      That seems to be a highly complicated job and out of the context of this tutorial.

      January 29, 2022 at 8:39 am
  • Paco Reply

    Hello! Can the EMG sensor be connected to arduino protoboard 5V external power supply instead of 9V battery?

    February 18, 2022 at 1:30 pm
    • Mehran Maleki Reply

      Hi.
      Unfortunately not! This module needs around 9 volts to operate. It also requires -9 volts, which makes us use two 9V batteries.

      February 20, 2022 at 7:52 am
  • MRIDUL M S Reply

    My output of emg sensor is zero.. If I disconnected any electrode from body it will be 1023.why is that?

    December 11, 2022 at 9:26 am
    • Ali Abdolmaleki Reply

      Hi.
      could you please share your C code with us? I will help you better if I know how to Setup this sensor
      any way. could you please try with below C Code

      void setup() {
      // initialize serial communication at 115200 bits per second:
      Serial.begin(115200);

      //set the resolution to 12 bits (0-4096)
      analogReadResolution(12);
      }

      void loop() {
      // read the analog / millivolts value for pin 2:
      int analogValue = analogRead(2);
      int analogVolts = analogReadMilliVolts(2);

      // print out the values you read:
      Serial.printf(“ADC analog value = %d\n”,analogValue);
      Serial.printf(“ADC millivolts value = %d\n”,analogVolts);

      delay(100); // delay in between reads for clear read from serial
      }

      February 15, 2023 at 7:52 am
  • Nuno Ribeiro Reply

    Hey! I’m not seeing any change in the serial plotter, it only goes up and down between 110 and 111. What am I doing wrong? I’m using an Arduino Nano and the same EMG and the image. I have also uploaded that same code. What other things should I be careful about?

    December 29, 2022 at 10:02 am
  • Jonas Reply

    Hi, I followed the steps but my arduino receives a signal jumping between 71 and 72, it doesn’t matter if I contract my muscles or not. Is there a possible fix?

    February 5, 2023 at 5:38 pm
    • Ali Abdolmaleki Reply

      Hi
      please make sure that you use right analog channel to read measurment
      change your analog channel or check your wiring

      February 28, 2023 at 1:52 pm
  • Haiqal Reply

    Hi can i ask,l few things?

    1. what is the exact name for the emg sensor?

    2. If there is no exact name, can you provide the exact details which includes block diagram and working principles for me to refer?

    May 25, 2023 at 6:49 am
    • Mohammad Damirchi Reply

      Hi Haiqal,
      The code of ICs on the module is available in the product images. You can check them out in the link below
      EMG Muscular Signal Sensor

      May 27, 2023 at 7:48 am
  • Calula Reply

    Hi! Is it possible if i want to make a signal classification using ML that will be processed in a microcontroller/single board computer?

    January 17, 2024 at 6:47 am
  • Mihail Reply

    Hello! i made this circuit but with alternative version of the PCB where there is no potentiometer , but when i plug everthing it just go to value aroun 75 +-2 and stays there without reactiong to contraction. Is there a way to check where is the problem or how to check if electrodes are transmiting any signal

    February 1, 2024 at 7:50 pm
    • Mohammad Damirchi Reply

      Hi Mihail,
      you can use an external potentiometer multi turn to see if there is a change in your output.
      Also, the output signal is too small to be seen on oscilloscope.
      In that case, stoke in your board and fine-tune it.

      February 4, 2024 at 5:19 am

Leave a Reply

Your email address will not be published. Required fields are marked *