A quadrature triangle VCO

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, luketeaford, Joe.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Tue Feb 23, 2021 5:09 pm

Hmm, interesting indeed. So, I don't know if it is related but I found that after going back to the 100R Iabc resistors yeseterday, I had been checking the tracking without looking at both waves. What was happening was they were both the same size at low frequencies, and then diverging to the point that 1 was 10Vpp and the other 2.5Vpp by 15Khz or so!

So, today I balanced the differing "gain slopes" by replacing the 2nd OTAs 100R with a 1.5k. What this does is make the difference between the 2 Iabc more pronounced the more Iexpo goes up. But it balanced the waves perfectly through the whole frequency range. The problem is now that the expo seems to peg out too early though. I have a resistor in the expo to limit the Iexpo to 2mA (6.2k). So for example if I set the FM index to max, it will track nicely all the way up to 8 octaves, but then as you reduce FM index lower, it gets worse because presumable the Iexpo is then delivering most of it's max 2mA (also the LM13700s max) to the one OTA. In other words, you can feel the frequency (whatever it may be) cap out at the same position on my coarse frequency knob (about 3/4" CW), regardless of what frequency you are at. This is indicative to me that the Iexpo is maxed out.

Now, the question is, why I have to make the Iexpo/Iabc balancing resistors so agressive I wonder? Are the 2 amplifiers inside one LM13700 really so different? Or is there something else going on here I can fix up?

User avatar
EATyourGUITAR
has no life
Posts: 6130
Joined: Tue Aug 31, 2010 12:24 am
Location: Providence, RI, USA

Re: A quadrature triangle VCO

Post by EATyourGUITAR » Tue Feb 23, 2021 6:41 pm

How are you loading the 311 and how is your threshold setup so that I can get an idea of rise time on the output?
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Tue Feb 23, 2021 8:55 pm

Well shit, guys. 2 pieces of good news:

1) Somehow, and I have never seen this before, something was wrong with that LM13700. I grabbed a few others from a new bag of them (Tayda), and voila, Iabcs are balanced. I can put 100R resistors on both Iabcs out of the expo and the waves are the same size. Only a small trimmer (if any) is needed on one of the 4.7k OTA resistors to perfectly balance the wave sizes. So that mystery is solved.

2) I swapped in a CD4053 for the MAX4053 and it seems works fine so far. I can't hear any difference in the TZFM. Yay for 50 cent chips.


Now, onto further development:

As I've been thinking tracking, I realized any design of this type where you do FM by modulating the size of the DC voltage to the OTA will have an inherent range shifting when approaching zero FM index. The exponential generator will have some range that your VCA will max out at, which depends on what OTA or VCA you are using. In the case of the LM13700 that is 2mA of Iabc. So, it's a matter of setting a workable zone that makes sense for the VCO's range. In other words, I think the goal here is to find the minimum FM index position that one would expect a certain tracking (8 octaves? 7 octaves), then size the integrating caps so that we hit the limit on Iabc *after* a given frequency limit (say 8.3kHz or 16.4kHz). Then you know that it will always track well at any posiition above that minimum one.

I just tested this out on a osciallator that I believe does FM in this way, a Rubicon 2. I set the FM index really close to middle, say maybe 10%, and I could definitely hear the tracking peter out up after 5 octaves or so. Then dialing the FM index up more extended the range.


The real Cadillac solution, which is obviously not probably realistic or pratical, would be to have the effective integrating cap size decrease as the FM index knob is decreased. This would keep the frequency selected by the tuning knobs constant while changing the depth of the FM modulation, and keep the tuning range constant all at once!

User avatar
EATyourGUITAR
has no life
Posts: 6130
Joined: Tue Aug 31, 2010 12:24 am
Location: Providence, RI, USA

Re: A quadrature triangle VCO

Post by EATyourGUITAR » Tue Feb 23, 2021 10:19 pm

