I'm trying to create a voltage comparator circuit with an LM311 and I'm getting really confused about the input voltage range.
(From this point forward we assume my VCC+ is 5v and VCC- is 0v)
So as I understand it the input of LM311 is not rail-to-rial. According to the datasheet if VCC is +/-15v then the common mode input voltage range is -14.5v to +13v. So with my 5v setup it would be +0.5v to +3v.
Ok but I don't understand what this common mode input voltage range actually is.
According to this and this tutorial the common mode input voltage is actually the same on both inputs?
From the TI video:
Common mode voltage is defined as the average voltage, which is applied to the two inputs of an amplifier. In the case of an op amp, the two inputs are at practically the same potential with only a small voltage offset between them. So effectively, you can see the common mode voltage on either input.
Well that's pretty confusing because in the case of LM311 I definitely have different voltages on the inputs because I am comparing them!
To add to the confusion from section 9.2.2.1 of the datasheet we read:
When choosing the input voltage range, consider the input common mode voltage range (VICR). Operation outside of this range can yield incorrect comparisons.
Ok so does that mean that each of my inputs, on pins 2 & 3, have to be within 0.5v - 3v?
The following list describes the outcomes of some input voltage situations.
• When both IN– and IN+ are both within the common-mode range:
– If IN– is higher than IN+ and the offset voltage, the output is low and the output transistor is sinking current
– If IN– is lower than IN+ and the offset voltage, the output is high impedance and the output transistor is not conducting
Ok I think I understand this part. It seems to mean that IN- and IN+ are both within 0.5-3v. Note that the common mode voltage is being treated as a range here. But then:
• When IN– is higher than common mode and IN+ is within common mode, the output is low and the output transistor is sinking current
Wait if the common mode is a range, then how can IN- be higher than it? What does that even mean? Does the datasheet mean when IN- is outside of the range? Meaning either below 0.5v or higher than 3v?
Because using the word "higher" for a range doesn't make sense.
Same thing for the next part:
• When IN+ is higher than common mode and IN– is within common mode, the output is high impedance and the output transistor is not conducting
• When IN– and IN+ are both higher than common mode, the output is undefined
All I need to know is how can I determine what voltages are acceptable to apply to the IN- and IN+ pins in order to avoid undefined and nonlinear outputs.
And how can I determine this in the future for other parts from their datasheet.