tirsdag 15. januar 2019

Juno filter: cap values and expo converter musings

After spending the last few weeks experimenting with the Juno filter, I have some thoughts. It seems the exact compnent values along the signal path are not terribly important to how the filter works. A lot of the filter is tweakable as we've seen in my previous posts - the input CV ranges, the VCA gain etc.

I have tried various cap values as well, and today I made a comparison of both cap values and changes to the expo converter.

Expo converter

The expo converter core is dependent on a reference current. Right now that is set up using a 1.5MOhm resistor, but changing this does not change the output curve, it only changes WHAT linear CV gives what output.

I tried swapping for a 1MOhm resistor, and using the base octave trimmer I could still get the necessary output range. Here are the currents through a single I_abc resistor:

Using 1.5MOhm resistor, the output current is:

Full trim and 5V CV range: 3.2nA to 1.377mA
Center trimmed: 165nA to 168uA

Using 1MOhm resistor, the output current is:

Full trim and 5V CV range: 4.9nA to 1.379mA
Center trimmed: 248nA to 238uA

The center trimmed range is well within the total range independent of resistor, with room to spare for additional octaves.

Filter caps

The Juno 106 uses 240pF caps, other Roland synths use 330pF, and we use 270pF. Here are the responses to a center trimmed CV using a 1.5MOhm reference resistor:

240pF
0V = 7.7Hz
5V = 6.4kHz
10V = 42kHz

270pF: 
0V = 7Hz
5V = 5.7kHz
10V = 39kHz

330pF
0V = 6.1kHz
5V = 4.7kHz
10V = 34kHz

Note that at 10V all of the outputs are at their max (I_abc is 1.38mA) so tracking is off. But all filters reach well above 20kHz. If one aims for a 40k cutoff 240pF and 270pF seem equally suited.


Juno filter: VCA and Resonance CV circuit tweaking

I took a closer look at the Juno 106 circuit for VCA and Resonance CV to figure out what they did to the base-emitter voltage drop in the transistors in the circuit. While simulating it turned out that it actually uses a 10V resonance CV where I put 5V. This confirms my initial testing where I had to use 10V resonance CV to get a proper response.

Juno 106 VCA CV


Anyway, following the tuning instructions in the Juno 106 results in a response where the first 150mV of the CV does not output any I_abc current, because the transistor does not switch on until it sees a high enough voltage. This is practical as it will fully turn off the VCA. In my Xonik VCA I have assumed that 0V CV cuts off the output current, but if there are small differences in the supply lines or something we may still get a tiny output. The Juno does not have this problem because of the 'deadband'.

CV vs I_abc  (red) before calibration - notice deadband at the start of I_abc


CV vs I_abc after calibration, deadband ends at about 150mV

CV vs voltage at opamp output - notice that we get 10V at the start.

After calibrating the trimming I tested the current outputs:

VCA:
max -301uA

Resonance:
max -205 to -356 uA depending on the trimmer.

I wanted to add a mixing point for the VCA CV. I am not quite sure how to do this on the existing design - I could possibly add a resistor to the positive input of the VCA CV op amp - so I decided to use the current converter from the Xonik VCA.


Using standard component values, I ended up with this version


which has the following params:

VCA: 
max -320uA

Resonance:
max -147 to -405

If trimming the size of the deadband is not necessary, the trimmer and 1MEG resistor may be replaced with a 1.5MEG resistor to -15V. This will give a deadband of about 150mV.

Leaving out the 1MEG resistor will give 0 current at 0V but with the possibility of a tiny current leakage, slightly turning on the VCA.

Frequency CV

I also modified the Frequency CV mixer a bit, now the trimmer lets you add or subtract up to 5.6 octaves.

As a side note, the 390k resistor to -15V adds 3.8V to the output. Switching the resistor from the trimmer from 270k to for example 150k would give the same trimability and remove the need for the 390k, but makes the trimmer slightly more sensitive.


Here is the updated circuit. I still want to add linear FM of the filter cutoff, but other than this I am getting close to a version that can be tested.

søndag 13. januar 2019

Juno filter with higher possible cutoff

While trying to find a suitable 0-5V CV filter range I discovered that my design had some unfortunate limitations.

The maximum cutoff achievable was around 16kHz. I tracked this down to two factors: The 220k resistor from the VCA-OTA output to ground and the output filter capacitor (fixed low pass filter). Removing the output cap helped a lot, but I still could not get higher than 30kHz cutoff independent of control current.

Cutoff is max 30kHz and has very poor tracking at high frequencies. Current is the total current for all four OTAs, divide by 4 to get I_abc

I still had to change the resistor, which meant I could not get proper unity amplification at 5V CV. Compensating elsewhere in the circuit (input buffer or pre-OTA) distorted the signal at my wanted 10V p.p. amplitude (while such a distortion may be desireable, I want control over it and it was not something I planned now).

I switched back to the original design with a 47k output resistor. Then I thought, I can compensate for the loss using additional output amps. I added two inverting amps (to keep the output in phase) and this worked well.

