Precision Tuning of the AS3340 VCO
Author - Rob Hordijk (September 2018, Version 2)
Edited for style and clarity - Mark McMillan

## Introduction

In some applications of the AS3340 VCO it is useful to produce precise frequencies that correspond to established music tones, e.g. the note A4 ("A" note above middle C) is 440 Hz. The VCO by its nature produces continuous frequencies over a range (not specific "notes") and the exact frequency varies based on a number of circuit parameters. By careful "tuning" of the circuit it is possible to make the AS3340 produce the exact frequencies that correspond to the standard music scale for specific input (control) voltages.

By establishing a standard control voltage-to-frequencey system it is possible for a discrete input source (such as a keyboard) to drive the VC input and produce exact musical note frequencies. It is conventional to define a control voltage range of 0-5V to correspond to the music note range C1 to C6. This implies exactly 1.0000 volts per octave - e.g. to produce middle C (261.63Hz) the control voltage would be 3.0000V. Each octave is divided into 11 intervals which corresponds to a control voltage of 1V / 11 = 0.0909V per note. For example, the note A4 would be produced with the control voltage 3.0000 + (9*0.0909) = 3.8181V.

It is assumed the device driving the AS3340 CV input is capable of producing these exact discrete control voltage values. A common such device is a keyboard which usually produces a digital MIDI output, which is then converted to discrete control voltages by a MIDI-to-CV converter module. Some keyboards supply direct CV outputs with no coverted required. When used with a properly tuned AS3340 pressing a key produces the exact specific control voltage for that note, which drives the AS3340 to produce the proper musical frequency.

To understand how the AS3340 can be easily tuned to a 1 Volt per octave scale (and 0V = note C1) it is important to look at the different building blocks that affect the tuning and how these blocks can be trimmed in a logical order. Typically the AS3340 is used in a circuit with two trimmers that must be iteratively tuned several times in order to achieve tuning over the C1 to C6 music scale. It may take up to 10 iterations of adjusting the two trimmers to achieve optimal tuning.

The tuning technique described here uses a circuit with four trimmers which are adjusted only once, in a specific order. This is a simple four-step tuning procedure which results in a stable optimal tuning with no iteration and and no re-adjustments.

This method is superior to the one or two trimmer adjustment procedure in the original XX3340 datasheets where two trimmers are used, which need to be adjusted repeatedly to come to a final 1V/Oct tuning that spans from C1 to C6 over a control voltage range between 0.000V and +5.000V. Additionally the two trimmer adjustment procedure does not guarantee that the AS3340 will be in its optimal temperature compensation range at the 1V/Oct scale. The four trimmer procedure comes much closer to the optimal working conditions for the AS3340 and is also much easier to perform.

## AS3340 Building Blocks

This is the internal schematic of the AS3340, as described in the datasheet:

There are four building blocks in the AS3340 that affect the 1V/Oct tuning. Note that naming conventions for resistors and currents are taken from the AS3340 datasheet.

1. The internal opamp A2 that drives the dual-transistor in the exponential converter. It receives a reference current through Rr on pin 13, which sets the initial pitch on the oscillator when the exponential converter input receives a voltage of 0V.
2. The matched transistor pair Q1 and Q2 in the exponential converter. This receives a current on pin 14 over the resistor Rs and the magnitude of this resistor defines the V/Oct curve of the exponential converter.
3. The input CV mixing opamp A1 that drives the exponential converter. It recieves CV voltages on pin 15, adds them together and delivers a current to the resistor on pin 14 into the base of the Q1 transistor.
4. The tempco gen and precision multiplier temperature compensation circuit which adjusts the input CV mixing opamp. It receives two reference currents of around 100μA on pin 1 and pin 2 through resistors Rz and Rt, these currents must be the same for optimal performance.

It is important to understand that for the best tuning all four blocks need to be adjusted. This is simply best practise and actually makes the trimming process easier than when some trimmers are replaced by fixed resistors and only one or two trimmers are used. Using less trimmers simply results in a less well tuned circuit.

This may be a bit confusing as the original 3340 datasheet does not properly explain this and suggests one can do with two trimmers. But that will not give the best results. Using the two trimmer method implies that both trimmers need to be adjusted alternatingly and it may take over ten times of readjusting the trimmers alternatively until one gets the proper point of operation. That is a difficult method and definitely not recommended for factory trimming (e.g. trimming a circuit which is then sent to a customer to use). Using the four trimmer method requires each trimmer to be adjusted only once and directly to its optimal setting. Trimming four trimmers only once is much easier than going back and forth over two trimmers and in the end not being sure if all is optimally adjusted. So, it is highly recommended to study this four trimmer procedure thoroughly before making a design decision on which method to use.

