Transistors and comparators

Discussion in 'General Electronics Chat' started by jawshoeaw, Jul 15, 2009.

  1. jawshoeaw

    Thread Starter New Member

    Jul 15, 2009
    I know this is old thread but thought I'd chime in. I don't see any way to use NPN with a comparator. From what I've read (including the site where you got that last circuit) you have to use a PNP. Don't know why so many people get this wrong but to trip a transistor/relay from a comparator LM339 you use PNP. From an op-amp, you can use NPN since op-amp let's current flow forward, it "sources" vs. "sinking".
  2. millwood


    you can make it work either way.

    the "unique" thing here is that lm339 has an open-collector output. that means its output can only sink current, through a pull-up path (which can be a resistor + a p-n junction).
  3. beenthere

    Retired Moderator

    Apr 20, 2004
  4. AdrianN

    Active Member

    Apr 27, 2009
    You can use a NPN without any problem. As Millwood says, you need a pull-up at the LM339 output. Then you can connect the NPN base to LM339 through a resistor. It will invert the logic, which you can correct from the comparator inputs.