Skip to main content

Analog Comparators, Differentials, and Detectors

 Analog wiring going into plugs


Like all humans, every second of every minute of every hour revolves around our ability to compare. Even shortly after birth, we were able to compare and distinguish between what we wanted, needed, or did not like. In every sense of the word, our ability to differentiate is instinctive. Furthermore, most of us are fully aware of that age-old debate between nature and nurture.

However, when it comes to comparison, it is in our nature, but it is our nurturing that shapes our comparative skills. Moreover, we use our comparative skills to navigate in today’s overly abundant and choice-driven world.

Besides, we humans aren’t the only ones that can get in on the fun of comparing. For example, in the field of electronics, there are devices in use today that perform comparative functions for input voltages. These devices are called comparators, and they come in various types for various applicational purposes.

What is a Comparator?

Within the field of electronics, a comparator is a device that provides a comparison of two currents or voltages and outputs a single digital signal that indicates which of the two inputs is larger. Also, a comparator has two analog input terminals (V+ and V-) and one binary digital output (Vo). The ideal output is;

Vo = 1, if V+ > V-


Vo = 0, if V+ < V-

Furthermore, a comparator consists of a specific high-gain differential amplifier, and they are generally in use in electronic devices that digitize as well as to measure analog signals. This, of course, includes relaxation oscillators and analog-to-digital converters, as well as.

Overall, comparators play a vital role in the design process of electronic circuits. Furthermore, the various types of comparators and their classifications include optical, electrical, electronic, pneumatic, mechanical, analog, as well as digital comparators. Also, a comparator is an essential tool in the design and the building of many electronic and electrical projects.

The Analog Comparator and the Differential Voltage

As mentioned previously, a comparator utilizes a specialized or focused high-gain differential amplifier, which means that it also uses differential voltages. Moreover, it is essential that these differential voltages stay within limits detailed by the manufacturer.

Furthermore, in the earlier integrated comparators, such as the LM111, LM211, and LM311, as well as the LM119 series, they had a differential voltage range considerably lower than their power supply voltage, i.e., ±10 V vs. 35 V.

Also, rail-to-rail comparators allow for any differential voltage within the power supply range. Furthermore, there are specific rail-to-rail comparators that have p-n-p input transistors, for example, the LM139 series, which allows the input potential to drop 0.3 volts below the negative supply rail but do not permit it to increase above the positive rail. However, there are also specific ultra-fast comparators, such as the LMH7322, that enable the input signals to go below the negative rail as well as above the positive rail, albeit by a small margin of only 0.2 V.

Note: In summary, the differential input voltage of a current rail-to-rail comparator is generally limited only by the full-swing of the power supply.

What are the Applications for Analog Comparators?

The summary of an analog comparator is relatively straightforward, and in essence, it is a one-bit analog to digital converter. Since it takes two input voltages (analog), and compares them and then provides a differential output voltage (digital) indicating which of the two inputs is higher (high or low-level signal).

Overall, in terms of functionality, a comparator is similar to an operational amplifier, but comparators are designed to function with its output saturated at one power rail or the other and with positive feedback. In general, a comparator is most commonly in use in devices like analog-to-digital converters (ADCs) that measure and digitize analog signals.

Visual inspection of PCB with optical equipment

Utilizing an analog comparator in your circuit board can be in many applications.


Other applicational uses for comparators include:

Threshold detector: The threshold detector uses an operational amplifier and a series of resistors that provide hysteresis. Hysteresis is the dependency of the state of a system on its history. Take, for example, a magnet can experience more than one possible magnetic moment in a given magnetic field, and this, of course, depends on how the field changed in the past.

In summary, the threshold detector performs the function of a voltage switch, but with a significant difference. The state of the detector’s output does not directly affect the input voltage, but rather the voltage drop across its input terminals. Unlike, say the zero-crossing detector, the threshold detector with hysteresis does not switch when Vin is zero. Instead, the output becomes Vsat+ (saturated) when Va becomes positive and Vsat- when Va becomes negative.

Null detectors: The use of a null detector is to identify when a given value is zero. A comparator is suited for null detection comparison measurements because they are essentially a very high-gain amplifier with controlled output limits and well-balanced inputs. Functionally, a null detector circuit compares two input voltages: a reference voltage and an unknown voltage, which they typically refer to as Vr and Vu. Furthermore, if using a comparator as a null detector, the accuracy will be limited.

Zero-crossing detector:  A zero-crossing detector is a comparator with its reference level set at zero. In summary, it is in use in detecting the zero crossings of an AC signal. Furthermore, a zero-crossing is a point where the sign of a mathematical function changes, such as from positive to negative. In terms of function, the zero-crossing detector identifies each time an ac pulse changes its polarity. Thus, the comparator’s output changes state each time the pulse changes its polarity. Therefore, the output is high (HI) for a positive pulse and low (LO) for a negative pulse.

The applications for zero-crossing detectors include use in phase-locked loops, converting an analog signal into a form suitable to use for frequency measurements, or as a controller for power electronics circuits.

Level-shifter: The level-shifter circuit only requires a single comparator with an open-drain output, for example, the LM393. The level-shifter provides excellent flexibility in selecting the voltages to be translated by using an appropriate pull-up voltage. Moreover, it also permits the translation of bipolar ±5 V logic to unipolar 3 V logic when using comparators such as the MAX972.

Relaxation oscillator: We form a relaxation oscillator by using an RC network, which slows the negative feedback to the inverting Schmitt trigger. Also, this feedback through the RC network affords the Schmitt trigger’s output the ability to oscillate in a continuous symmetric square wave. So, in this configuration, the Schmitt trigger is an astable multivibrator. Typically, the Schmitt trigger is a bistable multivibrator employed as a comparator with hysteresis.

Astable refers to a free-running multivibrator that does not have a stable state and thus switches endlessly between two states. Furthermore, this continuous switching between states creates a train of square wave pulses at an unvarying frequency. However, bistable refers to a flip-flop that has two stable states that generate a single pulse that is either negative or positive in value.

 Comparing an electronic printed circuit board to the schematic

Ensuring your circuit board functions properly is necessary with all designs and especially with analog comparators in the devices. 


The analog comparator affords a myriad of applicational uses in a variety of circuit configurations. The functionality that an analog comparator provides is near limitless, and its use is strictly dependent on your circuit designs and needs.

Choosing the right component or circuit for your design can be a challenge made easy with Cadence’s suite of design and analysis tools. Whether working through hysteresis, balancing input and output voltages, or trying to match signal frequencies, OrCAD PCB Designer is the layout solution you’ve been looking for. 

If you’re looking to learn more about how Cadence has the solution for you, talk to us and our team of experts