lab 1  · web view2018. 2. 25. · in this lab, we created a circuit to clearly process...

12
EECE 2150 - Circuits and Signals: Biomedical Applications Lab 15: ECG – The Instrumentation Amplifier, Analog Filtering, and A/D Conversion April 5th, 2017 Teresa Hoch Lab Partners: Sam Glassner and Marco Serrato

Upload: others

Post on 29-May-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

EECE 2150 - Circuits and Signals: Biomedical Applications

Lab 15: ECG – The Instrumentation Amplifier, Analog Filtering, and A/D Conversion

April 5th, 2017

Teresa Hoch

Lab Partners: Sam Glassner and Marco Serrato

Spring 2017 Section 3

Page 2: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

Introduction:

In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise and unwanted low and high frequencies and amplify our target signal. We do this by using an instrumentation amplifier and a band pass filter made up of a high pass and low pass filter. In the first part of this lab we created an instrumentation amplifier that was used to reject the common mode signals and provide a gain. Once this first component was operational, we then add our low and high pass filters in an effort to reduce noise and prepare the ECG signal for analog to digital conversion. By the end of this lab, we were able to produce digital ECG signals in MATLAB.

Part 1 – Connecting and Powering the AD627 Amplifier.

For the instrumentation amplifier, we will use an AD627 which requires external DC power supplies of two 9V batteries for operation.

Figure 1. Diagrams for AD627 Instrumentation Amplifier Pin-Out and Connection.

Q1: The capacitors in this amplifier are there for safety. They remove any AC current and only let DC current pass through the circuit.

Q2: In order to get a total circuit gain of 25, we selected an R value of 10 k. This is because, according to the AD627 spec sheet, the gain equation is G=5+200kΩ /RG.

Page 3: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

Figure 2. AD627 Instrumentation Amplifier Circuit.

Part 2 - Testing the AD627

A sine-wave test signal with a 30 mV peak-to-peak amplitude is generated to test the AD627 chip.

Q3: We will use a frequency that is in the middle of the expected ECG signal frequency range. This range is 0.5 Hz to 20 Hz so we choose a test frequency of 10 Hz.

Figure 3. Test Signal Configuration.

The test signal is connected to the input pins of the AD627 as shown in the figure above, making sure one input is the sine wave and the other is ground. The output is measured on the oscilloscope.

Page 4: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

Figure 4. Input and Output on Oscilloscope.

Q4: We have an output voltage of 880 mV and an input voltage of 37 mV. This means the differential gain of the amplifier is 880/73, or 23.78. The spec sheet stated an expected gain of 25. These to values are close enough given that no circuit is exact.

The cut-off frequency of the amplifier occurs when the voltage is 0.707 times the maximum voltage. Our maximum is 0.88 V so our cut off frequency occurs at 0.622 V, which is 13.67 kHz.

The common mode gain Gc of the AD627 circuit was measured by connecting the signal generator to both inputs at the same time and measuring the output signal. The input signal will be a 250 mV peak-to-peak sine wave at 60 Hz. Gc = Output/Input = 3.5/250 = 0.014 at 60 Hz.

The common mode rejection ratio, CMRR, is equal to 20log10(Gd / Gc) which gives us a value of 64.6. The spec sheet states a CMRR of 77 5. This is reasonable agrees with our measured value.

Part 3 – First attempt at measuring your ECG signal.

Our ECG signal is measured using Biopac EL503 electrodes. Electrode placement and measurement configuration is shown on the figure below.

Page 5: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

Figure 5. Electrode Placement Diagram and ECG Measurement Configuration.

Figure 6. First ECG Measurement.

Page 6: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

The figure above shows the our first ECG measurement on the oscilloscope. As you can see, it is very noisy and, although you can make out the tips of the QRS wave, the rest of the heart beat components are not clear. In order to produce a better ECG signal we has to eliminate this noise. One source of noise is from the 60 Hz power lines that the body picks up from the environment. In the next part of this lab we will create low pass and high pass filters to eliminate the noise.

We increased our R value to 47 k in order to create a larger gain and increase our amplification. This was done in order to create the largest signal that is certain to fit within the combined limits of the +/- 9V.

Part 4 - Conditioning the ECG Signal for Input into the A-to-D Converter

