Electronic – Role of current source in comparator

comparatorcurrent-source

I have this schematic of a quarter of the internals of an LM339 from this site

LM339 schematic

I want to know what the purpose of the four current sources are in this circuit, and how might they be implemented?

I know current sources can be implemented as the following;

  • op-amps (not useful to this particular circuit or we would end up nesting opamps within opamps within opamps);
  • a JFET "constant current diode" (also unlikely, as the LM339 is bipolar);
  • a BJT current source, which I believe to be the most likely candidate in this device.

What happens to the circuit if the current sources are not present, or the supply isn't able to source enough current? I've tried simulating the circuit – warning, the simulation runs very slowly and fails when you make adjustments to the input voltages, which is either a bug in the simulator or I don't understand what I'm doing (most likely the latter)

I intend to implement this circuit using discrete components for learning purposes.

Best Answer

Q1 and Q4 are voltage followers. The function of the 3.5-µA current sources on their emitters is simply to provide their operating current. Keeping the current constant improves their speed.

Q2 and Q3 are a differential pair, also called a "long-tailed pair". Both the differential gain and the CMRR increase with the value of the shared emitter impedance. A current source has very high equivalent impedance (ideally infinite), which is why it is used here.

Q7 is a simple common-emitter amplifier. Again, its gain is directly related to the collector load impedance, so a current source is used here for high gain.

As far as implementation, the IC designer has more flexibility than you'll have with discrete parts. Usually, a bipolar current-mirror circuit is used (similar to the Q5-Q6 pair shown above), with one "master" transistor setting a reference current used by several "slave" devices. The current sources you see are all slave devices, and the different currents are set by designing those transistors with different sizes (emitter areas). The ratio of the slave emitter area to the master emitter area determines the slave output current relative to the reference current.