Note that both the tempco circuit (D) and the exponential converter reference current (A) need to be set only once. The advantage of these being trimmed to their optimal performance is that it will give stable temperature correction and a reference pitch that makes the final tuning of the 1V/Oct scale much easier. The (D) and (A) settings will hold for a long time. When these two ‘blocks’ are set correctly they effectively compensate for chip to chip variations, resistor tolerances and variations in the capacitance of the timing capacitor between different oscillators. Since they can be set individually without influencing each other it then becomes straightforward to tune the actual 1V/Oct scale later (an adjustment that may have to be made more often).

The exponential converter consists of opamp A2 and the matched transistor pair Q1 and Q2. It is the classic ‘textbook’ exponential converter design and further knowledge of this circuit is assumed.

Q3 simply provides a copy of the output current to be used for optional high frequency tracking adjustment and as such does not take part of the main trimming procedure. Its an option for top-end designs and high frequency tracking can be trimmed with an optional fifth trimmer after the basic trimming procedure is completed and as described in the AS3340 datasheet.

The 1V/Oct input CVs are mixed and converted to a current by the input CV mixing opamp A1 which flows into the base of Q1 and a resistor Rs between the base of transistor Q1 and ground. The base of Q2 is directly connected to ground.

The Q1 transistor is in the feedback loop of the opamp A2, while the other transistor Q2 sources current to charge a timing capacitor in the triangle wave oscillator core.

## AS3340 Oscillator

The following is important to fully understand the design of the AS3340 oscillator circuit:

When the base of both Q1 and Q2 are connected to ground a default current flows to the triangle wave oscillator core, causing a pitch of a certain frequency. This pitch will be used as the reference pitch, when the input CV to the base of transistor Q1 is at 0V. This pitch can be set by changing the value of the resistor Rr on pin 13, which supplies the reference current to the opamp in the exponential converter. The situation where there is no current flowing into or out of the base of Q1, e.g. when the base of both transistors are connected to ground, is the point where the transistor pair is the least sensitive to temperature changes. When the transistors are on the same silicon substrate and have the same temperature the effects of an overall change in temperature can be neglected. Meaning that when the reference pitch is set to a pitch where being ‘out of tune’ is most noticeable, other factors that can detune the oscillator become less noticeable to the human ear. A good reference pitch is 1046.5 Hertz, known better as note C6 on the musical scale. A trimmer can be used in series with resistor Rr from pin 13 to the positive power supply rail, or Rr can be connected to the taper of a trimmer between ground and the positive power supply rail. The relationship between this reference current and the pitch is linear, and for a stable tuning it requires the power supply voltages to be rock stable. As an alternative for a connection to the power supply voltage it can also be connected to a stable reference voltage source added to the circuitry.

It is also recommended to apply a stable reference voltage at pin 9 of about 1/3 of the power supply voltage or at least use a large stabilizing capacitor from ground to pin 9. Pin 9 reflects the upper trip point voltage for the trianglewave and is internally generated by a resistor divider in the chip between ground and the positive supply voltage. This means that any instability in the power supply voltage will ‘modulate’ this trip point and detune the pitch of the triangle wave as it reaches the 'modulated' trip point earlier or later. As the internal resistors are around 7kΩ to ground and 14kΩ to the positive supply voltage a low impedance output from an external opamp can easily override this voltage created by the two resistors. But this voltage must be close to the 1/3 of the positive power supply voltage, else other internal circuitry can start to behave erratically. There is a practical margin of around 10% to keep the chip in its stable zone.

So, when a stable voltage reference is present one can use a voltage divider from this reference current and buffer it with an opamp and connect the opamp output straight to pin 9. When the power supply is rock-stable one can also buffer the voltage at pin 9 and use it as a reference voltage for further waveshaping processing, e.g. to invert the sawtooth output to a bipolar downsloping sawtooth wave or create a 50% duty cycle squarewave by comparing the voltage on pin 9 with the sawtooth wave output with a high imput impedance comparator or FET opamp.

## Four Trimmer Tuning Circuit

Below is a basic schematic that can be set up on a breadboard to make yourself familiar with the tuning procedure and allows you to experiment with different resistor values for Rt and Rs. It only shows the components used for tuning the pitch. You can monitor the pitch from the sawtooth output on a high impedance frequency meter. It shows the four trimmers that when adjusted in the right order will directly lead you to the proper tuning.

The tuning steps are as follows:

