v2164 linear VCA problem

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

Moderators: Kent, luketeaford, Joe.

Post Reply
prune
Common Wiggler
Posts: 61
Joined: Fri Apr 24, 2015 6:51 am
Location: Berlin

v2164 linear VCA problem

Post by prune » Sun Nov 12, 2017 8:36 am

I've been putting together some V2164 linear VCAs using the Mike Irwin linearisation method, and I've run into a small problem

When the input voltage to logarithmic converter hits 0, or very close to 0, the output goes a bit weird (see attached picture) - shooting up toward the rail, then when the input goes back up the output doesn't recover properly, causing an assymetry in the waveform. I attached a picture of this behaviour with a triangle wave input.

I can stop this from happening by biasing the input a tiny bit off 0, which gives a more symmetric output, but then maximum output is lower, which means the VCA doesn't close off (output in this instance also pictured)

it seems I have a trade-off between linear output and how much i can close off the VCA. Is there a fix for this problem? I can't find any reference to it in other threads where this linearisation technique is discussed...
Attachments
logarithmic converter output without input bias
logarithmic converter output without input bias
1.JPG (2.25 MiB) Viewed 724 times
logarithmic converter output with input bias
logarithmic converter output with input bias
2.JPG (737.31 KiB) Viewed 736 times

prune
Common Wiggler
Posts: 61
Joined: Fri Apr 24, 2015 6:51 am
Location: Berlin

Post by prune » Sun Nov 12, 2017 8:57 am

oh, yeah and the schematic im using is here -

Image

- except I have a precision rectifier before control voltage input so it never swings negative[/img]

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

Post by guest » Sun Nov 12, 2017 1:42 pm

the 2164 never really goes off, its a logarythmic control. it does go down to -120dB, which is unhearable, so pretty much the same thing. if you use small offset, and increase the gain of the linearization circuit, you should be able to stretch your input voltage over whatever stretch of that 120dB range you want.
openmusiclabs.com

prune
Common Wiggler
Posts: 61
Joined: Fri Apr 24, 2015 6:51 am
Location: Berlin

Post by prune » Sun Nov 12, 2017 4:22 pm

ahh yes, thanks. im not sure how to increase the gain of the linearisation circuit but I can add another op amp

im still a bit confused though as no one else makes any mention of this problem - I've built this circuit a handful of times now and its always the same

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

Post by guest » Sun Nov 12, 2017 5:52 pm

perhaps there is some other circuit people use to ensure it never goes negative?

at what CV do you want the VCA to have 0dB gain (1:1 in:out)? if 5V, then you need to make the current into the opamp (set with R1) equal to the current into the linearized 2164 (set with R2) at that voltage. for example, if R2 is going to -15V, it would need to be 300k for the current to be equal to a 5V CV going through a 100k R1. this is how the gain is set.

the problem with doing an offset is that it requires a very large resistor going from +Vcc (or other positive reference voltage) to the inverting input of the opamp (IC-1A). this ensures that a small bit of current always flows, and sets the raio of full on to full off. for example, if 15V/300k sets the full on level, and you wanted -60dB for full off, then you would need a 300M resistor to +15V. even if you went down to 30k and 30M, you still are only getting -60dB of attenuation at "off", which isnt that great.

ultimately, the positive spike up is probably a better way to go. that should ensure a good "off". are there any downsides youre experiencing with that positive peak? i can see that the opamp output waveform is assymetric, but do you hear something you dont like at the VCA output during those transistion times (attack/decay seem off)? im guessing the assymetry has to do with discharging the compensation capacitor at different rates depending upon the impedance presented by the 2164 in those 2 conditions.

you could try putting a red LED in the feedback loop. this would decrease the impedance for negative excursions, and speed up that transition so the postive and negative going waves look the same.
openmusiclabs.com

User avatar
Dr. Sketch-n-Etch
Super Deluxe Wiggler
Posts: 8105
Joined: Thu Jan 21, 2010 1:46 pm
Location: Vancouver, BC, Canada

Post by Dr. Sketch-n-Etch » Sun Nov 12, 2017 7:32 pm

I have designed about a dozen modules using 2164, most often in its Irwin linearized incarnation, so I'm pretty familiar with its many foibles.

Have you used a Mode pin resistor? If not, you may wish to try using one. If so, then you may wish to try not using one. Whenever I use 2164 in linearized mode, I almost always use a 560k resistor (for a 15V supply) on the Mode pin (or 390k for a 12V supply) as this would seem to minimize control bleedthrough according to the datasheet. You might want to give this a try.

