Design and Implementation of Peak Detector and Thresholding Circuit for ECG Signal Conditioning

Now we will see other steps in our signal conditioning and processing unit, so if we recall our block diagram, if you go back to and visualize our block diagram, we will see this CC amplification sometime later by the end of the experiment a nd we have done the filtering part which is nothing but a pre-processing part which are, we require especially like low-pass filtering, high-pass filtering as well as notch filtering Now next step is what? If we recall our previous session, we require in order to find out our BPM we require to know the QRS peaks, how many number of QRS peaks obtained within a minute gives the measurement of our BPM, so in order to find out that BPM value how do we determine, this is our peak, QRS peak and when we see that peaks can be either a positive peak or negative peaks, generally negative peaks are called valleys, but when we design a circuit no matter what either it may give the positive peak or a negative peak and since we are interested only in a positive peak values, if you can pass through an half-wave rectifier the negative peaks will be completely removed off, so thatís the reason we are interested in or we have to design a half-wave rectifier, but it is not mandatorily to have a half-wave rectifier even simply we can go with a positive detector and itís ritual in circuit and we can implement that too without having a half-wave rectifier too But if we have a half-wave rectifier we donít even have to worry about the negative peaks at all, you know, how do we do an half-wave rectification? Half-wave rectification is an op-amps, if you remember op-amp generally in case of any rectification the first and the important passive element, the important active element that we take is nothing but our diodes, diode place an major role, diode place a active role even in case of our filtering from AC to DC, so once step is our rectification where half-wave you know by using a diodes weíll convert our AC signal into pulsating DC So the problem with simple element is impedance matching, so thatís a reason if you want to have some gain as well as some kind of an you know impedance matching rather than having a simple you know diodes if you can go with a diode with an operational amplifier it will always have a better advantage Now if you see our you know half-wave rectifier, so since we require to remove our negative, remove negative signal right, as our intention is to find out our positive peak then negative peak will be rectified using this half-wave rectifier Now how does it work? If you clearly see that right, the input is connected to the positive terminal, and forget about the diode right now, how does it, if this diode is not that, how does it look like? It is nothing but our half-wave rectifier, sorry it is nothing but our voltage follower Now how does an voltage follower works, what are the input that they give? Output will also be the same, and the gain of the voltage follower is 1, so whatever the input amplitude the output will also have same amplitude because not having any change in the shift, phase shift, the reason is the input is applied to the positive terminal, but now in this case if you clearly observe there is a diode, only one particular amplitudes will be allowed and the amplitudes below, and the negative amplitudes cannot be allowed, right, so when the diode is in a forward bias condition it will allow the input signal, when the diode is in reverse bias condition it will not allow it, right, so to understand about the circuit what we do is that we can understand, for example like say if the input is a positive peak, what supposed to be the output? It should also be positive peak, right Now because of this positive peak that diode will be in forward bias condition so that we will get a positive peak Now during a negative peak, since it is voltage follower right, we will get a negative and diode will be in a reverse bias condition, so we will not get anything, right, but diode

