# Precision Clamps

Written by

There is often a requirement in electronics to limit or clamp a variable voltage to some known maximum or minimum level. Figure 1 shows how the “ideal” clamp would operate. In the case of the maximum clamp, the output voltage tracks the input voltage until Vmax is reached at which point but is “clamped” to Vmax. Similarly, the minimum clamp tracks the input voltage unless it falls below Vmin, at which point the output voltage is clamped to Vmin.

The simplest way to implement a clamp is to use a simple diode as shown in Figure 2. Using the maximum clamp as an example, the diode remains reverse biased if Vout is less than Vmax, so Vout follows Vin. If Vin exceeds Vmax, the diode becomes forward biased and Vout is limited to Vmax (plus the diode forward voltage). The minimum clamp works in the same way – the diode is reverse biased if Vout is greater than Vmin but conducts to limit Vout otherwise.

The diode voltage-drop and the soft “knee” as the diode transitions from reverse based to forward biased means this is not really a precision circuit. The inflexion point in the transfer function shown in Figure 1 will not be well defined and the output voltage will not be clamped to Vmin or Vmax precisely. The circuit would be much improved if we could use as an ideal diode, with zero forward drop and a sharp transition between forward and reverse bias states.

Figure 3 shows how we can use an op amp to “idealise” the diode. Again, using the maximum clamp as the example, if Vin is less than Vmax, the op amp output will be saturated to the positive rail and the diode will be reverse biased leaving Vout equal to Vin. As soon as Vout exceeds Vmax by a tiny fraction, the op amp output swings negative and the diode conducts just enough to pull Vout (and therefore its inverting input) down to Vmax. The minimum clamp works the same way, but with the polarities reversed.

This circuit eliminates the impact of the diode forward drop and sharpens the inflexion point but it does introduce another potential problem. When the clamp is not active, there is no negative feedback around the op amp and its output is saturated. Saturation in this case means the output is driven hard against one of the power rails. This is not how op amps are designed to work so this behaviour is undocumented and the results can vary from device to device. It may take quite some time for the op amp to come out of saturation and not all op amps behave well while doing so. Fortunately, it is pretty easy to fix this so the op amp always remains within its proper operating range.

Figure 4 shows how this can be done with the addition of a second diode D2 and an additional resistor R2 (which should be much larger than R1). Now the op amp always has a feedback path so maintains its inverting input at Vmax regardless of the input voltage. When Vin is less than Vmax, D2 is forward biased D1 is reverse biased leaving Vout equal to Vin.

Once Vin exceeds Vmax, D2 is reverse biased and D1 conducts as before, pulling Vout down to Vmax. The op amp output, therefore, swings only one diode drop (0.7V) above or below Vmax. This is well within the op amp’s operating range.

References
Horowitz, Paul, and Winfield Hill. The Art of Electronics. Third edition, 11th printing, with Corrections. Cambridge New York, NY: Cambridge University Press, 2017.

 Keep up-to-date with our FREE Weekly Newsletter! Don't miss out on upcoming issues of Circuit Cellar. Subscribe to Circuit Cellar Magazine Note: We’ve made the Dec 2022 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine. Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.