Op-amp voltage clipper issue

Thread Starter

mad_hacker

Joined Jun 10, 2016
6
I have a signal that I want to clip the voltage from going to high. The reference voltage that I want clip is set by the pwm pins of the atmega2560, going through a RC circuit to filter it out into straight DC. Afterwards the signal goes to the ADC pin of the atmega2560.

I also have buffering circuit that ensures that the RC or Op-amp aren’t being effected by the adc on the atmega 2560. The circuit works but the lowest voltage I can clamp down is 2.2v, with the highest around 4.5v. Am I doing something wrong?

The op-amp isn’t rails to rails but 2.2v seems really high for the lower limit on a non rail to rail opamp.
Any comments or suggestions would be greatly appreciated.

upload_2018-2-23_22-11-11.png
 

ebeowulf17

Joined Aug 12, 2014
3,307
I have a signal that I want to clip the voltage from going to high. The reference voltage that I want clip is set by the pwm pins of the atmega2560, going through a RC circuit to filter it out into straight DC. Afterwards the signal goes to the ADC pin of the atmega2560.

I also have buffering circuit that ensures that the RC or Op-amp aren’t being effected by the adc on the atmega 2560. The circuit works but the lowest voltage I can clamp down is 2.2v, with the highest around 4.5v. Am I doing something wrong?

The op-amp isn’t rails to rails but 2.2v seems really high for the lower limit on a non rail to rail opamp.
Any comments or suggestions would be greatly appreciated.

View attachment 146780
Don't forget the voltage drop of the diode.

I don't know how high of a voltage you're feeding the input, and therefore have no idea how much current is running through the diode and op amp when they're actively clipping.

Depending on how much current is running through them (as well as part variations, temperature effects, etc.) you could easily see an op amp Vol of 1.2 or higher and a diode Vf of 1 or more, so it's not hard to see how this is possible. Even at only 0.1mA, you should expect at least 0.6V each for the op amp and diode (1.2V total.) By the time you reach 10mA, you should expect 1.7-1.8V minimum.

I don't see anything directly in the specs that adds up directly to 2.2V for you, but given that all of these specs represent "typical operating conditions," and allow for significant variation due to both manufacturing variations and environmental factors, plus the fact that I don't know how much current you're trying to sink through this arrangement, I'm not terribly surprised that you're finding 2.2V.

I'd try a rail to rail amp and/or a Schottky diode with an especially low Vf. You might also consider adding an output stage, so instead of clamping the signal to your reference voltage through a diode, you could use an op amp comparator to trigger a MOSFET to clamp with no Vf drop. Don't hold me to anything in this last paragraph - just brainstorming at this point.
 

AnalogKid

Joined Aug 1, 2013
12,128
The schematic does not match your description. When the input signal is above the reference, the U11A output will be saturated high( about 3.5 V) and D4 will be reverse-biased (off) unless the input is above 4.1 V. When the input is below the reference, U11A will go low and the D4 anode will be at approx. 0.8 V.

If you want the circuit to clip the input when it is above the reference, reverse the inputs to U11A.

ak
 

ebp

Joined Feb 8, 2018
2,332
Use a signal diode instead of a 1N400x. Signal diodes such as the 1N4148 are vastly faster, have much lower capacitance and lower reverse leakage current. The circuit will be not be fast at the best of times because the U11A will be driven to saturation when not clamping. It can take several microseconds for it to recover from saturation. This may not be any sort of problem if the slew rate of your input signal is low enough (which is kind of assumed, since the LM358 is no speed demon).

Because the clipping circuit is closed-loop, the diode forward voltage drops out of the equation. However the circuit won't work within less than a diode drop of the negative rail, even if the amp output could go fully to the negative rail. It will clip, but at a diode drop above the lowest output voltage of the amp. Clipping and clamping with single supplies and especially if they are low voltage can be quite a challenge.
 

ebeowulf17

Joined Aug 12, 2014
3,307
The schematic does not match your description. When the input signal is above the reference, the U11A output will be saturated high( about 3.5 V) and D4 will be reverse-biased (off) unless the input is above 4.1 V. When the input is below the reference, U11A will go low and the D4 anode will be at approx. 0.8 V.

If you want the circuit to clip the input when it is above the reference, reverse the inputs to U11A.

ak
Good catch on the polarity of the inputs. I hadn't even noticed that (I often get mixed up when configuring op amps - I'd be a total wreck if I didn't have simulations to help me check my work!)

When the input is below the reference (as drawn above, not in the intended configuration) wouldn't the D4 anode potentially be much higher than 0.8V? I thought it would be at the op amp's low output (at least 0.6V for anything above 1/10mA current) plus the diode Vf (at least 0.6V.) If that's not right, where did I go wrong? How are you arriving at 0.8V?
 

Thread Starter

mad_hacker

Joined Jun 10, 2016
6
My apologizes on the circuit diagram. I tested it on the bread board earlier and didn't get it to work until I switched the inputs. I forgot to change it in the diagram. Any other thoughts on the voltage rise though.
 

crutschow

Joined Mar 14, 2008
38,504
If you want to clamp close to zero volts you can replace the diode with a transistor as shown in the LTspice simulation below.
Results are shown for clamp voltages of 0V, 1V, 2V, 3V, and 4V.
The maximum output of the LM358 is a little less than 4V for a 5V supply.
The output clamp voltage is <8mV.
Note that the U2 input polarity is the same as you showed in your diagram but opposite of what you have in your real circuit.

upload_2018-2-23_10-13-5.png
 

AnalogKid

Joined Aug 1, 2013
12,128
When the input is below the reference (as drawn above, not in the intended configuration) wouldn't the D4 anode potentially be much higher than 0.8V? I thought it would be at the op amp's low output (at least 0.6V for anything above 1/10mA current) plus the diode Vf (at least 0.6V.) If that's not right, where did I go wrong? How are you arriving at 0.8V?
Working from memory, the LM358 saturates below 0.4 V. The data sheet says 20 mV max. with a 10K load.

ak
 

ebeowulf17

Joined Aug 12, 2014
3,307
Working from memory, the LM358 saturates below 0.4 V. The data sheet says 20 mV max. with a 10K load.

ak
Fair enough - so then the question is what kind of load it's seeing and how much current it's sinking. This is the graph that made me think it would be much higher. Maybe I'm misunderstanding what this graph represents:
IMG_4573.PNG
 

Thread Starter

mad_hacker

Joined Jun 10, 2016
6
If you want to clamp close to zero volts you can replace the diode with a transistor as shown in the LTspice simulation below.
Results are shown for clamp voltages of 0V, 1V, 2V, 3V, and 4V.
The maximum output of the LM358 is a little less than 4V for a 5V supply.
The output clamp voltage is <8mV.
Note that the U2 input polarity is the same as you showed in your diagram but opposite of what you have in your real circuit.

View attachment 146792
Thanks for the feedback. I want to clamp it at the reference voltage and not a zero volts.
 
Top