6.4 Open Loop Voltage Comparator

A common op amp application making deliberate use of saturation is the voltage comparator. This circuit compares two input voltages and produces a binary output voltage (that is, a voltage that can have only one of two possible values) to indicate which input voltage is higher. Consider the circuit shown in Fig. 6.17, with unipolar supply voltage V_{CC}.  Assume the op amp is ideal, with infinite open-loop gain, A. The output voltage hits the positive voltage supply rail, V_{CC} volts, whenever the differential input voltage is positive, i.e., whenever V_{+}>V_{-}. Likewise, the output voltage sits at the ground rail, 0 volts, whenever the differential input voltage is negative, i.e., when  V_{+}<V_{-}.  If we consider a real op amp, with finite open loop gain, such as A=10^{6}, then the output would sit at the positive supply rail whenever V+ exceeds V- by 1 \mu V, a very small value.

Neglecting this small value, we can write V_{o}=V_{CC} when V_{+}>V_{-} and V_{o}=0 when V_{+}<V_{-}. A numerical example follows.

Figure 6.17

Examples

Example:  Design an op amp comparator circuit that determines whether a test voltage, V_{test}, exceeds a reference voltage, V_{ref}.  The circuit should cause an LED to glow whenever V_{test}>V_{ref}.

Solution: The op amp is set up as a voltage comparator with inputs V_{test} and V_{ref}.  (We are not concerned with where these voltages come from in this circuit; in the next chapter, we will examine this using a more detailed circuit.) When powered with a unipolar supply voltage of +5V, the op amp output will be high (+5V) when V_{test}>V_{ref} and  low (0V or gnd potential) otherwise. An LED at the output of the op amp serves as an indicator, glowing when V_{test}>V_{ref}. The 100Ω resistor between the LED anode and the op amp output was chosen to provide a current of ~ 30 mA in the LED circuit, which would result in a bright LED.

Figure 6.18

 

Question: in the example just discussed, what value resistor should be used in the output circuit, in place of the 100Ω resistor, if the voltage supply rail of 12V is used instead of 5V?  Assume, for this case, that the LED drops 2V and should be operated at a current of 10 mA.

Answer: The high-level output from the op amp would be 12V. The resistor would drop 10 V, and the appropriate resistance would be R=\frac{V}{I}=\frac{10}{0.01} = 1000Ω=1kΩ.

Note that the output voltage was assumed to saturate at the voltage supply rail, 5 and 12 volts, in these two examples. We are ignoring the ~ 1 V voltage drop between the supply rail and the saturated output in these examples. 

 

Fig. 6.19 shows how the previous circuit might be developed using  a pair of voltage dividers at the op amp inputs.  Op amp voltage rails V_{CC} and ground are connected to the + and - terminals of a 5 volt battery, respectively.  Two voltage dividers, each comprised of a pair of resistors in series, are connected in parallel with the battery.  In this circuit,  V_{ref}=2.5V and V_{test} is determined by the setting of variable resistor R. When R>5k\Omega, for example, V_{test}>V_{ref}  and the output LED will glow.

 

Figure 6.19

Figure 6.20 is  a view of the same circuit schematic with the ground symbol used in place of the lower node.

Figure 6.20

In Fig. 21, we show a wiring drawing of the circuit using an LM358 Dual Op Amp IC. Only one of the two op amps on this IC is used in the circuit.

Figure 6.21

 

License

Icon for the Creative Commons Attribution 4.0 International License

Applied Electrical Engineering Fundamentals Copyright © by David J. McLaughlin is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book

Feedback/Errata

Comments are closed.