Connect with us

LM393 comparator does not work...

Discussion in 'General Electronics Discussion' started by dtvonly, Mar 14, 2012.

Scroll to continue with content
  1. dtvonly


    Mar 14, 2012
    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.

    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.

    Attached Files:

  2. duke37


    Jan 9, 2011
    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)
  3. dtvonly


    Mar 14, 2012
    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.
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    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.
  5. dtvonly


    Mar 14, 2012
    Hi all. Thank you for all your help. This circuit is now working great, exactly as it was intended. Bye.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day