will have some cutoff, okay, ideally speaking we will not get any negative And similarly another positive peak, like so as a result when we pass through this circuit weíll get only a positive peaks, why? Why do we have to go with the circuit? Because when we see our ECG signal, ECG signal will also looks like something like this, since our interest is only this QRS peak, and we do not have to consider the negative and this is nothing but our unwanted signal, so what we can do is that, we can remove this particular signals which are lower than this value, right, so that means the negative values can be completely eliminated, removed by using this are half-wave rectifier, so to understand that weíll do you know simulation Now what do we required? We required a diode, let me take op-amp as well as diode, let me take op-amp as well as diode, then we require a resistor, so negative terminal should be connected here, and this is RL, need resistance values more than enough for this point, even we can go with a 10K it should not load the input, so let me take it as 10K resistor Now to understand the working of the diode, working of our half-wave rectifier, what we do is that weíll connect a sinusoidal input free signal, working of the circuit, connected sinusoidal input signal right, and the peak to peak values 2 volts, because this signal is generally used to represent a peak voltage itself, since we require the positive peak and negative peak as an input signal so that easily to understand whether it is passing only the positive peaks or positive as well as negative peaks, so we can take peak to peak as 2 volts Then to visualize both input and output Iím connecting green, green represents our input signal, and other one blue represents our output voltage Now when we go to the grapher and run the circuit, right, if we observe the green is nothing but our input, and blue is nothing but our output when we see that the green is completely right full wave with a peak to peak as 2 volts, right, peak to peak value has 2 values, but whereas an output if you observe it was only allowing a positive peaks to flow, whereas input peaks is completely removed off, so even if you consider ECG signal in the same way only the positive portion of the ECG signal will be allowed, and the negative portion of the ECG signal will be removed, so that now it is easy to understand the positive peak from the data, from the signal and we can set a threshold Now here comes our thinking, why? The reason is when we recall what we have discussed about our ECG signal, till this part is okay, but how do we find out this particular voltage is the peak, and how do we find out this particular voltage is a peak, and how do we set a threshold to the system, right, so as we know that if we keep a capacitor, capacitor will charge, to what value? To whatever the output we receive, so from that we can understand that if you use a capacitor, if the voltage is increasing capacitor starts slowly, right, so since if we do not create any discharging path, whichever the voltage that we get, highest voltage that we get, capacitor will be charge to that highest voltage value, that is good enough, so it is easy to understand the highest peak in ECG signal, what I mean is that suppose if I pass the signal to a capacitor, so if the complete signal is passing through this, since the maximum voltage is this particular value, right, and if I donít create any discharging path the capacitor will always at this particular point But how do we set a threshold, right, the idea is that if I can set it threshold, if we recall what we have discussed in our first session of our experiment, if you recall, if I can set a threshold and if I can find the peaks, how many number of peaks above this particular threshold points that completely gives our the number of peaks in particular

duration of time, but why? Why do we have to consider? The reason is when we see the peak this also will be considered as a peak, this also considered as a peak, right, so if I donít consider the threshold even this things can also be considered as a peak and it is very hard to understand the BPM correctly and accurately, so thatís a reason as we have already know that the QRS peaks is very, very long or having a very high amplitude compared to other peaks if we can detect this particular peak, our problem is solved So in order to detect that we are using capacitor which shows the, you know the complete highest voltage but how do we create a threshold, right, and if I can create a threshold, if I compare the output signal from the input signal, so when you do the comparison whichever is the highest that I can decide it, right, so if you see the logic to implement it, so this particular capacitor part will charge, and the purpose of this 1mega and 2 mega is to provide threshold, but what percentage of threshold we are doing here? So if you observe suppose if I say this is nothing but voltage divided circuit 1 mega, 2 mega, if I say this is V in, so this is what? V out, V in is the charge across our capacitor, right, the capacitor will be charged to the R voltage value, let us consider that V in, so V out is nothing but V in into 2 mega divided by 3 mega, so 2 divided by 3 is how much? 66% right, 2 divided by 3 is 66% of Vin, so that means we are setting a threshold at 66% If you want to set at 75% or if you want to set at 50%, even we can change the resistance value such a way that it will always gives 70% or 65%, whatever the percentage that threshold in that we required for Now why do we are choosing 1 mega and 2 mega resistance, why not 1 kilo, 2 kilo, 100 ohms, 200 ohms, the reason is that the input signal should not, see it should not create any loading of our input signal, when we choose a lower resistance value, this resistance required some current to operate, right, so because of that we cannot, we creates loading on our input signal, so in order to not to have any effect on our input signal, what we do is that if I can take very high input resistance, it will not load the input signal, so rather than going with 1 kilo or 100 ohms, if I go with a mega ohms you know the loading effect will be good, so thatís why we are using 1 mega and 2 mega, so then whatever we get is nothing but the signal which is greater than this threshold, this threshold is 66.6%, so you will get a signal like this, right, we will see, what we do is that in a simulation weíll pass sinusoidal signal and we will look at this point without this particular, weíll see whether the capacitor is charging to the peak value or not Now we will take even this particular portion, this portion too attached to that and we will see whether it is setting a threshold and it is passing only the values greater than that particular threshold or not, right, and we will also compare with experimental results Now we will see how to implement the circuit using a simulation, once we verify in a simulation we will see in actual way and we will do the experiment on that, so just open multisim, if you recall the circuit what we have discussed, just recall the circuit, so we need this particular part, so I will take an op-amp, Iíll take op-amp, right, and I need to have a diode so I will take a diode, then we will take resistors as well as the capacitor, Iím taking resistor, one more resistor and the capacitor too, so capacitor is also there, then this resistor, right, so this two has to be connected together Now if you remember the purpose of a capacitor is to charge to a peak value, so whichever the value that we are that ECG signal, peak value is there that will be charge inside

