This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LM339: Biasing LM339 power to bring the inputs within common mode

Part Number: LM339

Help out a MechE! I need to switch a mechanical relay based on polarity of a +/- 10mV signal from a floating source - a battery tester. I'm using an LM339 to ascertain polarity, driving a ULN2803 to get enough current for the relays. Everything is powered using a 24V isolated supply. I created a virtual ground at 0.5V above V- using a resistive voltage divider and tied one of the inputs to that, in effect creating a Vref. The circuit still does not work until I tie the V- output of the 24V power supply to AC ground. Now it works, but we're really concerned about the effect of tying the battery tester to ground, particularly if it's biased relative to earth ground. Is it possible to use 0V as reference if the other input never goes below -300mV? To add insult to injury, merely probing the outputs on the LM339 with a voltmeter can make the difference between the circuit functioning and not. 

  • Hello Ilya,

    The input to the LM339 is not truly "floating", a reference to ground is still needed.

    Can you draw a rough schematic of what you are doing?

    How is the battery tester connected? Are you monitoring across a shunt in the battery line? Where is the 20mV coming from?

    Yes. The inputs can be referenced to "0V" (V-), but we need to establish what "0V" is to the rest of the system. You need to keep the "floating" inputs within the limits of V- and 2V below V+.

    If I get what you are trying to do - then, yes, you can use V- as the reference, but you MUST insure that neither input will go 300mV below V-, or "bad things" could happen. But we need to know the source of the 20mV.
  • Thank you, Paul. The solution ended up being very pedestrian (see diagram). The battery tester is actually grounded so I split my power supply into +/-12V. Now the inputs are right in the middle of the common mode and the relays are happily clicking away.

    You were correct to suspect that current is sensed via a shunt so that lead isn't actually ground but goes negative by a small value when the current is negative. Was that my problem? How hard is that V- limit for Vref, e.g. is 0.1mV above V- always OK but 0.1mV below always isn't?

    Also, I've read that a voltage divider is a lousy way to create a virtual ground. Do I need to use a buffer op-amp in this case and if so, what p/n would you recommend. Consider that this is all on a perf board and I'm probably as proficient as an average thi rd-year EE major.

  • Hello Ilya,

    The 750 ohm resistor values are a bit low - you are burning quite a bit of current in the divider resistors (24V/1.5k=16mA). You cold bump them up to 10k each and make life easier on the power supply. The pull-up could also be 10k, too...

    Also keep in mind that the resistors will limit the current should any part of the 24V supply get shorted to the battery or "real" ground somehow (you never know if someone may accidentally ground or miss-wire your circuit).

    It depends on the application/function if using a voltage divider is lousy or not. In this case, you are just centering the input signal within the input range - which is fine.