ArticleslgStudy

engineering

Comparator

Comparator is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Comparator rather than just read about it. In short: In electronics, a comparator is an electronic component that compares two input voltages or currents and outputs a digital signal indicating which is larger. It has two analog input terminals V+ and V− and one binary digital output Vo.

Comparator — main illustration
Comparator — illustration

Key takeaways

  • Comparator belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Comparator to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Comparator from memory before moving on to harder problems.

Reference excerpt

In electronics, a comparator is an electronic component that compares two input voltages or currents and outputs a digital signal indicating which is larger. It has two analog input terminals V+ and V− and one binary digital output Vo. The output should be bistable and is ideally

Vout={VS+if V+>V−,VS−if V+<V−,0if V1=V2, where VS+ and VS− are nominally the positive and negative supply voltages. A comparator consists of a specialized high-gain differential amplifier. They are commonly used in devices that measure and digitize analog signals, such as analog-to-digital converters (ADCs), as well as relaxation oscillators. Comparators are closely related to operational amplifiers, but a comparator is designed to operate with positive feedback and with its output saturated at one power rail or the other. If necessary, an op-amp can be pressed into service as a poorly performing comparator, but its slew rate will be impaired.

Differential voltage

The differential voltages must stay within the limits specified by the manufacturer. Early integrated comparators, like the LM111 family, and certain high-speed comparators like the LM119 family, require differential voltage ranges substantially lower than the power-supply voltages (±15 V vs. 36 V). Rail-to-rail comparators allow any differential voltages within the power-supply range. When powered from a bipolar (dual rail) supply,

VS−≤V+,V−≤VS+, or when powered from an unipolar TTL/CMOS power supply,

0≤V+,V−≤Vcc. Specific rail-to-rail comparators with p–n–p input transistors, like the LM139 family, allow the input potential to drop 0.3 volts below the negative supply rail, but do not allow it to rise above the positive rail. Specific ultra-fast comparators, like the LMH7322, allow the input signal to swing below the negative rail and above the positive rail, although by a narrow margin of only 0.2 V. Differential input voltage (the voltage between two inputs) of a modern rail-to-rail comparator is usually limited only by the full swing of power supply.

Op-amp voltage comparator

An operational amplifier (op-amp) has a well balanced difference input and a very high gain. This parallels the characteristics of comparators and can be substituted in applications with low-performance requirements. A comparator circuit compares two voltages and outputs either a 1 (the voltage at the plus side) or a 0 (the voltage at the negative side) to indicate which is larger. Comparators are often used, for example, to check whether an input has reached some predetermined value. In most cases a comparator is implemented using a dedicated comparator IC, but op-amps may be used as an alternative. Comparator diagrams and op-amp diagrams use the same symbols. A simple comparator circuit made using an op-amp without feedback simply heavily amplifies the voltage difference between Vin and VREF and outputs the result as Vout. If Vin is greater than VREF, then voltage at Vout will rise to its positive saturation level; that is, to the voltage at the positive side. If Vin is lower than VREF, then Vout will fall to its negative saturation level, equal to the voltage at the negative side. In practice, this circuit can be improved by incorporating a hysteresis voltage range to reduce its sensitivity to noise. Because of the difference in characteristics of an operational amplifier and comparator, using an operational amplifier as a comparator presents several disadvantages as compared to using a dedicated comparator.

Op-amps are designed to operate in the linear mode with negative feedback. Hence, an op-amp typically has a lengthy recovery time from saturation. Almost all op-amps have an internal compensation capacitor which imposes slew rate limitations for high frequency signals. Consequently, an op-amp makes a sloppy comparator with propagation delays that can be as long as tens of microseconds. Since op-amps do not have any internal hysteresis, an external hysteresis network is always necessary for slow moving input signals. The quiescent current specification of an op-amp is valid only when the feedback is active. Some op-amps show an increased quiescent current when the inputs are not equal. A comparator is designed to produce well-limited output voltages that easily interface with digital logic. Compatibility with digital logic must be verified while using an op-amp as a comparator. Some multiple-section op-amps may exhibit extreme channel-channel interaction when used as comparators. Many op-amps have back to back diodes between their inputs. Op-amp inputs usually follow each other so this is fine. But comparator inputs are not usually the same. The diodes can cause unexpected current through inputs.

Design

… excerpt ends here. Continue reading the full article.

Illustrations

Comparator: LM393 dual comparator, a common comparator integrated circuit chip, shown on a circuit board
LM393 dual comparator, a common comparator integrated circuit chip, shown on a circuit board
Comparator: Illustration of how a comparator works
Illustration of how a comparator works
Comparator: A simple op-amp comparator
A simple op-amp comparator
Comparator: A low-power CMOS clocked comparator
A low-power CMOS clocked comparator
Comparator: A precision calibration comparator
A precision calibration comparator

Worked examples

Example 1 — a first encounter with Comparator

Start with the simplest possible case. Write down what Comparator claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Comparator before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Comparator ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Comparator

In research
Comparator appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Comparator in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Comparator is common in secondary-school and first-year university syllabi. It links to neighbouring topics Analog circuits, Comparison (mathematical), Electronic amplifiers, so understanding it makes those chapters shorter.
In everyday life
Look for Comparator outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Comparator” →

How to study Comparator in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Comparator means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Comparator out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Comparator in simple terms?

In electronics, a comparator is an electronic component that compares two input voltages or currents and outputs a digital signal indicating which is larger. It has two analog input terminals V+ and V− and one binary digital output Vo.

Why does Comparator matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Comparator?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Comparator.

Tags

  • Analog circuits
  • Comparison (mathematical)
  • Electronic amplifiers
  • Electronic circuits

Keep exploring