NPN and PNP with Comparator

Thread Starter

BWBW

Joined May 17, 2013
11
I'm using 1/4 of lm324 as a comparator, wanting to light a set of leds when high, and another when low, using 9v battery source. When using a 3904 and 3906 (shared base connection from the 324 output), NPN works as expected, but PNP doesn't turn fully off. The PNP works as expected if NPN is removed, where 'low' drives pnp and the 324 output powers the led directly. I want to power several led though.

Is there a way to use both PNP and NPN from the one comparator's output to drive a few LED from the shared base connection where they will fully turn off? Is this a breadboard issue? Should I just use another 1/4 of the 324 and dedicate one to NPN and one to PNP? Thank you for your time, maybe I don't know the right word search to have learned this yet.
 

crutschow

Joined Mar 14, 2008
38,503
Hard to make any suggestions about your circuit when you don't post a schematic of it. :rolleyes:

But certainly using another 324 should work.
 

dl324

Joined Mar 30, 2015
18,326
I'll go with the opamp output isn't high enough to turn the PNP transistor off. But why not post schematics so we have more to go on.
 

Bordodynov

Joined May 20, 2015
3,431
Turn on the PNP transistor through a resistor divider so that with a high level on the operational amplifier = VCC-2V, the voltage at the emitter junction is less than 0.5V.
 

Thread Starter

BWBW

Joined May 17, 2013
11
I'll go with the opamp output isn't high enough to turn the PNP transistor off. But why not post schematics so we have more to go on.
Schematic attached! The NPN won't fully turn off, the green led remains slightly dim, while the PNP/red led does go on and shut off completely. The 2nd image at bottom of attached is 1/2 lm324 to delay the on/off toggle; however the end result is the same, the NPN remains slightly on. My reference to R2 is wondering if a larger resistor value would affect the NPN - but didn't.

Is there a way to have the both transistors on and off in this circuit? Thanks!
 

Attachments

dl324

Joined Mar 30, 2015
18,326
The NPN won't fully turn off, the green led remains slightly dim, while the PNP/red led does go on and shut off completely.
I think it would be the opposite. The PNP won't turn off completely and the red LED stays on.
upload_2018-11-10_13-42-15.png

The output isn't guaranteed to be higher than Vcc - 1.7V.
upload_2018-11-10_13-45-44.png
 

Audioguru

Joined Dec 20, 2007
11,248
The output "low" voltage of the opamp is increased when driving the PNP transistor which causes the NPN transistor to conduct a little. Use a darlington little PNP transistor (MPSA64) to fix it.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Another possibility might be to put a diode in series with the base of the effected transistor (or both of them) so that it takes a higher op amp output voltage to turn on the NPN, and a lower op amp to turn on the PNP. If you're right on the verge of working, one diode drop of extra threshold voltage might do the trick?

(Just brainstorming, haven't tested or simmed this idea.)
 
Top