Question

In: Electrical Engineering

Muscle sensor (EMG) is an application of common source mosfet Write a theory about it and...

Muscle sensor (EMG) is an application of common source mosfet
Write a theory about it and where did we see it in real live and how much is its gain ?

Solutions

Expert Solution

Measuring muscle activity by detecting its electric potential, referred to as electromyography (EMG), has traditionally been used for medical research. However, with the advent of ever shrinking yet more powerful microcontrollers and integrated circuits, EMG circuits and sensors have found their way into all kinds of control systems.

This sensor will measure the filtered and rectified electrical activity of a muscle; outputting 0-Vs Volts depending the amount of activity in the selected muscle, where Vs signifies the voltage of the power source. It’s that easy: stick on a few electrodes, read the voltage out and flex some muscles!

(OR)

Measuring muscle activation via electric potential, referred to as electromyography (EMG) , has traditionally been used for medical research and diagnosis of neuromuscular disorders. However, with the advent of ever shrinking yet more powerful microcontrollers and integrated circuits, EMG circuits and sensors have found their way into prosthetics, robotics and other control systems. Yet, EMG systems remain expensive and mostly outside the grasp of modern hobbyist.

Electromyography (EMG) is a method to evaluate motor unit action potential activity in a muscle region. As action potentials (electrical signals) propagate through nerves to neuromuscular junctions, the change in electrical potentials (voltage) can be measured. EMG is performed in the clinical setting to diagnose functional abnormalities of muscle; in this procedure, a needle electrode is inserted directly into a muscle to monitor an area smaller than 1 square millimeter.

Surface EMG is a non-invasive method of measuring muscle activity. Rather than using needle electrodes, conductive gel electrodes are placed on the skin to measure overall activity of a large region of muscle fibers. The voltage measured represents the amount of force a muscle (or group of muscles) is exerting in real-time. Surface EMG is commonly used in biomedical engineering applications to connect human muscles to the outside world, e.g. interfacing a residual limb with a myoelectric prosthesis, controlling a limb within virtual reality, and providing biofeedback for muscular pain.

Parts needed

MyoWare

Arduino Uno

22-gauge wire (3-conductors)

A computer

EKG electrodes

What is MyoWare?

MyoWare is a small surface EMG sensor developed by Advancer Technologies as a Kickstarter project a few years ago. It automatically analyzes the incoming raw voltage signal and outputs a smooth positive waveform of integer values, as depicted by the graph below (more details are found in the MyoWare datasheet). The new version of MyoWare also outputs the raw voltage data for customized filtering and processing.

What is Arduino?

Arduino is an open-source project that has designed a family of simple computers that provide an interface between sensors and control of physical devices. Because the schematics to design the products are open-source, other companies may freely reproduce the models as well. These unofficial devices are often cheaper and generally reliable. The Arduino “Uno” is a good starter model with a fair amount of inputs and outputs.

Arduino devices are programmed using a simplified version of the C language. A user writes code on a computer and transfers this code to the Arduino by USB. Then, the Arduino can be powered by USB or a battery without the need for a computer.

Preparation

Browse through the MyoWare data sheet for helpful information about the sensor.

Find the three holes on the edge of the MyoWare that are labeled (+),(-), and SIG (signal). Solder a 22-gauge wire to each hole. Solder the other ends to header pins (pins can be found in an Arduino starter kit).

Connect the MyoWare’s (+) wire to the +5 output header on the Arduino and (–) to the Arduino GND (ground) header. Connect the signal wire to A0 on Arduino. Connect Arduino to the computer via USB cable.

Download and install Arduino editor. Alternatively, use the web-based Arduino Create developer environment.

Arduino Code

Arduino programs are called sketches and have .ino file extensions. Create a new sketch (File -> New) to generate the code below. The lines starting with // are comments for humans and ignored by the computer.

void setup() {

// put your setup code here, to run when Arduino is powered on:

}

void loop() {

// put your main code here, to run repeatedly:

}

void setup(){} is a function (a set of instructions) that is run when the Arduino is powered on. void loop(){} is a function that repeats continuously, approximately once every millisecond though the rate depends on the complexity of the code. Your program instructions will run in here.

“void” just means the function does not return any value when it is run. You can think of C functions like math functions, e.g. f(x) = 2x. If I perform f(3) in pre-calculus class, the “return value” is 6. Below is how the same mathematical function would look in Arduino code.

int f(int x){ // first int means the function returns an integer

return 2 * x; // end each statement with a semicolon

}

// run our function & assign result to the variable someMathProblem

int someMathProblem = f(3);

void printMathResult(){

println(someMathProblem); // prints out 6

}

printMathResult(); // this runs the function that prints 6.

// Notice we cannot assign the result to a variable,

