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: 1952
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

A quadrature triangle VCO

Post by devinw1 » Mon Feb 22, 2021 12:33 am

Something new I've been working on the breadboard. I got the idea for this when reading Tietze and Shenk and this example of a quadrature function generator:
quadgen.jpg
I had actually been playing with making a trapezoid VCO, but then I realized one can very easily form the trapezoids by just summing the 2 triangle waves! Easy peasy. Here is my core so far. It works very well. I realized I could quite easily make the whole thing do TZ by just flipping the polarity of 1 of the signlas going to the summing amp before the window comparator! No fussing with anything else and the whole quadrature core has lovely TZFM. I have found that using a SPDT switch which has the linear FM CV on one leg, and a perfectly inverted copy on the other makes a very effective and fast "4 quadrant multiplier". I use quotes because it's only analog on one side of the multiplier, but that is all we noramlly need in these cases. In my testing, this arrangement works better and faster than an optional inverter with FET/Switch because you don't have any slew rate or stability of the op amp to contend with. Only some small series resistors are needed to make the transitions perfect.

My eventual goal right now I think is to make this a module, and then have a connection int the back which will output the 2 quadrature sines to an optional frequency shifter module like Doc Sketchy has been working on. This will be a long way out though!

For now here is the core:
QuadratureConcept02202021.png
Triangles:
Triangles02202021.png
Triangles02202021.png (7.82 KiB) Viewed 551 times
Trapezoids:
Trapezoid02192021.png
Trapezoid02192021.png (7.47 KiB) Viewed 551 times
TZ Triangles:
TriTZ0220201.png
TriTZ0220201.png (9.21 KiB) Viewed 551 times
TZ Trapezoids:
TrapTZ02202021.jpg
TrapTZ02202021.jpg (102.52 KiB) Viewed 551 times
Attachments
QuadratureConcept02202021.png

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

Re: A quadrature triangle VCO

Post by devinw1 » Mon Feb 22, 2021 12:37 am

The one thing that doesn't show up on this schematic is that I have to have a trimmer on one of the 4.7k resistors to the OTAs in order to make the waves the same amplitude. I also had to use those 20k resistors on the Iabcs to the OTAs. If I use smaller and smaller resistors, the difference in wave size becomes huge and unmanageable, and I'm not sure why! It seems to me as long as the resistors are the same tolerance, the value should only change the max bias current. Any feedback on what might be going on there would be appreciated! :despair:

User avatar
oldenjon
Ultra Wiggler
Posts: 865
Joined: Sun Feb 26, 2012 1:28 am
Location: Sacramento, CA

Re: A quadrature triangle VCO

Post by oldenjon » Mon Feb 22, 2021 1:04 am

Wow this is really cool. The first thing that popped in my head when looking at the diagram is how much it resembles a state variable filter. What's the V/oct tracking like or have you not gotten that far? I wanted to build Doc's original frequency shifter, but it seems like he might have shifted away from the sync'd oscillator approach. This might be a good alternative for that.
Last edited by oldenjon on Mon Feb 22, 2021 1:10 am, edited 1 time in total.
"We all dance by ourselves, that's why we only play electronic music"

http://synthscalledbeasts.tumblr.com/

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

Re: A quadrature triangle VCO

Post by devinw1 » Mon Feb 22, 2021 1:09 am

That is no accident about the form resembling a SVF! One can build a very nice sine wave TZ Vco using this mindset . doepfer has one as a product actually!

User avatar
oldenjon
Ultra Wiggler
Posts: 865
Joined: Sun Feb 26, 2012 1:28 am
Location: Sacramento, CA

Re: A quadrature triangle VCO

Post by oldenjon » Mon Feb 22, 2021 1:16 am

Yes, I think the Serge QUO is basically a self-oscillating state variable filter. Neat that you get sin/cos tri and square directly from the core. Minimal processing to get a clean sine and saw from there if you want. Question: How would sync work in this design?
"We all dance by ourselves, that's why we only play electronic music"

http://synthscalledbeasts.tumblr.com/

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

Re: A quadrature triangle VCO

Post by devinw1 » Mon Feb 22, 2021 1:46 am

oldenjon wrote:
Mon Feb 22, 2021 1:16 am
Yes, I think the Serge QUO is basically a self-oscillating state variable filter. Neat that you get sin/cos tri and square directly from the core. Minimal processing to get a clean sine and saw from there if you want. Question: How would sync work in this design?
Great question! :D I *think* the caps can both be shorted out at the same time for a hard sync, but my guess is the restarting phase might bobble back and forth between 0 and 90 degrees? Or of course you could soft sync by putting an optional digital inverter on the signal going to the first switch. This would just reverse the core and do a reverse style sync on both waves. I'm thinking I'll do this by putting a 1 bit digital multiplexer feeding Q And Qbar from the flip flop. Super easy soft sync that way.

