I am taking the tractive voltage and dividing it by a factor of about 20 and comparing it with the reference of 3V. If the tractive voltage is 80V, that should be divided to 4V and that is greater than the non-inverting input of 3V. This should turn the LED on. And it does. But when the tractive voltage is 20V (so 1V) LED should not turn on. But mine does below.
I have been picking my hair out for hours trying to figure out what's wrong with this LM311 set-up. I may be making a rookie mistake though.
edit: someone asked to show some voltmeters, so i attached one for both inputs and at the output for across the LED
so it turns out that the circuit behaves correctly when I put a voltmeter across the LED. this is really weird to me. why does the presence of a voltmeter cause it to function properly?