the capacitor, now the purpose of this resistors are to provide a threshold, now we are setting a threshold using 1 mega ohm resistor and 2 mega ohm resistor, so when we calculate if we recall it is somewhere around 66% right, so Iím taking 1 mega as R1 resistor, and 2 mega as R2 resistor Now we have to connect this terminal to this one, right, so this is the input signal, so in order to test the circuit what we use? We generally go with AC voltage, so let me connect the AC voltage here, connecting here and we also need a rom, so Iím taking rom connecting here from here to here, and even this part should be ground So what we have to do using the circuit, what we have to measure? We will see what is the output voltage at this, whether when I change the voltage of the input, whether the capacitor output, so in order to understand what I do is that let me remove this part, this particular terminal, so that there is no connections here so we can easily see whether it is following the peak or not, then we will make this connection and at this particular terminal, at this particular junction or at this particular node right we connect another voltage output, nothing but our, we will connect it to a probe and we will see, how the output signal looks like, right, so whether it is given the threshold of our requirement or not Now I will take two probes, one at the input so which measures the input voltage or whatever the input that we are connecting to the op-amp positive terminal and other one at this particular point, right, so the green it represents our input and the blue represents our output of the op-amp now Now to understand the circuit let me go to the grapher and run it, see, what we can see? The green is completely input, right, the blue is output, output is always showing it as 1, right, let me stop it, so if it is showing it the 1, how do we understand it? Now if I zoom completely, zoom all and let me zoom only to this particular portion somewhere around 159 milliseconds, right, and even to 10 milliseconds Iíll zoom, right, if you observe the output initially it is keep on increasing, keep on increasing meaning, it is charging, the capacitor starts charging, charging, charging, and it charge to value of 1, why only to 1? Because the input voltage, the peak voltage that we applied is only 1 volt, and since we do not have any discharging part, since it is a maximum voltage that the output is providing it is the capacitor is always at this particular point What if I change my output? Right, if I change, sorry, what if I change my input? If my input voltage change, if the input voltage is 2 volts, slowly again the capacitor starts charging to the 2 volts value, why donít we see that? So the whole idea of the circuit is to find out the peak value and the purpose whether it is, the purpose solving or not let me check, so let me run continuously, and Iím running it continuously, now this voltage I will change it to 2, 1.05 to slowly to 2 value, 2 volts, now it is a 2 volts Now let me change the settings of the grapher, 2 voltage, if you observe now this capacitor started increasing to a value of input peak value, right, isnít it? Now what if I decrease? Let me decrease, right, now the capacitor started slowly decreasing because the input voltage now is very smaller, and the capacitor will also take some time to discharge so because that entirely depends upon the discharging rate, so thatís why it started discharging and again continuously maintaining the value of the peak, so that means one part it is clear that whatever the peak voltage that we are getting, the capacitor can, the capacitor will charge to that peak value, right Now, what is the other purpose? We have to see whether it is providing the threshold of our requirement or not, so in order to understand whether it is providing or not, what we do? We will connect this R1 resistor and we will take another output voltage connected this