User avatar
Haralds:Werk
Wiggling with Experience
Posts: 354
Joined: Fri Sep 09, 2016 3:33 am
Location: Germany
Contact:

Re: A quadrature triangle VCO

Post by Haralds:Werk » Mon Feb 22, 2021 2:17 am

This looks very promising. And easier to understand and build then Don's core.
www.haraldswerk.de
Home of Next Generation Formant

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1661
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Re: A quadrature triangle VCO

Post by cygmu » Mon Feb 22, 2021 3:33 am

Looks very cool.

Before I tie myself in knots: am I right that the two op amps at the left end of the drawing have their terminals mis-labelled?

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

Re: A quadrature triangle VCO

Post by guest » Mon Feb 22, 2021 5:20 am

this looks like a lot of fun! the waveforms look really good as well.
devinw1 wrote:
Mon Feb 22, 2021 12:37 am
The one thing that doesn't show up on this schematic is that I have to have a trimmer on one of the 4.7k resistors to the OTAs in order to make the waves the same amplitude. I also had to use those 20k resistors on the Iabcs to the OTAs. If I use smaller and smaller resistors, the difference in wave size becomes huge and unmanageable, and I'm not sure why! It seems to me as long as the resistors are the same tolerance, the value should only change the max bias current. Any feedback on what might be going on there would be appreciated!
so, there are a few things it might be:

1. there will be an imbalance in the current of the two OTAs based on the transistor Vbe differences of the bias input node. the larger values of resistors connected to this node, the smaller the Vbe error becomes in relationship to the applied current or voltage (for a given current). for the 13700, gm tracking is usually 3%, so id expect output amplitudes to vary by about the same ratio.

2. if the capacitors are different sizes, you will get an amplitude variation which is proportional. so 10% accuracy caps will give about that much amplitude error.

3. the output of one of the stages goes through 330ohm resistors (plus on resistance of the switch) before getting to the mixing stage with the other, which does not have 330ohm resistors. so this would be another 3% error (as the other resistor is 10k).

4. your integration caps are 560pF, so if there are layout differences that put an extra 10pF on one versus the other, youve got another few percent of error.

but, considering youre seeing the amplitude vary a bunch based on the OTA bias resistors, it sounds like 1 is the most likely culprit.
openmusiclabs.com

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

Re: A quadrature triangle VCO

Post by guest » Mon Feb 22, 2021 9:08 am

one other thing while im thinking about it: the 13700 will have a temperature drift as configured - gm is proportional to 1/Vt. the tillman version uses the CA3280 to get around this, and the same thing could be done here by using a constant current source for the linearizing diodes. but, there still might be gm imbalance issues, so maybe the EN129 core would be good here, and then the 13700s are just toggled between +/- saturation.
openmusiclabs.com

jorg
Ultra Wiggler
Posts: 862
Joined: Fri Apr 03, 2015 9:38 am
Location: East Coast USA

Re: A quadrature triangle VCO

Post by jorg » Mon Feb 22, 2021 9:26 am

I like your approach! Multiple innovations and simplifications. Very nice job!

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

Re: A quadrature triangle VCO

Post by EATyourGUITAR » Mon Feb 22, 2021 12:20 pm

funny, I was also going to suggest using the EN129. there is a flip flop in there that can be modified for quadrature without much effort. you could duplicate everything and wire up some more comparators.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

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

Re: A quadrature triangle VCO

Post by devinw1 » Mon Feb 22, 2021 12:27 pm

cygmu wrote:
Mon Feb 22, 2021 3:33 am
Looks very cool.

Before I tie myself in knots: am I right that the two op amps at the left end of the drawing have their terminals mis-labelled?
Yes, that is most definitely wrong haha! Was just quickly transcribing my schematic from notes to Kicad and clearly botched that!

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

Re: A quadrature triangle VCO

Post by devinw1 » Mon Feb 22, 2021 12:32 pm

guest wrote:
Mon Feb 22, 2021 5:20 am
this looks like a lot of fun! the waveforms look really good as well.
devinw1 wrote:
Mon Feb 22, 2021 12:37 am
The one thing that doesn't show up on this schematic is that I have to have a trimmer on one of the 4.7k resistors to the OTAs in order to make the waves the same amplitude. I also had to use those 20k resistors on the Iabcs to the OTAs. If I use smaller and smaller resistors, the difference in wave size becomes huge and unmanageable, and I'm not sure why! It seems to me as long as the resistors are the same tolerance, the value should only change the max bias current. Any feedback on what might be going on there would be appreciated!
so, there are a few things it might be:

1. there will be an imbalance in the current of the two OTAs based on the transistor Vbe differences of the bias input node. the larger values of resistors connected to this node, the smaller the Vbe error becomes in relationship to the applied current or voltage (for a given current). for the 13700, gm tracking is usually 3%, so id expect output amplitudes to vary by about the same ratio.