Our next goal is to create the low and high pass filters that will remove the noise components that are not part of the ECG signal. Each of these filters will also have a gain. This is because we need to eliminate the DC signal in the filters before it is amplified. The figure below shows our signal path for the intended ECG circuit.

Figure 6. Signal path for ECG filtering and acquisition.

We will create a high-pass filter using a LM358 op-amp. Following the high pass filter diagram below, we choose resistors and a capacitor to create a lower cut-off frequency of 0.5 Hz or 3.14 rad/s. This is because the ECG signal has a frequency range of 0.5 Hz to

NI USB-6001

Page 7: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

20 Hz. The resistor values were each 30 k and the capacitor was 10 F. This creates an RC value of 0.3 which in turns gives us 0.5305 Hz as our lower cut-off frequency.

Figure 7. High Pass Filter Configuration.

Figure 8. Low Pass Filter Configuration.

Next we created a low pass filter using another LM358 op-amp to filter out high frequency noise. Following the diagram above, the cut-off frequency will need to be about 15 Hz and this was build with a 100 k resistor (R2) and 0.1 F capacitor. Initially, the low pass filter was set to have a cut-off frequency of 20 Hz but after testing the ECG signal, we realized we needed a lower cut-off frequency to eliminate more noise that was distorting our signal. The final cut-off frequency had a calculated value of 15.92 Hz. The filter also contained a 91 resistor (R) to create a very large gain of about 1099. This helped us to create the clearest ECG possible. The final ECG circuit with both filters can be seen in the figure below.

Page 8: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

Figure 8. Final ECG Circuit with Amplifier (left), Low Pass Filter (right), and High Pass Filter (middle)

Part 5 - Acquire ECG Signal

Again Biopac EL503 electrodes were placed on the body and the signal was shown on the oscilloscope. The new signal can be seen on the figure below. The filters and gain had a huge impact on the signal and made it look very different from the initial ECG signal.

Figure 9. Final ECG Signal

Page 9: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

Part 6 - Acquiring an ECG Signal Using the NI A/D.

Using the NI USB-6001 in Matlab, our ECG circuit, and the oscilloscope output, we acquired six 10-second long ECG traces. Each lab group member recorded a resting and active heart rate. These signals are plotted below.

Figure 10. Marco ECG Signal – Resting (left) and Active (right)

Figure 11. Sam ECG Signal – Resting (left) and Active (right)

Figure 12. Teresa ECG Signal – Resting (left) and Active (right)

Page 10: Lab 1  · Web view2018. 2. 25. · In this lab, we created a circuit to clearly process electrocardiogram, or ECG, signals. ECG signals can only be observed once we eliminate noise

It is interesting to note that not only does the frequency of heart rate increase from the resting to active state, as expected, but the shape of the ECG signal changes as well. The resting state across all the lab partners has the same classic ‘heart beat’ shape, while the active shapes seem to have a larger S and TU magnitude.

Conclusion: In this lab, we created a ECG circuit out of three basic components; an amplifier, a low pass filter, and a high pass filter. Each of these elements contributed to creating a clear ECG signal, free of unwanted noise and frequencies. The amplifier was made from an AD627 chips, two 9 volt batteries, and a 47 k resistor in order to create a large gain, reject the common mode signals, and increase our amplification within the limits on +/- 9V. A high pass filter was made from a LM358 op-amp, two 30 k resistors and a 10 F capacitor. This produced a lower cut-off frequency of 0.5305 Hz which was close to our goal of 0.5 Hz. A low pass filter was made from LM358 op-amp, a 91 resistor, a 100 k resistor, and 0.1 F capacitor. This created a upper cut-off frequency of 15.92 Hz which was close enough to 20 Hz but also allowed us to create a gain of 1099. The lower and upper cut-off frequencies were determined based on the fact that a human heart frequency ranges between a 0.5 and 20 Hz. Our ECG signal was tested using Biopac EL503 electrodes and an oscilloscope. We then produced digital ECG signals in MATLAB and plotted resting and active heart rates for each group member. From this lab we achieved a better understand of amplifiers and filters by creating a circuit with given cut-off and gain requirements and constructing these elements accordingly. We also were able to observe what happens biologically in a human heart at a resting and active state by observing the change in frequency and wave shape.