AN4071
Application note
Introduction to comparators, their parameters and basic
applications
By Radim Smat
Introduction
After operational amplifiers (op amps), comparators are the most generally used analog,
simple integrated circuits.
Operational amplifiers are well described in many publications and a lot of information can
be found regarding the design and proper use of these devices. On the other hand,
information concerning comparators is much harder to find as they are often considered as
simple devices. This note explains the main parameters of comparators and their limitations
from an application point of view.
Figure 1.
TS332 and TS334 micropower low-voltage rail-to-rail comparators
October 2012
Doc ID 022939 Rev 1
1/27
www.st.com
Contents
AN4071
Contents
1
2
Comparator substitution by an op amp . . . . . . . . . . . . . . . . . . . . . . . . . 4
Comparator parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Comparator classification by major parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3
Datasheet parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1
3.2
3.3
3.4
3.5
Input common mode voltage range - V
ICM
. . . . . . . . . . . . . . . . . . . . . . . . . 8
Input offset voltage - V
IO
(V
TRIP
) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
CMRR and SVR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Voltage gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Propagation delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4
Hysteresis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1
4.2
4.3
Built-in hysteresis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
External hysteresis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Dynamical hysteresis, example of oscillation issue and the solution . . . . 19
5
6
7
Relaxation oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Window comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2/27
Doc ID 022939 Rev 1
AN4071
List of figures
List of figures
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Figure 6.
Figure 7.
Figure 8.
Figure 9.
Figure 10.
Figure 11.
Figure 12.
Figure 13.
Figure 14.
Figure 15.
Figure 16.
Figure 17.
Figure 18.
Figure 19.
Figure 20.
Figure 21.
Figure 22.
Figure 23.
Figure 24.
Figure 25.
Figure 26.
Figure 27.
Figure 28.
TS332 and TS334 micropower low-voltage rail-to-rail comparators . . . . . . . . . . . . . . . . . . . 1
Comparator pinout example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Signal comparison by TS3011 with built-in hysteresis
(blue IN+, green IN-, red OUT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Open drain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Push-pull. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Wired-OR configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Voltage marking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Input-trip point V
TRIP
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Input offset voltage V
IO
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
V
IO
(V
TRIP
) measurement circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
TS3011 trip point voltage vs. common mode voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
T
PLH
diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
T
PHL
diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
TS3011 T
PD
vs. overdrive voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
TS3011 T
PD
vs. input common mode voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Circuit for T
PD
measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Trip point voltage definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Input hysteresis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Non-inverting comparator with hysteresis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Inverting comparator with hysteresis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Hysteresis circuit example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Dynamical hysteresis circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Device oscillation without C
FB
capacitor (green OUT, blue IN+), time scale 500 ns/div. . . 20
Case with C
FB
(green OUT, blue IN+), time scale 500 ns/div. . . . . . . . . . . . . . . . . . . . . . . 20
Zoom of the signal (green OUT, blue IN+), time scale 20 ns/div. . . . . . . . . . . . . . . . . . . . . 21
Relaxation oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Window comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Temperature control circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Doc ID 022939 Rev 1
3/27
Comparator substitution by an op amp
AN4071
1
Comparator substitution by an op amp
To use operational amplifiers in open loop as comparators is quite common. This especially
applies when an op amp is already used in the application, giving the user the opportunity to
use a dual channel (or quad channel) op amp which can save space in the application. This
is possible even if a better alternative is to use comparators that are optimized for this
purpose.
The op amp is a device which is designed to be used with negative feedback.
A major concern is to ensure the stability of such a configuration. Other parameters like slew
rate and maximum bandwidth are trade-offs with current consumption and the architecture
of an op amp.
Comparators, on the other hand, are designed to operate in open loop configuration without
any negative feedback. In most cases, they are not internally compensated. The speed
(propagation delay) and slew rate (rise and fall time) are maximized. The overall gain is also
usually higher. The use of an op amp as a comparator leads to an unoptimized situation,
where current consumption versus speed ratio is low. The opposite is even worse. Normally,
a comparator cannot be used instead of an op amp. Most probably, the comparator shows
instability under negative feedback. Generally speaking, comparators and operational
amplifiers cannot substitute each other except for low performance designs.
4/27
Doc ID 022939 Rev 1
AN4071
Comparator parameters
2
Comparator parameters
Comparator classification by major parameters
●
●
●
●
●
●
●
Propagation delay
Current consumption
Output stage type (open collector/drain or push-pull)
Input offset voltage, hysteresis
Output current capability
Rise and fall time
Input common mode voltage range.
Besides major parameters, comparators are classified by other parameters such as input
bias current, common mode and power supply rejection ratio, sample/hold function, and
startup time.
Figure 2.
Comparator pinout example
A single device has, ordinarily, five pins: two for power supply V
CC+
,V
CC-
, two as inputs IN+,
IN- and one for the output OUT. It is possible to have an extra pin for standby function.
When V
IN(+)
> V
IN(-)
, the output is in high state, if V
IN(+)
< V
IN(-),
the output is in low state.
Doc ID 022939 Rev 1
5/27