Also, I tend to put -5V (or -15V in your case) through 10M to the CV summer to ensure that the damn thing goes off completely. I also tend to put a 4.7k resistor between the linearizing opamp's output and the control pins to limit the current to the control pins during shutoff (the 2164 can actually get quite hot when the VCA is turned off if you don't do this).

Good luck! The 2164 is a wonderful little beastie, but it can by a bit of a pain to overcome its many little idiosyncracies.
Power spent passion bespoils our soul receiver
Surely we know.

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

Post by guest » Sun Nov 12, 2017 10:07 pm

dr sketchy's suggestion is pretty good about adding a 4.7k (or larger) resistor in there. if you were to stay below 0 for longer than you do, youd see the voltage rail all the way to 15V. the internal impedance of the 2164 at the control node is 5k, so you could be sending 3mA in. the max attenuation is -100dB, or +3V at the control port. so you could go to 10k there, and then max saturation would give 3V at the control port, shutting it off fully, without overdriving the input. this doesnt protect against reverse biasing of the internal transistors for large negative excursions (>-0.6V at the inverting input of the opamp), but you shouldnt have that anyways if you have a rectification stage beforehand.

if you take a look at your scope plot for the non-offset case, you will see that the opamp output rises normally until about 1.2V or so, and then it ramps linearly. this is the transition region where the 2164 is pretty much off, and the only way to get current to back to the non-inverting pin is through the capacitor. so the capacitor charges up to make some current flow, but eventually that would saturate. on the fall side, the 2164 is turned back on again, so it can slew quickly to stabilize the opamp. the advantage to using a diode in the feedback is that current can flow through the diode instead of the capacitor for the reverse bias condition. a diode is a much lower resistance path than a capacitor (for low frequencies like these), so it maintains the opamps stability, and slews much faster, and ensures that the 2164 never gets over-driven at the non-inverting opamp connection point. if you pick a diode like an LED that has a large forward voltage drop (lets say 3V), then you are also limiting the current flow into the control port of the 2164. the drawback to the diode is the leakage when its supposed to be off, and maybe some added capacitance. but, you already have 100pF there, so i doubt it will be that big of an effect.
openmusiclabs.com

User avatar
Dr. Sketch-n-Etch
Super Deluxe Wiggler
Posts: 8105
Joined: Thu Jan 21, 2010 1:46 pm
Location: Vancouver, BC, Canada

Post by Dr. Sketch-n-Etch » Mon Nov 13, 2017 12:10 am

I like guest's suggestion. I was going to suggest using a diode as well, but since I have never needed it, I didn't. Maybe I'll try it.
Power spent passion bespoils our soul receiver
Surely we know.

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

Post by guest » Mon Nov 13, 2017 1:31 am

if you end up using an LED, you can cover it up with some heat shrink to reduce the reverse conduction. also, they tend to have 100pF or so of capacitance, so you can probably get rid of the capacitor entirely.
openmusiclabs.com

User avatar
megaohm
Super Deluxe Wiggler
Posts: 1904
Joined: Mon Jun 15, 2009 6:11 am
Location: Chicago, IL

Post by megaohm » Mon Nov 13, 2017 8:44 am

I stuck diodes into a VCA design with the 2164.
Designed for 5V = unity but had in mind that some envelopes in the format put out 10V or near rail levels. The distortion with that much gain sounded bad so I limited with a schottky diode. Worked but didn't limit all the negative V at the op amp output. About -200mV still gets through and gives near 2x gain. But no distortion so I'm happy.
Another thing I tried was adding a zener diode in the loop, too (suggested on the SDIY mailing list). Thought 5.1V would work but with it the VCA wouldn't shut off as completely. 7.5V worked well and limits the voltage seen by the VCA CV pins.
Didn't have success with the limiting resistor you guys mentioned.
Seemed to limit the off-ness of the VCA. Tried everything from 10K to 1K.
Wanted to do this because it was suggested on the SDIY list and hoped it would limit the heat.
Tried the resistors before adding the 7.5V zener but the schottky may have been in place so perhaps that is why I get bleed while you guys do not?
(also, I may be splitting hairs here. The "bleed" was very low - near the noise floor of my mixer but not as quiet/off as without the resistor).
www.MegaOhmAudio.com

Will work for pistachios

