Thursday, February 8, 2024

AS3364 gain > 1

Since my juno filter might output less than unity gain, I wondered if it is possible to make up for this in the output VCA mixer, effectively making gain > 1

Normally, I use a 47k input resistor and a 47k output resistor, as per the AS3364 datasheet.

I tested this quickly and got a sligtly more than 8Vpp output (I didn't measure the input, it may have been as high as 10Vpp but could also be lower).

5v/cell, approx 8Vpp


I then replaced the input with a 22k resistor. The resulting output was 17-18Vpp.

Still 5v/cell, 17Vpp


Changing the input resistor would increase the input current by 47k/22k = 2.14. 

8 * 2.14 = 17.12, so this looks like it is doing exactly what we want.

The datasheet says that maximum signal input current is between +/-300 and +/-500uA.

With a 47k resistor and max input 11.5V, the input current is 244uA. Reducing to 22k, the max is 522uA. I'm not sure if going higher actually kills the chip, but it is something to think about. It could be that it will just start clipping.

If we choose to use a smaller resistor we should also make sure that the input amplitude does not go too high. For example, if we go for the lowest maximum signal input:

max V input = 300uA * 22kOhm = 6.6V, or 13.2Vpp.

Oh - and to make up for a change from 100k to 230k input to the juno filter, use a 47k / 2.3 = 20.4k resistor (or just two 10k resistors in series)

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