1. Connect mV meter between Tp1 and Tp2. Trim TEMPCO ADJ pot until voltage is 0mV.
2. Put jumper over JP1, so pin 14 is connected to analog ground AGND. Trim REF PITCH C6 until pitch is C6 = 1046.5 Hertz. Remove jumper.
3. Apply +5.000V CV and trim REFIND C6 trimmer until pitch is again 1046.5 Hertz.
4. Apply 0.000V CV and trim SCALE ADJ trimmer until pitch is 32.7 Hertz.
5. Done!
Notes
• All resistors are assumed to be 1% metal film types, except the 100kΩ precision CV input resistors.
• Values are indications and may need adjusting for different power supply voltages.
• Resistances Rr, Rs, Rt and Rz are explained in the AS3340 datasheet.

Here is a full explaination of each step of the trimming procedure:

### Step 1 - Trimming the temperature compensation circuitry

The first step in the tuning procedure is to make sure that the temperature compensation circuitry is working properly. To work properly the currents that flow into pin 1 and pin 2 must be equal. But for those currents to be equal requires different resistor values for the Rt and Rz resistors going from the negative power supply on pin 3 to pins 1 and 2. The main question is how to know that these currents are equal. Resistor Rt has an optimal value of 5k6Ω when the power supply voltage at pin 3 is at -6V or the –6.5V when the internal zener diode is used.

To be able to trim the currents into pin 1 and pin 2 as equal the Rz as drawn in the datasheet can be changed by adding a 5.6K resistor in between the trimmer and the minus power supply voltage on pin 3. The top 24k resistor can then be reduced to e.g. an 18k resistor. A millivolt meter is connected between pin 2 and the connection point of the 5k6 resistor in the Rz and the trimmer. The trimmer is now adjusted until the voltage on the millivolt meter reads 0 mV. It is adviceable to add two testpins on the PCB, one next to and connected to pin 2 and one that connects to the point between the second 5k6 resistor and the trimmer in the Rz resistance from pin 3 to pin 1.

### Step 2 - Trimming the reference pitch

To trim the reference pitch the base of Q1 can be connected to ground by shortcircuiting pin 14 to ground. As the input CV mixing opamp supplies a current to Q1 (and not a voltage) this is a safe procedure, as the current that now flows from the mixing opamp output to ground is limited to what would flow through Rs.

Trimming the reference pitch to C6 makes the rest of the tuning procedure a lot easier. On a PCB design one can put a two pin header next to Rs, so if one places a jumper on this header one can conveniently shortcircuit Rs and then set the reference pitch. After this the header can be removed permanently. When a trimmer is used in the way shown in the schematic and when the positive power supply voltage is +12V then the trimmer range is one octave when the resistance of the trimmer and the resistor in series from the trimmer to ground are equal. Eventually you would want to find values for this series resistor and the Rt resistor to get a +/-10% trimming range around e.g. the C6 note.

### Steps 3,4 – Trimming the 1V/Oct scale

Now the 1V/Octive scale can be tuned by adjusting Rs at pin 14. For this the 1k8 resistor in the datasheet needs to be replaced by a somewhat smaller resistor and a trimmer in series, e.g a 1k5 resistor plus a 500Ω multiturn trimmer. It will be assumed that all 100k input resistors on pin 15 are high precision, low tolerance resistors, e.g. 0.05% to 0.01% tolerance. In SMD format these are available for quite reasonable prices.

First it should be noted that when all 100k input resistors are connected to ground the voltage over Rs is not 0V, as one would expect from a standard opamp. The opamp internally adds quite a large offset voltage with the idea that a 0V CV input voltage would produce the lowest note of the scale, which is most probably not the C6 reference pitch but rather the C1 note. Most probably this rather large offset voltage was implemented because the original CEM3340 was designed with digitally controlled polyphonic synthesizers in mind. In the late seventies the then available microcontrollers invariably used a single +5V power supply and associated DA-converters could produce CVs over five octaves within a 0V to +5V range. That the CEM3340 would accept such a CV range directly was probably quite convenient in those days, but for this a large internal voltage offset was necessary, large enough to push the oscillator some four to five octaves down from the C6 reference pitch for a 0 V input CV.

It is important to understand that when changing the value of Rs to trim the 1V/Oct scale, the scale pivots around the C6 reference pitch, meaning that while trimming pitches that are below C6 go down in pitch and pitches above C6 will actually go up. So, the reference voltage to tune the 1V/Oct scale from is not a 0V input CV but the CV where the oscillator produces the C6 note at 1046.5 Hz! This means that one first has to find that C6 note and then trim Rs from that point on. This is very important to understand! Lets assume that there is a 5-octave analog keyboard, or that a MIDI->CV converter is available that gives a 0 V to +5V output over five octaves. The 360k resistor between pin 15 and the positive power supply rail in the datasheet schematic is replaced by a trimmer, or better a resistor and trimmer in series.

### Step 3 – Refinding the C6 note

