EMG Project

The purpose of this project is to use an EMG(Electromyography) signal, a bio-medical signal from the body, from a person to control the character Mario in the game “Super Mario Bros.” which can be broken down into the physical setup for how the EMG signal is acquired, the program: used to filter; apply movement to Mario, and record the data, then finally the results and discussion of the project.

Project Contributors

Blazer Humphreys

Responsible for creating and wiring the circuit, the program that collected, filtered, and gave meaning to the data, tested and calibrated the setup until it worked.



Physical Setup:

Electrode Placement
Hardware Signal Processing

Signal Acquisition:

The signal was acquired by placing three electrodes on the forearm. The electrodes were placed based on a guide which allowed us to place the electrodes as shown in the figure to the right. The white wire is ground, while the green wire is the negative EMG signal and the blue wire is the positive EMG signal

Hardware Signal Processing:

The EMG signal from the person using an internally connected INA 128 op-amp extracted the EMG signal. The signal was then amplified using a non-inverting amplifier with a LM 741 op-amp to increase the signals amplitude to a usable value. These two circuits can be seen in the figure above.


Program:

The program that was used for the project was made in LabVIEW the 2022 version. There are three steps for the program. initialize filing, connect to Arduino, and lastly execute algorithm and record data.

Initialize Filling System:

The purpose of this sequence was to ready a folder and file to house the data that would be later collected using the Arduino.

Connect and Execute:

In the last sequence the program will then connect to the Arduino and acquire the analog values coming from pin AI1. The program then filters the data using a specific algorithm and a lowpass filter. The algorithm is shown below, This was made in our labs but applied here to smooth the out the signal for the low pass filter.

The next step was to define threshold values for each bit or directional key pressed.

o    before-20: No key is pressed

o    20- 25: A key is pressed

o    25-35: W Key is pressed

o    45- beyond: D key is pressed

The figure below outlines this. Keep in mind that the specific thresholds were used for the trials and aren’t set because it mostly depends how the user places the electrodes. Therefore, in the figure the thresholds are labeled y, y2, y3 and can be adjusted while the program is running so the user can live test the thresholds.

  • The image below is the front panel for the program. this where the user can see the output and make necessary changes without stopping the program.

  • Due to space limitations it is hard to upload high-resolution images of this project’s program I would more than happy to email the program file or further discuss this project.

Over all the project was a success, although a little buggy at times, I was still able to control Mario Using only my arm. The most difficult part of this project having the electrodes stick to my arm while I was having to record, make adjustments to the program and test. The video above is my submission video.

Previous
Previous

Automated Crash Avoidance

Next
Next

Turtle Robotics-Ares Project