Posted by & filed under Projects, VCAs + Amplifiers.

The LM13700 is a bonafide classic synth chip, plus it’s cheap and *still* available decades after it was originally introduced. Ok, it’s no longer the state of the art, and its noise and distortion figures are pretty poor, but that’s actually a part of its charm. It’s definitely got that “vintage sound”. So let’s have a look at how we’d actually use it. We’ll design a simple linear “Vintage VCA”.

A Eurorack VCA with the LM13700

Let’s assume we want +/-5V (10Vpp) input and output signals, and let’s design for a 0→5V control voltage (gain CV) level. The audio signal levels are pretty standard, but Eurorack envelope modules vary in the output level they provide. Doepfer’s original gear produces 0→8V, but many subsequent manufacturers have used either 0→5V or 0→10V. Consequently, designing for a low CV input level and providing an attenuator for larger envelope signals is a sensible course of action.

Firstly, we need to look at how much input voltage the chip needs. The short answer is “not much” because OTAs can only cope with very low input levels. We need the datasheet for the LM13700 OTA to tell us the detail. There’s a graph on page 6 that shows us what we need to know.

If you check the graph above, you’ll see that by the time the input signal level is up to around 100mV, distortion is somewhere between 1% and about 8%, depending on whether we’re using the linearisation diodes. Although there’s more distortion earlier if you don’t use them, I prefer the character of the chip without them. The approach to distortion is much gentler (shown as linear on the graph) and you get a “soft drive” sound rather than sudden hard clipping. If we’re not using the diodes, we probably better keep the input voltage well down under 100mV. 50 or 60mVpp give 2 to 3% distortion, so let’s go with that.

We’ve got 60mVpp as our maximum input, so we need to scale our 10Vpp input down.

10V / 60mV = 166.667

1 / 166.67 = 0.006

Our 10Vpp input is nearly 167 times too big! We need to reduce it to x0.006. A simple voltage divider on the input will do, and values of 100K/620R will provide the scaling we need.

R2 / R1 + R2 = 620R / (100K + 620R) = 0.006161

10V x 0.006161 = 61.6mV

In highly-technical electronic engineering circles, this is known as “close enough” ;). So far, our circuit looks like this:

Notice we use the same 620R resistor on the other (unused) input of the OTA. This helps minimise offset voltages. We feed our input to the inverting input of the OTA because the output will get flipped again later on. We’ll come to that.

Working out the output level of the LM13700

The LM13700 isn’t a simple op-amp. It’s an “Operational Transconductance Amplifier” or OTA. I’m going to avoid trying to explain what the hell that means. The short answer is it has an extra input that allows us to set the gain of the chip using a current. This control current is known as Iabc in the LM13700 datasheet, and the relationship between the input, the gain control current, and the output looks like this:

Iout = (q / 2kT) x Iabc x Vin

Ok, hold on! What on earth is all that lot?! Brace yourself…k is Boltzmann’s constant, T is temperature, and q is the charge of an electron. Yeah, seriously. Blame a physicist.

You also see kT/q referred to as the “thermal voltage”. The worst thing about it is that word “thermal” – it depends on the temperature – but if we assume room temperature, the thermal voltage is 26mV, and the whole mess simplifies:

kT / q = 26mV, so q / kT = 1/26mV

q / 2kT = 1 / (2 x 26mV) = 1 / 56mV = 19.2

That makes everything a lot easier. We can now write our input/output equation as:

Iout = 19.2 x Iabc x Vin

Iabc can have an absolute maximum of 2mA before the chip blows up. However, staying under the absolute maximum isn’t our only concern. The output offset voltage moves around as Iabc varies, and this translates into control voltage feedthrough from the gain input. To help minimise this, it makes sense to keep Iabc lower. Let’s design for a 500µA maximum control current. What’s our maximum output?

Iout = 19.2 x Iabc x Vin

Iout = 19.2 x 500µA x 60mV = 576µA

The output from the chip is not a voltage, but is a current instead, hence Iout not Vout.

Converting the LM13700’s output current to voltage

In cheap’n’cheerful 13700 circuits, you’ll often see a resistor hanging off the output down to ground. This resistor acts to take this current to ground, and if a current is following through a resistor, there must be a voltage across it, so the resistor converts the current to a voltage. Here’s an example from the datasheet. I don’t hold with such disgraceful practices. Ok, not often.

There is a active circuit that does the same thing with somewhat better performance, a building-block op-amp stage known as an “I-to-V convertor”, or sometimes a “transimpedance convertor”.