// because the function returns void [nothing]

You do not need to add the f(x) and printMathResult() functions to your Arduino file; they are only included here as an explanation of functions.

3. Next, assign outbound pin #13 to a descriptive variable name. Define your voltageThreshold (MyoWare outputs data on a scale of 0–1023, so 400 is approximately 40% activity) These variables are defined outside of the setup and loop functions. In the setup() function, begin listening to the incoming data from MyoWare using Serial.begin(9600). 9600 represents the baud rate, or the number of 0’s and 1’s (bits) Arduino will transmit per second. We also setup pin #13 to be an output rather than input.

int onboardLED = 13; // Arduino onboard LED (pin 13) you can control

int voltageThreshold = 400; // any reading higher will trigger an action

void setup() {

// put your setup code here, to run when Arduino is powered on:

Serial.begin(9600);

pinMode(onboardLED, OUTPUT);

}

4. Add programming logic code to run repeatedly in loop():

void loop() {

// put your main code here, to run repeatedly:

int currentVoltage = analogRead(A0); // store the incoming voltage

Serial.print(currentVoltage); // prints voltage to monitor

if(currentVoltage > voltageThreshold){

// trigger actions

Serial.println("CONTRACTION!"); // prints string + new line

digitalWrite(onboardLED, HIGH); //this sends 5V, turning on LED

} else {

Serial.println(""); // adds a new line

digitalWrite(onboardLED, LOW);

// turn off the light if threshold is not met

}

}

If the currentVoltage coming from MyoWare is greater than the voltageThreshold we previously defined, then do all the statements within the first curly braces { }. If the currentVoltage is anything else (numbers less than the threshold or no value at all), then run the statements in the curly braces within else { }.

Build and send the code to Arduino, which must be connected by USB at this point. If building fails due to an error, take a look at the message and line number and make sure there are no spelling mistakes or missing parentheses or semicolons in the code. Also click Tools -> Board: -> and make sure Arduino Uno is selected.

Attach the MyoWare to a muscle via electrodes. You may need to trim the electrode adhesive borders so they fit properly. The sensor works well over many muscles including paraspinals. Try recording the flexor digitorum superficialis or biceps brachii first.

7. Open Tools -> Serial Monitor in the Arduino coding application to see voltage readings streaming in.

Example of Serial data from MyoWare. Values will range from 0 to 1023.


Related Solutions

Electromyography (EMG) (a)  Consider the technique of electromyography (EMG) to examine muscle function about joints during movement....
Electromyography (EMG) (a)  Consider the technique of electromyography (EMG) to examine muscle function about joints during movement. Explain where the captured, high frequency raw signal originates, and describe the physiological basis with reference to the relevant parts of the neuromuscular system.                                                                                         [8 marks] (b) When processing EMG signals, the following terms are frequently encountered in the literature: (i) Band Pass filtering (ii) Full wave rectification (iii) Normalisation to maximum voluntary contraction (MVC) (iv) Median frequency Please explain what each of these terms...
Draw a high frequency small signal model for BJT and MOSFET, for common gate, common source...
Draw a high frequency small signal model for BJT and MOSFET, for common gate, common source and common drain amplifiers
Write a theory application/explanation about durkheim division of labor
Write a theory application/explanation about durkheim division of labor
Write about 300 words (in your own words), showing your understanding of 'MOSFET'. It should be...
Write about 300 words (in your own words), showing your understanding of 'MOSFET'. It should be a qualitative text with an introduction about 50 words, a body paragraph about 225 words and a conclusion about 25 words.
What are important insights about the application of ethical theory in your healthcare?
What are important insights about the application of ethical theory in your healthcare?
Write everything you know about EMG not WRITTEN i want it TYPED using Microsoft word between...
Write everything you know about EMG not WRITTEN i want it TYPED using Microsoft word between 2 to 3 pages
Confounding the concepts of correlation and causation is a common source of errors in business. Write...
Confounding the concepts of correlation and causation is a common source of errors in business. Write a 300-500-word essay in which you explain correlation, causation, and the errors of confusing the two. Include at least one example from your personal or work experience that illustrates this problem and indicates the realized or potential costs of such a mistake.
Write an explanation and application about max weber bureaucracy
Write an explanation and application about max weber bureaucracy
Write theory, real life application and recommendations for Kinematic of linear motion lab?
Write theory, real life application and recommendations for Kinematic of linear motion lab?
write about one nursing theory. be sure to state the level of theory: grand, middle ......
write about one nursing theory. be sure to state the level of theory: grand, middle ... write a paragraph that explains the basics of the theory write a paragraph in which you give your thoughts and impressions compare it to other theories or cite your experiences in health care ( either as a worker or patient)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT