By using this website, you agree to the use of cookies. We use them to optimize functionality and convenience of the site for our clients.
Elemyo | 30 december 2022

Overview of the EMG/ECG module
MYO v1.4

ЭМГ датчик для регистрации мышечной активности. ПО для визуализации миографических сигналов. Подключение к Arduino.

In this overview, we will cover all the basic questions related to the EMG/ECG module MYO v1.4: from description and configuration to installation of software for visualization of EMG and ECG signals.
1. Description
MYO v1.4 – is a high-tech sensor for recording EMG (electromyographic) and ECG (electrocardiographic) signals, compatible with most modern microcontrollers and having open source software.
Distinctive features:
Programmable gain.
Curved contact surface for secure skin contact.
Electrodes are made of stainless steel and do not require replacement (unlike gel electrodes).
Dry contact with the skin is enough for  functioning (no need to use specialized gels).
High resistance to  sources of external interference (the sensor circuit allows you to effectively suppress external interference).
Free and open source software (for Windows 10, macOS, Linux operating systems).
Characteristics:
Module size 35.4⨯13.8⨯6.0 mm. Contact pitch 1.27 mm.
Supply voltage range 4.5 - 5.5 V. Typical voltage 5 V.
Low current consumption 3 mA.
The output signal is analog, the maximum swing is equal to the supply voltage.
The base gain is 1000 V/V, can be increased by ⨯1, ⨯2, ⨯4, ⨯5, ⨯8, ⨯10, ⨯16 or ⨯32 times. Adjustable via SPI interface.
Frequency range: 10 - 200 Hz.
Распиновка ЭМГ датчика мышц MYO v1.4. Подключение к микроконтроллерам семейства Arduino и другим
Fig. 1 Pinout MYO v1.4
The main differences from MYO v1.3:
The surface is curved for better skin contact (Fig. 2)
Reduced size (thickness, length and width by 30%, 20% and 11% respectively) (Fig. 3)
Connector for connection (replaceable wire)
No 3.3V signal output
A diode showing turning on a module
Изогнутая контактная поверхность ЭМГ датчика мышц MYO v1.4
Fig. 2 Curved shape of the module contact surface
Распиновка ЭМГ датчика мышц MYO v1.4
Fig. 3 Size comparison of MYO v1.3 and MYO v1.4 modules
2. Sensor attachment
There are several ways to attach the sensor to the body. It is important that the sensor fits snugly against the skin and does not move from touch, muscle contractions and movements. Next, consider the options for mounting the sensor.
1.
One wide transverse strip of medical adhesive plaster through the center of the module. It is best to use a fixing medical adhesive plaster on a fabric basis.
2.
Two narrow transverse strips of medical adhesive plaster along the edges of the module. It is best to use a fixing medical adhesive plaster on a tissue basis
3.
Secure with an elastic bandage or knitwear.
4.
Attach with adhesive sport-tape. Sport-tape stretches well in one direction only. It is better to place the module across this direction.
3. Connection to Arduino
On fig. 7 shows an example of connecting the MYO v1.4 module to the Arduino Uno microcontroller. When  connecting MYO v1.4 to another microcontroller of the Arduino family, the location of the SPI pins may differ. Tested on the following Arduino modules: Uno, Leonardo, Pro Micro, Mini, Nano and Mega.

Be sure to use a USB isolator if you connect the Arduino to a computer that is plugged in* (see Figure 7.1)). If a laptop with a built-in battery (up to 12 volts) is used, then the USB isolator can be omitted, provided that the laptop is disconnected from the mains (see Fig. 7.2)). Follow generally accepted electrical safety codes when working with the  sensor.
Изогнутая контактная поверхность ЭМГ датчика мышц MYO v1.4

Fig. 7: MYO v1.4 connection to Arduino UNO:

1) using a USB isolator, 2) without using a USB isolator.

NOTE! Be careful when connecting the "Gnd" and "5V" pins,
incorrect polarity will damage the module. If the module begins to heat up, turn off the power immediately and check that the module is connected correctly.
Programming Arduino UNO
To program the Arduino UNO controller, use the free Arduino IDE https://www.arduino.cc/en/main/software
Download the library from the official Elemyo GitHub page at: https://github.com/ELEMYO/Elemyo-library. To download, click on the "Code" menu (green) and select "Download ZIP".
1.
2.
Launch the Arduino IDE program and install the library. To do this, go to the menu "Sketch -> Include Library -> Add .ZIP Library" and select the downloaded archive. Wait for the library to be installed and restart the Arduino IDE.
Connect the Arduino UNO controller to the PC.
In the "Tools -> Port" section, select the port to which the Arduino controller is connected.
Select the type of microcontroller you are using under "Tools -> Board -> Arduino AVR Boards" (for example, if using Arduino UNO, then Arduino UNO)
Open the example distributed with the library "File -> Examples -> Elemyo-library -> EMG_Simple_Read".
Upload the example to the board "Sketch -> Upload".
After a successful upload, you can visualize the signal using the built-in Arduino IDE Plotter. Go to "Tools -> Serial Plotter" and set the speed to 115200 baud. The plotter will draw two graphs: blue is the original signal, red is the signal envelope.
3.
4.
5.
6.
7.
8.
9.
To use the ELEMYO_GUI program, you need to load the Terminal sketch from the Elemyo library on the Arduino.
Пример ЭМГ сигнала в Arduino IDE Plotter, получаемого датчиком мышц MYO v1.4

