Maker Pro
Maker Pro

Op amp LM339 help

Tom Rice

Jan 18, 2018
4
Joined
Jan 18, 2018
Messages
4
I’m trying to use an LM339 as a voltage comparator to translate a 0-2.5 volt DC level into 0-5 volt logic level. With a 1.6 volt reference on the negative input and 2.5 volts on the positive input, the output will only go to 2.5 volts even with a 1k pull-up to 5 volts on the output. What am I doing wrong?
 

Attachments

  • 37611E1D-3985-4C30-BD5C-E425767BE1DA.jpeg
    37611E1D-3985-4C30-BD5C-E425767BE1DA.jpeg
    140.7 KB · Views: 169

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
What load do you have on the output?
 

Tom Rice

Jan 18, 2018
4
Joined
Jan 18, 2018
Messages
4
What load do you have on the output?
Thanks for the reply! Just the pull up resistor and I’ve tried 330 ohms up to 100k. What’s strange is that on the bench test the output goes to 5 volts with a separate 0-2.5 volt dc signal but when connected to the unit I’m trying to interface with and using its internal 5 volt supply and the 0 to 2.5 volt dc signal out, the op amp will only go to 0 or 2.5 volts. I’ve tried that same signal connected to a CMOS gate and get the same results (which didn’t surprise me).
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
That's your pull-up, what is the load?

Or are you getting these results without a load?
 

Tom Rice

Jan 18, 2018
4
Joined
Jan 18, 2018
Messages
4
That's your pull-up, what is the load?

Or are you getting these results without a load?
Hi Steve, at this time there is no load on the comparator other than the pull up resistor. If working the way I expected, the output would feed a CMOS gate CD 4082, four input AND. I have tried connecting it but the voltage is still 2.5 volts and the output of the gate is also limited to 2.5 volts.
 

Alec_t

Jul 7, 2015
3,590
Joined
Jul 7, 2015
Messages
3,590
Are you sure there isn't an inadvertent short between pins 1 and 6 of the '339?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,725
Joined
Nov 17, 2011
Messages
13,725
Show us a crisp photo of the actual build. It may help us find the point in question.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
"The output goes to 5 volts with a separate 0-2.5 volt dc signal" but the output does not go high enough "when connected to the unit I’m trying to interface with".
Then whatever drives its input with 0V to 2.5V is probably modulating its voltage on and off so that the average voltage at the comparator output is half the supply voltage. Maybe the input signal is 0V, 2.5V, 0V, 2.5V over and over?
 

Tom Rice

Jan 18, 2018
4
Joined
Jan 18, 2018
Messages
4
Yes the power supply is a solid 5 volts. I monitor it continually during my tests. There are no shorts on the bread board and in fact the LM339 works flawlessly on the bench. A 2.5 volt level applied to the + input with 1.6 volts applied to the - input produces 5 volts out. It’s only when the same set up is connected to the system I’m trying to interface with that the problem occurs. The system has an on board 5volts and remains there when testing with the LM339. The 0 to 2.5 volt being connected and monitored from the system is also constant either at 0 volts or 2.5 volts depending upon the user selection. However the output of the LM 339 never exceeds this 2.5 volt level with only a pull up resistor connected to 5 volts. This chip is open collector so some load is needed.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Did you measure each side of the 1K resistor and get 5V on one side and 2.5V on the other side? This seems improbable since the LM339 would have to be half on, which it is designed not to do.

Bob
 

Alec_t

Jul 7, 2015
3,590
Joined
Jul 7, 2015
Messages
3,590
What is the impedance of the mystery source of the signal feeding pin 7?
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
Aren't you measuring the +2.5V output with a slow voltmeter? Try looking at it with an oscilloscope to see the high frequency squarewave switching from 0V to 5V over and over.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Does the external 2.5V source share a common ground with your LM339 circuit?

Oh, and PICTURES.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
And your pull-up is a pull-up, it's not a load. When I asked about a load I was asking about anything else connected to the output (and typically ground referenced)
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
If all you want to do is convert a 2.5V pulse of level into a 5V pulse or level. 2 transistors and a few resistors will do the job.
See pictures attached.
 

Attachments

  • level shifter.pdf
    10 KB · Views: 34
  • level shifter sch.pdf
    8.7 KB · Views: 46
Top