BME 207 Design Project

by chadwic0 in Circuits > Electronics

438 Views, 2 Favorites, 0 Comments

BME 207 Design Project

Screen Shot 2022-04-29 at 12.34.14 PM.png
Screen Shot 2022-04-26 at 12.52.13 PM.png

This design project had many different steps that allowed us to complete the final circuit. We needed to design a circuit that integrated an INA, Notch Filter, and Low Pass Filter. This will allow us to measure a human ECG once all the individual parts were integrated.

Supplies

List of Supplies

  1. Circuit Board
  2. 741 Op Amps (5 in total)
  3. Wires
  4. Jumper Cable
  5. Function Generator
  6. Power Supply
  7. Oscilloscope
  8. 20,000 ohm resistor
  9. Two 1,000 ohm resistors
  10. Two 10,000 ohm resistors
  11. 500,000 ohm resistor
  12. Two 1,800 ohm resistors
  13. 420,000 ohm resistor
  14. Two 22,000 ohm resistors
  15. Two 0.1 μF capacitor
  16.  0.2 μF capacitor
  17. 0.066 μF capacitor
  18. 0.0334 μF capacitor
  19. LT Spice Software
  20. Ardunio

Create LT Spice Schematics for INA and Compete AC Sweep

Screen Shot 2022-04-26 at 12.58.36 PM.png
Screen Shot 2022-04-26 at 12.58.53 PM.png
Screen Shot 2022-04-29 at 11.40.00 AM.png

In order to make the INA schematic, chose the theoretical gain of 1,000. We then used the equation shown above to calculate the correct resistor values to be able to make the proper schematic. In using this equation the left side of the equation is the gain, 1,000. The value of R1 was something that we arbitrarily chose to be 20 kΩ. We continued the calculations and obtained values of: R1= 20kΩ, R2=10kΩ, R3=1kΩ, R4=500kΩ. Shown below is the schematic we created for the INA. We then performed an AC sweep on the schematic. We were able to see that there was a gain of around 1,600 instead of 1,000. This was a marginally high percent error.

Create LT Spice Schematic for Notch Filter

Screen Shot 2022-04-26 at 1.02.00 PM.png
Screen Shot 2022-04-26 at 1.02.15 PM.png
Screen Shot 2022-04-29 at 11.41.53 AM.png

Next we created the notch filter. This filter’s purpose is to eliminate noise from the wall outlets used to power the machinery. The notch filter needs to eliminate the frequency of 60 Hz. Since we wanted to design a 60 Hz noise rejection filter, we used the equation shown above. Knowing the quality factor was ten we were able to successfully calculate R1, which allowed us to obtain all the other values needed for the schematic. We determined that R1 = 1657.86 Ω, R2 = 424,413.18 Ω, and R3 = 1651.41 Ω. We arbitrarily chose capacitor values of  0.1 μF and 0.2 μF, since the set up of this filter allows for flexible capacitor values. Knowing these values, we created a proper schematic and conducted an AC sweep. This AC sweep showed a cutoff frequency of 63.655 Hz. This was similar to our theoretical value of 60 Hz, with a marginally low percent error of 6.09%

Create LT Spice Schematic for Low Pass Filter

Screen Shot 2022-04-26 at 1.03.03 PM.png
Screen Shot 2022-04-26 at 1.03.17 PM.png
Screen Shot 2022-04-29 at 11.44.06 AM.png

Then we created the low pass filter. For the low pass filter we used the equation shown above. en the complex math, we conducted research to determine what a normal cutoff frequency for a low pass filter is, and we determined that it is 150 Hz [2]. We used the equations above to obtain resistor and capacitor values. We determined that R1 = 22,000 Ω, R2 = 22,734 Ω and the two capacitor values would be 0.066 μF and 0.0334 μF. With these values we were able to create the proper schematic and AC sweep. The AC sweep showed us a cutoff frequency of 150.25 Hz, which was similar to the theoretical value of 150 Hz, with a marginally low percent error of 0.16%.

Create INA on Circuit Board

Screen Shot 2022-04-26 at 1.03.57 PM.png
Screen Shot 2022-04-26 at 1.04.15 PM.png

We used the INA LTspice simulation as the circuit blueprint. The materials include: a breadboard, three op amps, 20kΩ resistor, 2 1 kΩ resistors, 2 10 kΩ resistors, 2 500 kΩ resistors, wires, function generator, power supply, and an oscilloscope. The photo of the circuit is shown above. We connected the three op amps in series. The power supply is connected to the op amps, using -9V and 9V. The rails along the top and bottom of the breadboard allow for all of the op amps to receive the positive and negative voltages. The rest of the components are as they appear in the schematic. We then displayed the input and output graphs on the oscilloscope. The graph shown in the oscilloscope is a transient analysis.Therefore, the gain was shown in a different way, however, it was still around 1,600. This gave us a percent error of around 60% for both of these tests. Therefore, our INA tests had a relatively high percent error.

Create Notch Filter on Circuit Board

