EMG Sensor

by bdarden in Circuits > Arduino

923 Views, 1 Favorites, 0 Comments

EMG Sensor

istockphoto-1294603953-612x612.jpg

An electromyography (EMG) sensor is a device that can measure muscle activation in a person. There are two main types of EMGs: needle and surface EMGs. Needle EMGs have a metal needle inserted into the skin in order to measure muscle activation, whereas surface EMGs use electrodes stuck on a person's skin in order to measure the activation. The following circuit is for a surface EMG built on a mini breadboard outputting a signal to an Arduino.

Supplies

  • 1x Arduino Uno
  • 1-2x Mini Breadboard
  • 2x 9V Battery w/ clips
  • 2x 1 MOhm resistor
  • 2x 2 kOhm resistor
  • 1x 0.1 uF capacitor
  • 2x JRC5532D op-amps
  • 3x EMG electrodes
  • Jumper cables
  • Alligator clips

Optional

  • 2-3x LED
  • 1-2x 100 Ohm resistor

Beginning Stages

20220413_140800.jpg
20220413_141305.jpg
20220414_090102.jpg

Insert the 2 op-amps into the mini breadboard so that they bridge the center gap and are at least 5 rows apart. One op amp will serve as a buffer stage (IC1) while the other serves as a differential amplifier (IC2). With a jumper wire, connect the far left vertical rail to the left most vertical rail on the right side. These will serve as the two ground rails.

The op amp closest to the top of the breadboard will be the buffer stage in this instance. Using a jumper wire, connect pin 1 and pin 2 together as well as pin 6 and pin 7. This is effectively creating a closed loop between the inverting pin and the output of IC1, which serves as a buffer for the signal.

The other op amp will be the differential amplifier for the signal. To set it up, put 1 jumper wire bridging the center gap one row above IC2 and another at least 3 rows above IC2.

Since op amps are active components in circuits, they need to be powered. The two rails on the far left will serve as ground and negative supply (in that order) while the two rails on the far right will serve as ground and positive supply (in that order). Connect jumper wires from the positive supply rail to pin 8 of both IC1 and IC2. Connect jumper wires from the negative supply rail to pin 4 of both IC1 and IC2. Lastly, connect a wire from the closest ground rail to pin 5 of IC2.

Differential Amplifier Time

20220414_090733.jpg
20220413_211954.jpg

Since EMG signals are on the order of mV, we need to amplify them in order to analyze them. That's where the differential amplifier comes in.

The resistor values were selected in order to have a gain of 500. Connect one lead of a 1 MOhm resistor (R1) to pin 2 of IC2 and the other lead to the row in between the bridge wires from the previous step. Take the other 1 MOhm (R2) resistor and connect pin 3 of IC2 to the closet bridge wire to IC2. With one of the 2 kOhm resistors (R3), connect pin 2 of IC2 to a row beneath pin 4. Using the other 2 kOhm resistor (R4), connect pin 3 to two rows beneath pin 4. These resistors serve to make the differential amplifier.

Using a jumper wire, connect the far lead of R3 to pin 1 of IC2. Similarly, connect the far lead of R4 to the ground rail.

With jumper wires, connect pin 1 of IC1 to the row with the near lead of R1. Then connect pin 7 of IC1 to the bridge wire closest to IC2.

Signal Input

20220413_212109.jpg

In order to get the EMG signal, we need to hook up the electrodes into the circuit. The EMG signal will be recorded using 3 different electrodes. One will be a reference electrode placed on a bony part of the body near the muscle. Another will be placed roughly at the midpoint of the muscle. While a third will be placed at the distal end near the insertion point.

Connect the reference electrode to the ground rail.

Connect the midpoint muscle electrode to pin 3 of IC1.

Connect the end muscle electrode to pin 5 of IC1.

Signal Output

20220413_212131.jpg

To be able to see the EMG signal, the sensor has to be connect to some external device. In this instance, we are using an Arduino Uno.

Since there is the chance that the signal will produce a large DC offset, insert the 0.1 uF capacitor in the same row as the top bridge wire. This wire is connected to the output (pin 1) of IC2. Next, connect the output of the capacitor to analog pin A0 in the Arduino Uno using a jumper wire. Finally, connect the Arduino ground to the sensor's ground rail.

Powering the Circuit

It might be important to actually have some power going into the sensor......

Taking one of the 9V batteries, connect its positive terminal to the positive supply rail as mentioned in Step 1. Connect its negative terminal to the ground rail.

With the other 9V battery, connect its positive terminal to the ground rail and its negative terminal to the negative supply rail as mentioned in Step 1.

Now the circuit part should be complete!

Arduino Fun Times

EMGcode.jpg

With the sensor powered and everything connected, now it is time to actually see the signal! The picture shows the basic Arduino code used. The code includes optional lines if you want to play around with the EMG output. :)

Optional Fun Step

If you want to play around with the EMG signal, then this is the step for you!

Connect one lead of an LED to a ground rail (if there is no more room on the original mini breadboard, you might need a second one) and the other lead to an open row. Connect one lead of a 100 Ohm resistor to be in series with this LED and bridge the center gap with the other lead. With a jumper wire, connect the bridged lead of the resistor to digital pin 3 on the Arduino. Also connect the grounded rail to the ground pin of the Arduino digital side.

If you want to have even more fun with the signal repeat the line above with more LEDs and 100 Ohm resistors connecting to higher digital pins. (This would involve adding more lines of code to the one provided in the previous step).

Final Output!

If you are able to get an output, then congrats! You are better at making circuits than I am. I was unfortunately not able to get an output that matches what an EMG is supposed to output........but here is what I was getting.