2. if the capacitors are different sizes, you will get an amplitude variation which is proportional. so 10% accuracy caps will give about that much amplitude error.

3. the output of one of the stages goes through 330ohm resistors (plus on resistance of the switch) before getting to the mixing stage with the other, which does not have 330ohm resistors. so this would be another 3% error (as the other resistor is 10k).

4. your integration caps are 560pF, so if there are layout differences that put an extra 10pF on one versus the other, youve got another few percent of error.

but, considering youre seeing the amplitude vary a bunch based on the OTA bias resistors, it sounds like 1 is the most likely culprit.
Thanks for those pointers. That all makes sense.

I chose the low value of resistors on the 13700s by looking at the regular, non-modulated squarewave that comes from the first switches. It becomes more and more spikey as you increase the input resistance and I worried this would be bad news for modulation and found the 4.7k/47R combo was sufficiently clean and sounds good as well. But as you say, this has the effect of making the imbalance between the 2 OTAs more pronounced.


I hadn't thought of the temperature dependence thing. I do like being able to use saturated OTAs, but my way seems SO much cleaner for FM because for the EN129 core, for example, now you have to not only rectify the FM signal, but you have to add that whole rising edge detector to trigger the flip flop on zero crossings. Honestly since the AS3280s are so readily available now, maybe that is the way to go?

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

Re: A quadrature triangle VCO

Post by devinw1 » Mon Feb 22, 2021 1:34 pm

Would it make any sense to do something like this to improve Idiode on the 13700?

https://tinyurl.com/ycq5ra7t

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

Re: A quadrature triangle VCO

Post by guest » Mon Feb 22, 2021 8:39 pm

devinw1 wrote:
Mon Feb 22, 2021 12:32 pm
I chose the low value of resistors on the 13700s by looking at the regular, non-modulated squarewave that comes from the first switches. It becomes more and more spikey as you increase the input resistance and I worried this would be bad news for modulation and found the 4.7k/47R combo was sufficiently clean and sounds good as well. But as you say, this has the effect of making the imbalance between the 2 OTAs more pronounced.


I hadn't thought of the temperature dependence thing. I do like being able to use saturated OTAs, but my way seems SO much cleaner for FM because for the EN129 core, for example, now you have to not only rectify the FM signal, but you have to add that whole rising edge detector to trigger the flip flop on zero crossings. Honestly since the AS3280s are so readily available now, maybe that is the way to go?
i think i misunderstood your first post. was the imbalance occuring due to changing the 47R resistors, or the bias current balancing resistors from EXPO (20k)? i was assuming the latter.

as for using an EN129 core, i totally agree with you, and thats the way i would go if it was just a signle 13700 being employed in the core. but, with 2, the scales tip a bit. not sure if enough to go the EN129 route, but if the amplitude doesnt remain constant over CV and temperature, that might be a fix. as for fixing Idiode, what you have will work, but it might be easier to do an opamp current source with a matched transistor pair, that way both 13700s get the same current, and there are no temperature drifts. for the sinulator i went with 100k/10k input resistors to get good linearity (and therefore temperature stability). i think either way, youre going to have make the 4.7k variable on one of the 13700s to dial in the amplitude, but it should only be within 5% or so.

as for comparator speed, the 339 is good in this sort of setup to ~4kHz, and then the delay gives very noticeable drifts. the 311 is good for the full audio spectrum.

im looking forward to watching the evolution of this!
openmusiclabs.com

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

Re: A quadrature triangle VCO

Post by devinw1 » Tue Feb 23, 2021 12:13 am

So I think I was effectively compensating for the balance with both the 20k resistors and the trimmer on one of the 4.7k OTA resistors. The major problem there is that 20k limits the top end Iabc too much. I went ahead and pulled those out and just put in some matched 100R resistors to take that out of the picture, and then I just needed a larger amount of adjustment on the one OTA to make the waves the same size (ended up with a 3.3k+1k trimmer...so pretty different!)

That all being said, I was not entirely surprised to find that the tracking is not great.It is, as one might expect dependent on the position of the "FM index" knob. At full CW (shallowest TZFM / largest DC signal to OTAs) I only had about 6 octaves good tracking, getting worse from there. At the midway, it was more like 5 octaves. I suppose this is always going to be an issue on this type of design. Maybe more linearizing diode current? Or perhaps the 3280 shines better here...

If it seems like I can't get good tracking, I do have a pretty simple design working in the simulator using the saturated OTAs. It requires the full wave rectifier, but not any of the rising edge detector stuff. There's a cleaner way to do it I believe. I'll keep that in the back pocket for now.

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

Re: A quadrature triangle VCO

