How does the comparator work internally?

I'm currently working on LM339 comparator. It says "If IN– is lower than IN+ and the offset voltage, the output is high impedance" on the datasheet. I'm wondering how does the comparator makes it go to high impedance internally?

From my understanding, high impedance means zero current at the output, which means zero current at the collector of the NPN. Like how do we make Ic=0 (this might be a basic NPN question)?

• Welcome. Please point out what page you are referring to, as datasheets offer hundreds of parameters for most any rational condition.
– user105652
Commented Nov 22, 2019 at 4:17
• My bad. Page 11-13 Commented Nov 22, 2019 at 15:41

There's a (simplified) schematic on page 11 of the datasheet you linked that shows why the output can either be low or high-impedance, but not actively pulled high:

This shows an open-collector output. When the current flows in to the base of the output transistor, it attempts to pull current in to its collector, leading to the output being actively pulled low.

When no current flows in to the base of the output transistor, then there's nothing pulling current in to its collector. But there's also nothing pulling the output high, so we have a high-impedance output.

There's no operating condition that leads to current flowing out of the output pin and driving the output high.

• You mean the output being pulled low when it's trying to pull current to "collector"? I thought it's the emitter pin that's pulling to ground? Commented Nov 22, 2019 at 14:14
• I posted a new question that gives a bigger picture of the circuit i;m workig on. electronics.stackexchange.com/questions/468582/… Commented Nov 22, 2019 at 15:56
• @cy1125, the emitter pin is connected directly to ground. It can't do anything to change its voltage. It's always ground. The collector pin is connected to the load. If current flows in to the collector, it will pull the output voltage towards (not necessary all the way to) ground. Commented Nov 22, 2019 at 16:29

If I understand the question correctly, the collector current goes to zero when the base current goes to zero. The rest of the circuitry inside the comparator is simply switching the output transistor either full-on or full-off.

The LM339 uses a PNP differential Darlington to drive a single path of NPN Darlington’s to an open collector output now with 4 stages of gain.

This structure of uncompensated high speed gain allows the differential input to be converted into a logical output with active “0” or an open “1” pulled up by a resistor.

Regulated current mirrors make the bias reference for the input zero crossing threshold. The PNP inputs allow operation of the inputs at ground level for a single supply.

this circuit will do that

simulate this circuit – Schematic created using CircuitLab