Transistors and comparators

Thread Starter

jawshoeaw

Joined Jul 15, 2009
1
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".
 

millwood

Joined Dec 31, 1969
0
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".
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).
 

AdrianN

Joined Apr 27, 2009
97
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.
 
Top