• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Electrical Engineering News and Products

Electronics Engineering Resources, Articles, Forums, Tear Down Videos and Technical Electronics How-To's

  • Products / Components
    • Analog ICs
    • Connectors
    • Microcontrollers
    • Power Electronics
    • Sensors
    • Test and Measurement
    • Wire / Cable
  • Applications
    • Automotive
    • Industrial
    • IoT
    • Medical
    • Telecommunications
    • Wearables
    • Wireless
  • Resources
    • Covid-19
    • DesignFast
    • Ebooks / Tech Tips
    • EE Forums
      • EDABoard.com
      • Electro-Tech-Online.com
    • FAQs
    • 2020 LEAP Awards
    • Oscilloscope Product Finder
    • Podcasts
    • Webinars / Digital Events
    • White Papers
  • Videos
    • Teardown Videos
  • Lee’s Teardowns
    • Teardown Videos
  • Learning Center
  • 5G
  • Women in Engineering

How to design an Arduino-based EMG monitor

February 4, 2021 By Nihil Agnihotri

Electromyography (EMG) is a medical procedure that evaluates the health conditions of muscles and nerve cells. These cells transmit electrical signals that cause muscles to contract or relax. EMG is used to read these signals and plot them as numbers or graphs.

Typically, EMG is performed by doctors as one part of a diagnostic tool that can detect a potential muscle or nerve disorder. However, EMG sensors are also used in muscle-controlled electronic applications — such as for controlling a servo motor or robotic arm by using muscle-like movements.

In this project, we’ll use an AD8226-based EMG sensor to plot an EMG graph with the help of Arduino. AD8226 is an instrumentation amplifier that’s widely used to design sensors. It provides gains from 1 to 1000. It’s also widely used in medical instrumentations, bridge amplifiers, industrial process control, and portable data-acquisition systems.

Here, we’ll learn how to interface an AD8226-based EMG sensor with Arduino UNO and plot the electrical activities of a muscle group on Arduino UNO. The sensor can be used to measure the activation of any group of muscles, including biceps, quads, calves, etc.

 

Components

1. Arduino UNO x1
2. AD8226-based EMG sensor x1
3. 52mm electrode pads x3
4. A 3-lead connecting cable x1
5. 9V batteries x2
6. Connecting Wires & Jumper wires

Software

  • Arduino IDE

The EMG sensor
The EMG device used in this project is a 3-lead differential muscle/electromyography sensor. It comes with an onboard, 3.5mm cable port that can be used to attach regular EMG/ECG electrodes.

Although the sensor is not an industry-grade EMG device, it is effective for measuring and monitoring muscle activation. It can be used for robotics, prosthetics, and a variety of control applications.

The sensor board has this pin configuration:

The sensor is ideal for use with microcontrollers. Unlike industry-grade medical sensors, however, it does not output raw EMG signals. Rather, an amplified, rectified, and smooth signal is delivered that can be read at Arduino’s analog input pin (or any other microcontroller).

 

The board is powered by DC voltage that ranges from +/-3.5 to +/-18V. The output signal voltage can range to 0V. The sensor’s gain can be changed using an onboard potentiometer, which can be adjusted between 0.002 for 0.01Ω to 20,700 for 100KΩ on the pot. The output differential signal can vary from 0mV to the supply voltage/gain.

 

The sensor board uses an AD8226 instrumentation amplifier. It requires only one external resistor to set the gain from 1 to 1000. The amplifier operates on supplies, ranging between +/-1.35 to +/-18V (for dual supplies) and 2.2 to 36V (for a single supply).

It’s can also handle voltages beyond its rail-to-rail voltage. For example, even with a 5V supply, the IC can withstand up to +/-35V.

The AD8226 is a small form factor, multichannel, low-cost, and low-power amplifier.

 

Circuit connections
The sensor board has two sets of pins:

  • A 3-pin set that includes -+Vs, GND, and -Vs terminals. It’s used to provide a dual-supply to the AD8226 amplifier. 
  • A 2-pin set that includes the signal and GND terminals. It’s used to interface the board with the microcontroller. 

To begin, you’ll need the two 9V batteries. Connect the positive terminal of one battery to the +VS pin. Then, connect the negative terminal of that same battery with the positive terminal of the second battery, joining it to the GND pin in the 3-pin header. 

