MaM Sense

INTRODUCTION

Bioelectric signals are the total electrical current produced by the electrical current on the tissue, organ or cell. Although biopotentials differ according to the tissues and organs from which they originate, they generally have common signal characteristics such as low amplitude (10 ΞΌV-10 mV) and low frequency (0 200 Hz). Specialized electrodes and electronic systems are used to obtain these signals for clinical purposes. The system used in this field is usually named with the name of the target organ (such as Electrocardiography, Electroencephalography). Electrodes, amplifiers, signal adaptors, and signal display devices are used in order to measure these potentials, which are of very small amplitude. Surface electrodes that are attached to the skin are commonly used as electrodes (EOG, EMG, ECG) because they do not damage the tissues. Sometimes it is necessary to use a needle electrode to make more local measurements. Because the measured signals are very small, recording problems are encountered at every stage. Problems such as skin conductivity, body movement, electrode noise, interference from the mains, electromagnetic wave interactions further deteriorate the quality of the already small signal.

Although it is possible to measure the biopotentials in every tissue in principle, ECG, EMG and EOG recordings are most frequently performed for diagnostic purposes today. EOG is a method of recording the electrical potential between the cornea and the retina with the help of electrodes placed around the eye. EOG signal amplitude is 0.05-3.5mV and frequency is 1-10 Hz. Electromyography (EMG) is a technique for evaluating and recording the electrical activity produced by skeletal muscles. EMG signal amplitude is 1-10 mV and frequency is 0-500 Hz. Electrocardiography (ECG) is a method for measuring the electrical activity going through the heart by using external (skin)electrodes. ECG signal amplitude is 0.5-1 mV and frequency is 0.1-40 Hz. The aforementioned bioelectric signals are first amplified by using a differential amplifying circuit to have a gain of 101, then filtering is done using a high-pass filter in accordance with the frequency band of the signal. In this filtering stage, the cut-off frequencies of the bioelectric signals were adjusted to be 0.1 Hz, 20 Hz and 0.3 Hz for EOG and EMG and ECG, respectively.

Cut-off Frequency for High-Pass Filter: 𝑓𝑐 = 1/2Ο€RC

Then, using the 2nd order Sallen-Key low-pass filter, the cut-off frequencies were adjusted to be 6 Hz, 500 Hz, 40 Hz and gain 3 for EOG, EMG, ECG, respectively.

Gain: πΊπ‘Žπ‘–π‘› (𝐴𝑣) = 1 + Ra/Rb

Cutoff Frequency If Resistor and Capacitor Values Are Different: 𝑓𝑐 = 1/2Ο€βˆšR1R2C1C2

Cutoff Frequency If Resistor and Capacitor Values Are Same: 𝑓𝑐 = 1/2Ο€RC

Cut-off Frequency for Low-Pass Filter: 𝑓𝑐 = 1/2Ο€RC

SIGNALS

Within the framework of this information, such signals can be received with an installed switch hardware and passed through the amplification and filtering stages relying on their characteristics. Then, clean single output from these mentioned three signals are obtained with a single integrated sensor. After the pre-amplificion of the signals by the instrumentational amplifier, the signals follows different patterns depending on the switch stage that the user arranged without any deterioration. At this stage, depending on the mode of the circuit, while the signal passes through different filtering levels, depending on the characterictics of the signal, different amplification amplitude is applied. Then, offset is added to the circuit before the final amplification. Thus, it is ensured that all signal types reach the same amplitude levels at the output. After these processes, the signals pass through the amplification stage again and reach the desired output amplitude.

ARDUINO CODES

EOG

#define THRESHOLD1 400
#define THRESHOLD2 700
#define EOG_PIN 0 //A0 Pin

void setup(){
pinMode(11, OUTPUT); // digital output pin 11 red
pinMode(12, OUTPUT); // digital output pin 12 yellow
pinMode(13, OUTPUT); // digital output pin 13 green
Serial.begin(115200);
}

void loop(){
int value = analogRead(EOG_PIN); //The "Value" variable reads the value from the analog pin
if(value > THRESHOLD2){ //blink
digitalWrite(13, HIGH); // green led on
delay(1000); // delay 1 second
digitalWrite(13, LOW); // green led off
delay(1000); // delay 1 second
Serial.println("Blink");
}
else if(value > THRESHOLD1 && value < THRESHOLD2){ //up
digitalWrite(12, HIGH); // yellow led on
delay(1000); // 1delay 1 second
digitalWrite(12, LOW); // yellow led off
delay(1000); // delay 1 second
Serial.println("UP");
}
else if(value < THRESHOLD1){ //left
digitalWrite(11, HIGH); // red led on
delay(1000); // 1delay 1 second
digitalWrite(11, LOW); // red led off
delay(1000); // delay 1 second
Serial.println("Left");
}
}


EMG

#include < Servo.h >
#define THRESHOLD 300
#define EMG_PIN 0 //A0 Pin
#define SERVO_PIN 3 //Digital Pin 3

Servo SERVO_1; //Define Servo motor
void setup(){

Serial.begin(115200);

//Set servo motor to digital pin 3
SERVO_1.attach(SERVO_PIN);
}

void loop(){
int value = analogRead(EMG_PIN); //The "Value" variable reads the value from the analog pin
if(value > THRESHOLD){
SERVO_1.write(150); //If the sensor value is greater than the THRESHOLD, the servo motor will turn to 150 degrees.
}

else{
SERVO_1.write(30); //If the sensor value is less than the THRESHOLD, the servo motor will turn to 10 degrees.
}
Serial.println(value);
}


ECG

int UpperThreshold = 530; //These threshold values can be adjusted
int LowerThreshold = 500; //These threshold values can be adjusted
int reading = 0;
float BPM = 0.0; //Beat Per Minute
unsigned long FirstPulseTime = 0;
unsigned long SecondPulseTime = 0;
unsigned long PulseInterval = 0;
bool IgnoreReading = false;
bool FirstPulseDetected = false;

void setup(){
Serial.begin(9600);
}

void loop(){

reading = analogRead(0); //Reading the ECG Data

if(reading > UpperThreshold && IgnoreReading == false){
if(FirstPulseDetected == false){
FirstPulseTime = millis();
FirstPulseDetected = true;
}
else{
SecondPulseTime = millis();
PulseInterval = SecondPulseTime - FirstPulseTime;
FirstPulseTime = SecondPulseTime;
}
IgnoreReading = true;
}

if(reading < LowerThreshold){
IgnoreReading = false;
}

BPM = (1.0/PulseInterval) * 60.0 * 1000; //BPM CALCULATION

Serial.print(reading);
Serial.print("\t");
Serial.print(BPM);
Serial.println(" BPM");
Serial.flush();

}

MAM High Tech


Our company’s vision is develops and produces software application using advanced technology by expert engineers.