Comparator circuits find a number of applications in electronics.
Effectively a comparator compares two voltages and switches its output according
ly.
Comparators are used in many areas of electronics where levels need to be detect
ed and in many cases op-amps used as comparators can be seen in many circuits.
What is a comparator?
As the name implies they are used to compare two voltages. When one is higher th
an the other the comparator circuit output is in one state, and when the input c
onditions are reversed, then the comparator output switches.
These circuits find many uses as detectors. They are often used to sense voltage
s. For example they could have a reference voltage on one input, and a voltage t
hat is being detected on another. While the detected voltage is above the refere
nce the output of the comparator will be in one state. If the detected voltage f
alls below the reference then it will change the state of the comparator, and th
is could be used to flag the condition. This is but one example of many for whic
h comparators can be used.
In operation the op amp goes into positive or negative saturation dependent upon
the input voltages. As the gain of the operational amplifier will generally exc
eed 100 000 the output will run into saturation when the inputs are only fractio
ns of a millivolt apart.
Op amp vs comparator
There are many ICs that are specifically intended as comparators. These are very
similar in many respects to op amps. Not only is the circuit symbol the same, b
ut many of the internal circuits appear very similar. However their performance
is very different.
Open and closed loop operation: The comparator is optimised for open loop oper
ation whereas the op amp is intended for closed loop operation with negative fee
dback. The operation of an op amp is not guaranteed for open loop operation.
Digital vs analogue operation: The comparator is intended for operation in one
of two states, high and low, whereas the op amp is intended for analogue operat
ion between the voltage power two rails. The transistors in a comparator are des
igned for digital operation, whereas the op amp is intended for analogue operati
on.
Output stages: The output stages of comparators and operational amplifiers are
very different. The op amp is optimised for linear operation within the rail vo
ltages, whereas the comparator is optimised for operation at high and low states
. Often a comparator will have an open collector output.
Response time: One characteristic often required for a comparator circuit is a
fast response time. The transistors used in op amps are not developed to provid
e switching, instead they are designed for analogue performance. As a result the
y will not provide the fast switching performance of a comparator.
Latch-up: On some occasions it has been known for the output of an op amp to l
atch up when driven hard into the rail. Comparators are designed to operate in t
his mode and should not ever latch up.
In view of these reasons it is always best to use a comparator chip, rather than
an operational amplifier for comparator applications.Nevertheless there are occ
asions where it is more convenient to use an op amp, or one may already be in us
e in a circuit. Under these circumstances, the circuit should be used or designe
d with care, not expecting the optimum performance.
However the overall circuit configuration and concept of operation are exactly t
he same whether an op amp or a special comparator chip is used. The main differe
nce may be that an open collector output may be present on the comparator.
Op amp comparator notes
There are a number of points to remember when using comparator circuits.
Ensure differential input not exceeded: As there is no feedback the two inputs
to the circuit will be at different voltages. Accordingly it is necessary to en
sure that the maximum differential input is not exceeded.
Input current change: Again as a result of the lack of feedback the load will
change. Particularly as the circuit changes there will be a small increase in th
e input current. For most circuits this will not be a problem, but if the source
impedance is high it may lead to a few unusual responses.
Input signal noise: The main problem with this circuit is that new the changeo
ver point, even small amounts of noise will cause the output to switch back and
forth. Thus near the changeover point there may be several transitions at the ou
tput and this may give rise to problems elsewhere in the overall circuit. The so
lution to this is to use a Schmitt Trigger as described on another page.