Fig. 8: Signal example in Arduino IDE Plotter.

4. Signal visualisation
To interact with MYO v1.4 (when connected to an Arduino or Arduino-like microcontroller), you can use the ELEMYO_GUI program, a free, cross-platform, open source Python GUI for real-time visualization, analysis, and processing of EMG/ECG signals.
Supported operating systems: Windows 10, Linux, macOS.
The program is distributed free of charge under a MIT license.
ELEMYO GUI
­
ELEMYO_GUI allows real-time visualization, processing, recording and playback of signals from 1 to 6 sensors. On fig. 9 shows a graphical window of the program with an example of a signal from one sensor.
Программа для визуализации и анализа ЭМГ и ЭКГ сигналов

Fig. 9: a graphical window of ELEMYO_GUI

Functional:
Real-time display of signals from 1 to 6 sensors. Possibility of scaling and flipping the signal graph.
Show of the frequency spectrum of the signal (analysis window - 1 second, smoothing factor 0.85).
Setting a notch filter at 50/60 Hz, as well as a band pass filter with a given bandwidth.
Plotting a signal envelope with an adjustable smoothing factor.
Recording a signal to a text file.
Playback of the recorded signal.

Installing ELEMYO_GUI on Windows 10
Way 1

Download the "ELEMYO_GUI.zip" archive from the link: https://github.com/ELEMYO/ELEMYO-GUI/releases. To run the program, unpack the archive and run the program file "ELEMYO_GUI.exe".
Way 2

Download the "Python 3.8.0" "Windows x86-64 executable installer" from the official Python website at: www.python.org/downloads/release/python-380/ (file located at the bottom of the page) and install Python.
When installing "Python 3.8.0", check «Add Python 3.8.0 to PATH» box and select «Install Now».
After installation, open IDLE: «Start -> Python 3.8 -> IDLE», либо «Start -> search «IDLE»», or in folder C:\Users\%USERNAME%\AppData\
Local\Programs\ Python\Python36-32\Lib\idlelib\idle.py
Download the program file MYOblue_GUI by link https://github.com/ELEMYO/ELEMYO-GUI
Open downloaded file in IDLE: File -> Open. Then, in the opened window with the code, click F5, or Run -> Rune module. The program will start.

At the first start, an Internet connection is required - the program will download and install the missing components (pyserial, pyqtgraph, qtpy5, numpy, scipy modules), this will take some time (5-10 minutes). Next launches will be fast.
1.
2.
3.
4.
5.
Installing ELEMYO_GUI on macOS
Download the "Python 3.8.0" "macOS 64-bit installer" from the official Python website at: www.python.org/downloads/release/python-380/ (file located at the bottom of the page) and install Python.
After installation, open IDLE: «Applications -> Python 3.8 -> IDLE»
Download the program file ELEMYO_GUI by link https://github.com/ELEMYO/ELEMYO-GUI
Open downloaded file in IDLE: File -> Open. Then, in the opened window with the code, click F5, or Run -> Rune module. The program will start.

At the first start, an Internet connection is required - the program will download and install the missing components (pyserial, pyqtgraph, qtpy5, numpy, scipy modules), this will take some time (5-10 minutes). Next launches will be fast.
1.
2.
3.
4.
Installing ELEMYO_GUI on Linux
Download the program file ELEMYO_GUI by link https://github.com/ELEMYO/ELEMYO-GUI
Check if Python 3 is preinstalled: https://docs.python.org/3/using/unix.html. If not installed, install according to instructions: https://docs.python.org/3/using/unix.html.
Run the file using Python 3 (stability was tested on Python 3.8.0), to do this, in the terminal, go to the folder with the ELEMYO_GUI.py file and run the command: python3 ELEMYO_GUI.py
1.
2.
3.
Sensors connection
To interact with sensors in ELEMYO_GUI, you must use an Arduino or an Arduino-like microcontroller. A detailed description of connecting one sensor to the Arduino is described in the next section of this review: "Connecting to the Arduino". Read the section carefully and then do the following:
upload the "Terminal" sketch from the Elemyo library for the Arduino IDE to the microcontroller
connect MYO v1.4 sensors to Arduino according to the diagram in fig. 10
connect your Arduino to your computer and run the ELEMYO_GUI program, the drawing process will start automatically.
in the "sensor number" field of the ELEMYO_GUI program, set the number of connected sensors.

Table 1: Pinout when connecting six sensors to the Arduino Uno.
Подключение массива ЭМГ датчиков MYO v1.4 к Arduino UNO

Fig.10: An example of connecting six sensors to the Arduino.

5. Signal example
The sensor is intended for registration of EMG (electromyographic) and ECG (electrocardiographic) signals.
пример ЭМГ сигнала, получаемого датчиком MYO v1.4. Одиночное, плавное сокращение мышцы

Fig.11: An example of an EMG signal received by the MYO v1.4 sensor. Single, smooth muscle contraction

пример ЭМГ сигнала, получаемого датчиком MYO v1.4. Три плавных последовательных сокращения мышцы с разной амплитудой

Fig.12: An example of an EMG signal received by the MYO v1.4 sensor.

Three smooth consecutive muscle contractions with different amplitudes

Пример ЭКГ сигнала, получаемого датчиком MYO v1.4.

Fig.13: An example of an ECG signal received by the MYO v1.4 sensor.

Thank you for reading.

If you have any questions - feel free to contact us via email: info@elemyo.com

Автор: Elemyo