AN-31: precision clamp & driving op amp into saturation - Page 1
Forum section: electronics / beginners

author: shapirus
author_rank: Super Contributor
timestamp: March 10, 2023, 03:09:15 pm
content: There's a precision signal clamp circuit in TI'sAN-31application report:When Vin < Vref (signal level below the limit level), op amp's output rises to the maximum level it can achieve. As far as I understand, this means driving the output stage transistors into saturation. Also as far as I understand, it is generally considered a bad thing, a classic example of which is the explanation provided when giving an answer to "I have an unused op amp in the package, can I use it as comparator to avoid adding a dedicated comparator IC?"So, is driving an op amp into output saturation always a bad thing? Is it bad in this clamp circuit? If so, how can it be modified to avoid saturation?upd: Think of Vin as of a high-impedance, low-voltage signal.

author: MasterT
author_rank: Frequent Contributor
timestamp: March 10, 2023, 08:08:00 pm
content: Saturation affects speed, there is "recovery time " to get back in linear mode.Bad things is input differential voltage, that not every OPA can allow.To solve both issue, use BJT as a switch element, basicaly common voltage regulator circuits.

author: shapirus
author_rank: Super Contributor
timestamp: March 11, 2023, 12:20:17 am
content: Can you please elaborate on using a series pass/switch transistor? The circuit you showed, as far as I understand, does a different thing. I'm interested in improving the circuit shown in the original post in a way that it still clips the input signal at a precise level set by a voltage reference, but avoids driving the op amp into saturation.It obviously saturates because there is no negative feedback when Vin < Vref, so the output is driven all the way to the maximum positive swing. I wonder if there is any way to provide this feedback to keep output within the linear region and not affect the input signal at the same time, or achieving this in some other way.

author: MasterT
author_rank: Frequent Contributor
timestamp: March 11, 2023, 12:34:06 am
content: O'k, first circuits just shows line of thoughts, R3 should be replaced by zenner. Here is another one, MOSFET or BJT is not relevant.

author: shapirus
author_rank: Super Contributor
timestamp: March 11, 2023, 01:07:48 am
content: This is a linear regulator, not a signal clamping (or should I say "clipping"?) circuit. Will only work when Vin is coming from a low impedance source and is high enough to power the op amp.Think of a high-impedance, low-voltage source of Vin with the op amp powered from its own power rails. Sorry I should've noticed this explicitly, because the original circuit doesn't indicate the impedance and level of Vin.

author: MasterT
author_rank: Frequent Contributor
timestamp: March 11, 2023, 03:07:48 am
content: It's up to you how to power up OP amp. Voltage regulator is the same "limiting" circuits as any clamp, only series instead of shunt.Here is one more, depends on how much high impedance of the source, second buffer OPA may be ommited if first OP amp is CMOS and R2 is like 1 Terra Omm or so. Low leak diode would be necessary

author: Kleinstein
author_rank: Super Contributor
timestamp: March 11, 2023, 08:14:00 am
content: The more series regulator circuits add noise, offset and drift from the OP amps when not limiting. The circuit also does not solve the saturation problem. The 1st BJT version is not really working because of the CE saturation voltage and effect of the base current driving a high impedance target.There is nothing that wrong with the initial circuit. If one wants to avoid saturation of the OP- amp one could add a buffer amplifier series resistor and diode in the freeback of the main OP-amp.It would add the delay of the buffer, but the OP-amp would one need to move by 2 diode voltages to engage the clamp.

author: exe
author_rank: Unknown
timestamp: March 11, 2023, 10:52:29 am
content: JFYI there is a topic on how to limit opamp output:https://www.eevblog.com/forum/projects/limiting-op-amp-output/.

author: shapirus
author_rank: Super Contributor
timestamp: March 11, 2023, 01:19:30 pm
content: Quote from: exe on March 11, 2023, 10:52:29 amThanks, that's a lot of information to analyze and circuits to try.Meanwhile, I have assembled the circuit from the first post on a breadboard to see how it performs in real life:- op amp: LM358- power: +9V with a virtual ground one diode drop above the negative rail, making it +8.4V/-0.6V dual supply- signal (Vin): 0..+2V sine wave- Vref: 1.235VAt low frequency clipping works just as expected. Output is limited to Vref and, when Vin < Vref, the output waveform precisely matches the input one.As frequency is increased, the op amp overload recovery time shows itself: since the op amp output is saturated when Vin < Vref, it takes about 25 uS after Vin becomes greater than Vref for clipping to start, which makes this circuit with this particular op amp usable up to about 1-2 kHz, above which the delay becomes very visible on the scope relative to the length of the clipped portion of the wave.So, not very surprisingly, it becomes a trade-off between the performance at higher frequencies and the number and cost/availability of the required components.

author: Kleinstein
author_rank: Super Contributor
timestamp: March 11, 2023, 01:39:22 pm
content: The LM358 on it's own has some problems with AC higher than a few kHz. For the LM358 I don't think there is an especially long overlod recovery time, more the output cross over distortion and the rather limited slew rate. Chances are it would work a little better with a reduced supply.

author: shapirus
author_rank: Super Contributor
timestamp: March 11, 2023, 02:26:52 pm
content: Quote from: Kleinstein on March 11, 2023, 01:39:22 pmYeah, I picked this particular device to illustrate what can be achieved with as jellybean an op amp as it possibly gets. The thread linked a couple of posts above has some useful information on faster parts and circuits.For near-DC and low frequency signals, however, it looks like the circuit from the first post of this thread is going to do the job, of course, as long as staying in the output saturation condition isn't going to damage the op amp.Some additional information on the questions raised:https://www.ti.com/lit/an/sloa277a/sloa277a.pdf(LM358/LM324 oriented, but contains info applicable for general case too).

author: shapirus
author_rank: Super Contributor
timestamp: March 12, 2023, 06:31:07 pm
content: Quote from: Terry Bites on March 12, 2023, 05:34:54 pmTried it in simulation, unfortunately it doesn't work. If the zener values are lower than the potentials between the respective rails and ground, then output is clipped at a level that depends on the supply voltage instead of Vref, and there is (obviously) very high current passing throuh the zeners.If they are higher, then there is some wild oscillation of the op amp's output taking place the moment clipping is supposed to begin, and then it still goes as close to the positive rail as it can when the oscillation stops.However I see what you meant to do there. It may probably work after some modifications.Quote from: Terry Bites on March 12, 2023, 05:34:54 pmYes, it's actually a rather simple idea: a window comparator that sets output to a fixed level if input falls within (or rather outside) a defined region. I like it.However, they don't show how they implement the most interesting part of this circuit: the switch. Any idea of some good implementations? I bet there are specialized ICs, but in this case I'd be interested in a discrete components solution.(upd: just get a specialized IC, it's not a trivial thing to do right; for those having a similar question, chips such as CD4052 is what you're after.)(upd2: JFETs seem to be a possible option too.)But then again, the comparators must be fast enough for the whole idea to make sense. At least, considerably faster than op amps that are advertised as having a short overload recovery duration.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 13, 2023, 10:12:53 pm
content: You're right, it doesn't work. My FUp, too many late nights.Its a problem. The function relies on the opamp going open loop.

author: shapirus
author_rank: Super Contributor
timestamp: March 13, 2023, 11:04:22 pm
content: Quote from: Terry Bites on March 13, 2023, 10:12:53 pmI believe they went the window comparator + switch way in AD8036 for a reason.Looks like it's the way to do it, if faster operation is required (and AD8036 is rated at 200 MHz which is incredible).However, I still haven't fully read the circuits posted in that other thread. There were more approaches discussed in it.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 13, 2023, 11:53:37 pm
content: You can always just dump the amp!A comparator controls a switch that either the passes the input or the clamp voltage to the output.It has some problems. The comparator has no hysterisis.The analog switch adds some glitch to the output.But its another way of getting a relaible clamp.

author: Kleinstein
author_rank: Super Contributor
timestamp: March 14, 2023, 07:27:35 am
content: The version with comparator and switch should work OK when the input is low impedance. It can cause trouble if the signal source is relatively high impedance, from the switch effecting the voltage seen by the comparator and depending on the switch possibly oscillate when close to the cross over.

author: shapirus
author_rank: Super Contributor
timestamp: March 14, 2023, 10:41:24 am
content: Quote from: Kleinstein on March 14, 2023, 07:27:35 amI guess it's why they buffer it with an op amp in AD8036.I wonder how they implement the switch.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 14, 2023, 08:34:16 pm
content: AD8037I imagine the switch is a regular cmos mux. Its interesting to note that it says:"The worst case error between VOUT (ideally clamped) and VOUT(actual) is typically 18 mV times the amplifier closed-loop gain...This occurs when VIN equals VH (or VL). As VIN goes aboveand/or below this limit, VOUT will settle to within 5 mV of theideal value." Is this the effective comparator hysterisis I wonder?It the comparator would go mad without it surely?