Here's my schematic. The comparator is a LM339 and the transistor (NOT Gate) is a BC547B.
What I want it to do is the following:
R2 and R4 set the reference voltage for the comparator. Whenever the voltage across the potentiometer R1 goes above that reference voltage, the LM339's output reads LOW (and vice versa).
However, I need that output to be a HIGH when the voltage crosses above the threshold (and vice versa), that's why I've added the BC547 to function as a NOT Gate.
However, I'm not 100% sure, if I've added some redunancy with the resistors, specifically R5, R6, R7. For example, do I still need a pullup resistor R5 when I add the transistor?
Can someone please verify if I could optimize the circuit?
I can't see your schematic, but if you want to compliment the output of a comparator you just swap the + and - inputs, then it will work the other way round.
PerryBebbington:
I can't see your schematic, but if you want to compliment the output of a comparator you just swap the + and - inputs, then it will work the other way round.
Unfortunately that doesn't work with the Schmitt trigger.
Thanks Larry, appreciate your help. I've connected the GND properly. It's just that Eagle software (I used for the schematics) named the pins differently than on the LM339.
I'll try to remove R6.