0
\$\begingroup\$

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?

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Could you put a voltage probe at the other input as well? And maybe even the comparator output? Even if you think you know what it should be, when weird things happen, it's happening because something you think should be happening isn't - and you can't know what it is until you measure it. When weird things happen, put probes everywhere to debug what's wrong. It's usually obvious when you do that. \$\endgroup\$
    – KD9PDP
    Mar 27, 2021 at 12:54
  • \$\begingroup\$ i hope i attached the voltmeters correctly above. one interesting thing is that when the output voltmeter's negative lead is connected in between the resistor and the LED (not to ground as i did above) the lm311 works as intended! the LED is on and reads 12V and when it is off it reads 6V \$\endgroup\$ Mar 27, 2021 at 19:01
  • 2
    \$\begingroup\$ Your voltmeter on the output is not connected correctly. It is currently just showing the supply voltage. One end of the voltmeter should be on pin 7. \$\endgroup\$
    – HandyHowie
    Mar 27, 2021 at 20:17
  • 1
    \$\begingroup\$ i think i fixed it. thank you \$\endgroup\$ Mar 27, 2021 at 21:30
  • \$\begingroup\$ Perhaps the wires weren't connecting correctly to the LED when you first tried it - perhaps remove the meter and see if it still works? \$\endgroup\$
    – Frog
    Mar 28, 2021 at 4:38

1 Answer 1

1
\$\begingroup\$

After some time, I sort of found out what was wrong above and why the circuit wasn't "working". So I'll just answer my question.

It was not problem with the circuit but the LED used. On Proteus, you can select the kind of LED. Above I unknowingly was using a digital LED. This means it either turns on or turns off. I don't exactly how the forward voltage and drive current apply to digital LEDs, but basically, if you use an analog LED above, the circuit works and makes more sense.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.