User avatar
Dr. Sketch-n-Etch
Super Deluxe Wiggler
Posts: 8105
Joined: Thu Jan 21, 2010 1:46 pm
Location: Vancouver, BC, Canada

Post by Dr. Sketch-n-Etch » Mon Nov 13, 2017 3:03 pm

Weird. I've never had anything but perfect success with my linearized 2164 applications. This is the one circuit that never gives me any problems at all. Here's my typical schemo...

Image

This is set up to give unity gain at 5V into the VCLin input. This can be changed easily, either by changing the -5V reference or the 30k resistor on the right. The -5V into 10M ensures hard turnoff at 0V, and the 4.7k resistor limits the current into the VC pins of the 2164 without affecting performance at all (at least in my builds).
Last edited by Dr. Sketch-n-Etch on Mon Nov 13, 2017 7:17 pm, edited 1 time in total.
Power spent passion bespoils our soul receiver
Surely we know.

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

Post by guest » Mon Nov 13, 2017 3:45 pm

is VCLin positive voltages? i ask, as prune shows a negative voltage on the reference (15V/100k), and you have a positive (+5V/30k). only one of those should work for positive input voltages.
openmusiclabs.com

User avatar
Dr. Sketch-n-Etch
Super Deluxe Wiggler
Posts: 8105
Joined: Thu Jan 21, 2010 1:46 pm
Location: Vancouver, BC, Canada

Post by Dr. Sketch-n-Etch » Mon Nov 13, 2017 7:21 pm

guest wrote:is VCLin positive voltages? i ask, as prune shows a negative voltage on the reference (15V/100k), and you have a positive (+5V/30k). only one of those should work for positive input voltages.
Sorry, I screwed up. I was drawing this quickly while my wife was pestering me to get off the computer and do something else, and I put in the wrong polarity of voltage. I've corrected it above. Sorry for any confusion.

Incidentally, for all these circuits (or any circuit where I need stable 5V) I tend to use 5V references, either REF02 or 78L05 (or 79L05 if all I need is negative) or (most often lately) LM336.

Incidentally, the control voltage (VCLin) can go negative and the VCA will just stay off. That's one of the beauties of this particular circuit. Hence, if you feed a bipolar waveform to VCLin, then the VCA will only go on when the waveform goes positive (as one would expect from any 2-quadrant multiplier, which is exactly what this circuit is).
Power spent passion bespoils our soul receiver
Surely we know.

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

Post by guest » Mon Nov 13, 2017 8:45 pm

i like to use the TL431A followed by 1 passive filter and then 2 opamp filter stages. the first opamp stage converts it to +5V, and the second to -5V. i find that the filters are necessary to keep the noise down to an acceptable level.
openmusiclabs.com

User avatar
Dr. Sketch-n-Etch
Super Deluxe Wiggler
Posts: 8105
Joined: Thu Jan 21, 2010 1:46 pm
Location: Vancouver, BC, Canada

Post by Dr. Sketch-n-Etch » Tue Nov 14, 2017 4:00 am

guest wrote:i like to use the TL431A followed by 1 passive filter and then 2 opamp filter stages. the first opamp stage converts it to +5V, and the second to -5V. i find that the filters are necessary to keep the noise down to an acceptable level.
That seems like a lot of trouble just to get a 5V reference! Why is the shunt regulator noisy? Also, when you say "opamp filter stage" are you sure you're not just talking about an inverter with external compensation?
Power spent passion bespoils our soul receiver
Surely we know.

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

Post by guest » Tue Nov 14, 2017 7:35 am

well, it gives +/-5V ref, so i feel like its not horribly extravagant, and a dual opamp is less than the cost of the regulator.

shunt regulators are notoriously noisey. the TL431A has 220nV/rtHz of noise at 10Hz, and this plateaus out at 120nV/rtHz at 1kHz. for CV circuits and VCOs it doesnt matter much, as there often isnt high gain, or the noise gets averaged out in other parts of the circuit. but if its used in the audio path anywhere there is even a modicum of gain you will hear it (120nV is -96dB referenced to a 1Vrms signal).

the opamp filters are just single pole with a big ol' cap (10uF) in the feedback loop. i find that a large cap is required to make any dent in the noise reduction, considering how large the low frequency noise is. by the second stage (first stage passive, second stage opamp) the noise is down as low as its going to go (limited by resistors and opamps).

i dont bother with it for all of my circuits, but most audio processing ones i will.
openmusiclabs.com

User avatar
neil.johnson
Super Deluxe Wiggler
Posts: 1691
Joined: Thu Apr 08, 2010 3:51 pm
Location: Cambridge, UK
Contact:

