Comparator Explained (Inverting Comparator, Non-Inverting Comparator and Window Comparator)
Вставка
- Опубліковано 9 лют 2018
- In this video, the Comparator circuit and its different configurations like inverting comparator, Non-Inverting Comparator, and window comparator have been explained.
What is Comparator:
A comparator is a device which compares the two analog inputs and gives the digital output depending upon which input is higher.
The comparator has two analog inputs (Inverting and Non-inverting Input) and it has one digital output (In some IC's complementary outputs are also available)
Inverting Comparator:
If the input signal is applied to the inverting terminal of the comparator then it is known as the inverting comparator. Because in this configuration, the output will be low when the input is greater than the reference voltage at the other terminal.
Non-Inverting Comparator:
If the input signal is applied to the Non-inverting terminal of the comparator then it is known as the Non-inverting comparator. Because in this configuration, the output will be High when the input is greater than the reference voltage at the other terminal.
Window Comparator:
In some applications, when it is required to have a high or low output when the input is within a specific band (of voltages) then window comparator is used. And it can be designed by combining the inverting and non-inverting comparators.
Op-Amp vs Comparator:
Schematically, Op-amp and comparators look identical. In fact, in their internal structure also they are almost identical except the final stage. Op-amps are designed to use for linear applications while comparators are designed to use specifically for operating it in the saturation region.
In open loop configuration, op-amp can be used as a comparator, but in general, the response of the op-amp will not be as fast as a comparator. (Because of Slew Rate)
Comparators are compatible with different logic families like TTL, RTL (Because of open collector output), and output of the comparator can be used as input to the logic gates. While in case of op-amp as a comparator, it is required to limit the output using the external circuit.
Application of Comparator:
Comparators are used as waveform converter, zero crossing detector, analog to digital converters (ADC), and in the applications where two input levels need to be compared.
Timestamps for the different topics covered in the video:
0:18 Introduction to Comparator
1:32 Op-Amp vs Comparator
4:41 Inverting and Non-Inverting Comparator
7:12 Window Comparator
10:15 Limitation of Comparator
This video will be helpful to all student of science and engineering in understanding the comparator circuit and its different configuration.
Follow me on UA-cam:
/ allaboutelectronics
Follow me on Facebook:
/ allaboutelecronics
Follow me on Instagram:
/ all_about.electronics
Music Credit:
www.bensound.com/ - Наука та технологія
Timestamps for the different topics covered in the video:
0:18 Introduction to Comparator
1:32 Op-Amp vs Comparator
4:41 Inverting and Non-Inverting Comparator
7:12 Window Comparator
10:15 Limitation of Comparator
If both the inverting and non inverting terminal voltages of comparator are same then what will be the output of comparator
Aewsome stuff!!!! Keep up with the excellent work! It helped me a lot. Thanks, man :D
Awesome video! I have an analog signal which I need to convert to a digital high/low voltage. I now know I need to use a window comparator!
Great video! Thanks for explaining the op amp comparator circuit .
In electronics, a comparator is an electronic circuit that compares the voltage level of two input signals and outputs a binary signal indicating which input signal is greater. It is a type of operational amplifier (op-amp) circuit that has a very high gain and is designed to operate in its linear region.
The comparator has two input terminals, one positive (+) and one negative (-), and one output terminal. The input signals are connected to the positive and negative input terminals, and the output signal is a binary signal that indicates whether the positive input is greater than or less than the negative input.
When the voltage level of the positive input is greater than the negative input, the output of the comparator is high (logic level 1). When the voltage level of the negative input is greater than the positive input, the output of the comparator is low (logic level 0).
Comparators are used in a wide range of electronic circuits, such as voltage level detectors, oscillators, and digital-to-analog converters. They are also commonly used in analog-to-digital converters (ADCs) to convert analog signals into digital signals.
Great explanation. You made it too easy to understand. Thanks...
I have gathered lots of knowledge and learn so many things about comparator from this video, thanks 👍✌️❣️❣️🙏
Make more and more videos,,
Thank you!!! I have a way better understanding now. 👍
Thank you bro, this was very useful. Now I understand how to bulid an inverting comparator circuit.
Great video. I enjoyed watching this video!👍
the concept was easy but you make it big ....................5 min video will be enough for this video.............but it is good explanation
Very well explained,thank you
Have to point out in the window comparator, the circuit works only when the op-amp has open collector output stage. It won't work if it has push-pull output, which is what many modern IC uses nowadays.
Thank you for the detailed video
You are best teacher... ❤️❤️
Kya explanation hai sir , tagraaaaa..,...
your explaination is so awesome.
Great video. Thanks for explain.
you made it so easy to understand
It's a very helpful video thank u sir
thanks bhai hope u do more videos in the near future
Excellent it helped me a lot...
At 6:16 , when Vin < Vref the output should be negative saturation voltage, dont you think? but you showed zero level in the output graph . Plz clarify my doubt, if i'm missing the point?
Very nice explanation. 👍👍
Hello, In my campus I am asked to do a project, I have to do a comparator circuit which detects whether the battery is below or higher a predetermined level. We have to Op-Amp comparator circuit, and also comparator circuit should be powered using the battery under test. Can you help on this, please?
Here is a suggestion for a topic : Different ways of connection between electronics circuits like open collector , compatibility between different logic families , wired and connection etc.
Thanks
Excellent explaination sir 👏
Can you explain what is latched comparator?
Your videos are great, upload the videos for the whole portion covering comparator and waveform generators,,please
Yes, I am going to cover it.
The video is really good. Thank u for ur time and efforts.
Can u pls explain : 1. the use of external pull up resistor ? 2. the reason for connecting Vcc of upper OP AMP to Vout of lower one ?
The pull-up resistor ensures the output of the comparator is indeed logic high when both comparator output is high.
If comparators are directly connected then it may happen that the overall output is less than the logic high value. And there might be ambiguity about the output.
Using the pull-up resistor that uncertainty can be eliminated.
For the second question, Vcc of the first op-amp is not connected to the output op-amp. Vcc is used for the pull-up resistor. And the pull-up resistor is connected to the output.
And similarly, the output of the second comparator is connected to the overall output.
I hope it will clear your doubt.
Awesome explanation
Amazing video sir 👍👍👌👌
Excellent sir....
Great video sir..
Good explanation sir... Happy teacher day ❤
very well explained
Thank you!
Consider you have a sensor which may be taking values of photoresistor and converting
them into voltage. Assume that sensor is recording the following values.
Max Value (Bright Light) ≈ 12 V (10% tolerance level)
Min Value (Dark) ≈ -2V (10% tolerance level)
Whenever the sensor reaches the value of ≈ 5V (10% tolerance level) a BlueLED must
be ON and when it drops from 5V it should be OFF.
The circuit is implemented using an amplifier which vaguely follows the idea of converting
analog input into digital by using it as a comparator.
Your great bro satellite communications gurinchi tutorial s cheyandi
Huge Thanks to U Dude
In minute 8:11 why does that configuration work as an AND? If one is at HIGH and the other at LOW why doesn't it blow up or something? Can someone explain me, please? thanks :)
nicely explained Sir
Just Superb!!
Thanks for it
IT IS VARY GOOD VIDEO,COULD YOU SEND TO ME HOW IT OPERA TO CONTROL THE THREE PHASE LOAD BALANCING
Thank you for this video, can I compare 10v and 1.5 while rail sources v-=-3.3 and v+3.3? or I can only compare values less than or equal to the rail sources ?
At 4.00 what is open collecter configuration
In window comparator why resistor Rl is connected?
What type of comparators are used in 555ic.
You didn't explain about the clamp diodes we use to protect the op amp against damage to excessive input voltage?!
great explanation, thank you!
i have one question, i've been looking for a book that talks about this subject and some other subjects but couldn't find a good one yet.
can you suggest me some good books that explains microelectronics well?
For basic electronics : electronics principles by malvino and electronic devices and circuit theory by Robert boylstead are good books. You can refer these books.
THANKS SIR FOR THIS VIDEO!!!!!!!!!!!!!!!!!!!!! IT IS A GREAT HELP TO ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! THANKS SIR!!!!!!!!!!!!!!!!!!!!!!!!
SIR PLEASE KEEP MAKING MORE VIDEOS... YOU ARE THE ONLY ONE I LOOK UP TO WHEN I NEED HELP!
Thank you sir
Is it possible for a quad op-amp to generate 3 window comparators. Specifically, if an RGB LED is used, how can I have ...
Input (In) Comp-A (R) Comp-B (G) Comp-C (B) Colour
In < 2.4V Low Low Low -
2.4V < In < 2.6V Hi Low Low R
2.6V < In < 2.8V Low Hi Low G
2.8V < In < 3.0C Low Low Hi B
In > 3.0 Low Low Low -
if the input to a comparator is a sine wave the output is a?
Sir but how can I get 0& 5 volts only neither -ve nor any positive if I just want 0 or 5
But how is it acting as an AND gate connection?
Thank you
thank you very much. Namastê
Really learn a lot from your channel. But you spoke about "open-loop configuration", could you please explain this concept/ circuit? Thanks
Excellent sir!
Nice video
Plz cover all 1st year topics..
Can PLD and NLD be used as Comparator??
Well done
Would you please clarify that from the circuit perspective, what would be the difference between an op-amp and a comparator? how are comparators faster than op-amps? Also, can you please explain the reason of adding the resistor?
op amp is optimized to provide accuracy and stability (both dc and dynamic) for a specified linear range of output values in precision closed-loop (feedback) circuits. It is achieved through internal compensation capacitor. But when the same op-amp is used in the open loop configuration as a comparator, then due to its internal compensation capacitor, its output cannot change very fast. On the other end, the comparators are meant to be operated in the open loop configuration. So, they do not require internal compensation capacitor. And because of that they are quite fast. I hope, it will clear your doubt.
Fantastic
why in output voltage , vo= 0 V when vin < vref , it should have been -vsat
It depends on type of comparator. Some comparators are single supply comparators. In such comparators the output will vary between Vaat and 0. In dual supply comparators the output varies between Vaat and - Vsat.
I hope it will clear your doubt.
@@ALLABOUTELECTRONICS Thank you very much
Please provide notes PDF along with lecture 🙏🙏🙏
I think you mixed up Beyond with Above..
please explain the function of RL resistor in this circuit,and please make a video explaining pull up resistors.
I think you are talking about resistor RL in window comparator right?
It serves two purposes. First, when the output of the comparator is low, it will restrict the sink current of the comparator. Second, when the output of a comparator is high, it will provide the strong logic high.
I hope it will clear your doubt.
And yes, at some time I will make a video on external pull up resistor.
Bro upload modified schmitt trigger with different utp and ltp's
Sir, what about the case when output is in between Vsat and -Vsat (means if open loop gain*(Vin-Vref) donot reach Vsat)
If it does not go into the saturation then op-amp is operating in the linear region and it will work as linear amplifier. That is means vout = open loop gain* ( vin1 - Vin2)
But for that input should be very small. Typically in uV.
Great
For the window comparator, why is it that if one op-amp goes low then Vo goes low automatically, but needs both op-amps to be high for Vo to go high?
Because in the window comparator, the output of the two op-amps are connected together using the pull-up resistor. So, their outputs will act as a wired AND connection. That means if any one of the op-amp output is low, then overall output will become low and the output of the window comparator is high when both the outputs are high.
Thanks
So I request that can u show videos electronic topics of diploma (ECE) many of our frnds subscribers of ur channel
Please let me know here the topics which you want me to cover on the channel.
Wht if both inputs are equal?
Internal circuit?
Pls continue the remaining topics of comparator and wave form
I have already made videos on them. If you go through the op-amp playlist, you will get it.
Op amp act as an amplifier comes under non linear application
At 9:04 iam confused that in window comparator why overall voltage is low if vin is less than either lower threshold voltage or upper threshold voltage
The output of the two compactors are connected. So, if any one of the output is low, then overall output will remain low.
The output of the window comparator high, when both comparators outputs are high. In this case, it will happen when Vin >VL and Vin < Vh.
So, basically, when the input voltage is within certain voltage band, then only the output of the comparator will become high.
I hope, it will clear your doubt.
If you run the output of an op-amp through a diode, would that give you a comparator?
If you use opamp in the open loop configuration ( without any feedback) then that itself will act as an amplifier. If you use opamp at the output of the opamp ( without feedback) then it will rectify the output.
SUPER
Please make video's in hindi as they will be easy to understand and clear's concept.....
sir, in 6:12 , the output waveform should give a negative saturation for all input less than reference voltage , i am confused by the way u have given only one side positive saturations. should the low outputs ought to be below axis ??.can u help me out
Many comparators are single supply, where the negative supply pin is grounded. In that case, the output will vary between Vsat and 0.
When the comparator is biased with dual supply, (Positive and negative) then, in that case, the output will vary between +Vsat and - Vsat.
Here the comparator is biased with the single supply.
That's why the output is zero instead of negative Vsat.
I hope it will clear your doubt.
@@ALLABOUTELECTRONICS thank u sir
can you explain why one is high and other is low,overall output is zero in window comparator?
Let's take the case when Vin is less than VL. In this case, the first comparator output will be high and the second comparator output will be low. And if you observe the output of both comparators are tied to gather. (Wired AND connection). So, even if first comparator output is high, it will be pulled down to a low voltage by the second comparator. And in this way, overall output will be low.
I hope, it will clear your doubt.
Joss video sir... Carry on
For the window comparator please note that if you connect the negative rail to ground, you will not output zero volts but rather a small positive voltage when the input is outside the range of the window. Further, the load in that circuit is drawn very poorly. The outputs of the two comparators should be joined into a single node which feeds one terminal of the resistor while the other terminal should be grounded.
Thanks Vivek, i was wondering how to interprete the RL. U made a good video into a better one.
good information but i find it difficult to focus on whats being said because of the constant pauses as if hes asking questions
When the inverting terminal voltage and non-inverting terminal voltage are same, how will it work then?
In ideal case, the output of the comparator will be zero. But in reality due to different bias currents at both inverting and non inverting terminal, the voltage at the two terminals will be slightly different. And because of that the output of the comparator will be either +Vsat or - Vsat.
how we can check stability of op-amp during frequency response
Stability of the op-amp can be checked using the gain margin and phase margin.
In simple terms, if I say, for the stability of the op-amp, when the gain of the op-amp reaches 1 (0 dB) at that frequency, phase should be less than -180 degree.
And when phase angle reaches the -180 degree, at that frequency, the product of open loop gain and feedback factor should be less than 1.
and how we can remove unstability
try to follow the above mentioned two criteria.
If you find that at your operating frequency the product of gain and feedback factor is greater than 1 and phase angle is less than 180 then change the feedback factor by adjusting the component values. Or if you use that circuit below the frequency where circuit becomes unstable, then you can avoid the instability.
when first one is low and second is high ,how output is low? when Vin >VH
when Vin > VH at that time the output of the first comparator will be low and the output of the second comparator will be high. So, overall output will be low.
actually your graphs are wrong for inverting and non inverting comparator because in case of non inverting comparator when Vin < reference then Vout = -Vsaturation not 0 and similar for inverting comparator , by the way your explanation is awesome :)
It actually depends on the comparator supply voltages. There are some comparators, where positive supply voltage is Vcc and negative supply voltage is 0. In some comparator its -VCC.
For single supply comparators, the output will be zero, for the dual supply comparators, it will be -Vsat.
I hope it will clear your doubt.
What happens when you have the same input?
Ideally, if both inputs are same then output should be zero. But practically that isn't the case. And even if you apply the same input to both input terminals, still you will see either +Vcc or -Vcc/ or 0V at the output (due to noise, offset voltage etc.)
Sir,in window comparator ,if input is less than low threshold value ,then comp1(upper comparator) should give high according to ur circuit design ?..u should keep the input on non inverting terminal of upper comparator (comp1) and modify the circuit ,if I m not wrong 🤔
When Vin is less than VL, then the output of the first comparator is high, but the second comparator is low. (ideally, the output of the second comparator is zero).
So, it will pull down the overall output voltage to zero. (even though the output of 1st comparator is high)
It acts like a wired-AND gate. That means the output will be high when both comparator output is high.
I hope it will clear your doubt.
Thanku sir😊
Bro can u please explain about. What is the use of not gate in 1bit comparator please answer me bro
You are talking about the digital 1 bit comparator right?
The one which is discussed here is the analog comparator.
In 1 bit comparator there are three conditions.
Let's say A and B are the inputs.
1) A=B (It can be determined using XOR operation)
2) A>B (AB')
3) A
Bro write truth table for all three conditions obtain expression by k map technique..K map technique can be used to analyze any ic
can 741 be used for searching comparing
Yes, It can be used as a comparator. But the response time of the 741 will not be that fast. Still for lab testing and prototyping, it can be used.
Sir, can you plz explain "why in window comparator, the output is low when any of the comparator output is low..?
I didn't understand it.. plz help sir
when any of the comparator output is low, the output of both comparators will be pull down to zero volt or low voltage. (Becuase it's wired and connection). That means the one terminal of the resistor (which is the output of the window comaprator ) will be at a low voltage. And the entire voltage will get dropped across the RL.
I hope it will clear your doubt.
@@ALLABOUTELECTRONICS sir can you explain the significance of that pull up resistor too? What really happens when the output of both comparators are high... How we determine the overall output..
Plz help sir
The pull-up resistor ensures the logic high at the output. If you see, every circuit or every IC has limited output current capacity. That means the maximum current it can deliver. If more current is drawn then the output voltage reduces.
And it might happen that the output voltage would become lower than the logic high value.
This pull-up resistor maintain the logic high value when the output of the comparator is high.
I hope it will clear your doubt.
I thought op amp always try to make V- = V+. When ap-amp is used as comparator, it seems the rule is obeyed?
No, V- = V+, when the opamp is used with negative feedback ( in the linear region). When the opamp is used as a comparator then it is used in the open loop configuration. Therefore, it is not applicable.
@@ALLABOUTELECTRONICS Thank you so much for confirming this information.
Sorry, violated.
Sir why in the waveform of non inverting comparator you made the output signal zero .....will that not be equal to -Vsat ??
In books it's given -Vsat
Plzzzz help sir this is creating confusion in my concepts!
See, that depends on whether the comparator is a single supply or dual supply. In a single supply comparator, when the output of the comparator is high, then it will go towards the +Vsat, and when it is low, the output is zero.
In dual supply comparator, there will be +Vsat and -Vsat.
Here I am assuming its single supply comparator. In the book, it might be a dual supply comparator. (The biasing voltage to the comparator will be +Vcc and -Vcc)
I hope it will clear your doubt.
@@ALLABOUTELECTRONICS ohh okay .....thank you so VERY much sir ....now m fine with the concept 😄