The I-to-V stage looks a lot like an inverting op-amp with the input resistor chopped off, and that is basically what it is. It gives an output voltage which depends on the input current Iin and the feedback resistor Rf.

Vout = -Iin x Rf

Notice that if you *increase* the feedback resistor, the output voltage goes up. This is like the inverting op-amp, where increasing the feedback resistor boosts the gain. Also notice that negative sign; like the inverting op-amp, this circuit inverts the output.

Since we know what the current is from the OTA, we can work out what resistor we need to get our required output voltage:

Rf = Vout / Iin = 10V / 576µA = 17.36K

The nearest practical value is 18K. So now our VCA circuit looks like this:

Turning a 0-5V CV input into a safe Iabc control current for the LM13700

We’ve just looked at turning a current into a voltage, but for this part of the circuit, we want to turn a voltage into a current instead. The same thing in reverse! There are lots of current source circuits you could use. We’ll choose this one:

This is a good design because it’s simple and nice and linear, which is what we want for our VCA. The input resistor goes to a virtual earth node at the inverting input of the op-amp, so we can add further input resistors and mix them together without them interacting. That’s very handy. It’s also very easy to work out Iout, since it’s the same as the current through Rin.

There are various ways you can think about how this works, but one way of looking at it is the following: Since the inverting input is infinite impedance, no current can flow into it. Thus the current coming in through Rin must be matched by an equal and opposite current provided by feedback from the transistor. Since the direction of the input current is into the inverting input, the direction of the feedback current must be out of the inverting input, and into the PNP’s emitter. Since the op-amp will try and hold inputs at the same voltage (ground, as pin 3 is grounded)  then the output will drive the transistor base as negative as is required (it’s a PNP, remember) to develop the required feedback current through the transistor.

Iout = Vin / Rin

We want 500µA, and we wanted to use a 5V level, so if we re-arrange the equation to find the resistor we need:

Rin = Vin / Iout = 5V / 500µA = 10K

So we just need a 10K input resistor. Of course, things won’t stay that simple for long. This is very much a “textbook” circuit, which is to say, it’s an idealisation, and it doesn’t include several components we will need in a practical circuit. Firstly, it would be a good idea to add some protection for the Iabc input of the LM13700 just in case something goes wrong. The worse case scenario would be a short to one of the rails, so 12V. We’ve already mentioned that Iabc can only go to 2mA before the smoke comes out.

R = V / I = 12V / 2mA = 6K

We can use 6K8 to be on the safe side. We also need to think about negative voltages. The circuit won’t provide any output if the input voltage goes negative since the transistor will be switched off. But it will also be reverse-biased, and eventually that will fry it. If we add a diode from the base back to the input, we provide an easy path for the current to take that avoids the PN junction inside the transistor (that’s what that little arrow in the symbol represents). So now we’ve got this:

This circuit above will work, but it’s still pretty basic. We’ve only got a single input, and we haven’t got any kind of manual control for the gain. We could naively tack a load of stuff on:

Ok, so what have we got here? Our 0-5V CV input is still there, marked “Envelope” in the middle. Above it we’ve got a manual gain control pot which provides 0-12V. Since this is a larger voltage, we scale up the input resistor appropriately. At the bottom we’ve got a general purpose CV input set up for a +/-5V range. This has the standard 100K attenuator pot, and the 10V range means we need to double the input resistor to 20K.

So what’s the problem? Well, if we try this circuit, we don’t get the voltages or currents we expect. They’re all rather low. This is because we’ve forgotten to think about the input impedances. Take the +/-5V Gain CV input, for example.

20K is a low input impedance, and becomes even lower since it is effectively in parallel with the lower half of the CV Amount pot. The output impedance of whatever our CV source is might be low, but then we’ve got the upper half of the CV amount pot in series with it, so it could easily finishes up being 50K or so. The result of all this is the input presents a significant loading and we lose some of our CV signal (about 10%) and we also badly deform the pots response curve, so a linear attenuator pot no longer behaves in a linear manner.

In order to avoid this effect, the general rule of thumb is to make input resistors ten times larger than pot values. This doesn’t stop them from being in parallel, but when a “large” resistor is in parallel with a “small” resistor, the value of the parallel combination is basically the same as the small resistor.

With a 100K pot, going up to ten times the value for the input resistor is a bit large (1M), but we could manage 470K without pushing things too far, and checking the situation in a simulation shows us that even 330K is almost linear. But wait! If we alter the input resistor, we alter the amount of current we get out of our circuit. We have to compensate somewhere else. Luckily the solution is provided by the bible of synth builders, Hal Chamberlin’s book “Musical Applications of Microprocessors”. Turn to page 203 (2nd edition) where he presents an even-more-vintage VCA design using the CA3080:

See those extra resistors at the top? R2 and R3? They split the feedback current from the transistor and effectively allow us to set the gain of the current source. Like this, we can use whatever size input resistors we like, and then scale the output current back up using a bit of gain in the current source. This gives us a schematic for our final current source:

And that pretty much wraps up our Eurorack VCA design! The only other thing I haven’t mentioned is the addition of C1 which works in tandem with R10 to add some smoothing to the CVs and keep some noise out of the CV path. The whole thing looks like this:

It might make sense to build this as a dual unit, since there’s another VCA in the LM13700 that we’re not using. Building two of these on the same PCB would save wasting one VCA. And anyway, you can never have too many VCAs, right?!?

Further reading on the LM13700

For a lot of extra detail, you can’t beat this excellent paper.

“Minimizing Distortion in Operational Transconductance Amplifiers”, Open Music Labs

There’s also this classic article on the LM13700, if you haven’t seen it.

“Understanding and Using OTA op-amp ICs (Part 2)”, Ray Marston

Comments and Feedback

As usual, if you spot any errors, get in touch, or comment below.

9 Responses to “Design a Eurorack “Vintage VCA” with the LM13700”

  1. Colin

    Thanks so much for this terrific article!
    If the VCA is not closing all the way, what would be the best way to correct this?
    My first instinct was to connect a 3M resistor to -12v at the CV mixing input stage. This worked, but I feel like maybe it chops off the end of the incoming envelope a bit? Not sure. Are there better ways to make sure a VCA closes?

    • Tom Wiltshire

      Thanks Colin.

      The principle of connecting a little bit of negative voltage into that mixer is good, so your -12V via 3M is working, but it sounds like it’s still a bit too much if it’s cutting off the end of the envelope. How about trying a trimmer pot between ground and -12V and then take the wiper output via 1M/2M2 to the mixer or something? That’d let you dial it down to “just enough” a bit better.

      Another alternative solution would be to connect the bottom of the gain pot VR1 to a 200K resistor to -12V, instead of directly to ground. That would allow the pot to go slightly negative and give you a panel adjustment for the offset.

      Let us know how you get on!

  2. Fayek Helmi

    Thank you for the very nice explanation of this circuit! i would love to read more “step by step” articles about the common eurorack circuits as i’m still learning more complex circuit designs.

  3. Robyn

    Thank you for this! It has helped me a ton! I have a question regarding the examples from “Musical Applications of Microprocessors”

    “See those extra resistors at the top? R2 and R3? They split the feedback current from the transistor and effectively allow us to set the gain of the current source.”

    From reading that section in the book, I understand that R2 and R3 form a parallel resistor. But I’m confused about the formula to calculate the current gain. What is the formula for getting 500microamps from the 15microamps in your example? Thank you!

    • Tom Wiltshire

      We know that the current through R10/33K must be 15uA because it has to carry the 15uA that comes in through R6. If R10 and R11 are in parallel, then the current flowing into them will split proportionally according to their values. So if R11 is 33 times smaller than R10, it must carry 33 times the current. That gives us 15uA x 33 = 495uA. So the total current from the transistor is 15+495 = 510uA. The control current will be slightly less since we lose a bit to the transistor base, so we can say that the collector current is “about 500uA”.

  4. Mark Revell

    Just built this and it works perfectly with my Doepfer set-up, nice one!

  5. James Wyatt-Lees

    Hi Tom,

    I see some OTA VCA designs that have a pot wired to plus and minus voltage as an initial on level. Presumably this works with the CV mixer so you can use an LFO as a CV source. How would this work with the design here with the diode in the CV mixers op amp feedback path? Is there a chance of burning up the transistor still?

    • Tom Wiltshire

      Having the initial level pot across +ve and -ve voltage just gives you a bit more flexibility about offsets. If it can go negative too, you can cancel a positive offset on the CV input and get the VCA to go properly ‘Off’. Whether that’s a likely enough situation to warrant using half your knob travel is a matter of taste! (An LFO would need a positive offset to shift it up above zero).
      The diode is still required, since the current to the VCA itself has to stay within range, no matter what CV inputs we throw at it.

      • James Wyatt-Lees

        Thanks Tom. I will have to play with that. I’m thinking of using an inverted envelope in the CV so being able to offset positive would be good as well as using LFOs as a CV source.


Leave a Reply

Your email address will not be published. Required fields are marked *