point, now this particular terminal is not interested in, I donít have to, so what I will do is that, let me run and yeah even if you decide no problem for us, right, so this indicates our the output voltage at this particular point and the violet colour indicates the threshold, that means the output voltage at the threshold, at the junction or node point of both the resistors 1 mega and 2 mega Now based upon our calculation, based upon our calculation what is the threshold value? So as we, if you recall the potential divider circuit it is nothing but V in into R2 divided by R1 plus R2, so in this case V in is, for example like say V in is 1 volt and R2 is 2 mega, R1 is 1 mega 2 by 3, 2 by 3 is 66.6, right, so that means if the input voltage is 1 volt, the threshold point is somewhere around 0.66 millivolt, our point is 666 millivolts right Now so to understand that let me change the input voltage to 1 volt, now observe, right 664 millivolt that means it is properly following the required or whatever the thresh point that we set, right, if the input voltage is changing even the threshold value will change, and how fast it changes everything depends upon the capacitor value that we have chosen there, so in this case we have chosen 1 micro farad capacitor, right So another requirement in order to do the signal conditioning circuit or signal processing circuit of our ECG is completely fulfilled using this circuit, right Now what is other part? What is the other part? Now once we detect, once we understand which all are, but which are all voltages or which are all the input signal is greater than this particular threshold only those output signals has to be passed, right, now we have set this, now what we have to do? The input signal should be compared with this particular threshold value and whenever the input value is greater than the threshold value only that particular value has to be pumped out, so in order to do that what we have to use? We have to go with a comparator, simple comparator is enough, we donít have to go with any metrogas or anything, the reason is we are not setting any two thresholds here, we are using only single threshold if the input value is greater than this particular value, only that particular signal has to be passed, and that has to be detected, and that has to be counted, so depends upon how many number of such a pulses are we are getting, and if we use a counter there then we can automatically see the number of pulses we are getting per second or per minute, or anything Now in order to that we will implement other part of our circuit, when we look into our presentation right, this particular part we have seen and if the input signal is sign wave, if the input signal is sign wave, right, then at this particular point the output will be completely, because of the capacitor the output is charged to the particular value, that is nothing but a peak value, so that means we could able to see the peak value, now this particular point we can also create a threshold Now next part is identifying and generating triggering pulses if the input voltage is greater than the particular threshold value, so in order to do that what weíll be using? We will be using a comparator, we will compare the input signal, sorry, the input signal with this particular threshold, right, so how a comparator works? If you recall the working of a comparator and if I observe this, okay, let us say this is plus and minus, this is V1 and this is V2, and this is V naught, if you recall, so the V naught will be equal to +VCC if V1 is greater than V2, right, and V naught will be equal to ñVCC if V1 is less than V2, now in this case if I see V1 is nothing but our threshold, right, so positive terminal is V1 and in this case positive we have connected to V1 that means the threshold value is 666 millivolt, and V naught is what?

Sorry, and our V2 is nothing but the input signal or the positive peak QRS wave, right, only this particular part Now when we are passing that we will get a peak only when this particular input, right, input is greater than this value, right, so when the input signal is greater than 666 millivolt, so also say this is 666 millivolt, then we will get a peak value, pulse Now we will see whether we are getting it or not, so what I will do is that we will implement the same circuit, so if you remember so this particular portion will implement now, right, so here we will apply the input, actual input signal right, this input signal we are applying and here it detects a peak and it generates a threshold that we will compare with the input signal and whether we will get pulses only when the input is greater than that or not we will observe that, okay So Iíll go to multisim once again, let me save the circuit, alright, Iím opening a new file or to this itself we can create extension of it by using another comparator, so I will go with schematic and I will take one more op-amp, right, so let me flip it, and the negative terminal when you look into our circuit if you see, to the positive terminal we are connecting, we are connecting the threshold value, and to the negative terminal we are connecting the input signal Now so just to identify what I will do is that I will take one more resistor, some rough 1K value and other terminal Iíll be connecting it to the ground or you can connect it to, okay, we will take the same circuit itself, we will take LED, so I will take an LED, connect it here and one more ground let me connect it here, so colour is red, okay, itís cool, now AC let me run it, so since the frequency is very high you can see itís continuously glowing, so make it as frequency, sorry, 1 volt, I will say 1 volt okay, right, then this one let me decrease, so we have to analyze so 100 volts is also really higher to understand so let me make it as 50, even that is too much, 30, okay, go to grapher and here let me change, let me increase the time division just to understand so what is happening here that we have to understand Now so we have not connected voltage source here, so let me remove everything, right, so I will take one more voltage source connect at this point, okay, Iíll take one more voltage source connect at this point, now let me go to the split voltage, right, so zoom it, so to understand this, how do we understand? If I want to understand this what I have to do is that I have to create a cursor, the input voltage is 1 volt, so the cursor is Iíll take Y axis cursor and I will keep somewhere around if you observe the cursor value it should be somewhere around 666 millivolt, okay somewhere around roughly 679 and let me zoom little bit so that easy to understand

