Visualizing 2 Channel EMG on LCD Display Module
by Upside Down Labs in Circuits > Sensors
434 Views, 1 Favorites, 0 Comments
Visualizing 2 Channel EMG on LCD Display Module
In this tutorial, you are going to detect EMG signals from both of your arms and visualize 2 channel EMG on a LCD display.
But before moving forward, let's understand a brief about Electromyography (EMG):
What is Electromyography (EMG)?
Electromyography is a technique that measures muscle response or electrical activity in response to a nerve’s stimulation of the muscle. We can use this electrical activity to detect neuromuscular abnormalities or create solutions for some crazy real-world problems like making artificial limb for amputees.
Supplies
HARDWARE:
DIY Neuroscience Kit Pro (Upside Down Labs Store | Amazon India | Robu India | Tindie | DigiKey)
The kit includes:
- BioAmp EXG Pill (Assembled)
- Arduino Uno with USB Cable
- BioAmp Cable (100cm)
- 3 x Jumper Cables
- NuPrep Skin Preparation Gel (25g)
- Wet Wipes x 10
- Repositionable Gel Electrodes x 3
- Boxy Gel Electrodes x 100
- Gel Electrodes (4 variants, 6pcs each)
- Muscle BioAmp Band (EMG Band)
- Brain BioAmp Band (EEG Band)
- Heart BioAmp Band (ECG)
- Electrode Gel (30ml)
- Servo Claw
- Muscle BioAmp Shield Kit
- Muscle BioAmp Shield v0.3 (Assembled)
- BioAmp Cable (100cm)
- Muscle BioAmp Band (EMG Band)
- BioAmp AUX Cable
- Gel Electrodes (4 variants, 6pcs each)
- STEMMA Cables x 6
- 9V Snap Cable
1 x LCD display (16 x 2) module with I2C interface
1 x Soldering
SOFTWARE:
Arduino IDE v1.8.X (Legacy IDE)
About DIY Neuroscience Kit Pro:
It is like your Neuroscience Lab in a Box which lets you explore the world of neuroscience by recording various biopotential signals of your body (EEG, EMG, ECG, EOG) and making amazing HCI and BCI projects.
Stack Muscle BioAmp Shield on Arduino Uno
Stack the Muscle BioAmp Shield on top of Arduino Uno properly.
Configure BioAmp EXG Pill for EMG/ECG
BioAmp EXG Pill is by default configured for recording EEG or EOG but if you want to record good quality ECG or EMG, then it is recommended to configure it by making a solder joint as shown in the image.
Note: Even without making the solder joint the BioAmp EXG Pill is capable of recording ECG or EMG but the signals would be more accurate if you configure it.
Connecting BioAmp EXG Pill
Connect the BioAmp EXG Pill to the A2 port of Muscle BioAmp Shield via 3-pin STEMMA cable which has JST PH 2.0mm connector on one end and 3 female jumpers on the other end.
Connecting Electrode Cables
Connect one BioAmp cable to BioAmp EXG Pill and another BioAmp cable to Muscle BioAmp Shield by inserting the cable ends into the respective JST PH connectors as shown above.
Skin Preparation
We’ll create a 2-channel EMG acquisition system and to do so, we’ll be using both the sensors to record EMG signals from the ulnar nerve of both the hands, Thus, prepare the skin accordingly.
Apply Nuprep Skin Preparation Gel on the skin surface where electrodes would be placed to remove dead skin cells and clean the skin from dirt. After rubbing the skin surface thoroughly, clean it with an alcohol wipe or a wet wipe.
Electrode Placements (option 1)
We have 2 options to measure the EMG signals, either using the gel electrodes or using dry electrode-based Muscle BioAmp Band. You can try both of them one by one.
Using gel electrodes
- Snap the BioAmp Cable connected to BioAmp EXG Pill to gel electrodes.
- Peel the plastic backing from the electrodes.
- Place the IN+ and IN- cables on the left arm near the ulnar nerve & REF (reference) at the back of your left hand as shown below.
- Now snap the BioAmp Cable connected to Muscle BioAmp Shield to gel electrodes.
- Peel the plastic backing from the electrodes.
- Place the IN+ and IN- cables on the right arm near the ulnar nerve & REF (reference) at the back of your right hand as shown below.
Note: In this demonstration, we are recording EMG signals from the ulnar nerve, but you can record EMG from other areas as well (biceps, triceps, legs, jaw, etc) as per your project requirements. Just make sure to place the IN+, IN- electrodes on the targeted muscle and REF on a bony part.
Electrode Placements (Option 2)
Using Muscle BioAmp Band
- Snap the BioAmp Cable connected to BioAmp EXG Pill on Muscle BioAmp Band so that IN+ and IN- are placed on the left arm near the ulnar nerve & REF (reference) on the far side of the band.
- Snap the BioAmp Cable connected to Muscle BioAmp Shield on Muscle BioAmp Band so that IN+ and IN- are placed on the right arm near the ulnar nerve & REF (reference) on the far side of the band.
- Now put a small drop of electrode gel between the skin and metallic parts of BioAmp Cables to get the best results.
Complete Tutorial on "How to use Muscle BioAmp Band": https://youtu.be/xYZdw0aesa0
Connect LCD Display
Solder 16x2 LCD I2C interface adapter to LCD display module. Then connect LCD display module to Muscle BioAmp Shield using 4 pin STEMMA Cable as per the connections shown above.
Uploading the Code
Connect Arduino Uno to your laptop using the USB cable (Type A to Type B).
Download the GitHub repository given below:
GitHub Repository: https://github.com/upsidedownlabs/Muscle-BioAmp-Arduino-Firmware
Extract the file and navigate to the folder named "9_2Channel_LCDBarGraph." Inside this folder, locate the Arduino sketch file titled "2Channel_LCDBarGraph.ino" and open it using the Arduino IDE.
Go to tools from the menu bar, select board option then select Arduino UNO. In the same menu, select the COM port on which your Arduino Uno is connected. To find out the right COM port, disconnect your Arduino UNO board and reopen the menu. The entry that disappears should be the right COM port.
Go to Sketch > Include Libraries > Manage Libraries and search for "LiquidCrystal I2C" and install the library made available by Marco Schwartz.
Now upload the code.
IMPORTANT: Make sure your laptop is not connected to a charger and sit 5m away from any AC appliances for best signal acquisition.
Visualizing 2 Channel EMG on LCD Display
This was just a demonstration to show you how both the sensors (BioAmp EXG Pill & Muscle BioAmp Shield) can be used together to create a 2-channel EXG acquisition system.
What are you gonna make with DIY Neuroscience Kit - Pro?
Let us know your feedback in the comments and feel free to ask any questions.
You can also mail us at support@upsidedownlabs.tech for any kind of support while you are making this project.