instructables Design a Functional ECG With Automated Plotting of the Biosignal Instructions

June 9, 2024
instructables

instructables Design a Functional ECG With Automated Plotting of the

Biosignal

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-product-image

Design a Functional ECG With Automated Plotting of the Biosignal

This project combines everything learned this semester and applies it to one single task. Our task is to create a circuit that is able to be used as an electrocardiogram (ECG) by using an instrumentations amplifier, lowpass filter, and notch fi lter. An ECG uses electrodes placed on an individual to measure and display the heart activity. Calculations were made based on the average adult heart, and the original circuit schematics were created on LTSpice to verify gain and cutoff frequencies. The objectives of this design project are as follows:

  1. Apply instrumentation skills learned in lab this semester
  2. Design, build, and verify the functionality of a signal acquisition device
  3. Validate the device on a human subject

Supplies:

  • LTSpice simulator (or similar software) Breadboard
  • Various resistors
  • Various capacitors
  • Opamps
  • Electrode wires
  • Input voltage source
  • Device to measure output voltage (i.e. oscilloscope)

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-1

Step 1: Make the Calculations for Each Circuit Component
The images above show the calculations for each circuit. Below, it explains more about the components and the calculations done.
Instrumentation Amplifier
An instrumentation amplifier, or IA, helps provide a large amount of gain for low-level signals. It helps increase the size of the signal so it’s more visible and the waveform can be analyzed.
For calculations, we chose two random resistor values for R1 and R2, which are 5 kΩ and 10 kΩ, respectively. We also want the gain to be 1000 so the signal will be easier to analyze. The ratio for R3 and R4 are then solved for by the following equation:
Vout / (Vin1 – Vin2) = [1 + (2R2/R1)] (R4/R3) –> R4/R3 = 1000 / [1 + 2*(10) / (5)] –> R4/R3 = 200
We then used that ratio to decide what each resistor value will be. The values are as follows:
R3 = 1 kΩ

Notch Filter
A notch filter attenuates signals within a narrow band of frequencies or removes a single frequency. The frequency we want to remove in this case is 60 Hz because most noise produced by electronic devices is at that frequency. A Q factor is the ratio of the center frequency to bandwidth, and it also helps describe the shape of the magnitude plot. A larger Q factor results in a narrower stop band. For calculations, we will be using a Q value of 8.
We decided to choose capacitor values we had. So, C1 = C2 = 0.1 uF, and C2 = 0.2 uF.
The equations we will be using to calculate R1, R2, and R3 are as follows:
R1 = 1 / (4piQfC1) = 1 / (4pi8600.1E-6) = 1.6 kΩ
R2 = (2Q) / (2pifC1) = (28) / (2pi600.1E-6) = 424 kΩ
R3 = (R1R2) / (R1 + R2) = (1.6424) / (1.6 + 424) = 1.6 kΩ

Lowpass Filter
A low pass filter attenuates high frequencies while allowing lower frequencies to pass through. The cutoff frequency will have value of 150 Hz because that is the correct ECG value for adults. Also, the gain (K value) will be 1, and constants a and b are 1.414214 and 1, respectively.
We chose C1 to equal 68 nF because we had that capacitor. To nd C2 we used the following equation:
C2 >= (C24b) / [a^2 + 4b(K-1)] = (68E-941) / [1.414214^2 + 41(1-1)] –> C2 >= 1.36E-7
Therefore, we chose C2 to equal 0.15 uF
To calculate the two resistor values, we had to use the following equations:
R1 = 2 / (2pif[aC2 + sqrt([a^2 + 4b(K-1)]C2^2 – 4bC1C2)] = 7.7 kΩ
R2 = 1 / (b
C1C2R1(2pi*f)^2) = 14.4 kΩ

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-2 instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-3 instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-4 instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-5

Step 2: Create Schematics on LTSpice
All three components were created and ran individually on LTSpice with an AC sweep analysis. The values used are the ones we calculated in step 1.

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-6

Step 3: Build the Instrumentation Amplifier
We built the instrumentation amplifier on the breadboard by following the schematic on LTSpice. Once it was built, the input (yellow) and output (green) voltages were displayed. The green line only has a gain of 743.5X compared to the yellow line.instructables-Design-a-Functional-ECG-With-Automated-
Plotting-of-the-Biosignal-7

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-8

Step 4: Build the Notch Filter
Next, we built the notch filter on the breadboard based on the schematic made on LTSpice. It was built next to the IA circuit. We then recorded input and output voltage values at various frequencies to determine the magnitude. Then, we graphed magnitude vs. frequency on the plot to compare it to the LTSpice simulation. The only thing we changed was the values of C3 and R2 which are 0.22 uF and 430 kΩ, respectively. Again, the frequency it is removing is 60 Hz.

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-10

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-11

Step 5: Build the Lowpass Filter
We then built the low pass filter on the breadboard based on the schematic on LTSpice next to the notch filter. We then recorded the input and output voltages at various frequencies to determine the magnitude. Then, we plotted the magnitude and frequency to compare it to the LTSpice simulation. The only value we changed for this filter was C2 which is 0.15 uF. The cutoff frequency we were verifying is 150 Hz.

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-12

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-13

Step 6: Test on a Human Subject
First, connect the three individual components of the circuit together. Then, test it with a simulated heart beat to ensure everything is working. Then, place the electrodes on the individual so the positive is on the right wrist, negative is on the left ankle, and the ground is on the right ankle. Once the individual is ready, connect a 9V battery to power the opamps and display the output signal. Note that the individual should remain very still for about 10 seconds to get an accurate reading.
Congrats, you have successfully created an automated ECG!instructables-
Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-15

instructables-Design-a-Functional-ECG-With-Automated-Plotting-of-the-
Biosignal-16

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

instructables User Manuals

Related Manuals