devinw1 wrote:
Tue Feb 23, 2021 8:55 pm
The real Cadillac solution, which is obviously not probably realistic or pratical, would be to have the effective integrating cap size decrease as the FM index knob is decreased. This would keep the frequency selected by the tuning knobs constant while changing the depth of the FM modulation, and keep the tuning range constant all at once!
this is doable. you can build circuits out of opamps that simulate variable capacitors. I know you can simulate inductors with capacitors. search for "simulated inductor circuit" on your favorite search engine. the moog ladder filter is a variable capacitor based on current. you can probably do something like that with an OTA filter circuit. LM13700 is cheap enough.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Tue Feb 23, 2021 10:48 pm

glad you found that fault 13700, things definitely werent adding up. although the limit of the 13700 is 2mA, youll see a lot of degradation in linearity above 500uA. the same is true for most expo converters, for pretty much the same reason, Rbe. so, is your current thinking that the HF linearity issue is solely the expo converter issue? for example, at full FM CV you get tracking to 10kHz, at 50% FM CV you get tracking to 5kHz, and at 10% FM CV you get tracking to 1kHz?
openmusiclabs.com

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Tue Feb 23, 2021 10:49 pm

EATyourGUITAR wrote:
Tue Feb 23, 2021 6:41 pm
How are you loading the 311 and how is your threshold setup so that I can get an idea of rise time on the output?
in case this was for my 311 setup, i had 1k pullups, so the rise and fall times were 50ns or so.
openmusiclabs.com

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Tue Feb 23, 2021 10:56 pm

devinw1 wrote:
Tue Feb 23, 2021 8:55 pm
The real Cadillac solution...
i guess the question here, is what is the user expecting? do you want the pitch to shift with FM index, or just modulation depth? i feel like there is some solution thats just adding a DC offset to the FM index or something.
openmusiclabs.com

Don T
Super Deluxe Wiggler
Posts: 1352
Joined: Sun Feb 02, 2014 3:11 pm

Re: A quadrature triangle VCO

Post by Don T » Tue Feb 23, 2021 11:08 pm

EATyourGUITAR wrote:
Tue Feb 23, 2021 10:19 pm
devinw1 wrote:
Tue Feb 23, 2021 8:55 pm
The real Cadillac solution, which is obviously not probably realistic or pratical, would be to have the effective integrating cap size decrease as the FM index knob is decreased. This would keep the frequency selected by the tuning knobs constant while changing the depth of the FM modulation, and keep the tuning range constant all at once!
this is doable. you can build circuits out of opamps that simulate variable capacitors. I know you can simulate inductors with capacitors. search for "simulated inductor circuit" on your favorite search engine. the moog ladder filter is a variable capacitor based on current. you can probably do something like that with an OTA filter circuit. LM13700 is cheap enough.
I wonder if there would be a way to rig a varactor in parallel with the timing cap. They come in a capacitance range of up to 100pf

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Tue Feb 23, 2021 11:18 pm

guest wrote:
Tue Feb 23, 2021 10:48 pm
so, is your current thinking that the HF linearity issue is solely the expo converter issue? for example, at full FM CV you get tracking to 10kHz, at 50% FM CV you get tracking to 5kHz, and at 10% FM CV you get tracking to 1kHz?
Yeah, I think so. I mean, the OTAs are multiplying the DC value from FM Index, and the OTA can only take a certain bias current, so as you make the FM index smaller and smaller, you push the max tracking frequency down (since the integrating cap is fixed). With my idea of having the the integrating cap get smaller with lower FM, the theoretical maximum is an infinitely small cap right at the zero point, then increasing again as you go the other way. Obviously, this isn't doable or really make a lot of sense, so I guess a lower limit would have to be set. (How often do people actually modulate a vco set to 0 Hz anyway?...).

Your idea of adding an offset to keep the frequency constant would work to do THAT part of the job, but it would not solve the moving of the "window" that the exponential response is optimized for. I think the only way to do that is to simultaneously change the integrating cap size as FM index changes.