Post by guest » Tue Feb 23, 2021 12:44 am

the tracking shouldnt have anything to do with OTAs, at least while theyre being held with a fixed FM CV. well, sort of. if your EXPO current is perfectly linear, then the frequency is most likely off due to comparator/feedback delays, or the delay in the OTA. it takes a bit of time for the voltage input on the OTA to translate to a current output. but, this delay is proportional to bias current, so it shouldnt be as noticeable (it just shifts everything across all frequencies, not just the top end). but, at the very top end, it does provide a hard limit. you could reduce your circuit to a standard triangle core VCO around one of the OTAs, and see what the tracking is like, just to narrow down the cause of the issue.

4.3k vs 4.7k is a large difference, and pretty close to 330ohm - are you sure all of the 330ohms are installed?
openmusiclabs.com

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

Re: A quadrature triangle VCO

Post by devinw1 » Tue Feb 23, 2021 1:58 am

Hmm, I'll have to look at that again. I'm pretty sure that the rolloff point of flatness in the v/oct response came down the lower the FM index voltage was. I agree in theory this shouldn't be happening, but if I'm looking at the same frequency range for a test at various FM indexes, this has to point to something with the OTA right? If it was something with comparator/feedback delays, the HF flatness should be constant regardless of the FM index.

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

Re: A quadrature triangle VCO

Post by guest » Tue Feb 23, 2021 2:29 am

yes, you might be on to something there. since the OTA internal delay is current dependent, maybe when you lower FM CV, you lower the current, thereby increasing that delay proportionally. ill give it some thought. this core has twice the delay issues, as there are twice as many delays to account for. total oscillation time is 2 OTA delays and 2 comparators delay per cycle.
openmusiclabs.com

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

Re: A quadrature triangle VCO

Post by guest » Tue Feb 23, 2021 4:26 am

was your test with various FM indexes done with the same frequency CV range, or the same output frequency range (increasing frequency CV as FM CV goes down). the latter will definitely shift down the frequency at which you see HF issues. also, if this is being driven by a PNP expo current pair, then there will be a bit more HF issues as the Vcb of the expo pair will get smaller as frequency goes up, reducing current due to the early effect. but, if your just using 100ohm resistors on the OTA control ports, that change shouldnt be too much.
openmusiclabs.com

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

Re: A quadrature triangle VCO

Post by devinw1 » Tue Feb 23, 2021 1:10 pm

guest wrote:
Tue Feb 23, 2021 4:26 am
was your test with various FM indexes done with the same frequency CV range, or the same output frequency range (increasing frequency CV as FM CV goes down). the latter will definitely shift down the frequency at which you see HF issues. also, if this is being driven by a PNP expo current pair, then there will be a bit more HF issues as the Vcb of the expo pair will get smaller as frequency goes up, reducing current due to the early effect. but, if your just using 100ohm resistors on the OTA control ports, that change shouldnt be too much.
Yeah, the former, so that's why I say it shouldn't shift in theory. Will look at it some more tonight. Using the PNP expo straight from my TZ0 module btw (the SMT matched pair), as I've tested it pretty thoroughly. :tu:

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

Re: A quadrature triangle VCO

Post by devinw1 » Tue Feb 23, 2021 1:24 pm

I did just realize I am violating this:

"The limitations are that the signal current not exceed ID / 2 and that the diodes be biased with currents. In
practice, replacing the current sources with resistors will generate insignificant errors."

My Id is about 750uA right now, and with my low impedance input Rs, the max Isignal is more like 500uA+.

Not sure what the effect of that is though.

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

Re: A quadrature triangle VCO

Post by guest » Tue Feb 23, 2021 2:20 pm

that shouldnt matter, with the small values of Rs you have. with such small input impedance, the input can be viewed as just a voltage source to the internal transistor pair, so the diodes arent really affecting anything. you can try pulling the diode resistor out and see if it changes anything.
openmusiclabs.com

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

Re: A quadrature triangle VCO

Post by guest » Tue Feb 23, 2021 4:30 pm

i just ran a series of tests on the LM311, and it appears as though the propagation delay is linearly proportional to the dV/dt of the incoming signal. at low frequencies it can be in the 100us range. there are some oddities in what im seeing, but in general ths makes sense. the delay varies with "input overdrive", but for a linearly increasing signal, there isnt any overdrive when it crosses the threshold. this then increases with time, with faster signals getting higher overdrive more quickly, and therefore getting into lower delay times more quickly. i found 100kHz input gave ~100ns delay, and 100Hz input gave ~100us delay. not sure if there is a fix for this. i tried adding positive feedback, but it didnt help, as the signal needs to change for the feedback to have any effect, but you haev to wait for the delay for the change to take effect. sort of a catch 22 situation.
openmusiclabs.com

Post Reply

Return to “Music Tech DIY”