Post by neil.johnson » Tue Nov 14, 2017 5:50 pm

If you're going to use diodes you need to use low leakage types otherwise linearity will be adversely affected. This is particularly important if you're going to use it in a 4-quadrant multiplier.

With different circuit configurations you can avoid the 10M bias resistor and get a clean "off" for CV=0V.

Neil
Random ramblings :: http://www.njohnson.co.uk
SSI parts and more :: https://www.cesyg.co.uk

User avatar
Dr. Sketch-n-Etch
Super Deluxe Wiggler
Posts: 8105
Joined: Thu Jan 21, 2010 1:46 pm
Location: Vancouver, BC, Canada

Post by Dr. Sketch-n-Etch » Wed Nov 15, 2017 2:01 am

neil.johnson wrote:With different circuit configurations you can avoid the 10M bias resistor and get a clean "off" for CV=0V.
Do tell!
Power spent passion bespoils our soul receiver
Surely we know.

prune
Common Wiggler
Posts: 61
Joined: Fri Apr 24, 2015 6:51 am
Location: Berlin

Post by prune » Wed Nov 15, 2017 8:50 am

I tried Dr. Sketch-n-Etch's implementation and got much better results (thankyou!) - the resistor between the op amp and the control pins seems to serve multiple purposes - the circuit becomes more stable, the cv provided to the op amp is greater for input of 0V, as well as the current to the VCA is reduced. The small negative offset closes the VCA completely for 0V input. There is still some non linear switch on/switch off behaviour but the performance is vastly improved

I couldn't find a workable solution with diodes: without the resistor between op amp and vc pins the voltage is not large enough to turn them on; with it, the response looks beautiful at the output of the op amp, but the voltage drop across the resistor to the vc pin reduces it so that you no longer get 3V to turn the vca off (as much as it can be). I suppose if I wanted to sacrifice some attenuation I could get possibly improve that non linearity a little

prune
Common Wiggler
Posts: 61
Joined: Fri Apr 24, 2015 6:51 am
Location: Berlin

Post by prune » Wed Nov 15, 2017 9:18 am

Dr. Sketch-n-Etch wrote: Do tell!
+1

User avatar
neil.johnson
Super Deluxe Wiggler
Posts: 1691
Joined: Thu Apr 08, 2010 3:51 pm
Location: Cambridge, UK
Contact:

Post by neil.johnson » Wed Nov 15, 2017 6:27 pm

prune wrote:
Dr. Sketch-n-Etch wrote: Do tell!
+1
I'm in the midst of some technical work based on the 2164 so hopefully it'll all become public in the not-too-distant future.

Neil
Random ramblings :: http://www.njohnson.co.uk
SSI parts and more :: https://www.cesyg.co.uk

User avatar
Dr. Sketch-n-Etch
Super Deluxe Wiggler
Posts: 8105
Joined: Thu Jan 21, 2010 1:46 pm
Location: Vancouver, BC, Canada

Post by Dr. Sketch-n-Etch » Thu Nov 16, 2017 3:44 pm

prune wrote:I tried Dr. Sketch-n-Etch's implementation and got much better results (thankyou!) - the resistor between the op amp and the control pins seems to serve multiple purposes - the circuit becomes more stable, the cv provided to the op amp is greater for input of 0V, as well as the current to the VCA is reduced. The small negative offset closes the VCA completely for 0V input. There is still some non linear switch on/switch off behaviour but the performance is vastly improved

I couldn't find a workable solution with diodes: without the resistor between op amp and vc pins the voltage is not large enough to turn them on; with it, the response looks beautiful at the output of the op amp, but the voltage drop across the resistor to the vc pin reduces it so that you no longer get 3V to turn the vca off (as much as it can be). I suppose if I wanted to sacrifice some attenuation I could get possibly improve that non linearity a little
Yes, and a single 10M resistor is a pretty economical solution to what otherwise could be a pretty annoying problem (VCAs not turning off). I'm all about what works without too much hassle. I try not to overthink stuff too much.

Of course, if the VCAs are being used in balanced-modulator configuration (with two opposing linear VCAs being controlled by inverse CVs), then the 10M resistor is not a good idea, but the 4.7k resistor is still a good idea, and doesn't affect (negatively) the performance of the modulator at all (as far as I can tell).
Power spent passion bespoils our soul receiver
Surely we know.