The other way to go, which I just thought of, might be to just have a 3P position dual switch which selects an FM depth level (High/Medium/Low), selecting one of 3 fixed DC levels and also switching or shunting integrating caps to match. How often to people play with the FM depth anyway, as it detunes the whole osc? I noticed on Rubicon, they sort of do this but with only 1 position with the "lock" mode for TZFM, which sets the FM index at a pretty low but fixed point so only the tuning knob changes pitch. Lots to think about.

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Wed Feb 24, 2021 1:52 am

if you decrease the cap while you decrease the FM index, wont you just keep the VCO output at a fixed frequency? like, it wont modulate at all anymore? if you have sin(wkt) where k is your FM index, and adjust your capacitor (which adjusts w), then the two just cancel each other out. if you want small amounts of modulation around 0Hz, then only being able to go 1kHz at your top value should be fine. if you want lots of modulation around 0Hz, then going up to 20kHz will work as well by just increasing the FM depth (thereby increasing the OTA outputs). but, if you want small modulation depth up at 5kHz, then it cant go through zero anymore, and adding a DC offset has the same effect. i feel like i must be missing something here.

but, if you do want to decrease your cap without using the OTA, then decreasing the thresholds would work, with an afterwards multiplier that restores the gain: f = I/C*V. since youre already adjusting I, and C is a pain to adjust, then V is your last variable. but again, if I ~ k, and V ~ k, then f is constant.
openmusiclabs.com

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Wed Feb 24, 2021 11:57 am

Damn, now that I think about, you may be right. I think that if you decrease the FM index, then decrease the cap size to keep the same base frequency, the modulation depth will stay the same, because the same Iout of the OTA charging the smaller cap offsets it. Damn. My brain's gonna explode.

So then, maybe the solution is to apply an offset to the reference current of the expo at the same time of changing the FM index.? Gonna have to think about this.

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Wed Feb 24, 2021 12:40 pm

if it helps any, the complete relationship for frequency is: F = k*I*e^(V/Vt)/(Id*C*V), where I is the reference current on the expo, V is the voltage input to the expo, k is the FM mod signal to the OTA, Id is the diode bias current (if applicable), C is the integration cap, and V is the peak to peak voltage of the output.

also, if your 311 outputs have a lot of runt pulses, i found that putting caps on the balance pins completely eliminated this. since the balance pins are right next to the output, the output was coupling via the few picofarads on the breadboard and setting up a positive feedback loop that oscillated. i still have one mystery left to solve, but i think its the base-emitter capacitance on the input transistors passing AC at higher frequencies. the apparent threshold moves based on dV/dt, amplitude, and offset.
openmusiclabs.com

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Wed Feb 24, 2021 1:28 pm

That is helpful, thanks. So really it's pretty evident that if there is a max the Iexpo that can be delivered to the OTA, then as you decrease k, you lower the max frequency of the osciallator, all the way down to zero.

Using a saturated OTA with FM signal being delivered to the expo doesn't have this limitation, but with the expense that it must be rectified first.

That is a great tip on the 311 btw. I normally just short balance and strobe pins together when using on a breadboard. Do you mean to put a cap on each pin to ground? Or one cap between the 2?

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Wed Feb 24, 2021 1:40 pm

with the 311, im using a cap on each to ground, although tying both together sounds like a good solution, and is definitely a lot easier.

im not sure the saturated OTA is much different. i think the equation stays the same, but k is multiplied up at the expo converter rather than in the OTA. the expo reference current just becomes k*I.

another thing i was thinking was that this could also be done with a 2164, although its just trading some pros/cons for a different set of pros/cons.
openmusiclabs.com

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Wed Feb 24, 2021 1:50 pm

just tested tying them together, and it reduces the runt pulses just the same, so thats great! the only downside is that it amplifies any offset that might exist.
openmusiclabs.com

