The ECG circuit was first built according to the first schematic pictured where pin 10 would provide a small measurement that we needed to amplify. In the schematic used for the ECG, the Vref, V(+), and V(-) are used to find the heart palpitation. The first op-amp was used to set a new ground for the circuit. Then the AD623 amplifier then sends the small sensed difference to the second op-amp where the signal passes through an active band-pass while also amplifying the signal.
(first op amp located at the start of the circuit)
A voltage divider is used to provide a 2.5V input for a the amplifier set to a gain of 1. This provides a new ground for the rest of the system
(connected to arms and wrist to provide measurements)
The amplifier has high impedance, meaning our measurements will not draw current from the system. This is where we connect the alligator clips to our arms and wrist to measure our heartbeat.
(second op amp located at the end of the circuit)
Served to act as an active bandpass filter where the gain is 21. We decided to change Rf from 100k to 330k which changed the gain to 70.21 and also filtered more of the high frequencies.
This bode plot represents the cut-off frequencies given by the capacitors along the second op-amp. The 10uF capacitor along with the 4.7k(Ohm) resistor provides a high pass with a cut-off frequency of 21.27(Hz). The second filter occurs on the last Op-amp where the cut-off frequency is 147.06(Hz) thanks to the 68nF capacitor and a 100k(Ohm) resistor. We decided to change this cut-off frequency from 147.06 (Hz) to 44.56(Hz) since we began to receive noise from 60(Hz).
In this trial we looked at the normal heartbeat measurement, because we first saw two peaks back to back we added more of a delay. The sharp pulses are relatively easy to differentiate from the noise.
In the second trial, the participant held their breath, and we began to see more noise regarding the low frequencies.
In the third trial, the participant did cardio consisting of running, and we saw an increase in power and frequency.
-Array=csvread('/Users/JuanParra/Desktop/F0000CH2.CSV',1,3);
x = Array(:, 1);
y = Array(:, 2);
plot(x,y)
hold on
title('MATLAB Serial Readout From Oscilloscope')
xlabel('Sample Number')
ylabel('Amplitude')
f1.Color = [252.0,252.0,252.0]/256.0;
f1.InvertHardcopy = 'off';
%%Plot one cycle
AdultCycle = y();
AdultCycle_x = []
hold off
After looking at the oscilloscope readings from the initial circuit we noticed a lot of noise. Then looking at the fft we were able to see that our low pass filter was letting in more frequencies than we wanted. A change in the resistor from 100k(ohm) to 330k(ohm) would lower the cut-off frequency from 147(Hz) to 44.5(Hz), aimed at getting rid of 60(Hz) noise from AC. This would also change the gain experienced for the inverted amplifier which had a previous gain of 21.27. The new gain is calculated regarding the 4.7k(ohm) and the new 330k(ohm) which would be, 330/4.7 = 70.21.
The code for reading BPM, in the Arduino, is meant to delay enough so that the second peak is not measured in the BPM. This delay can be measured in the oscilloscope or Matlab where it ended up being 200-230 ms.