OP-Amp Comparator & applications Explained

Comparator Hey friends welcome to the  Kohiki.com ALL ABOUT ELECTRONICS. So, in this article, we will learn about the comparators.

So, many times in electrical and electronic circuits, it is required to compare the two voltage levels.

Introduction to Comparator

For example, let’s say, you are measuring the temperature of any room using the temperature sensor. And let’s assume that the output of this temperature sensor is in terms of the voltage. And you want to compare this voltage with some reference voltage so that whenever the room temperature goes beyond a certain value then you can take some action. Like turning ON some buzzers or activating relays.

Comparator Explained

So, it can be done by using this comparator. So, this comparator consists of two inputs, inverting and non-inverting input. And it has one digital output. Now, here, the digital means, the output can have two states. Either High or Low. And here the state of the output depends upon which input is higher.

So, let’s say if the voltage at the positive terminal or the non-inverting terminal is higher than the inverting input terminal, in that case, your output of will be high. Likewise, if the voltage at the negative terminal is higher than the positive terminal, in that case, your output will be low. So, as you can see, this acts like a 1 bit analog to digital converter. And in fact, this com is used in analog to digital conversions.

Also Read: How The Internet Works & 5+online business

Op-Amp vs Comparator

 So, now if you see the schematic of this comparator, it looks very similar to the schematic of the op-amp because the case of the op-amp also has two inputs and one output. As well, it has two biasing voltages. And in fact, we have seen that this op-amp can be used as whenever it is used in the open-loop condition.

So, in the previous articles on op-amp, we have seen that whenever we use this op-amp in the open-loop condition, in that case, the output will be equal to the open-loop gain of the op-amp multiplied by the differential input voltage. Where, here, the differential input means the difference between this non-inverting and the inverting input.

Op-Amp vs Comparator

So, whenever your non-inverting input is higher than the inverting input, in that case, this differential input voltage will be positive. And in open loop condition, the gain of the op-amp is very high.

So, the output will be equal to the positive saturation voltage of the op-amp. that means, whenever your inverting input is higher than this non-inverting input, in that case, the output of the op-amp will be equal to the positive saturation voltage. And likewise, whenever your inverting input terminal is at a higher voltage than this non-inverting input, in that case, your output voltage will be equal to the negative saturation voltage of this op-amp.

So, in this way, this op-amp can be used as a comparator in open-loop conditions. But if you observe, there are many IC’s available in the market. And they are specifically used as comparators. And there is a reason behind it. the first reason is that these op-amps are designed specifically for linear applications.

So, although this op-amp can be used as a comparator in the open-loop condition, the response of the op-amp will not be too fast. While if you see the comparators, they have minimum propagation delay and very fast rise and fall times. Because in general, the slew rate of the is higher than the slew rate of the op-amp. And that is why comparators used to have very fast response.

Op-Amp vs Comparator

So, moreover that if you observe this comparator, in most of the ICs the output stage of this comparator used to be an open collector. So, we additionally required the external pull-up resistor to use this comparator.

So, because of this open collector configuration,it is possible to use this comparator with different logic families. And we can directly apply the output of this comparator to the different logic gates. And moreover that because of this open collector configuration, it is also possible to connect different comparators in a wired-AND condition. While in the case of the op-amp if you observe,in open-loop configuration the output of the op-amp can have two voltages. Either positive saturation voltage or negative saturation voltage.

So, we can use this op-amp as a comparator then the output of the op-amp cannot be used directly with different circuitries. And somehow we need to restrict the output voltage of the op-amp by using external circuitries. So, because of these reasons, the comparators are used in applications where you need to compare the two voltage levels. So, if your application is not critical and you do not require any fast response in that case the op-amp can be used as a comparator.

Also Read: Best 5+Information Technology In Day To Day Life

Inverting and Non-Inverting Comparator

So, now so far we have seen that whenever we use this comparator, the input to the comparator used to be a reference voltage, and the one input used to be a signal which we need to compare with this reference voltage. Now depending on where this input is applied, this comparator can be classified as inverting or the non-inverting comparator.

So, if we apply this input to the non-inverting terminal, in that case, this comparator is known as the non-inverting comparator. Because here whenever your input goes beyond this reference value, in that case, the output of the comparator will be high. Similarly, when we apply this input to the inverting terminal, in that case, this comparator is known as the inverting comparator.

Because in this case, whenever your input goes beyond this reference value, in that case, the output of the comparator will be equal to a low value. So, let’s take one example, and using this example let’s understand this inverting and the non-inverting comparators. So, let’s say here we have two input signals. One is the triangular wave which is applied as input to this comparator and the second is the reference voltage. And here assume that this input is applied at the positive terminal of this comparator.

Inverting and Non-Inverting Comparator