From my previous experiments I knew that I could replace the resistor-to-ground feeding a buffer, into an inverting amp with the same resistor in the feedback loop. Doing this meant I would only need a single additional opamp to get phase correction and unity gain. But doing his also had a surprising effect - distortion and cutoff was immediately improved!

Using this and a constant current input to the OTAs let me run the filter up to at least 130kHz. This is completely unrealistic though, as it would require a higher control current I_abc for the OTAs than they can handle (max is 2mA), but past 60kHz could be achievable

Max cutoff is above 130kHz (though this would break the OTAs) and tracking is near perfect.


Increasing range

I then re-added the expo converter and got a surprise/reminder. I still couldn't push the filter past 24kHz. I simply could not get a control current higher than about 760uA. After trying a few adjustments in the exponential converter itself (changing reference current and emitter resistor) I turned to my exponential converter simulator and quickly discovered the problem - the current is controlled by changing the voltage drop across the resistor connected to the OTAs control pin. The pin is always around -13.3V in the simulator, and the transistor pulls its collector further and further away from this to generate a higher and higher current. But at about one diode drop above 0V it cannot go any further, it simply cuts off.

Plotting the voltage at the right collector of circuit A shows that it cuts off above at approx 0.63mV. 
Similarly, the plot of the current running through the 18k resistor shows that it cuts off at about 860uA. Note that this is slightly higher than the 760uA of the OTA control because the voltage difference is higher (-15.6V here vs -13.9 in the OTA control)

So, to get a higher current than this, I had to reduce the resistor value (remember, U=R*I, to get a higher I from the same U, R must decrease).

Doing this let me generate up to 1.38mA, putting the cutoff close to 40kHz.

Changing to a 10k resistor increases the maximum current.

Tracking using the expo converter

CV response (0.5V/octave) using expo converter. Blue line has 18k resistor to OTAs, red has 10k and no output filter cap, and has slightly better tracking. Also note that the response is the same even if the resistor value changed, the base frequency has not moved up/down.


Note that I have NOT tried to tune tracking when using the expo converter, it is possible that one could get a lot better tracking than this by adjusting U15. It is however also possible that there is something that prevents the expo converter from getting a perfect tracking over the full frequency range.

Output lowpass filter

I've added a 22pF output filter cap in, which seems to give a cutoff around 50kHz. This affects the tracking at high frequencies a bit too, so I'll have to do some testing.

New circuit


Final notes

I do not know if changing the max cutoff frequency or the output lowpass filter affects the sound. It is possible that this messes with the Juno sound. Maybe the cutoff should not go as high (though the manual says 5-50kHz or 4-40kHz). I like try it at least. One could also squeeze out an even higher cutoff by reducing the resistor even further. The OTA control pin is at -13.3V in the simulator but it could perhaps be even lower in the circuit, but never less than the negative supply (-15V). The transistor never gets past about 0.7V. This means the overall range will be below 16V. As maximum I_abc is 2mA we COULD use an 9.1kOhm resistor and get max I_abc 1.75mA (or an 8.2kOhm and get 1.95mA, but then we are really close to the

onsdag 2. januar 2019

Breadboarding the Juno filter

Such a nice morning, checking my wirings before powering on the juno filter prototype for the first time.

tirsdag 1. januar 2019

A closer look at the responses of the jp6 filter after fixing CV and bug

To make a good state variable filter with 12/24dB HP, LP and 12dB BP I simulated the JP6 filter and tapped it at various places to look at the responses.

For my simulated circuit, setting cutoff CV to 1.35 to get results comparable to my previous erroneous circuit. Resonance CV control is still a bit wonky but now it uses an expo converter. I have set reso to 0.5V (but there is a missing current limiting resistor in the circuit) to get 13dB resonance.

24dB LP:
- Cutoff: 500Hz
- Resonance: 13dB at 1.24kHz

24dB HP:
- Cutoff 3.2kHz
- Resonance: 13.2dB at 1.4kHz

12dB LP + 12dB HP,
12dB HP + 12 dB LP
- LP cutoff: 2.6kHz
- HP cutoff: 694Hz
- Center: 1.33kHz
- 13.4dB attenuation on top
- Resonance: Top has 1.1dB amplification

12dB LP with connection to second stage
- Cutoff: 772Hz
- Base attenuation 1.44dB
- Resonance: Top has 6.6dB amplification over base at 1.25kHz, base is -13dB

12dB LP without connection to second stage
- Cutoff: 769Hz
- Base amplification 1.4dB
- Resonance: Top has 6.6dB amplification over base at 1.25Hz, base is -10dB

12dB HP with connection to second stage
- Cutoff: 2.1kHz
- Base attenuation 1.7dB
- Resonance: Top has 6.4dB amplification over base at 1.4kHz, base is -13dB

12dB HP without connection to second stage
- Cutoff: 2.1kHz
- Base amplification 1.1dB
- Resonance: Top has 6.65dB amplification over base at 1.4kHz, base is -10dB


BTW: I have found another serious issue. The cap on the output amp prevents the filter from getting a higher LP cutoff than 14k. removing it gives a cutoff of about 20kHz at most. This does not seem right compared to the promised 5-50kHz in the datasheet.