This page describes a triangle-wave VCO developed to provide an accurate and stable frequency response while avoiding the drawbacks of OTA-based designs. Drawbacks of OTA designs include 1) the necessity to use PNP transistors for the exponential current source, 2) OTA offset voltages that change with control current and the 3) the temperature dependence of the OTA's transconductance. The design described below eliminates these drawbacks by not using an OTA. Its main novel feature is the use of IC analog switches to 1) commute the direction of the current source feeding the ramp generator and 2) provide accurate reference voltages for the upper and lower switching thresholds.
In addition to the main oscillator section illustrated in the first figure below, I have included schematics for the exponential current generator and a sawtooth waveshaper, along with a description of an interesting synchronization method.
In the circuit shown below, the ramp generator is the active integrator comprising OA1 and C3. The exponential current source controlling the oscillator is connected to the integrator via the two switches in U1a, which is one half of an ADG431 analog switch IC. With the switches as shown, the control current is drawn directly out of the integrator, causing its output to ramp upward. With the two switch positions reversed, the control current is reflected through the Wilson current mirror formed by Q1 - Q4 to drive the control current into the integrator, producing a downward ramp. Note that the two switches replace the saturated transistor pair commonly used in transconductor-based designs.
The integrator drives a hysteretic switch built around U2a, U2b and U1b. U2a, half of an LM319 dual comparator, switches high as OA1's output crosses +5 V from below, while at the same time U2b switches low. This switching event simultaneously reverses the control current direction (as described above) and the threshold voltage of the of the comparator circuit. During the positive ramp phase, the right-hand side of R11 is connected to a stable +6.9 V reference through U1b. In conjunction with R5 and R11, this sets a +5 V threshold for the comparator U2a. When the comparators switch, the analog switches of U1b reverse, changing the threshold voltage to -5 V as the integrator ramps downward.
The use of analog switches to set the threshold-limits of the oscillator provides accurate and stable limits and avoids the problems encountered in the more common zener-diode clamping schemes. Those problems are 1) the unsymmetrical output of the LM319 comparators, which makes symmetrical thresholds difficult to achieve, 2) the temperature dependence of the zener clamping voltage and 3) the necessity to accurately match the steering diodes in the (reversible) clamping circuit.
When the circuit was first breadboarded, I found the oscillations to be a bit unstable (jittery). This was cured by adding C4 to the circuit to provide a bit of hysteresis around U1a. The resulting waveform was stable but had discontinuities at the switching points. These were nearly entirely eliminated by adding the small capacitor C5 and the R2-C2 compensation network (refer to the ADG431 data sheet). The values required for these components are somewhat sensitive to the physical layout of the circuit and may need to be changed from those shown in the figure.
This oscillator performs very well. The temperature dependence of the bare oscillator (without the exponential converter) was initially only about 150 ppm/K. I corrected this small drift by making the voltage divider R5/R11 slightly temperature dependent, using a combination of a 6 k carbon-film resistor and a 15 k metal-film resistor for R11. The final overall drift, including the converter, is below 50 ppm/K, measured between 200 Hz and 3 kHz. Tracking is perfect within my ability to measure it -- better than 0.1% from 100 Hz to 40 kHz. Capacitor C5 affects the tracking at the extreme high frequency end of the oscillator's range and may be chosen to give correct tracking between 20 and 40 kHz. The high-frequency tracking control in the exponential converter was adjusted for a correct octave between 10 and 20 kHz.
With the symmetry carefully trimmed (R4), oscillation down to 0.025 Hz was achieved. With the offset adjustment (R8) adjusted for zero dc offset at 2 kHz, the offset varied by about +/- 2 mV between 100 Hz and 10 kHz, about a factor of 10 better than I have seen in OTA-based circuits.
The photos below show the triangle waveform at 20 kHz. The second photo shows the switching transient in detail, with 10x horizontal magnification and 5x vertical magnification.
The Exponential Converter
The exponential converter shown above is a straighforward design. I chose the CA3083 array for the converter transistors. My measurements indicate that these have much better characteristics than their specs indicate, with matching better than 0.2 mV and betas above 200. Although general-purpose arrays like this have a bit more emitter series resistance than expensive, special purpose pairs, the the D1-R14 feedback path provides highly effective compensation for the effects of this resistance.
The input summing amplifier OA1 is an OPA27, chosen for its low offset. The servo amplifier OA2 is an OPA132, chosen for its overall high-performance characteristics, and because it is optimized for servo applications.
In the right-hand part of the figure I have indicated a method of isolating the converter's power supply using ferrite beads. This isolation effectively removes glitches from the VCO switching circuits that were showing up in the converter. I recommend liberal use of ferrite-bead isolation throughout the VCO circuit, especially on the supply lines to the ADG431's.
The next drawing shows the the triangle to sawtooth waveform shaper I made for the VCO. The circuitry around OA1a shifts the triangle to the range of zero to -5 V. Four analog switches (AS1) feed this waveform into the differential amplifier built around the "b" section of the op amp, with the polarity inverted on alternate half cycles of the triangle wave. Precise timing is ensured by driving the switches directly from the comparitor outputs of the main oscillator. I found this method far superior to the more usual design that adds the square-wave output to the triangle followed by a switched inverter / buffer.
With the compensation capacitors C1 and C2 carefully selected, switching transients are extremely small, especially the one at the midpoint of the ramp. I found that the two sections of the ramp are accurately connected from 200 Hz to 6 kHz, with a small discontinuity developing outside this range. I believe this discontinuity stems from the small dc offset voltage of the main triangle, mentioned above. The waveform at 5 kHz is shown below.
At the bottom of the above drawing is a circuit for synchronizing the VCO to a another (master) oscillator. The required input is a narrow pulse, about 10 us in width. In my system I have standard trigger generator modules that produce a standard pulse for consistent synchronization between various VCOs. The "d" section of OA1 follows the input pulse and switches Q1 on during the pulse duration. Thus, Q1 feeds periodic pulses through R18 into the oscillator trip point (pins 4 and 10 of the LM319 comparitor).
These sync pulses force the oscillator to ramp downward. (If the oscillator is already ramping downward when the pulse arrives, then the downward ramp continues unchanged.) Eventually the short pulses "kick" the oscillator into sync with the master oscillator.
If the master frequency is higher than the slave frequency, then the resulting waveform is a triangle wave of reduced amplitude -- every sync pulse reverses the upward ramp direction. But if the master is lower than the slave, then the waveform is more interesting. After equilibrium is reached, alternate sync pulses arrive somewhat after the triangle begins to ramp up. This causes the output to ramp back down until the lower trip point is reached. The result looks like a triangle with the lower tip folded upward. The other sync pulses arrive during the downward ramp, and thus are ignored. As the slave frequency is continuously decreased, the "folded up" segment becomes larger and larger and eventually becomes a new cycle of the waveform. At this point a new folded up segment is created, and the process repeats.
Is this "hard" sync or "soft"? I don't think it really falls into either of these usual categories. Once sync is established the oscillators stay locked. But it takes a while for the sync to be established, something like tens of ms.
When the master frequency is very near the slave frequency (or near a submultiple), an other interesting effect occurs. Rather than synchronizing, the oscillator becomes chaotic, in other words the sound becomes very jittery. This is an effect that is well known from chaos theory -- the kicked oscillator problem has regimes where the response is chaotic. Additionally, when the master frequency is slightly below the slave frequency, a subharmonic often develops. The resulting waveform has alternately smaller and larger amplitudes of the small folded-up region. This suggests that the chaos may develop via a "period-doubling" route. The chaotic region can be expanded by decreasing the size of the kicks, e.g., by increasing R18.
The synchronized waveforms have some very interesting timbres, at some points almost vocal sounding. Thus this synchronization method is useful for generating many unusual sounds and modulated timbres.
Acknowledgement -- This work benefited from a number of conversations with members of the synth-DIY list, especially Rene Schmitz, Martin Czech, Terry Michaels and Jim Patchell.
Aftertnote -- The OPA132 and OPA4132 devices may be replaced by OPA134 and OPA4134 devices. In the expo converter OA1/OA2 may be replaced by an OPA2227.