Maker Pro
Maker Pro

LM393 comparator does not work...

dtvonly

Mar 14, 2012
11
Joined
Mar 14, 2012
Messages
11
Hi. Please see the attached comparator circuit using the LM393 comparator.
All electrical specs seemed to be met yet the output of the LM393 is not what I expected.

Expected output:
With switch S1 open, LM393 output should be around 9V.
With switch S1 close, LM393 output should be around 0V.

Actual:
With S1 open, at inverting input is 5.34V, and at non-inverting input is 8.77V.
LM393 output is 0.419V (wrong, why???)
With S1 close, inverting input is still at 5.34V, and non-inverting input is 4.2V (correct!)
LM393 output is 0V (correct!)

Why is the LM393 output wrong when S1 switch is open?

Please advise. Thank you.

p.s. the datasheet for the LM393 is all over the internet. This is why I did not attach a datasheet here.
 

Attachments

  • LM393 comparator circuit.JPG
    LM393 comparator circuit.JPG
    12.5 KB · Views: 7,387

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
I do not want to spend time looking for data sheets. Most comparators need a pull-up resistor at their output, they only pull down as you have found.

The fet is connected wrong, interchange the ground and 9V (assuming it is +9V)
 

dtvonly

Mar 14, 2012
11
Joined
Mar 14, 2012
Messages
11
Hi Duke37. thank you for replying. You are correct. the datasheet did include a pullup for driving TTL and/or CMOS load. I connected a 10k pullup and that solved it. As for the FET, this is correct since I want to "connect" the 9V to drain with -Vgs; i.e when LM393 output is low (0V). Anyway, this whole circuit now works fine. Thank you for your help.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
I'm sure you know what you're doing, but the source would typically be grounded and the drain connected to the load then to V+.

In any case, the mosfet is drawn upside-down from normal convention. the more positive parts are normally drawn at the top, and the more negative toward the bottom. It just makes understanding easier.
 

dtvonly

Mar 14, 2012
11
Joined
Mar 14, 2012
Messages
11
Hi all. Thank you for all your help. This circuit is now working great, exactly as it was intended. Bye.
 
Top