Voltage comparator

A comparator compares two input voltages and reports their relationship as an output state. The output type matters: LM393/LM339 examples use a pull-down output that needs a suitable pull-up for a HIGH level, while other comparators use different output structures.

A high-gain input stage responds to the difference between the two inputs. In the LM393 example, the output transistor sinks current when the negative input exceeds the positive input by enough to overcome offset. Otherwise the output is high impedance and an external pull-up establishes HIGH. Inputs must remain in the specified common-mode range; response time depends on overdrive, load, supply and temperature.

In plain terms

A see-saw with no middle ground: the heavier side slams to the floor, the lighter side springs up. There is no 'almost level' — just two states, and a hair-trigger threshold between them.

Why designers use it

Best for

Key specifications

When not to use it

Common mistakes

Where you will find it

A short history

TI's LM393 and LM339 documentation illustrates two- and four-comparator arrangements with open-collector outputs. Their input common-mode range includes ground under specified conditions, but does not generally extend all the way to the positive supply. Modern B versions have different electrical limits from the older versions, so check the full code rather than treating the family name as a specification.

Good to know

Related