The goal of this project was to build a cost efficient electromyograph (EMG) computer interface through USB capable of supporting a large number of channels.
EMG is a technique for recording the electrical activity of muscles. An EMG detects the electrical potential generated by muscle cells when these cells are electrically or neurologically activated. The signals can be analyzed to detect medical abnormalities, muscle activation level, or muscle recruitment order. The signals can also be used to analyze the biomechanics of human or animal movement. Another very common usage of EMG is for the control of prosthetic devices where EMG signals from the remaining muscles in a missing limb can be used for controlling a robotic prosthetic.
The reason I built this device is that we needed a cost efficient EMG acquisition hardware in order to use it with an existing simulator software and eventually improve the existing control algorithms and try it in an actual robotic arm.
Figure 1 – Channel circuit
In order to control a prosthetic device we need to have some EMG signals from the muscle activity of the amputee as sysem inputs. The activity is related to the voltage difference along a muscle.
A channel consists of 2 electrodes that measure the voltage at 2 points on the surface of the muscle, an instrumentation amplifier that calculates the difference between them, analog filters and an Analog-to-Digital Converter (ADC).
The hardware consists of the analog part which inputs the differential signal for all the channels and the digital part which samples the analog signals and sends the data to a computer at a high frequency of fs=1kHz. The user can stack up to 6 boards on top of each other to get a total of 42 channels.
Figure 1 shows the structure of each channel.
The active electodes ensure:
- low ouput impedance which means that the signal in the cable is stable against interference without the use of heavy shielding and guarding
- matched input impedance to the instrumentation amplifier.
The instrumentation amplifier calculates the difference between 2 electrodes. The average voltage of the 2 electrodes is injected back to the person by the Driven Right Leg (DRL) circuit. DRL is a feedback loop for the system that is used to reduce common mode interference.
The filtering stage is consisted of a 2nd order High Pass Filter (HPF) and a 2nd order Low Pass Filter (LPF). I chose the HPF cut-off frequency at 19.4 Hz in order to remove the drift of the signal and the movement transients. The signal is sensitive to disturbances caused by movement because of our use of dry electrodes but the aforementioned filter can remove most of the movement artifacts. The LPF cut off frequency, fc=152.7 Hz, was chosen lower than the Nyquist frequency (fs/2 = 500 Hz) as we observed that the power of the signal above fc was negligible for our project. This fc value is also more computational efficient for a real time application. Even though filters of larger order had slightly improved Signal-to-Noise Ratios (SNR), these results were not steady between all of the subjects so we chose a 2nd order filter for design simplicity and cost efficiency.
Finally, the ADC samples the signal and connects with the digital circuit through the Serial Peripheral Interface (SPI).
Figure 2 – PCB high level circuit
Figure 2 shows a high level view of the board. There are 7 channels, each of them is like the one described above. Moreover, there are 8 active electrodes (plus 1 passive for the DRL) which can be connected in bipolar or monopolar configuration using jumpers. This result to 4 bipolar or 7 monopolar channels. The average voltage of all of the electrodes is injected back to the user through the DRL circuit. An Arduino Due was used to connect the computer with the board as it inherently supports SPI and USB communications, is fast, is relatively cheap and easily programmed. Arduino Due accesses the ADCs consecutively and when it receives a sample for all the signals it sends them to the virtual port of the computer.
The hardware was tested in a simulator software written in Matlab. The 7 channels (1 PCB) were more than enough in controlling 3 Degrees Of Freedom (DOF) when the electrodes were connected around the forearm. Someone can use up to
A maximum of 6 boards for recording different muscle groups can be used so that we are able to control more DOFs while we respect the system’s sampling frequency of 1 kHz.