User avatar
horstronic
Super Deluxe Wiggler
Posts: 1049
Joined: Thu Aug 08, 2013 5:35 am
Location: Germany

Post by horstronic » Mon Nov 20, 2017 5:58 am

What a great thread!
Dr. Sketch-n-Etch wrote:Of course, if the VCAs are being used in balanced-modulator configuration (with two opposing linear VCAs being controlled by inverse CVs), then the 10M resistor is not a good idea, but the 4.7k resistor is still a good idea, and doesn't affect (negatively) the performance of the modulator at all (as far as I can tell).
Actually that's part of the module I'm working on right now. So the 10M resistor is not an option for me.
I'm still fighting the nonlinear behaviour near 0V when the VCA opens at higher frequencies. It seems to have a lot to do with the feedback cap and the opamp.
The lower the value of the cap, the better it gets but I also get oscillations if I go too low. I'm still experimenting with that, trying to find the best opamp/cap combination for my purpose.

Apart from that, thanks for the hint with the 4k7 resistor, I hope you don'tmind if I use that idea!

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

Post by guest » Mon Nov 20, 2017 6:57 am

horstronic wrote:I'm still fighting the nonlinear behaviour near 0V when the VCA opens at higher frequencies.
can you describe a little more what you mean by this? is it that CV modulated at higher frequencies near 0V will cause audio to go through the VCA, whereas lower frequencies will not? the extra 4.7k should help with that (or try 10k). another thing to think about, is shunting some of that output voltage to ground. maybe put a 100pF cap at the output of the opamp to ground. it will make it less stable, but at higher frequencies it should shunt some current away from the VCA. maybe there is some other way to put a lowpass filter in there that is exactly matched to the one wrapped around the opamp, so they cancel each other.
openmusiclabs.com

User avatar
horstronic
Super Deluxe Wiggler
Posts: 1049
Joined: Thu Aug 08, 2013 5:35 am
Location: Germany

Post by horstronic » Mon Nov 20, 2017 7:38 am

The module I'm working on is using 2 linear VCAs that can be used in different ways. They are both controlled by one CV, so one is opening when the CV goes positive, the other one opens when the CV goes negative.
There it an output where VCA2 is subtracted from VCA1, so when you put the same signal into both VCAs, you basically have a balanced modulator, where a positive CV makes the output signal go from "off" to "on",whereas a negative CV makes it go from "off" to inverted.
Does this make sense to you? Sorry, it's hard for me to explain this in english.

So here's my problem. As I want to use this as a balanced modulator, I also want it to work at audio rate CVs, and that's where the circuit seems to get close to its limits.
I made a screenshot of my LTSpice simulation of this.
Here's a 1kHz sine wave modulating both VCAs. Input signal on both VCAs is just 5V DC. What you see is just the output of the VCAs.

Image

As you can see, there's a little area between about 0V and 500mV where the VCAs don't seem open fast enough. So here's the result when VCA2 is subtracted from VCA1:

Image

I think you can see what is my problem, right?
In this example, I used 100pF caps in the feedback loop. It gets much better with smaller caps and also when I use opamps that have a higher slew rate.
So the problem seems to be that the opamp isn't able to go from about 3V, where it pretty much closes that VCA at -100dB to the area where it opens it, because it's restricted by its own slew rate and the cap in the feedback loop.
So I'm now experimenting with different opamps and caps to find the best option for this configuration. I can't go to low with the cap values because it starts oscillating then, same goes for the selection of opamps. If the slew rate is too high, it will oscillate too.
So far, I got the best results with an OP275 and 22p feedback caps, but that's still not good enough.

By the way, as always this is much worse in real life. In LTSpice I'm getting reasonable results whereas on my prototype it's still all over the place :hihi:
Trace lengths seem to play a big role in that, I'm also experimenting with that.
guest wrote:
horstronic wrote:I'm still fighting the nonlinear behaviour near 0V when the VCA opens at higher frequencies.
can you describe a little more what you mean by this? is it that CV modulated at higher frequencies near 0V will cause audio to go through the VCA, whereas lower frequencies will not? the extra 4.7k should help with that (or try 10k). another thing to think about, is shunting some of that output voltage to ground. maybe put a 100pF cap at the output of the opamp to ground. it will make it less stable, but at higher frequencies it should shunt some current away from the VCA. maybe there is some other way to put a lowpass filter in there that is exactly matched to the one wrapped around the opamp, so they cancel each other.

Post Reply

Return to “Music Tech DIY”