### Author Topic: Understanding comparator output current  (Read 1873 times)

0 Members and 1 Guest are viewing this topic.

#### kicken

• Contributor
• Posts: 21
• Country:
##### Understanding comparator output current
« on: November 20, 2016, 08:38:56 am »
Having finally gotten the hang of 555-timer circuits (i think) I thought I'd expand my knowledge a bit by trying to incorporate some binary counter ICs and a comparator.  I create a circuit that I think should roughly count seconds using two 4-bit counters.  I'm also using two 4-bit comparators to determine when the count has reached 59.  At that point I want to turn on a transistor.

I got confused however when trying to figure out a resistor value for the transistor base.  I went to the datasheet for my comparator to see what the current limit is on it's output and it listed a bunch of negative values for the output high and also no maximum value.  I was planning on using a 5V source for my circuit, and if I am understanding the datasheet correctly that means the output pin in a high state has a typical current of -1mA.

I did a bunch of reading regarding negative current, sink vs source current, active high vs active low, etc and so far things are not much clearer to me than before.  If my understanding is correct the the datasheet is saying that roughly 1mA would be provided by the comparator to drive the transistor.  Does this also mean I don't actually need a current limiting resistor on the transistor base as the current is already limited?

Would appreciate any insight into this datasheet.  I'm having a hard time understanding what it's saying and what it means for my circuit planning.

#### evb149

• Super Contributor
• Posts: 1838
• Country:
##### Re: Understanding comparator output current
« Reply #1 on: November 20, 2016, 10:09:36 am »
It will not limit the current for you reliably.  They give typical and minimum but no maximum though you can see from the temperature variation related figures that you could expect somewhere between 1mA and 6.8mA plus or minus source or sink given the particular test conditions.  But a BJT's base will draw "lots" of current when the VBE is forward biased more than about 600mA and there is not external emitter resistance.
So the best way to calculate the base series resistor is to assume that the comparator is sending 1mA or less current to the BJT base.  Given your supply voltage and the slight (0.5V, 0.4V?) voltage drop of the comparator when sourcing/sinking 1mA, and given around 650mV to 750mV VBE figure out what the voltage drop of the resistor at 1mA must be to drop the rest of your maximum supply voltage's potential besides what the comparator VOH/VOL drops and what the VBE value may be.  V = I*R so R=V/I and V is your desired voltage drop of the mimumum supply voltage - the comparator drop - the VBE drop and I=1mA.

Of course for a reasonable transistor 1mA base current is much more than you need to have heavy collector to emitter current flow if the Beta is 50 or 100 or more.. so you could really reduce the base current to maybe 0.5mA or 0.1mA or whatever depending on your BJT hFE / Beta range and temperature and the desired collector current.

The following users thanked this post: kicken

• Super Contributor
• Posts: 1875
• Country:
• Reactor Operator SSN-583, Retired EE
##### Re: Understanding comparator output current
« Reply #2 on: November 20, 2016, 02:23:44 pm »
For bipolar transistor as switch -

If you are trying to use the transistor s a switch then preferably you want it
saturated. To do that rule of thumb is to "force beta" to ~10, eg. Ibsat =
Icsat / 10

That will minimize Pdiss in the transistor switch and realize Vcesat. Not their
are some transistor if you interchange collector and base youc an get even
lower Vcesat values.

Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer

The following users thanked this post: kicken

#### Zero999

• Super Contributor
• Posts: 15767
• Country:
• 0999
##### Re: Understanding comparator output current
« Reply #3 on: November 20, 2016, 11:25:51 pm »
How much current do you need the transistor to switch?

Perhaps you should consider a logic level MOSFET, rather than a BJT? MOSFETs don't draw any current from the control circuit, apart for a short length of time when it's switched on/off.

#### kicken

• Contributor
• Posts: 21
• Country:
##### Re: Understanding comparator output current
« Reply #4 on: November 21, 2016, 03:37:20 am »
I'm basically just using the transistor as a switch to pull the load pin on my counter ICs to ground so they will reset to 0 on the next clock cycle.  To do this I just connected the collector to my +5v along with a 1k resistor and tied the reset line in just after the resistor.  If my understanding is correct then when the transistor turns on the line will be pulled low and about 5mA will be flowing through the transistor.  I mostly just stuck in a 1k because it's what I have on hand.  I'm guessing I could use a higher value and reduce the current even more yet still have it work ok.  I've not yet bought any of the counter or comparator parts  yet so I could add some bigger resistors to the list.

Smf