Real Comparator don't make the same result that an op amp comparator

Thread Starter

Zouglou LeMagicien

Joined Feb 12, 2019

I'm working on a project for the school, and my teacher want from me to use a real comparator instead of an OpAmp.
This comparator is LT1011 and it's use like an hysteresis non inverting comparator. So for me there is 2 thresholds.

I make a simulation on Ltspice (link down) to try to understand it but with not a good result.

That is the schema that my teacher is using. I calculated the 2 thresholds value and it was +/- 0,9V. But on the simulation that is not correct :

It is more like that we have only 1 threshold and i don't understand why.
Also, it goes only bewteen 0/9V, normally, it will goes to +/-9V...
By te way, the R3 resistance is a pull up resistor cuz the output of the comparator can just generate a 0.

If I compare the same value with an OpAmp, i got this :

We have clearly 2 thresholds here, so that's not a problem of value...

I did check the datasheet of the comparator, but it doesn't help me a lot...

Hope someone do know why :D




Joined Jun 4, 2014
You can connect the GND pin to the negative supply. This will make the output voltage rail-to-rail and the hysteresis will match that obtained with the op-amp.

Thread Starter

Zouglou LeMagicien

Joined Feb 12, 2019
Thanks for your response, it help me a lot !

Another question, in the simulation of my teacher, he put a diode in the entry of the comparator (he don't want to be higher, I don't know why). When i simulate i get this :
(green the input and blue the ouptut)
It's like we have only 1 threshold at 0V and the schematic is this :
with the +/- pin connected to +/- 9V
Last edited:

Thread Starter

Zouglou LeMagicien

Joined Feb 12, 2019
You do still have two different threshold voltages. AS near as I can see from your waveforms they are 0V and 0.35V. To see it better use a sine wave input.
Oh yeah saw it, but does the formula of the threshold change here ? Because it's a comparator or because of the pull up resistor ?

Thread Starter

Zouglou LeMagicien

Joined Feb 12, 2019
Sure, but i get more than 0.35V..
Let's make it :
VTH = Vsat+ * R1/(R1+R2) = 0.82V
VTL = Vsat - * R1/(R1+R2) = 0.09V

The low threshold voltage might be correct, but what about the high threshold ? The pull up resistor doesn't play a role in the formula ?


Joined Jul 11, 2016
LM311 , LT1011 are/have OC (Open Collector) OE (Open Emitter) output = the voltage OE output and the voltage to OC output may differ from Vcc and Vee and/or GND
. . . according to Transistor Model output the OE shouldn't go higher than : Vcc - 2V
LM311 - Simulation - Test.png LM311 - Simulation - Test i2.pngLM311 - Simulation - Test i3.png
Last edited: