# OpAmp Buffer configuration with max allowed output

I'm designing a circuit, and a section of it is as follows: simulate this circuit – Schematic created using CircuitLab

What circuit can i use to allow OA1 to follow the Non-inverting input from 0 to 5V exactly, and anything above 5V in the input remains 5V on the output?

(i thought of using 2 resistors or a trimmer to reduce voltage on the input, but i have no use of the 5-10V range, and i want to use the full 0-5V range on the output)

(the 0-10V input is not available for redesign, the OA2 doesn't exists, but i placed it there to signify a high impedance circuit after the output.)

Note: I'm trying to be accurate, i could use a resistor+zener diode on the Output to limit to the closer commercial value for zeners eg. 5.6V, but there must be a better and more precise way to do this..

Here's my solution: simulate this circuit – Schematic created using CircuitLab

How it works is that the 3rd opamp will compare Vlim against a 5 V reference voltage. As soon as the voltage rises above the 5 V reference, the output of OA3 will go low this basically works as an ideal 5 V zener diode. As soon as Vlim goes below 5 V, OA3's output will become high and the diode will be in reverse mode.

So the diode is to prevent OA3 interfering when Vlim < 5 V

The accuracy of the 5 V clamping level is mainly determined by that level itself and the DC offsets of the OA3. The diode is in OA3's feedback loop so the voltage drop across it does not matter.

• Really simple solution, only adds an OpAmp, 1xDiode, 3xResistors (got Vref from the 24V). The simulation works perfect. I'll test this on my circuit to see if Real punches Ideal in the face. Jun 29, 2017 at 12:35
• The circuit works fine. I used a 7805 to get a better and fixed 5V Vref. Looks very stable. Thank you. Jun 29, 2017 at 18:52
• @Bimpelrekkie if the buffer had gain, would you want to put the op amp clipper on the input rather than the output to avoid input offset error? I guess you'd be adding input capacitance which could be a problem if this was a fast circuit. Jun 29, 2017 at 23:36
• No I'd still want to clip at the output as gain makes the input more sensitive so OA3's offset would also be amplified. In this circuit the speed is limited by the bandwidth and slew-rate of the opamps. Opamp input capacitance will influence much less than that. Jun 30, 2017 at 14:03

A web search for opamp min-max circuits some time ago led me to a fascinating AD8036 Voltage Feedback Clamp Amp from Analog Devices. This device, when used in non-inverting mode can clamp the input voltage between an upper and lower limit. Figure 2. Clamp-amp block diagram. (See page 16 of the datasheet.) $+V_{IN}$ is applied to A1's non-inverting input until $+V_{IN} > V_H$ at which point S1 applies $V_H$ to A1. Similarly when $+V_{IN} < V_L$ S1 applies $V_L$ to A1.

There are a few limitations to the device - particularly the supply voltages (+/- 3 to +/- 5 V) and 6.3 V max $\Delta$V between $V_H$ and $V_L$ - but you can work around those by, for example, working in the 0 to 1 V range on your inputs and putting a x 5 amplifier afterwards. • I think TI has one too with the OPA699. I use one and I slam it into its lower clamp voltage quite fast and it has very nice clamp recovery. Very little distortion. Jun 28, 2017 at 22:10 simulate this circuit – Schematic created using CircuitLab Might have to change the resistor values, but the ratio is there and you get the idea.

• Wouldn't this be pretty bad in terms of SNR? Your input signal is 1/5th of the original signal + zener and resistor noise? Jun 28, 2017 at 23:46

Just make the positive voltage rail +5V rather than 24V and use a rail to rail op amp.

You could get 5V from 24 with a linear regulator or build your own with a voltage divider buffered by another op amp and a pass transistor.

The circuit may not have great ac characteristics if you're going to be slamming the op amp into the 5V rail.

• Good suggestion, but i'm using stock components, and don't have any rail-to-rail opamps. I'll be going for Bimpelrekkie's solution. Jun 29, 2017 at 18:55
• It doesn't have to be rail to rail. I couldn't find the relationship between the positive supply voltage and the maximum output voltage for the LM358, but with a simple experiment you could set the positive supply a little above 5V so that the LM358 saturated at 5V. The only thing is that the voltage you will need for the positive supply may not be a common linear regulator output and so you'll have to get it from a voltage divider buffered by another op amp, but you were going to use a second op amp anyway. Jun 29, 2017 at 19:00
• Bimpelrekkie's solution is probably more linear though. Jun 29, 2017 at 19:03