Hi, I am trying to teach an old dog new tricks (trying to educate myself) and I am having issues with what seems to be a very basic concept. If you guys could point me in the right direction, I will be very grateful.
Using the illustration above as a guide, if +Vcc = 5v then VRef = 2.5v through the voltage divider provided by the two resistors. This sets the Inverting input of the comparator to have a threshold of 2.5v.
Therefore, if VIn > VRef then VOut is High (Vcc) else (VIn is < VRef) vOut is LOW (0v).
So I tried to put this into practice using a LM311 Voltage Comparator. Below, is my schematic.
Within this circuit, as pin 2 (the non inverting input) is tied to Vcc (+5v), I would have thought that the output on pin 7 (VOut) would be HIGH (+5v), after all, 5v > 2.5v which is in accordance with the first illustration.
One element that I am not too sure of and I may have wrong on this drawing is GND. I am using GND to mean 0v. However I *think* ground might actually be the point between the resistors.
However, when measuring the voltage between VOut and GND (with 5v going to the non inverting input - pin 2) I only get 1.39v. If I pull pin 2 to 0v I get 0.32v ... where the difference is ~ +1v it's not what I am expecting. Also, if pin 2 is left floating, it also reads 1.39v.
I am not sure if I have my theory wrong, if I am using the wrong device (LM311), if I am just wiring it up wrong or I am taking the measurements from the wrong place. As I say, I am trying to educate myself so I apologise in advance if I have miss some basic step or principle, but I would really appreciate this forums help.
Regards,
Harold
Using the illustration above as a guide, if +Vcc = 5v then VRef = 2.5v through the voltage divider provided by the two resistors. This sets the Inverting input of the comparator to have a threshold of 2.5v.
Therefore, if VIn > VRef then VOut is High (Vcc) else (VIn is < VRef) vOut is LOW (0v).
So I tried to put this into practice using a LM311 Voltage Comparator. Below, is my schematic.
Within this circuit, as pin 2 (the non inverting input) is tied to Vcc (+5v), I would have thought that the output on pin 7 (VOut) would be HIGH (+5v), after all, 5v > 2.5v which is in accordance with the first illustration.
One element that I am not too sure of and I may have wrong on this drawing is GND. I am using GND to mean 0v. However I *think* ground might actually be the point between the resistors.
However, when measuring the voltage between VOut and GND (with 5v going to the non inverting input - pin 2) I only get 1.39v. If I pull pin 2 to 0v I get 0.32v ... where the difference is ~ +1v it's not what I am expecting. Also, if pin 2 is left floating, it also reads 1.39v.
I am not sure if I have my theory wrong, if I am using the wrong device (LM311), if I am just wiring it up wrong or I am taking the measurements from the wrong place. As I say, I am trying to educate myself so I apologise in advance if I have miss some basic step or principle, but I would really appreciate this forums help.
Regards,
Harold