So, when this input signal is less than the reference voltage, in that case, the output of this comparator will below. And as soon as, this input signal goes beyond this reference point then the output of the comparator will be high. So, for this particular duration, if you observe, the output of the comparator will be high. And once again when this input level goes below this reference voltage, in that case, the output of this comparator will also become low.

Similarly at this point, whenever this input signal crosses this reference voltage, then again the output of the comparator will be high. And it will remain high up to this point. Because after this point again this input signal value is lesser than this reference voltage. So, in this way, whenever we apply this input non-inverting terminal then the output will be high only when your input signal is higher than this reference voltage.

Now, similarly, let’s assume that we have applied this triangular wave at the inverting input. So, in this case, your output will be low during the time, when your input signal is higher than this reference voltage. and for the rest of the time, your output signal will remain high. So, this is all about the investing and the non-inverting configuration of the comparators.

Window Comparator

Now, so far in our discussion, we have compared this input voltage with the reference voltage. But in some applications, it required that your output should remain either high or low whenever your input voltage is within a specific band. So, this kind of comparator is known as the window comparator.

So, in the case of this window comparator, your output will be high only when your input voltage is within a specific band of voltages. So, the lower voltage is known as the lower threshold voltage and the higher voltage is known as the higher threshold voltage. So, whenever your input voltage is in between this VL and VH, then only your output voltage will be high. So, this window comparator can be designed by combing the inverting and the non-inverting comparators.

Window Comparator

So, as you can see here, the first comparator is the inverting comparator and the second comparator over here is the non-inverting comparator. And both are connected using this external pull-up resistor. And because of this configuration, they will act as a wired-AND connection. So, if any of the comparator output is low in that case your overall output will also become low. While your output will be high only when both the comparator outputs are high.

Now, here, whenever your input signal is less than this lower threshold voltage in that case the second comparator output will below value, and the first comparator output be high value. Because here, this input is lesser than this upper threshold voltage. So, because this second comparator is at a low value, so your overall output will be equal to low. While let’s take the second case, where your input is greater than this lower threshold voltage but it is less than this upper threshold voltage.

So, in this case, if you observe, both comparator outputs will be high. And your output will be equal to high. Similarly, when your input is greater than this upper threshold voltage, in that case, this second comparator output will be high, while your first comparator output will be low. And because of that, your overall output willow. So, in this case, your overall output will be equal to low. So, as you can see, your output will be high whenever your input signal is in between these lower and the upper threshold voltages.

Window Comparator

Now, let’s say, you have applied this triangular wave to this window comparator and this VH and VL are the upper and lower threshold voltages respectively. So, here your output voltage will be high during the duration when your input voltage is between these lower and the upper threshold voltages. And for the rest of the time, your output will remain low.

So, as you can see here, whenever your input is in between this upper and lower threshold voltage then only your output will be equal to a high value. And for the rest of the time, your output will be equal to a low value. So, in this way, this circuit can be used as a window comparator.

Limitation of Comparator

Now, so far in our discussion, we have assumed that the inputs which are being applied to this comparator are ideal inputs. That means they do not contain any kind of noise. But practically, if you see, it is quite possible that the noise may get superimposed over these input signals. And in that case, because of this noise, your output voltage may get affected. So, let’s understand this by taking one example.

So, here we have two voltage levels. One is the reference voltage and one is the input voltage. And here assume that the comparator is configured in a non-inverting configuration.

So, here, the input voltage is greater than this reference voltage. So, ideally, your output of the comparator should remain high. But suppose if the noise gets superimposed over this input voltage then let’s say, the input signal will look like this. So, if this signal is applied to this comparator, in that case, your output will be get affected.

Limitation of Comparator

So, if you observe over here, for this particular time duration, your input signal goes below this reference voltage. So, for this particular time window, your output signal will look like this. That means your output will be equal to low voltage. Similarly, for this time window, if you see, your input signal again goes below this reference voltage.

So again, for this particular time period, your output will be equal to low. And again over here, your input signal goes below this reference voltage. So, again here you will observe the low voltage for this particular time period. So, because of this noise, if you observe, your output signal will be get affected.

So, we can say that this comparator not immune to external noise. So, to resolve this problem the comparators are used with some hysteresis. Or we can say that positive feedback is provided to these comparator circuits. And this kind of circuit is known as the Schmitt trigger circuits. So, by providing positive feedback we can increase the noise immunity of this comparator. And we will discuss more this Schmitt trigger circuit in the next article.


FAQ


YouTube Video

So here are a youtube video based on Comparator. Which was uploaded by Afrotechmods


So, I hope in this article you understood about the comparator circuits. So, if you have any questions or suggestions, do let me know in the comment section below. If you like this article, hit the like button and subscribe to the channel for more such articles.

continue Reading…..



Leave a Comment