## Introduction: Acquisition, Amplification, and Filtering Circuit Design of a Basic Electrocardiogram

In order to complete this instructable, the only things needed are a computer, internet access, and some simulation software. For the purposes of this design, all circuits and simulations will be run on LTspice XVII. This simulation software contains libraries of over 1,000 components which makes creating circuits very easy. Because these circuits will be generalized, the “UniversalOpAmp2” will be used for every instance where an op-amp is needed. Additionally, each op-amp was powered by a +15V and -15V power supply. These power supplies not only power the op-amp but also clip the output voltage if it were to reach either of those two extrema.

## Step 1: Instrumentation Amplifier Design

After the signal has been acquired, it needs to be amplified to perform calculations and filtering on it. For electrocardiograms, the most common method of amplification is the instrumentation amplifier. As aforementioned, the instrumentation amplifier has many advantages when it comes to amplification circuits, the biggest being the high impedance between the input voltages. To construct this circuit, 3 op-amps were used in conjunction with seven resistors, with six of the resistors being equivalent in magnitude. The gain of most electrocardiograms is around 1000x the input signal [1]. The equation for the gain of an instrumentation amplifier is as follows: Gain = 1 + (2*R1/R2) * (R7/R6). For simplicity, every resistor was assumed to be 1000 ohms, except for R2, which was determined to be 2 ohms. These values give a gain of 1001 times bigger than the input voltage. This gain is sufficient to amplify the acquired signals for further analysis. However, using the equation, the gain can be whatever one wants for their circuit design.

## Step 2: Band Pass Filter Design

A bandpass filter is a high pass filter and a low pass filter working in coordination usually with an op-amp to provide what is known as a passband. A passband is a range of frequencies that can pass while all others, above and below, get rejected. Industry standards state that a standard electrocardiogram must have a passband from 0.5 Hz to 150 Hz [2]. This large passband ensures that all the electrical signal from the heart is recorded and none of it is filtered out. Likewise, this passband rejects any DC offset that could interfere with the signal. To design this, specific resistors and capacitors must be chosen so that the high pass cutoff frequency is at 0.5 Hz and the low pass cutoff frequency is at 150 Hz. The cutoff frequency equation for both the high pass and the low pass filter is as follows: Fc = 1/(2*pi*RC). For my calculations, an arbitrary resistor was chosen, then using Equation 4, a capacitor value was calculated. Therefore, the high pass filter will have a resistor value of 100,000 ohms and a capacitor value of 3.1831 microfarads. Likewise, the low pass filter will have a resistor value of 100,000 ohms and a capacitor value of 10.61 nano-farads. A diagram of the bandpass filter with the adjusted values is shown.

## Step 3: Notch Filter Design

A notch filter is essentially the opposite of a bandpass filter. Instead of having a high pass followed by a low pass, it is a low pass followed by a high pass, therefore one can essentially eliminate one small band of noise. For the notch filter of the electrocardiogram, a Twin-T notch filter design was used. This design allows for a center frequency to be filtered and provides a large quality factor. In this case, the center frequency to get rid of was at 60 Hz. Using Equation 4, the resistor values were calculated using a given capacitor value of 0.1 microfarads. The calculated resistor values for a 60 Hz stop band were 26,525 ohms. Then R5 was calculated to be ½ of R3 and R4. C3 was also calculated as double the value chosen for C1 and C2 [3]. Arbitrary resistors were chosen for R1 and R2.

## Step 4: Combination Circuit

Using nets, these components were placed in series together and the image of the completed circuit is pictured. According to a paper published by Springer Science, an acceptable gain of the ECG circuit should be around 70 dB when the entire circuit is set up [4].

## Step 5: Testing the Entire Circuit

When all the components were placed in a series, validation of the design was needed. Testing this circuit, both a transient and AC sweep were conducted to determine if all the components were working in unison. If this were the case, the transient output voltage would still be about 1000x the input voltage. Likewise, when the AC sweep was conducted, a band-pass filter bode plot would be expected with a notch at 60 Hz. Looking at the images pictured, this circuit was able to successfully accomplish both of those goals. Another test was to see the efficiency of the notch filter. To test this, a 60 Hz signal was passed through the circuit. As pictured, the magnitude of this output was only about 5x greater than the input, compared to 1000x when the frequency is within the passband.

## Step 6: Resources:

[1] “ECG Measurement System,” Columbia.edu, 2020. http://www.cisl.columbia.edu/kinget_group/student_projects/ECG%20Report/E6001%20ECG%20final%20report.htm (accessed Dec. 01, 2020).

[2] L. G. Tereshchenko and M. E. Josephson, “Frequency Content and Characteristics of Ventricular Conduction,” Journal of electrocardiology, vol. 48, no. 6, pp. 933–937, 2015, doi: 10.1016/j.jelectrocard.2015.08.034.

[3] “Band Stop Filters are called Reject Filters,” Basic Electronics Tutorials, May 22, 2018. https://www.electronics-tutorials.ws/filter/band-stop-filter.html.

[4] N. Guler and U. Fidan, “Wireless Transmission of ECG signal,” Springer Science, vol. 30, Apr. 2005, doi: 10.1007/s10916-005-7980-5.