For our final project, we built a surface electromyograph to collect and analyze data on muscle activity, which supports two channels, implements wireless transmission, and can be worn as mobile unit. Surface electromyography (EMG) is a noninvasive technique to record the activation signals of muscles when they are mechanically active. This signal is very small compared to the 60 Hz signal which appears on the human body from power systems. Wireless was employed to safely isolate the human body from 120V power supply and ground. The system takes data from a small, mobile transmission unit and outputs and stores data into Matlab for future analysis.
High Level Design
In bioinstrumentation, an electromyograph is used to monitor muscle activity and diagnose muscular diseases. The EMG works by measuring the electricity generated by the many myoelectric action potentials that change when a muscle is active. These action potentials can then be recorded, amplified, and sent to a computer for processing. We wished to make a device that could monitor muscle activity remotely without impeding the user�s movements. This would allow one to see how often they are using a exerting a muscle during an activity. Also, those with jobs that require high amounts of physical exertion, such as automobile union workers, can use the device for ergonomics studies. This project allowed us to use various skills acquired in previous courses and this one, in order to build an interesting, complex, and useful instrument.
The technique of electromyography has existed for centuries. There are products that implement wireless EMG that exist today, but no patents, copyrights, or trademarks to prevent us from producing our own version.
The project is composed of two main parts: the transmit side and receive side, as illustrated above. The transmit unit consists of EMG electrodes, amplifier stage, a microcontroller, and the transmitter. One electrode is placed on the muscle of interest, typically the bicep, and the other on the opposite side, typically the tricep. The voltage difference between these two is amplified with a differential amplifier, arranged for a high gain. The output of the differential amplifier is sampled on the transmit unit. The transmitter places groups of samples into packets, which are broadcasted wirelessly on 433 MHz. The transmitter is powered by itself using a 9V battery.
The receiving unit consists of the receiver, a microcontroller, and computer. The receiver receives the packets of information consisting of samples, high pass filters the data, and relays the information onto Matlab. In Matlab, a comprehensive user interface was created for recording, accessing, filtering and analyzing of the obtained data.
There were several opportunities for hardware and software tradeoff. One example is between the front-end amplifier and software gain. The advantage of using more hardware gain is the increase in the ratio between the signal and quantization error. Software gain not only amplifies the wanted signal, but also amplifies the quantization error already obtained from the analog to digital converter. However, using too much hardware gain can potentially max out the range of the amplifier and cause clipping. We chose a fixed hardware gain of 150 on the differential amplifier. Software �gain� can be achieved by the user by simply zooming in on the graph in Matlab.
Another opportunity for tradeoff is the implementation of a high pass filter on the signal. A high pass filter is needed in order to filter out the �motion artifact�, caused by muscle movement and positioning, and not actual firing of the motor unit action potentials. A hardware implementation would require the use inductors and capacitors on the output of the amplifier, before the MCU sampled the signal. The advantage of this is that the filter is instantaneous and requires no processing power from the CPU. However, finding appropriate inductor and capacitors is very difficult, and inaccuracies affect the frequency response significantly. A software implementation was instead used.
The transmitting unit is composed of the amplifier, microcontroller, and transmitter, as pictured.
The differential signal from the bicep is only on the order of 10 mV when fully flexed, so a high gain amplifier is needed. The INA121PA was chosen, since it can provide very high, linear gain, which is easily selected with an external resistor. The output is also biased with a reference voltage.
The body serves as an antenna for receiving RF signals as well as 60 Hz signal from power systems, so the common mode rejection ratio (CMRR) of the differential amplifier is of the utmost importance. The CMRR of the INA121 is 106 dB, which is very high.
The full hardware schematic is shown in Appendix B. The positive input was connected to an electrode on the desired muscle, typically a bicep. The negative input to the differential amplifier was connected to VDD/2 in order to serve as a reference voltage on the user�s body, and was connected to an electrode placed on the opposite of the monitored muscle, typically the corresponding tricep. A second pair of electrodes can be optionally connected as well into the second differential amplifier.
A prototype board, powered by a single 9V battery, was built for the microcontroller, as pictured on the right. Items such as the RS232 serial connector and Max 233 were not placed on the board, since its communication is done completely through the transmitter. The output from the differential amplifier was connected to the A0 pin on the Analog to Digital Converter (ADC). AREF was connected to VDD on the prototype board. The quantization error, as previously discussed is Compared to a 5mV signal, which would be amplified to 1.5 V, the error is approximately 1.30% of the signal.
The system is limited by baud rate of the transmitter and receiver. The transmitter samples at 800 Hz, and averages every 8 samples into one large “supersample”. Taking 8 samples rather than one reduces the noise per sample sent by a factor of √8 = 2.83.
For two channels, the system still samples at 800 samples/second, but only 400 samples/second per channel. However, the data transmitted per channel is also halved, so the noise reduction remains the same.
Two channels are implemented using a switch attached on Ports C.1, C.0, and ground. Port C.1 is pulled high, so when the switch is to the left, C.0 is pulled high as well and the transmitter sends data from two channels. When the switch is to the right, C.0 is pulled low the transmitter sends data from one channel.
The transmitter and receiver used are the RCT-433-AS, and RCR-433-RP modules, as provided in lab. The transmitter has four pins: VCC, ground, data and antenna. The full schematic can be seen in Appendix B.
Power into the chip comes through from the prototype board�s 5 V regulator and ground. This has no connection to 120V power supply. VCC comes through a self-wound inductor on the order of nano-Henrys to filter out any bouncing in the power supply to the transmitter.
On the transmitter, Data input is connected from the D1 pin into a common emitter amplifier, which is connected to the transmitter, as shown in Appendix B. This is done to make the data input on the transmitter a rail to rail CMOS input. The transmitter transmits the data using On Off Keying (OOK), which means the antenna produces a 433 MHz continuous wave (CW) signal when the data input is high, and nothing when the input is low.
However, the antenna used, as seen in the picture, is much shorter, at approximately 2cm. This was done so that the user can use wear unit as a mobile device.
The transmission protocol is borrowed and modified from Wireless Transmit and Receive project. The transmitter and receiver run at a speed of 2400 baud. The protocol for a packet is as follows, and will be elaborated on in the next section.
|Part Type||Manufacturer||Part Number||Quantity||Unit Price||Total Price|
|Custom PC Board||Bruce Land||—||2||$4.00||$8.00|
|Solder Board||Bruce Land||—||1||$1.00||$1.00|
|White Board||Bruce Land||—||1||$6.00||$6.00|
|40 Pin DIP Socket||Bruce Land||—||2||$.50||$1.00|
|20 pin DIP Socket||Bruce Land||—||1||$.50||$.50|
|Header Socket||Bruce Land||—||7||$.05||$.35|
|RS232 Connector||Bruce Land||—||1||$1.00||$1.00|
|Diff Amp||Texas Instruments||INA121||2||$5.00||$10.00|
For more detail: Dual-Channel Mobile Surface Electromyograph Using Atmega644