Connect with us

LM324 as a comparator

Discussion in 'General Electronics Discussion' started by bpm, Jul 18, 2013.

Scroll to continue with content
  1. bpm


    Jul 18, 2013
    Hi all,

    Can an LM324 op-amp be used as a comparator (for <2.5kHz frequencies)?
    What is the simplest way of making sure an LM339 comparator is working?

    I'm trying to build a circuit which needs a comparator. Since the circuit already has an op-amp chip for filtering and gain, I figured I'd use one of the spare op-amps on that chip. So first question, can an LM324 op-amp be used as a comparator (for <2.5kHz frequencies)?

    I ask simply because however I try it, it does not seem to work. So I bought a dedicated comparator chip, an LM339. And this makes even less sense. I attached the 5V supply and ground, and then (just as the most direct test I could think of) put 5V on the + input and ground on the - input. This produced nothing on the output. After much time fiddling, I accidentally knocked the general ground out and at this point I got a potential difference of about 3V from the output pin to ground. This also makes no sense to me, because I though the comparator should deliver 0V or 5V. Plugging the ground back in, this disappeared. I established by trial and error that it didn't matter which pin the chip was grounded by, it always killed the output signal.

    Please help, I think I am missing something very obvious, because what I am trying is really not that complex!

  2. (*steve*)

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

    Jan 21, 2010
    The LM339 has an open collector output. This means you need a pull-up resistor from Vcc to the output. Without this it will flop around like a piece of wet spaghetti. (And that's what you're seeing)

    I don't see why the op-amp wouldn't work, however you need to keep the input signals within the valid range for the device (and you can find that in the datasheet). As I have just reminded myself, that range is quite large.

    How did the LM324 not work? What does it do that you don't expect?
  3. john monks

    john monks

    Mar 9, 2012
    If the LM324 is used as an amplifier and another section is used as a comparator you might get some cross-talk.
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