Maker Pro
Maker Pro

comparator help (super newbie)

S

SklettTheNewb

Jan 1, 1970
0
I'm trying to understand the basic LM239 comparator. I have read
several sites about them, looked at samples, read datasheet, etc, etc
and I still am not getting logical results from my simulations.

Here is the test circuit that I made using CircuitMaker, there are 2
version where I switched the reference/input legs
http://www.pmddirect.com/temp/comparator_a.gif
http://www.pmddirect.com/temp/comparator_b.gif

You will see in those images that the output voltages are either 15.8m
(millivolt?) or 21p (I have no idea what that means)

The reference and input voltages are 6v and 3v and I have tried
flipping them, I never get output voltage of +9v (my supply to the
comparator)

I would really appreciate a tip what I've done wrong. I'm sure it's
simple, but 2 hours now and I can't find it.

Thanks for any help,
Steve
 
A

Andrew Holme

Jan 1, 1970
0
SklettTheNewb said:
I'm trying to understand the basic LM239 comparator. I have read
several sites about them, looked at samples, read datasheet, etc, etc
and I still am not getting logical results from my simulations.

Here is the test circuit that I made using CircuitMaker, there are 2
version where I switched the reference/input legs
http://www.pmddirect.com/temp/comparator_a.gif
http://www.pmddirect.com/temp/comparator_b.gif

You will see in those images that the output voltages are either 15.8m
(millivolt?) or 21p (I have no idea what that means)

The reference and input voltages are 6v and 3v and I have tried
flipping them, I never get output voltage of +9v (my supply to the
comparator)

I would really appreciate a tip what I've done wrong. I'm sure it's
simple, but 2 hours now and I can't find it.

Thanks for any help,
Steve

Try connecting the other end of R4 to +9V instead of ground.

Look at the internal schematic on the LM339 datasheet. It has an
"open-collector" output. It can pull the output pin down to ground, it
can't pull up.

Presumably, 21p means pico-volts i.e. 21e-12
 
S

SklettTheNewb

Jan 1, 1970
0
Andrew said:
Try connecting the other end of R4 to +9V instead of ground.

Look at the internal schematic on the LM339 datasheet. It has an
"open-collector" output. It can pull the output pin down to ground, it
can't pull up.

Presumably, 21p means pico-volts i.e. 21e-12


Thank you for the post, that actually did give me the result I wanted.
I'm not completely sure why, but I guess that is my next item to
investigate ;)

Thanks again!
 
J

John Fields

Jan 1, 1970
0
I'm trying to understand the basic LM239 comparator. I have read
several sites about them, looked at samples, read datasheet, etc, etc
and I still am not getting logical results from my simulations.

Here is the test circuit that I made using CircuitMaker, there are 2
version where I switched the reference/input legs
http://www.pmddirect.com/temp/comparator_a.gif
http://www.pmddirect.com/temp/comparator_b.gif

You will see in those images that the output voltages are either 15.8m
(millivolt?) or 21p (I have no idea what that means)

The reference and input voltages are 6v and 3v and I have tried
flipping them, I never get output voltage of +9v (my supply to the
comparator)

I would really appreciate a tip what I've done wrong. I'm sure it's
simple, but 2 hours now and I can't find it.
 
S

SklettTheNewb

Jan 1, 1970
0
Got it!
Circuit is working great now, thank you both for your time, I
appreciate it.

-Steve
 
Top