Screen Shot 2022-04-26 at 1.04.52 PM.png
Screen Shot 2022-04-26 at 1.05.04 PM.png
Screen Shot 2022-04-26 at 1.05.18 PM.png

Then we constructed the notch filter, again, based on the schematic. The materials include the same breadboard, 224 code capacitor, 2 103 code capacitors, 1 420 kΩ resistor, 2 1.8 kΩ resistors, one op amp, wires, power supply, function generator, and the oscilloscope. Shown below is our physical notch filter circuit. The circuit consists of two resistors in parallel with two resistors and a grounded capacitor, in parallel with another resistor. This loop is placed prior to the input of the op amp. We ran two tests on our notch filter, the first one was displaying the input and output graphs of our circuit on the oscilloscope.The cut of frequency of this graph was 65 Hz, which was marginally similar to the theoretical cutoff, with an 8.3% error. After getting the display on the oscilloscope we ran a frequency sweep of our physical circuit. This showed that the notch filter had a cut off frequency of 60 Hz, which is the exact value of our theoretical cutoff frequency.

Create Low Pass Filter on Circuit Board

Screen Shot 2022-04-26 at 1.05.43 PM.png
Screen Shot 2022-04-26 at 1.05.57 PM.png
Screen Shot 2022-04-26 at 1.06.11 PM.png

The last component is the low pass filter. We gathered the materials of a breadboard, two 22 kΩ resistors, 0.066 μF capacitor, 0.0334 μF capacitor, one op amp, function generator, power supply, and oscilloscope. The setup of the low pass filter is as follows. A 22kΩ resistor is placed in parallel with another 22 kΩ resistor and grounded .0334 μF capacitor and .066 μF capacitor in parallel. This loop occurs prior to the op amp, which is powered with 9 and -9V inputs. We displayed the input and output graphs of the low pass filter and obtained that the cut off frequency of our circuit was 149 Hz, this had a marginally low error of 0.67%. We then performed a frequency sweep of our circuit and obtained the cut off frequency of 150 Hz. This was the exact value for the cut off frequency we expected. 

Integrate the 3 Parts to Be One Whole Circuit

Screen Shot 2022-04-26 at 1.06.45 PM.png
Screen Shot 2022-04-26 at 1.06.57 PM.png
Screen Shot 2022-04-29 at 12.26.59 PM.png

We conducted testing on each of the above components individually, and ensured that their outputs were as they were in the LTSpice simulations. Then we could integrate these three components into one final circuit. The steps we took to integrate this properly were to first connect the output of the INA to the notch filter. There was one output from the INA and this was connected via a wire to the first component of the notch filter. Then we connected the single output of the notch filter to the first component of the low pass filter. These connections allowed for the final circuit to be integrated successfully. Shown below are the images of our final integrated circuit. We performed two tests on this circuit. First, we sent a preloaded cardiac signal from the function generator into the circuit as the input. We observed the results of this signal through the oscilloscope, then we used a human subject as the input. We placed the positive electrode on the subject’s left ankle, the negative electrode on the right wrist, and the grounded lead on the right ankle. When connecting this to our integrated circuit the positive electrode connected to the input of the first op amp in the INA, and the other lead was the input signal for the second op amp in the INA. The right ankle lead was grounded with the top red rail on the breadboard. Once connected, we turned the power supply on to power the op amps with 9 and -9 V. The ECG graph of the integrated circuit is shown above, however, our ECG is inverted.

Use Ardunio to Plot ECG and BPM

Screen Shot 2022-04-26 at 1.08.45 PM.png
Screen Shot 2022-04-26 at 1.09.00 PM.png
Screen Shot 2022-04-26 at 1.09.12 PM.png
Screen Shot 2022-04-29 at 12.27.34 PM.png

We used Arduino software to plot the biosignal and produce a BPM readout interface. The materials for this component of the lab were Arduino software and code, an Arduino board, wires, the function generator, a human subject with connected leads, and the integrated circuit. First, we obtained the code given to the students in the course. This code was uploaded into the software, and we established a connection between a computer and the Arduino. To begin, we ran the function generator straight through the Arduino and observed the plot to ensure the machinery was functioning. Once we generated a plot, we observed the upper and lower limits of the QRS complex on the plot in order to manipulate the code to produce a BPM readout. In the next portion of the Arduino component, we ran the signal from the function generator through the integrated circuit, and read the results on the Arduino software. This allowed us to visualize the plots and observe the BPM readout with the results of the circuit shown. Then, we switched the function generator for the human subject, and performed the same process. Our first test performed on the Arduino, was just running it alone connected to the computer, and we were able to obtain the normal ECG graph.We connected the Ardunio through our integrated circuit. We ran the output of our circuit and the graph is shown above. Our graph was inverted, however, it was periodic. Therefore, since we were running into problems with our computers working with the Ardunio, our TA was able to accept this data because it showed the correct trend. We then ran the beats per minute function on our integrated circuit. We obtained a value of 71 beats per minute. We were expecting 72 beats per minute, based on how we calculated our frequency. This was a marginally low percent error, which was 1.3%.