for us, make it as auto or single, yes Now, what to understand? One thing is clear that the C1 represents our threshold, and the green colour represents our input signal, what about the blue colour? Blue is nothing but our output, now what is happening? Whenever the input signal is greater than that, whenever the input signal is greater than the threshold value what is happening? It is going to ñVCC, right, and whenever the input signal is lower than that it is going to +VCC, the reason why because we have used positive input, yeah here if you observe the negative terminal is connected to here, where the positive terminal is connected with the threshold Now when we recall our comparator working, one thing we are sure that the output will be higher only when the input signal is greater than this particular value, right, that is what we even have seen in the calculation Now to quickly understand that why donít we take some values? So take a sign wave, Iím taking a sign wave, so letís say the value is 1 volt, so Iím applying a sign wave of 1 volt, and the threshold value is 660 millivolt Now this is positive, right, so in order to become +VCC, V naught to be +VCC when it will become only if the input is lower than the threshold in this case, right, suppose if the input is 0.5 volts, V1, so we are taking V1 as positive, V1 will be higher and this value will be lower, as a result V out will be +VCC, so thatís a reason, but we require in ulta way, so that means if I make this as a positive, and this has a negative, right, then what happens? Since it is 666 and this is the sinusoidal wave, okay, so this is threshold, in order to become V naught as higher, the input voltage should be greater than the negative value, only then it will become higher Now let me go to schematic just to stop the circuit, Iíll change, Iíll swap the terminals, okay, this particular terminal should be connected to here and this is your, and this particular terminal should be connected here, right, that is input, and here I am going to measure the threshold value and this is, okay, now let me run it, so grapher, now see what is happening? Yes, when we observe C1, C1 is at what point? C1 is at 679 millivolt, so we require 666, now when we see the output is becoming higher only when the input is greater than this particular threshold, now what is other colour behind that value, behind that C1? That is our blue colour that is for the threshold, so here if you remember the schematic we have used one at this point, other one at this point, light blue, sky blue and dark blue, so here if you see this is the output and the sky blue colour is somewhere here, so that is our threshold, right Now whenever the input is greater than the value we can also see the LED is keep on blinking it, right, if I change the input voltage even thresholds everything will change, so let me make it as 5 and change this to auto, right we can see, threshold is also changed and even right this is the input and this is the threshold, and this is the output that we are getting it, so that means that the thresholding part everything is working fine for our application Now we will see experimentally right, we will see experimentally of complete circuit, now if you see the next part of this, this particular portion, so we are using the diode, right, and we are also using a resistor, right, this diode and the first quadrant to portion of the op-amp is using that you know the half-wave

