Sunday, January 28, 2024

Moog overload circuit

Since my previous posts I've gotten some feedback from the Modwiggler forums about the breakdown I see when overdrive/feedback is high. The answer is that this is normal for positive feedback, which I guess is ok. I've since chosen to abandon the per-filter overdrive in place of my own pre-filter distortion.

I've taken a closer look at the Little Phatty (LP)/Slim phatty overload circuit to see how the professionals do it, and to see if the circuit exhibits the same behaviour.

The LP overload is a combination of two things - first, a voltage controlled distortion that puts an OTA in the negative feedback of an op amp, basically acting as a voltage controlled resistor. This is the same solution I'm using for my distortion. But then it also has a second OTA that feeds the output back to the oscillator/source mixer. This is positive feedback, much like what I'm doing on the filters.


Overload circuit uses two OTAs

In addition to the two OTAs in the overload circuit, the overload CV controls a VCA after the filter, more about this towards the end.

LP CV generation

The CVs on the LP is generated by a DAC8581. This is a bipolar DAC that outputs +/- a ref voltage. The reference voltage is 4.096V. The voltage is then fed through an op amp gain circuit, which has a trimmer in the negative feedback. I've simulated this, and at the extremes the trimmer has an output of around 4.7 to 5.5V. Thus, I assume the trimmed output is supposed to be +/-5V, at least this makes it easier to reason about the later parts of the circuit.


 

Oscillator VCA

Each oscillator has a VCA controlling the level into the source mixer. At +5V VCA CV the output sees approximately unity gain.


OSC1 VCA cv -5 to 5V vs output


OSC1 VCA input vs output, approximately unity gain

Distortion

The distortion in the circuit is done using two diodes in the feedback of an op amp. This is a very common scheme and gives soft clipping. An opamp controls the feedback amount. 

 

Approx 3 x gain from OTA in distortion op amp, feedback to mixer disconnected


-5 to 5v overload CV. Unity gain in distortion circuit when CV is -5, feedback to mixer disconnected  

Feedback

The output from the distortion circuit is fed back to the source mixer (and then gets distorted again and again and... You get it). This increases the distortion and also the amplitude of the signal fed into the filter.

-5 to 5v overload CV, feedback to mixer connected


Breakdown

As for the big question - do we see the same issue here as in my filter-overdrive circuits? Yes we do! At small input amplitudes, < +/-0.6V input, we get the same breakdown/railing. It's kind of comforting to see that there's not something magical going on in the Moog overload. The reason it doesn't show up earlier is, I assume, that the amount of feedback is not as high so the effect appears much later.


0.4Vpp sine is railing



5Vpp sine is ok



Post filter VCA


As mentioned at the beginning of the post, the overload CV also controls an output VCA. At -5V overload CV the VCA has a gain of 1.6. Increasing CV to 5V gives a gain of 2.3, adding some additional oomph to the signal. Not sure exactly why they do this. Also, when looking at the overload in a previous post I did, it does not look like overload increased the signal amplitide by much. I really expected this VCA to attenuate the signal when overload increased, but it doesn't seem to be the case

Filter output VCA - from 1.6 x gain to 2.3 x


Tuesday, January 2, 2024

AC-coupling and filter feedback

I plan to have a feedback path in all my filters to be able to overdrive them. This is achieved by returning the output to the input (in phase) via a VCA. 

Now, both on the Juno and JP6 filters, this introduced a strange effect: Whenever I turned the cutoff down (in LP mode), or reduced the amplitude of the input, the output started ping-ponging between very high and very low. The filtered signal was still in there, but an offset with changing polarity was added:

Ping-ponging with a period of 6ms is introduced when feedback is increased

For the Juno filter, the feedback amp was very similar to the output VCA, and included the same 1uF AC-coupling cap. 

First, I thought this effect was due to the input to the feedback not being properly centered, so I introduced a trimpot as well. This had some effect, but only because it reduced the feeedback. I then tried removing the AC coupling cap in the feedback amp, and suddely the ping-ponging stopped.

I still have a large offset in the signal prior to the output amp, but this is mostly taken care of by the AC-coupling cap before the amp:

Top: Output before the output VCA AC-coupling cap when turning the feedback pot rapidly up and down. Bottom: The output. The spikes are caused by the AC-coupling cap doing its job. It takes around 400ms to properly settle.

