# Simple distortion unit

**URL:** <https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639>\
**Category:** DIY STUFF\
**Created:** [April 15, 2020, 8:41am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639 "2020-04-15T08:41:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dud](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/dud/32/610_2.png) [@Dud](https://lookmumnocomputer.discourse.group/u/Dud)\
**Post date:** [April 15, 2020, 8:41am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/1 "2020-04-15T08:41:11Z")

</div>

A simple schem of [Nicklas Ronnberg](http://familjenronnberg.se/~niklas/diy/eurorack/dist/)  
Diode clipping !!!  
mine (allways in Kosmo format)

 ![dist unit module - sound bender (1)](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/e/eccd53eb5746d2c5add475a87c008c851ae360a0.jpeg)

---

<div class="post-metadata">

**Author:** ![Dud](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/dud/32/610_2.png) [@Dud](https://lookmumnocomputer.discourse.group/u/Dud)\
**Post date:** [April 15, 2020, 8:42am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/2 "2020-04-15T08:42:17Z")

</div>

![dist_schematic](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/f/f7912cdb259100d1751a6811075655d00be0f971.png)

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [April 15, 2020, 9:33pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/3 "2020-04-15T21:33:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![antoine.pasde2](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/antoine.pasde2/32/326_2.png) [@antoine.pasde2](https://lookmumnocomputer.discourse.group/u/antoine.pasde2)\
**Post date:** [April 15, 2020, 10:22pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/4 "2020-04-15T22:22:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [April 15, 2020, 10:53pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/5 "2020-04-15T22:53:46Z")

</div>

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](https://www.nutsvolts.com/magazine/article/op-amp-cookbook-part-4)). 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.

---

<div class="post-metadata">

**Author:** ![antoine.pasde2](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/antoine.pasde2/32/326_2.png) [@antoine.pasde2](https://lookmumnocomputer.discourse.group/u/antoine.pasde2)\
**Post date:** [April 15, 2020, 11:39pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/6 "2020-04-15T23:39:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fredrik](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/fredrik/32/682_2.png) [@fredrik](https://lookmumnocomputer.discourse.group/u/fredrik)\
**Post date:** [April 15, 2020, 11:50pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/7 "2020-04-15T23:50:39Z")

</div>

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](http://tinyurl.com/yblyggbh) of the first stage:

 ![image](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/a/a1c489e23ccb8d0416b5a5701d22fa2f5430fa8d.png)

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).

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [April 16, 2020, 12:26am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/8 "2020-04-16T00:26:37Z")

</div>

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:

 ![image](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/6/602af24d733a1f3c42249b4a489a58318ea9fb3d.png)  
With second stage diodes only:  
 ![image](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/b/b0ea1522a0f16f42f47c98092d2640298bfbeced.png)  
And with all four diodes:  
 ![image](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/5/513191924360e299e04f38baa8b940ee9c7c9eee.png)

---

<div class="post-metadata">

**Author:** ![antoine.pasde2](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/antoine.pasde2/32/326_2.png) [@antoine.pasde2](https://lookmumnocomputer.discourse.group/u/antoine.pasde2)\
**Post date:** [April 16, 2020, 1:28am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/9 "2020-04-16T01:28:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [April 16, 2020, 1:45am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/10 "2020-04-16T01:45:31Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/1/158c62e4347be422ce104a5e8d92ff2a03925a3f.png)  
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:

 ![image](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/5/5a807410781650d8782a465e8a2c720b2768fb10.png)

---

<div class="post-metadata">

**Author:** ![fredrik](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/fredrik/32/682_2.png) [@fredrik](https://lookmumnocomputer.discourse.group/u/fredrik)\
**Post date:** [April 16, 2020, 2:20am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/11 "2020-04-16T02:20:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![antoine.pasde2](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/antoine.pasde2/32/326_2.png) [@antoine.pasde2](https://lookmumnocomputer.discourse.group/u/antoine.pasde2)\
**Post date:** [April 16, 2020, 2:27am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/12 "2020-04-16T02:27:07Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [April 16, 2020, 2:30am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/13 "2020-04-16T02:30:05Z")

</div>

Oh, lord, no. I mean, I think it uses Spice for an engine, but it’s [Circuitlab.com](http://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.

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [April 16, 2020, 8:35am UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/14 "2020-04-16T08:35:57Z")

</div>

I’m referring to this configuration:

 ![](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/a/a8865f8231ad72d0908e207f6e782ca132b4f93b.jpeg)

@frederic I did not know this falstad simulation page. Neat ! The [simulation](https://www.falstad.com/circuit/circuitjs.html?cct=%24+1+0.000005+16.13108636308289+62+1+50%0Aa+256+272+352+272+8+15+-15+1000000+0.0000023797471637959517+0+100000%0Ag+256+288+256+320+0%0Aw+384+256+384+208+0%0Ad+320+208+256+208+2+default%0Aw+352+272+384+272+0%0Aw+256+208+256+240+0%0Ar+256+112+384+112+0+10000%0AO+384+272+432+272+0%0AR+192+256+160+256+0+1+40+1+0+0+0.5%0Ar+320+208+384+208+0+1000%0Ad+256+160+320+160+2+default%0Ar+320+160+384+160+0+1000%0Ar+192+256+256+256+0+10000%0Aw+384+208+384+160+0%0Aw+384+160+384+112+0%0Aw+256+112+256+160+0%0Aw+256+160+256+208+0%0Aw+384+256+384+272+0%0Aw+256+240+256+256+0%0Ao+8+64+0+4098+1.25+0.1+0+2+8+3%0Ao+7+64+0+4098+1.25+0.00009765625+1+1%0A) 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](https://www.nutsvolts.com/magazine/article/op-amp-cookbook-part-4), 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](https://www.nutsvolts.com/magazine/article/op-amp-cookbook-part-4)).

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

 ![simulation](https://global.discourse-cdn.com/free1/uploads/lookmumnocomputer/original/2X/1/18a2b2eb18457802df5009055705c3642dbb96f9.png)

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!

---

<div class="post-metadata">

**Author:** ![antoine.pasde2](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/antoine.pasde2/32/326_2.png) [@antoine.pasde2](https://lookmumnocomputer.discourse.group/u/antoine.pasde2)\
**Post date:** [April 16, 2020, 9:02pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/15 "2020-04-16T21:02:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![antoine.pasde2](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/antoine.pasde2/32/326_2.png) [@antoine.pasde2](https://lookmumnocomputer.discourse.group/u/antoine.pasde2)\
**Post date:** [April 16, 2020, 9:39pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/16 "2020-04-16T21:39:41Z")

</div>

> [@analogoutput](#):
>
> it’s [Circuitlab.com](http://Circuitlab.com)

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.

---

<div class="post-metadata">

**Author:** ![antoine.pasde2](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/antoine.pasde2/32/326_2.png) [@antoine.pasde2](https://lookmumnocomputer.discourse.group/u/antoine.pasde2)\
**Post date:** [April 16, 2020, 9:55pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/17 "2020-04-16T21:55:28Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [April 16, 2020, 10:03pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/18 "2020-04-16T22:03:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [April 16, 2020, 10:09pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/19 "2020-04-16T22:09:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Maxhirez](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/maxhirez/32/42_2.png) [@Maxhirez](https://lookmumnocomputer.discourse.group/u/Maxhirez)\
**Post date:** [April 17, 2020, 12:37pm UTC](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639/20 "2020-04-17T12:37:19Z")

</div>

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.

[Next page](https://lookmumnocomputer.discourse.group/t/simple-distortion-unit/639.md?page=2)
