# DIYstompboxes.com

## DIY Stompboxes => Building your own stompbox => Topic started by: bushidov on January 16, 2021, 10:42:48 PM

Title: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: bushidov on January 16, 2021, 10:42:48 PM
Hi All,

I have some questions about a non inverting op-amp with asymmetric soft-clipping diodes. Below is the schematic:
(https://i.postimg.cc/ts9bgzjW/non-inverting-opamp.jpg) (https://postimg.cc/ts9bgzjW)

So, the first part I want to make sure I got is that I am understanding what it is doing correctly. I've built this up on a breadboard and it sounds great, but I am just trying to make sure I understand "why" and "how" it is working.

So, I believe that it's C2 is my coupling capacitor and R4 is my bias resistor on the input signal going into the op-amp. C5 is my coupling capacitor leaving the op-amp, delivering the output signal. C3 and R6 form a high pass filter in the feedback loop at around 219 Hz (fc = 1 / (2π ⋅ 3,300 ⋅ 0.00000022))

The gain, I think, is just 1 + ((R5 + Gain) / R6), if not considering the diodes and capacitors C3 and C4. So, because the pot is a 1M pot, if cranked, 1 + ((33,000 + 1,000,000) / 3,300) or 314-ish (50dB-ish).

Now the parts I am less sure of is what C4 and R7 are doing.

I've seen things like putting an in series capacitor from the negative side of a feedback loop into a set of back-to-back diodes for soft clipping that go to the output of a feedback loop, like in the Big Muff Pi's gain stages. I guess that would be kind of a miller cap, that allow the AC signal to pass through it and be clipped and block the DC bias voltage. The cap determines the frequency band the unit clips. Enlarging the cap will make it clip more bass harmonics and making it smaller clips more high-end. So, is that what C4 is doing in this case?

As of R7, what is it doing? Is it something that should be used when calculating the general gain? Does it make the clipping act differently? Does it effect that HP RC filter made up of C3 and R6? Are my above assumptions incorrect?
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: Digital Larry on January 16, 2021, 11:33:45 PM
Take C4 out for a moment.

Then what you get when either of the diodes are conducting is R7 + dynamic resistance of the diodes (assumed low) in parallel with the R5 + Vr1 combination.  This will reduce the gain.  On something like a Tube Screamer AFAIK there's no resistor there so when the diodes conduct, the gain is 1 (essentially a short between the output and the (-) input.  So with a resistor there there will still be some gain and you may clip the op amp's outputs.

The cap C4 across the resistor R7 will start to dominate the impedance (going down) at the freq where 1/(2 * pi * C4) = R7.

So it means that there is more gain below that frequency and less gain above that frequency.

That's what I think, anyway!

DL
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: bushidov on January 17, 2021, 05:18:11 AM
Quote
Bad terminology. These are coupling caps.
Whoops. My error. Corrected on my post.
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: bushidov on January 17, 2021, 05:28:30 AM
Thanks Digital Larry. I think I follow what you are saying. I was reading Electrosmash's analysis on the Tube Screamer right before posting this, and I was thinking a similar thing, but wasn't sure.
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: antonis on January 17, 2021, 02:24:51 PM
To make it more easy, short diodes and take R5 + VR1 out..
You have an amp of x11 gain with R7/C4 LPF at the very same -3db corner frequency with that of R6/C3 HPF..
Now take in the diodes (considering their dynamic resistance zero) and see what happens from signal gain point of view.. :icon_wink:
Then take in R5 + VR1..
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: POTL on January 17, 2021, 03:13:28 PM
1) R4 is responsible for the amplifier bias, input impedance and forms a high-pass filter paired with C2
2) C2 protects the amplifier input from DC and is part of the filter.
3) R5 + VR1 / R6 is responsible for amplification. The lower the R5 value, the lower the minimum gain, the higher the VR1 value, the larger the operating range and the higher the maximum gain. The lower the R6 value, the greater the gain and vice versa.
4) C3 filters frequencies, the smaller the capacitance of the capacitor, the less low frequencies pass through, the nature of this ponder allows you to adjust the sound, more low frequencies, more phase and sag, less low frequencies, more toned sound and better readability, the attack is faster. For a clean boost, a large capacitor is better, for a heavy distortion, a small capacitor is better (unless, of course, you want to build a rat).
5) R7 limits clipping, the larger the resistor value, the less noticeable the clipping
6) C4, I'm not sure about its effect, but it doesn't cut high frequencies for sure, it affects clipping. Most likely, it limits at what frequencies the signal clips, or limits high or low.
7) C5 does the same as C2
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: anotherjim on January 18, 2021, 10:11:29 AM
I think C4 acts as a high cut over 200Hz when the diodes conduct. C3 & R6 high pass also acts about 200Hz but for all cases.
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: Digital Larry on January 18, 2021, 10:45:26 AM
The C4 is maybe most interesting, because it shapes the frequencies at which clipping occurs but is "inside" the clipping loop and doesn't shape the clipped sound.

At least, that's what I think.  Yea/nay?
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: iainpunk on January 18, 2021, 10:57:05 AM
C4 and R7 determine what frequency's are added back after clipping.
the gain stage has a minimum gain of 1, since its non-inverting.
this means that after clipping, the original signal that is 'inside' the clipped area of the wave gets added back.
adding impedance makes the gain after the clipping threshold larger, up to the un-clipped gain that is.
the resistor and capacitor have higher impedance for low frequency's than for high frequency's
this means adding the low end clean back more than the high end clean is added back.

hope this clears it up, Iain
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: POTL on January 18, 2021, 03:20:42 PM
about C4, unfortunately, you will have to assemble this circuit to understand :) yesterday I did a simulation and it did not show any changes in frequency response with and without a capacitor. However, when I looked at the oscilloscope, the voltage in which the signal (alternating current) was located shifted slightly. But it's better to hear once than see a hundred times :)
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: iainpunk on January 18, 2021, 06:20:04 PM
about C4, unfortunately, you will have to assemble this circuit to understand :) yesterday I did a simulation and it did not show any changes in frequency response with and without a capacitor. However, when I looked at the oscilloscope, the voltage in which the signal (alternating current) was located shifted slightly. But it's better to hear once than see a hundred times :)
when simulating the freq. resp., 9/10 ciruit software packages seem to consider diodes to be an open connection, it would be hard to represent distortion in a frequency transfer graph.

cheers, Iain
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: Elijah-Baley on January 19, 2021, 03:48:38 AM
I guess that is true. I use Tina TI software, and when I add or leave off diodes in soft clipping or hard clipping, silicon diodes or LEDs, the frequency doesn't change, neither the gain level.
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: Digital Larry on January 19, 2021, 12:16:46 PM
I think (at least LTSpice, which is all I've used) does frequency response simulations at a very low signal level.  And/or they just ignore any PN junctions in components.

If you want to see the AC behavior with clipping, I think you could do an AC analysis with a sweep input to get an idea of how it behaves.
Title: Re: Questions About a Non Inverting Op-Amp with Asymmetric Soft-Clipping Diodes
Post by: PRR on January 19, 2021, 03:04:59 PM
The classic SPICE determines .DC parameters "at idle" (zero signal) then uses them for the .AC analysis, meaning it too is a no-signal run.

Anyway "frequency response" is a Linear concept. If the response changes with level, such as with clipping, there is no single function to report.

"Probably" what you want is a simple input (perhaps 3-tone), swept over various levels, and get the .FOUR or FFT of the output.