Simple distortion unit

A simple schem of Nicklas Ronnberg
Diode clipping !!!
mine (allways in Kosmo format)

7 Likes

6 Likes

The first opamp is sort of a double phase rectifier (if the switch is closed) which also lets thru the original signal. The rectification will certainly give some distortion, but will also add double frequency components, which may not always sound nice. The 2nd opamp is a buffer/amplifier, but I’m not sure what the 10uF and 2 diodes to GND add to this circuit. What do they do?

1 Like

I don’t see this as a rectifier, to me it’s more like a clipping circuit.

With the switches open, you have a pretty standard unity gain inverting amplifier followed by a variable gain inverting buffer.
With the switches closed, the diodes in the feedback loop serve to reduce the amplifier’s gain as the voltage’s absolute value increases.
For small input voltages, say lower than 0.3 volts or so in absolute value, the diodes don’t conduct much at all and the resistance in the feedback loop is dominated by the 10k resistor and the circuit is essentially the same as with the switch open.
For voltages larger than 0.8 volts or so in absolute value, one of the diodes fully conducts with very little resistance so the total feed back resistor becomes essentially 470 ohms and the gain is reduced to 470/10000 = 0.047 or 5%, so the voltage at the output of the first opamp is essentially just one diode drop or approx 0.7V above or below ground depending on the sign of the input signal.
For inputs voltages between about 0.3V and 0.8V in absolute value, the gain progressively transitions, but non-linearly, from unity to 5% progressively squashing the top of the signal and the output of the first opamp is a clipped version of the input signal.

This clipping can create pretty sharp edges (a large sine wave input would almost look like a square wave at the output of the first opamp). These sharp edges can become big voltage spikes when going through the 10µF capacitor in the middle of the circuit. The two diodes there further clip those voltage spikes and ensure the input to the second opamp doesn’t go more than one diode drop (approx 0.7V) above or below ground.

I don’t think there will be frequency doubling effects as such, just more harmonics due to the sharper edges obtained by clipping.

This is my intuitive take on the circuit, I haven’t built or simulated it, so if anyone thinks my analysis is wrong, by all means let me know.

2 Likes

I agree with your analysis in part. The 2 diodes will rectify the signal, so that when the input is a sine, you end up with both parts of the sine, the positive half and the second half flipped (mathematically speaking you get the absolute value of the sine) to the same side effectively altering the AC input into a varying DC input (there are some more details here). The period time of this DC variation is half that of the original sine, hence frequency doubling. That should be audible. Given that a sound is characterized by peaks in its spectrum which have a constant spacing if you raise or lower their pitch a frequency doubling may not always sound good.

1 Like

I understand what you are saying, but the circuits in the page that you link have different configurations of diodes, with different effects than here. In our circuit, the diodes are in the feedback loop, not in the output circuit.
As an inverting amplifier, when the input goes negative the output of the first opamp will want to go positive and the diodes will not prevent that up to about 0.7V and then output will go no further up as the input goes further negative.
Similarly when the input goes positive, the output of the opamp will want to go negative and nothing will prevent that from happening until the output reaches about -0.7V and it will go no further negative.

An AC input will become an AC output, with no rectification.

1 Like

No, there’s no rectification going on here. Both diodes are in parallel in the feedback loop and effectively act as variable resistors (overriding the 10k when they open, and thus dropping the gain). This basically “squashes” the wave peaks. Here’s the output from a simple falstad simulation of the first stage:

The rectifier ones on the page you link to have a different layout (note which signal that goes to the next opamp from the first stage, and the feedback path from the second one).

2 Likes

Here’s what I get on a 220 Hz ±5V sine wave. NODE 1 is input, NODE 4 is output, NODEs 2 and 3 are before and after the capacitor in the middle. With first stage diodes only:


With second stage diodes only:

And with all four diodes:

1 Like

Can anybody explain why the second waveform (with only the second stage diodes) is not symmetrical?
Is that a simulation artifact on the first cycle and the steady state would be symmetrical?


No to your second question. No to your first, too, at least from me.

But if you take out the capacitor the asymmetry goes away. Also if you take out the capacitor the second stage diodes have no effect.

Edit: Actually that’s with all four diodes. With just the second stage diodes it’s this:

1 Like

Not sure, but the capacitor/diode combination kind of forms a high pass filter with a very non-linear R component. When the diodes stop conducting, the cut-off frequency changes drastically which I suspect explains the asymmetry.

1 Like

Thanks @analogoutput.
Is that a spice simulation?
Are you using generic ideal opamp, capacitors and diode models or actual TL082, electrolytic cap and 1N4148 models?
In the later case, what voltage of power supply are you using?

1 Like

Oh, lord, no. I mean, I think it uses Spice for an engine, but it’s Circuitlab.com and I’m just doing a lot of pointing and clicking. I don’t know enough to do anything more accurate. So yes, generic ideal opamp, capacitors and diode models, presumably.

3 Likes

I’m referring to this configuration:

@frederic I did not know this falstad simulation page. Neat ! The simulation of the first bit with values copied looks like this (hope I got all the wiring correct).

The diodes in the circuit I’m referencing are both in the feedback loop of the first opamp and organized in an anti parallel fashion. There is the difference that only one has a series resistor R2 in its feedback chain as opposed to the diagram shown earlier in this thread. This results in a half wave rectifier (compare figure 3, precision half-wave rectifier). I overlooked the missing feedback loop from the output of opamp 2 to opamp 1. That is not present in the diagram shown in this thread. Had that been there, then it would have been a full wave rectifier (compare figure 4).

Because I do not know how long the simulation is available, I’ve add the following screendump:

I upped the input voltage to 10 volts AC. So apart from at max the diode forward voltage for positive signals (inversed), negative voltages are inversed to positive values, which one arguably could see as simple inversion or half of a full wave rectification. The small capacitor doesn’t seem to add much.

If this discussion has brought me one thing, I absolutely love this falstad!

2 Likes

Yeah, this falstad web site is pretty cool, thanks @fredrik for introducing us to it.

@Jos, as indicated in the bottom right of your picture, you have one bad connection, the lower diode branch is not connected, that is shown by the red dot in the schematic.

Edit: And the two diodes’ resistors are not the same value.

That’s a nice web site, I played with it for a bit but unfortunately it is not worth to me the amount they are asking for, as you can do all that in KiCad (admittedly with more effort, but also with more flexibility).
I did play with it long enough to notice that their opamp is actually a TL081 which is a nice coincidence here.

@analogoutput, it turns out that some of the asymmetry in the first waveforms was indeed because they were the first cycles of the simulations, in your later waveforms, we can see that things become more regular and symmetrical with time.

RATS, a loose connection. Silly of me not to notice.

Yes, silly of me to post only the first cycle — even a close examination of that shows the second half not a mirror image of the first. But some asymmetry does persist.

1 Like

I should really learn to capture those from mine. Just another toy I never got the full benefit of. I’m a spoiled man-child.

1 Like