rectifier portion, so in order to verify that circuit what we do is that now the input we will connect it to, the input signal weíll connect it to the input of operational amplifier that is at the pin number 3, so what I will do is that I will take the input sinusoidal signal to 3 volts, to the third pin, so the third pin is somewhere here, okay, and this is the output, okay And which is the output in this case? The output is after the diode, so that is somewhere around when you recall the circuit the output is the cathode terminal of the diode, right, so the cathode terminal of the diode is connecting it to the second pin, second pin is are nothing but a inverting terminal of our op-amp, now if you see that, in this case I will take one more wire or Iíll take the second CRO probe, and I will connect the second CRO probe to the second pin, so third pin is input so Iím connecting it to the third pin of the input signal and the second pin is the output Iím connecting it there, right Now so let me auto set it, so we can keep it at any frequency there is no problem, when we look into the oscilloscope, so what I will do is that I will change a little bit down to the same value, from the signals it is clear that, right, only one peak we can see in the output, and other peak we cannot see that, that is because of half-wave rectifying, so we are removing complete negative peak signals of our input signal by using a simple diode, why? The reason is that we have to find out only the positive peak, we donít need negative signal processing in this case, so thatís the reason we are going with the removal of a negative signal Now if I observe, so there is no negative signal whenever there is a negative signal in the input the output is zero, and positive signal it is passing through, output is zero when there is a negative again, so that means it is completely removing our negative part, negative peak of our signals, negative signal set also, even if I change the frequencies no matter what frequency that you are at, so it can only pass positive frequencies, not the negative frequencies, sorry positive input signal not the negative input signal, right, so that means that particular portion whatever we have seen in the simulation and what we are seeing in our experimental, the half-wave rectification is completely done Now, what is the next part that we have to see? After passing through the half-wave rectifier we have to find out the peak, so in order to do the finding out the peak if you remember we are using a capacitor, now in this case if you see here the other part of the operational amplifiers in the board, right, when we look into the board, right, so this part we are using a capacitor and we are using the resistors of 1 mega and 2 mega, right, this combination, this particular combination will give us the peak, you know the peak detection as well as the thresholding, so now what I will do is that, so since we have already connected to this terminal, and the output of this is connected to the next portion of our circuit, it is nothing but the peak detection, so itís already connected using the white colour wire here, the output of this and now what Iíll do is that the output of CRO, weíll take the output of CRO, so we will connect this particular point to the cathode or the sixth terminal in this case, so this is my output, right, when we see that, when we look into the oscilloscope, the input is yellow in colour, input is yellow and the output is, the sky blue in colour right, we can clearly see that

Now the output is very, the output is completely at the peak value of our input signal, now what if I change the frequency? It remains the same, what if I change my amplitude? Right, so now let me increase the amplitude value, so right now it is the peak value of 1 volt if you see that the peak value of 1 volt because we are applying amplitude of 2 volts peak to peak, 1 volt on the positive peak and 1 volt in the negative peak, so the 2 volts peak to peak value Iím increasing the voltage so I will go to the amplitude I will change it to 3 volts, so that means 1.5, now see the capacitor, because of 1 microfarad capacitor itís quickly charged and it has gone to that particular peak value Now if I slowly increase even then we can see, so it is always, but whereas when I am decreasing it? We can observe that the capacitor is slowly discharging, and but whereas when Iím increasing it we can see the quick rapid change of going to the peak value, so that means we can understand that with this circuit we can easily find out the peak value of the input signal, right, so the peak detection part is done Then the next part is once the peak detection is done we have to create a threshold, now if I recall our circuit we are creating the threshold by using 2 resistance that is of 1 mega and 2 mega resistor, why we are using such a high resistance value? Again the reason is that not to have any loading effect into the system, so what I will do is that now this particular output terminal, the blue connection I will connect it to you know that junction, the resistor junction so when we see that we have connected an output at this point, right, which is the combination of 1 mega and 2 mega resistor, so what we are using it at the node of 1 mega and 2 mega we have connected the output, so here if we can see we have applied input frequency of 100, right, amplitude peak to peak value of 2 that means peak value of 1 volt Now when we see the output, the yellow represents our input and we can see that the output is in blue colour, right, the peak value is of 1 volt, 1 box, and the blue colour if I see it is 2 points, so somewhere around 486 millivolts we are getting it, the reason why there is a difference in the axle calculated value and the experimental value, it maybe because of some loading due to the previous stages or maybe because of the tolerances that we have, that since we have used 1 mega, 2 mega resistances, the tolerances, 5% tolerances is enough to change the complete resistance value of that, two different other values, so because of that tolerances and because of some previous loading stages it is changing some other, it is going to show some other threshold value, but as long as even though my input voltage is changing if that is maintained constantly my problem would be okay, or I can replace some other resistance value and we can see whether it is you know, you know whether it is having the required threshold or not, but when we apply DC input voltage and we do the experimental and we can see the complete like theoretically we can see that 666 millivolts it can be achieved, and even in the simulation we have seen Now what I will do is that I will change the amplitude to somewhere around 4 volts, so if it is the 4 volts it should be, so previously it was 400, now it should be 800, right, now if I see previously it was in 2 point, 2 levels, now it has moved to the 4 levels, so closely towards 1 volt, so somewhere around 800 millivolts, so that means when the input is keep on increasing, the threshold value is also increasing, let me change it to some other value, 6 so it is 1.2, right, so either maybe because of the previous loading or because of you know the tolerances due to the resistance value, the threshold value expected and the actual are little different, but by putting some port, some potential meter we can even you know set it to the required threshold value in this case Now what is the other stage that we have seen? Other stage is we have to pass through the comparator, so we have to connect the negative input to, negative input of an op-amp to this particular point and the positive input to the input signal so that when we do in that connection we can see the output of an op-amp to +VCC state, right, whenever the input is greater than the threshold, so what we do