User avatar
EATyourGUITAR
has no life
Posts: 6130
Joined: Tue Aug 31, 2010 12:24 am
Location: Providence, RI, USA

Re: A quadrature triangle VCO

Post by EATyourGUITAR » Wed Feb 24, 2021 2:34 pm

can the offset be trimmed out or does that make it sensitive to temp stability in the trimmer?
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Wed Feb 24, 2021 2:41 pm

guest wrote:
Wed Feb 24, 2021 1:40 pm


im not sure the saturated OTA is much different. i think the equation stays the same, but k is multiplied up at the expo converter rather than in the OTA. the expo reference current just becomes k*I.
edit:

OK I've convinced myself they are the same. I ran the numbers and get that the frequency of oscillation is proportional to:

(k*Iref*e^Vc)/(2*Vpp*C)

Where k is the DC Voltage (FM index), Iref is the reference current to the expo converter, Vc is the pitch control voltage to the expo, and Vpp is the peak to peak voltage of the wave.

So in that case, changing k or modulating by changing Iref should have the exact same effect only one can by bipolar and one cannot.

So, I'm not really sure why I'm seeing such a difference in trackingperformance. SHouldnt' this suggest that if I use the same size integrating caps as TZ0 (680p) that this thing will perform similarly? Yet, that is not what I'm seeing.

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Wed Feb 24, 2021 11:30 pm

EATyourGUITAR wrote:
Wed Feb 24, 2021 2:34 pm
can the offset be trimmed out or does that make it sensitive to temp stability in the trimmer?
it could be trimmed, but i think youre right that it would still amplify any thermal drifts. whats a bit of a bummer, is that using the balance inputs as they are intended means you cant put caps on them or tie them together, so this feedback issue will always exist. well, maybe you could still put the caps in there. its also something a healthy dose of hysteresis can fix. and it might not be an issue on a well layed out pcb.
openmusiclabs.com

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Wed Feb 24, 2021 11:57 pm

devinw1 wrote:
Wed Feb 24, 2021 2:41 pm
So, I'm not really sure why I'm seeing such a difference in trackingperformance. SHouldnt' this suggest that if I use the same size integrating caps as TZ0 (680p) that this thing will perform similarly? Yet, that is not what I'm seeing.
so, on the TZ0 you get the same tracking regardless of FM index level? 1Hz->1kHZ at low FM and 10Hz->10kHZ at high FM? if so, then there are a few places that they are different that could be the culprits:

1. you had some reset time compensation on the TZ0, if i recall correctly.
2. this one has 2x the reset time errors as the TZ0.
3. this one requires both OTAs to be pretty well matched, both over Iabc and Vin.
4. this one relies on the gain of the OTA to stay the same over Iabc, whereas the TZ0 just uses the OTA as a switch.

you could try modding the TZ0 to have this form of modulation rather than the EN129 version, and see what it does. the reset time compensation would probably need some tweaking in that case. if it had trouble tracking, then youd know it was something in the OTA gain function causing the problem.

which way does the tracking get off? as you lower the FM index, do the relative high frequencies start going flat or sharp? and where does this happen? for example, if it starts going flat at 10kHz at 100% FM, does it start going flat/sharp at 500Hz (1kHz being the 10% equivalent of 10kHZ) at 10% FM?
openmusiclabs.com

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Thu Feb 25, 2021 12:32 pm

OK, well I found one issue on the bread board. I had grabbed a 100k pot into a 10k resistor for the FM index, so the thing was super non-linear about 0. So, I was hanging out at around the 0.1V to 0.2V range for k, thinking I was more like 1V, which of course is a huge difference. So, the tracking was cashing out at a lower frequency than I expected as the current limit on the expo would kick in.

I made a spreadsheet which calculates the theoretical frequency band for a given k setting, including the effects of the diode current, and will post it up here later. I need to record some values and see how the actual does vs. reality but I think that the situation is not as dire as I thought.