As the other input resistors are precision 100k resistors one can now play the highest C note on the keyboard (assuming that happens to be C6), producing a CV of +5.000V, and adjust the trimmer on pin 15 until the oscillator plays the C6 note. You can now test with a high input impedance millivolt meter that the voltage on pin 14 is actually at 0 mV.

### Step 4 – Adjusting the 1V/Oct scale

Then the lowest C note is played (assuming this is C1) and Rs is adjusted until the oscillator plays the C1 pitch. This should finish the trimming procedure.

Note that all other CV inputs on the 100k resistors must be at ground, else they interfere with the trimming procedure. This applies directly to tuning knobs that may be hardwired to some of the 100k input resistors. In this case it would pay to implement a +5.000 V reference source and connect a ‘coarse’ tuning knob and a ‘fine’ tuning knob between ground and this +5.000 V reference. In this case tuning becomes especially easy as instead of using an external CV source one can now fully open the ‘coarse’ knob to the +5.000 V to ‘refind’ the C6 note with the trimmer from pin 15 to V+, and then close the ‘coarse’ knob to 0.000 V to adjust Rs to ‘find’ the C1 note. In this case the ‘fine’ knob should of course be at a twelve o’clock position. The coarse knob will span exactly five octaves.

## Conclusion

The four trimmer solution as presented in this text consists of four discrete steps and in each step a trimmer is adjusted straight to its optimal value before the next step is taken. As there is no backwards interdependency of trimmers when steps are taken in the right order the adjustment of a trimmer does not require readjustment of trimmers in a previous step. This means that the full trimming procedure is easy and straightforward.

Reference pitch and temperature compensation circuitry can be factory trimmed and shouldn’t need ‘field retrimming’ later. This means that end users could retrim the trimmers on pin 15 and pin 14 them selves: first the pin 15 trimmer to get a C6 for a +5.000V CV, and then the pin 14 trimmer to get a C1 at 65.4 Hz for a 0.000V CV. When end users would have a five octave 1V/Oct analog keyboard or sequencer, or a five octave 1V/Oct MIDI->CV converter, and a digital reference synth they can actually trim the AS3340 oscillator board by ear, without need for measurement devices. As long as they trim the C6 note first and only after that the C1 note.

## Additional Notes

• Resistors at pin 15 should all be 0.05% 100k or better, except for the trimmer/resistor to refind the C6 reference pitch. The two resistors from pin 3 to pin 2 and from pin 3 to the trimmer going to pin 1 are 1% 5k6 resistors. All other resistor values may change with different power supply voltages. E.g. when +12V is used, as is common for Eurorack systems, there would be the choice for using either –6.5V on pin 3 by using the built-in zener, a –6V negative supply from a 79L06 type of powerregulator, a –5V negative supply from a 79L05 type, or a 337L type adjustable regulator may be used. These different negative power supply values would need different resistance values, except for the ones mentioned at the beginning of this paragraph.
• Note that adjusting the reference current for the exponential converter on pin 13 also adjusts for tolerances of the timing capacitor used. This is especially useful for polyphonic setups in analog modular systems that do not have a microcontroller available that can do an autotune algorithm. It is best to use a mica capacitor as timing capacitor, but these are in general relatively expensive and can be hard to find. Through hole plastic 1% caps using polypropylene or polystyrene with a value of 1nF are less hard to find and work very well. Be careful with plastic SMD precision caps, as these can change value dramatically during the soldering process. Especially when soldered by hand. If you can find a 1nF COG NP0 SMD ceramic cap it may work well for a ‘cheaper’ design.
• To find the best values for trimmers for a certain power supply voltage range one should do some breadboarding and find the values for the trimmers and series resistors in a way that the trimmers cover about a 20% upwards and a 20% downwards deviation from the ideal value. For all trimmers multiturn types are recommended.
• It is of the utmost importance to have a stable and clean powersupply. This may pose a problem when an oscillator is designed as a module for e.g. the Eurorack market. In such a case the quality of the PSU is not known and how stable the whole Eurorack setup is. For the negative supply it is recommened to use a local negative power regulator like a 79Lxx type or 377L type. For the positive power the required minimum of the AS3340 is +10V, which is regrettably too close to the +12V Eurorack positive supply for any +10V local regulator to work reliably. For a stable design it may be necessary to connect Rr on pin 13 to a stable voltage reference created on board. The same applies to pin 9. Pin 9 basically holds the upper trip point voltage for the triangle oscillator. When this receives a stable voltage from a stable voltage reference, being a third of the positive PSU voltage on pin 16, then interferences over the positive power supply rail are largely eliminated.

The AS3340 can be purchased here: https://cabintechglobal.com/as3340-dil

This text is released in the public domain