comparator help (super newbie)

Apr 06, 2005 4 Replies

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

formatting link
formatting link



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


etc

2
15.8m

it's

it

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!

The LM239 has open collector outputs, so R4 needs to go to +V and it needs to be about 10k.

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

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

-Steve

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required