Making the vactrol VCA linear
While I was prototyping the "Shoosh" vactrol VCA I wanted to make sure it was possible to get the relationship between the control voltage (CV) and the preceived loudness fairly linear. So a 5V CV signal would actually sound twice as loud as a 2.5V CV signal. We humans don't notice small increments or decrements in volume very easily at all compared to most other audio properties, so we don't need to be 100% to get a completely usable VCA.
A non-linear VCA might do things like increase in volume quickly between 0 and a few volts, and then not get much louder for the remaining added volts.
There's a thorough way and a close-enough way. The thorough way involves testing, measurements and maths. The close-enough way involves plugging in different resistors until it sounds right.
Here's the circuit again:
The thorough way
At first I decided to ignore the CV and the amplifier stage, and focused completely on the question "how much resistance do my vactrols have at given amounts of LED current?", because that's the major source of non-linearity in the CV circuit. There are datasheets on this but I wanted to test it myself as I'd had a few vactrols that sounded like they varied. I set up an Arduino as a programmable voltage source, using a PWM output followed by a low frequency passive low pass filter to output a steady voltage, and used the transconductance amplifier setup in the final circuit to turn that voltage into a calculable current.
I then measured the resistances of three VTL5C1 vactrols, each at 0.1mA or 0.2mA intervals, and plotted the resulting data.
Looking at the second op amp in the schematic above (IC2), we have a variable gain inverting amplifier where the input resistor is the vactrol's LDR, and the feedback resistor is replaced with the gain pot. The total gain of the circuit's audio amplifier can therefore be calculated with this: amplifier gain = vactrol LDR resistance / gain pot resistance. The resulting signal is actually inverted, but as we're using it with an AC signal then this can be ignored. Assuming the gain pot is providing 1K ohms of resistance, we can plot amplifier gain vs LED current.
But how loud is that? Anyone who has ever wondered why potentiometers come in both "A" and "B" varieties will know that human perception of loudness is logarithmic, so we need to take the gain and turn it into perceived loudness. After consulting a few articles on decibels vs loudness vs power vs voltage gain, I found the following equation which held up really well when I tested it:
Loudness gain = 4log10(voltage gain)
And that gives us:
You can see that the 0 - 5mA range of LED current would actually sound really quite linear considering we're dealing with vactrols. The final task was to set resistor R4 to the right value, so that a 5V CV would cause 5mA of current for the vactrol's LED, which equated to a 1K resistor.
I don't know why one of the vactrols tested was different from the other two. Switching back and forth between them I confirmed it wasn't due to the order of the tests; one vactrol just had less resistance for a given LED current. The response curve itself is similar enough that the gain pot can simply be adjusted to compensate for the extra gain.
But honestly the above method is probably overkill for most people.
The 'close-enough' way
Here we plug different resistors in until it sounds right, but there's still a method to it that's worth following.
The most important part is R4, which controls how much current goes through the vactrol's LED, and in turn how the LED plays against the LDR in the vactrol. It changes the linearity.
The gain pot also plays a vital role in the loudness, but changing this only changes the output volume, it doesn't change the linearity. Note that if you decrease R4, the current through the LED will increase proportionally, and you'll need to turn down the gain pot (decrease its resistance) to get the overall circuit back to a nice level of gain.
- Start by hooking up a linear potentiometer (a "B" type pot) to a power source so you can send your test CV to your VCA. Lug 1 goes to ground, lug 2 goes to your CV input on your VCA circuit, and lug 3 goes to a 5V source of power. I used a 5V regulator to make sure that it was definitely 5V being provided when the pot was turned fully clockwise. Call this pot the "CV pot".
- Put a 1K resistor in for R4 just to start.
- Plug it all in and run some audio through the circuit. Something of a constant volume.
- Send a 5V CV to your VCA by turning the CV pot fully clockwise. Turn the gain pot on the VCA down as you go - it can get loud if both the gain pot and the CV pot are both on full.
- Now the 5V signal is set, adjust the gain pot so that the output volume is a comfortable volume. Ideally you should get this volume the same as your bypassed signal, because that'll let you do an A/B comparison.
- Return the CV pot to an anti-clockwise position. The audio should now be silent. Turn the CV pot slowly from anti-clockwise to clockwise, noting if it sounds like the increase in volume is linear enough. If it is, then you're done. Congratulations.
- If the volume increases too quickly and then gradually increases much less as the CV rises, try increasing the value of R4 and doing the test again.
And your done. If it sounds good then it is good.