Im building the following circuit:

Where the analog in is the non inverting input that with a potenciometer I can vary from 0 to -12V

The inverting input (with would vary from 0 to -16) is obtained from an amplifier (UN741) that should change depending on the output of the LM311, the "comp".

The problem is that no matter how I change the voltages values from my inputs I always get a output on HIGH or 5V and never on 0V even when the non inverting input is greater that the inverting input.


2 Answers 2


You should use a circuit like this one from the datasheet:

enter image description here

You can use +5 for Vcc+ but Vcc- should be -12.5V or a bit more negative. . The LM311 will work down to the negative supply rail plus a few hundred mV and to within a couple volts of the positive supply rail.

enter image description here

The emitter connected to ground will give you the 0V/5V output, or you can connect it to -12.5V ~-15V if you want more swing at the output. Adjust your hysteresis resistors correspondingly, and possibly add another resistor to a supply voltage or other reference if you need to adjust the center of the deadband. Also keep in mind that your pot does not have zero output resistance so the width of the deadband will vary as you turn the pot (maximum at mid-scale, minimum at either end).

  • \$\begingroup\$ Im actually supplyin +12V and -12V respectively. \$\endgroup\$
    – RedBoots
    Dec 6, 2017 at 3:46
  • \$\begingroup\$ There is nothing wrong with the schematic, at least for input voltages above -11.5V or so. Your parts or their connections might be faulty. Are you building it or simulating it? \$\endgroup\$ Dec 6, 2017 at 4:59
  • \$\begingroup\$ Building it, It might be the part then. \$\endgroup\$
    – RedBoots
    Dec 6, 2017 at 20:26

When using any single supply analog device, be sure to observe the spec \$V_{ICR}\$ or Vcm input range.

You will find most bipolar types need the inputs away from at least one or both supply rails by at least 1 to 3 diode drops from Vcc/Vee to allow for biasing the inputs to make them work.

So you can choose a bipolar supply or you can bias both inputs to Vcc/2 or anywhere in between the permitted Vcm input range. Then the differential inputs will work down to <1mV levels.

Some comparators are designed to operate rail-to-rail input but may have greater input offset, others are designed to operate both inputs at and even slightly below the Vee -ve supply which is useful for single supply low level 0V comparison. ... but not the LM311.


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.