is that when we look into the board, what we do is that we will connect the positive terminal to input terminal, so positive in this case is 10th terminal, so 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10, so this terminal Iím connecting it to the input, right, whereas other terminal I should connect it to the output, okay, Iíll remove this wire, so this is our threshold, right, to this threshold point, Iím taking one more wire, Iím connecting it to this point Now I have to measure the output, so this is my output, let me auto-set it When I look into the oscilloscope, right, so let me keep both the things to the same point, so easy for us to understand, and this point to changing the offset value, right, and the input also Iíll change to the same 2 volts peak to peak, so easy to understand and let me change the input range to 5 volts, right, so both are at the same point, so since it is difficult to understand what I will do is that, I will change the amplitude itself to somewhere around 6 volts peak to peak, so that means 3 volts, so here it is clear, now if you remember the threshold the theoretical threshold for 3 volts would be 666 millivolt into 3, but practical we are getting 1.2 volts, right, so practically we are getting somewhere into 1.2, now when we observe that one thing is clear that when I say if I take a cursor, Iíll take a cursor of amplitude type, Iíll just keep somewhere, somewhere at 1.2, that is what theoretically when we measure we are getting, Iím sorry, the practical when we measure we are getting at that point, now I place the cursor at that point, it is clear that, so when we look into that it is clear that when the input, so the cursor yellow one when we look into the CRO this particular cursor consider it as a threshold for us, whatever we have calculated practically Now when the input is greater than the particular threshold we can see there is a high value, high in this case is 15 volts, because the VCC and ñVCC that we are applying is +15 and -15, itís close to +15, it is slightly below +15 because of the saturation, the output saturation will be lesser than the VCC that you are applying to that, and when the input is lower than that particular value it is again going back to the ñVCC states, but when we look into the board we can see the LED is continuously glowing, we cannot see any flickering of an LED like on-off, on-off, the reason is that frequency, when we see the frequency, the frequency that we applied is 100 hertz, 100 hertz itís very hard to understand with our eyes, so what I will do is that I will change the frequency to somewhere around human understandable value, so somewhere around 30 or 20 hertz, so where we can easily visualize it, when I see that right, since the frequency when you look into the oscilloscope so we can see, we have kept somewhere around 30 and even in the oscilloscope we can see the input is 30 hertz frequency, oscilloscope we can see the high value and when you look into the breadboard right, so whenever it is higher the LED starting glowing, so when we look into the breadboard we can see, because of the smaller frequency right we can see the on and off, on and off of our LED too Now if we connect to a digital counter, the output of this to a digital counter one thing

is clear that we can easily count how many number of pulses we are getting it, right, and if you create a some clock cycle for different, for this particular time period how many number of frequencies that we are getting, right, that gives us how many BPM, beats per minute, so we have seen individual subsystem point of view, how, whether it is working as per our requirement or not, now what we have to do? We have to take a subject or we have to connect particular person, we will connect the ECG electrodes, so these are the ECG electrodes connected to the person, so one at the right hand, other one at left hand, and other one the ground is at right leg that we have discussed in the starting of our experiment, right, and here we will be connecting to this metal pins we will connect the electrodes and we will see whether we are getting ECG signal or not in a oscilloscope, then what we do is that weíll pass through amplifier, for amplification of an ECG signal until and unless we do the amplification it is very difficult, very hard to detect using our normal DSOís, because the amplitude of the actually signal is very poor, right, so in order to improve our signal ratio we are passing through this instrumentation amplifier, then we will pass through filtering so that we can easily visualize whether the signal has been filtered or not