And thanks for the tips, and I agree with all. I did use your HF comp scheme on TZ0, so not expecting this core to do quite as well in HF right now. I am thinking that a reasonable goal is that the VCO can track up to 8,372Hz with a setting of k 1V. This is the criteria that Don T set for his Trap VCO and it seems pretty reasonable to me.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Thu Feb 25, 2021 5:12 pm

Here's my stab at a frequency calculator (attached). I think it's all correct except I am not sure why I have to have a divide by 8 to get the frequency to work out. My hand math says it should be 4. The circuit simulator agrees with the 8 though. :despair:

Here's the theoretical values I get for 560pF integrating caps. As you can see it will only track to high C (~16.4kHz) with a FM DC value (k) of 2V or greater. Wherever the lines bend over flat is where the expo current limits (set at about 750uA via a 6.2k resistor (since Iabc for each amp = 1/2 of Iexp)):
560p_FreqRange.png
Attachments
Quadrature Frequency Calculations.xls
(50 KiB) Not downloaded yet

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Thu Feb 25, 2021 9:53 pm

Got my breadboard issues sorted out and ran some quick tuning tests using 330pF caps. I had no film caps in that size so had to use MLCCs but they are matched. The results are actually pretty good! I tuned the V/oct response with k=2V which is right in the middle, and it had a good solid 8 octaves of tracking at that point. Lowering the k to half of that (1V) has the interesting effect of making it get sharp up in the high registers, before hitting the current limit on the expo (~750uA per OTA).

The data:
Screen Shot 2021-02-25 at 6.55.00 PM.png

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Fri Feb 26, 2021 1:23 am

devinw1 wrote:
Thu Feb 25, 2021 5:12 pm
I think it's all correct except I am not sure why I have to have a divide by 8 to get the frequency to work out. My hand math says it should be 4. The circuit simulator agrees with the 8 though.
theres a number of factors of 2 involved, so maybe one of them got dropped along the way?

I_abc = I_expo/2
F = I_ota/(2*C*Vpp)
Vpp = 2Vp (for symmetric signal around gnd)
I_ota = I_abc*dVbe/2*Vt (where dVbe is the difference in voltage at the input pins of the OTA, valid for dVbe<Vt)
openmusiclabs.com

User avatar
guest
Super Deluxe Wiggler
Posts: 5609
Joined: Mon Aug 19, 2013 11:49 am

Re: A quadrature triangle VCO

Post by guest » Fri Feb 26, 2021 7:17 am

also, for the life of me i cant figure out why the frequency is pitching up at the end (both in the simulation and reality). if you figure it out, please report back. whatever it is, it must be a large effect, since all the other mechanisms are working to pitch it down at high frequencies. i feel like it must be in the expo converter. what value is the emitter resistor on the expo? in the TZ0 its 24k, which is too small to output the max 1.5mA withuot the opamp coming out of regulation.
openmusiclabs.com

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1976
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: A quadrature triangle VCO

Post by devinw1 » Fri Feb 26, 2021 11:26 am

guest wrote:
Fri Feb 26, 2021 7:17 am
also, for the life of me i cant figure out why the frequency is pitching up at the end (both in the simulation and reality). if you figure it out, please report back. whatever it is, it must be a large effect, since all the other mechanisms are working to pitch it down at high frequencies. i feel like it must be in the expo converter. what value is the emitter resistor on the expo? in the TZ0 its 24k, which is too small to output the max 1.5mA withuot the opamp coming out of regulation.
Yeah, that is crazy, right? Current limit for the expo is 6.2k, which limits each OTA to just under 1mA each, so we should be fine there. Plus, the tuning resposne being good at k=2V, and going sharp at upper octaves at k=1V kind of suggests something with the OTA doesn't it? Like, slightly different gm curves for different differential input voltages? Though, we are under 100mV input voltage for both cases so I wouldn't think the distortion would be such an issue... :despair:

Post Reply

Return to “Music Tech DIY”