It's a working concept but not entirely satisfying. I don't know what else to do at the moment, and when things don't change too rapidly this works ok.

To reduce the time the signal takes to settle, I can replace the 1uF cap with a 470nF one, that halves the settling time:

470nF cap gives 200ms settling time

Now, these examples are from setting a low cutoff frequency. We see the same with a low amplitude input, but then an additional effect appears:

A +/- 1.2V signal when the feedback is introduced. At high feedback the output suddely drops.

 

Not sure what causes this, and it is only at close to max feedback, but suddenly the output drops and changes shape. It looks like some kind of phase reversal (but maybe not the kind the TL07x is notorious for) as the feedback suddely attenuates the signal, but not sure what is going on. Here's a closeup:


Edit: My current theory is:

The max feedback in the current circuit is "unity" (or perhaps slightly more?), e.g. we feed a signal with the same amplitude as the input back from the output. This means that for every iteration, the signal will increase in strength, not going towards a stable point? Presumably, this can have some strange effects.

I'm also simulating the feeback at extreme values - I've changed the feedback CV range to 0-8V and use a 47k resistor in place of the 100k input for the feedback, this produces some very strange results in the simulation that I need to look closer into.

Edit 2: Look at this!

I managed to simulate an overdrive amount sweep - and it looks exactly like the output I see in the real circuit!

I set the overdrive CV to be equal to the number of seconds since simulation started (e.g. overdrive CV is 1V at 1s etc), so we can see that the output breaks down around 3.5V. 


As some of the op amps in my simulation does not have power rails, the ranges may be a bit different. Also, the signal is +/-2.5V, not +/-1.2V.

Oh, and how do one do voltage sweeps combined with transient analysis in LTSpice?

You replace the voltage source with a Behavioral Voltage source (BV), which has a formula of V=[...]. To get the current time use 'time', time is in seconds so V=time will do what happens here. Then run a normal Transient and make sure that the stop time is sufficiently large to capture what you want to see.

Edit 3:

I'm searching modwiggler to explain what I see. Here is a start:
 

Positive feedback causes oscillations:
https://modwiggler.com/forum/viewtopic.php?t=274218&hilit=filter+feedback+issue


Monday, January 1, 2024

Biasing cap and filter response

1uF

While looking for the reason why the filter output jumps frantically between +/- max when the cutoff is low or the input is close to zero when turning up distortion (spoiler: it's the biasing capacitor), I realised that I should have a closer look at what the output biasing/centering capacitor is actually doing to the filter's response. 

The cap is there to make sure the output is centered around 0, i.e. filter out any DC component (AC coupling the signal). The higher the capacitor, the longer the filter takes to change to 0V after an abrupt (DC) change. In the case of the jumping described above, I would like the change to settle as fast as possible, which means replacing the current 1uF cap with a smaller one, but what would that do to the output?

Looking online, it seems that the most common value of cap is 10uF. The Juno synths use 1uF. The cap in combination with a resistor/resistance creates a high pass filter with the cutoff frequency f=1/(2*PI*C*R). In my case, I have an 82k resistor immediately following the cap so I assume that this is R in the formula (the JP8 uses 100k and Juno 6 56k + a 20k trimmer).

The red line in the first plot here shows what our current 1uF cap does.

0.47uF

1uF 3dB
The 470uF cap clearly moves the cutoff frequency higher. Its -3dB point is at approximately 2.9Hz, compared to the 1.4Hz of the 1uFthe calculated values are 1.94Hz and 4.2Hz so 82k is at least close to the "real" resistance).


0.47uF at 20Hz
The human hearing is usually considered incapable of hearing frequencies of less than 20Hz. At this point the 0.47uF cap attenuates the signal by 90mdB. This in itself is not a lot, but it means that any sub-audible, ground shaking frequencies are filtered out. This may not be a problem as the equipment later in the chain may also have similar filtering, but it is something to think about.


10uF

In comparison, the 10uF cap gives a cutoff of less than 0.2Hz which is probably the reason why it's the more common choice.

0.047uF
I've seen some designs use a 47nF cap. This gives a -3dB cutoff at 370Hz which is a complete no-go combined with my 82k resistor.