Next, connect the negative terminal of that second battery to the -Vs pin. This provides the +/-9V dual-supply to the sensor. 

To interface with Arduino, connect the GND pin in the 2-pin header to any of the two ground pins on Arduino UNO. Lastly, connect the signal pin to any analog input pin, such as A1.    

Circuit diagram 

 

The electrodes
Ensure the 3-lead cable that’s equipped with a 3.5mm jack, is connected to the sensor board. The EMG/ECG electrodes can, then, be attached to the cable. 

Pick a muscle group to monitor, such as a bicep or calf. Place one electrode in the middle of this muscle group and attach the red cable’s snap connector to this electrode. Next, place a second electrode at one end of this muscle group, attaching the green cable’s snap connector to this electrode. 

Then, place the third electrode on a bony or non-muscular part of the body that’s near the same muscle group. Attach the yellow cable’s snap connector to this electrode. 

Arduino sketch  

int EMGPin = A1;
int EMGVal = 0;

void setup() {
Serial.begin(115200);
}

void loop() {
EMGVal = analogRead(EMGPin);
Serial.println(EMGVal);
}

How it works
The EMG signals can range from 50u to 30 mV. The AD8266 sensor offers a gain of up to 1000, which can amplify the EMG potentials to the mV level. The “read” EMG signals are amplified, rectified, and smoothed by the AD8226 instrumentation amplifier. 

When the electrodes are properly placed on a muscle group, their contraction and relaxation produce EMG potentials. These potentials are picked up by the sensor and amplified to a measurable range. The sensor board’s gain can be adjusted by using an onboard potentiometer. 

The output signal from the sensor board is read via Arduino’s input pin. As the output signal from the sensor board is rectified (and in mV range), Arduino can easily read it. Arduino is programmed to read the analog input at its A1 pin and print the readings to the serial port.

These EMG readings can be set and monitored as numbers, ranging from 0 to 1023, on Arduino IDE’s serial monitor or as a graph on its serial plotter.     

The code
The sketch begins by assigning A1 as the pin to read the EMG sensor’s analog signals. A variable ‘EMGVal’ is declared to store the analog values that are received from the sensor. 

In the setup() function, the baud rate for serial communication is set to 115200. In the loop() function, the sensor’s analog voltages are read and stored in the ‘EMGVal’ variable. 

The analog readings are printed to the serial port, where they can be monitored on Arduino IDE’s serial monitor or serial plotter.  

The results

You may also like:


  • What is the difference between an ECG, EEG, EMG and…

Filed Under: FAQ, Featured, Sensor Tips Tagged With: FAQ

Primary Sidebar

EE Training Center Classrooms

“ee

“ee

“ee

“ee

“ee

Featured Resources

  • NEW! EE World Online Learning Center
  • CUI Devices – CUI Insights Blog
  • EE Classroom: Power Delivery
  • EE Classroom: Building Automation
  • EE Classroom: Aerospace & Defense
  • EE Classroom: Grid Infrastructure

February 2021 Special Edition: Power Electronics Handbook

RSS Current EDABoard.com discussions

  • toroidal transformer voltage drop
  • WRS1000
  • What is the DC voltage rating of this Y2 capacitor?
  • Earth interacting with a AC/DC converter
  • Atmega328 Assembly-Send 16 bits serially!

RSS Current Electro-Tech-Online.com Discussions

  • Touch circuit sound, led. 555 timer
  • Please help with failed EMC scan for charity system?
  • Radio Frequency emitter used to propel objects with a parabolic reflector.
  • Low power mic to 2w speaker mono audio circuit design
  • A new motor for my lathe

Oscilloscopes Product Finder

Follow EE World on Twitter

Tweets by @EEWorldOnline

Footer

EE World Online

EE WORLD ONLINE NETWORK

  • DesignFast
  • EDABoard Forums
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Analog IC Tips
  • Connector Tips
  • Engineer's Garage
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • Wire & Cable Tips
  • 5G Technology World

EE WORLD ONLINE

  • Subscribe to our newsletter
  • Lee's teardown videos
  • Advertise with us
  • Contact us
  • About Us
Follow us on TwitterAdd us on FacebookFollow us on YouTube Add us on Instagram

Copyright © 2021 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy