Clik here to view.

Editor’s Note: This DI is a two-part series.
Part 1 shows how to make an oscillator with a pitch that is proportional to a control-voltage.
Part 2 will show how to modify the circuit for use with higher supply voltages, implement it using discrete parts, and modify it to closely approximate a sine wave.
Typical circuit
An ongoing project (or gadget) called for a means of generating an audio output to represent a varying voltage level. Ho hum: that sounds like a voltage-controlled oscillator. But this signal was bipolar, spanning peaks ranging from -1 to +1 V. A linear-in-frequency response just sounded wrong, and anyway could never deliver the symmetrical ±1-octave output that I wanted.
Wow the engineering world with your unique design: Design Ideas Submission Guide
A typical, well-known type of oscillator—though as drawn, lacks voltage control—is shown in Figure 1. At the start of a cycle, C1 is fully charged. It then discharges through R1 until the reference voltage, shown as mid-rail, is reached, when the monostable multivibrator is triggered, delivering a pulse to turn on Q1, which shorts C1 to the positive rail, thereby starting the next cycle. The output, an exponentially-decaying sawtooth having constant amplitude, is taken from the top of C1 via a buffer (not shown). (Strictly, the op-amp should be a comparator; it’s used as one.) C1 would normally be switched for different ranges, with R1 varied for tuning.
Image may be NSFW.
Clik here to view. Figure 1 A typical relaxation oscillator with an exponentially decaying sawtooth output, is the starting point for this design.
Another method of tuning this is to keep R1 and C1 constant and vary the reference voltage. The output level now varies, the tuning law being exponential. If we want pitch-linearity, maybe that would be a good starting point?
Tweaking
An exponential decay may not give the exact curve we need, but with a little tweaking, parts of it are close enough to be useful. Some experimenting produced the workable circuit shown in Figure 2.
Image may be NSFW.
Clik here to view.
Figure 2 Varying the reference voltage instead of the R-C time-constant gives a tuning law that is close enough to being linear in pitch over a couple of octaves, especially after adding R2.
Just as described above, the bipolar control voltage is compared with the falling exponential(-ish) ramp to tune the oscillator’s frequency. When they coincide, U2a, used as a multi-supply multi-voltage (MSMV), is triggered to produce a reset pulse to turn Q1 on momentarily, thus resetting C1’s voltage to its maximum value. Figure 3 shows the key waveforms.
Image may be NSFW.
Clik here to view.
Figure 3 Waveforms from the circuit in Figure 2, at both extremes of its two-octave span.
Bending the law so we can do what we want
The single, simple, humble resistor R2 is the key to this design. By compressing and shifting the exponential decay curve, it allows a reasonably close approximation to a tuning law that is linear with pitch rather than frequency over a couple of octaves and more: an increment in the control voltage now changes the frequency by a fairly constant frequency ratio rather than a fixed amount. The match is worst at the low-frequency end, being around 5% off close to the low calibration point and way off even lower down. (A semitone is ~7%.) Using 51k for R2 gives the closest match for the bottom octave frequency itself, but 56k generally “sounds” better on average in that region.
With the values shown, the output frequency ranges from about 250 Hz to 1000 Hz for inputs from -1 to +1 V, which is close to the two octaves upwards from “C4” (middle C: ~262 Hz if we define A4 to be precisely 440 Hz) to “C6”. (The quotes are used here to distinguish pitch values from capacitors!) For different spans, just change C1 or both R1 and R2, whose ratio must be kept constant. If the control voltage falls below about -1.5 V, as determined by R1 and R2, oscillation will stop. Above +1 V, the match is still reasonable for another half octave and more.
U2b divides the oscillator’s pulse output by 2 to give a square wave, which the output network turns into a trapezoid of about 1.1 V pk-pk (~-6 dBu). While this has no pretensions to waveform purity, it does now have softer and “more analog” edges rather than sharp digital ones.
Other comments: MCP6002s are cheap and cheerful. The MCP6022 is better specified (much faster, and with <500 µV input offset) but more costly. The spare half of U1 could be used for further filtering of the output if desired. The spec for Q1 is not critical. A ZVP3306A has an RDS(ON) of up to 15 Ω, but the width of the pulse driving its gate ensures that C1 is fully charged under all conditions. The ~±1 V control range was just what I wanted, but that was a happy accident rather than being designed in.
It now does what’s needed and is ready for dropping into the project (or gadget). However, . . .
A few extra components give more octaves and accuracy
Contemplating the basic circuit threw up an interesting idea. Linear-in-frequency tuning can be done in two ways, one being to use a linear ramp and vary the control voltage much as we’re doing with the exponential one, while the other would be to replace R1 with a controllable current sink and delete R2. Use these together and the tuning law becomes “squared”, giving a power law that is inherently much closer to being linear-in-pitch. Figure 4 shows how to do that.
Image may be NSFW.
Clik here to view.
Figure 4 Adding a voltage-controlled current sink in place of tuning resistor R1 is the key to operation over more than 4 octaves with much better pitch accuracy.
Q2, U1b, and R1 form the current sink. Its control voltage is half of that at the input, ensuring that Q2 never saturates. C1 discharges linearly, the slope being governed by Vcon. The power rails are shown as 0 V / +5 V rather than ±2.5 V to reflect the wider tuning range, but the output frequency is still centered at around 520 Hz (close to a pitch of “C5”) with the component values shown.
The required control-voltage swing now measures ~840 mV/octave (or ~70 mV/semitone). The response is almost exactly linear-in-pitch over the middle two octaves, and still decent for the two octaves and more surrounding those. The errors are worst at the low-frequency end because the current sink is then running out of steam (or electrons). An MCP6022 is used because of its better performance but the rest of the circuit is almost unchanged.
While the range of 4-plus octaves is over the top for my target application, improved accuracy is always welcome, and this better performance opens the way to possible musical use.
In Part 2, that will be shown, but first we’ll see how to modify the circuit for use with higher supply voltages, how to implement it using only discrete parts apart from the op-amp, and how to end up with a respectable sine wave at the output.
—Nick Cornford built his first crystal set at 10, and since then has designed professional audio equipment, many datacomm products, and technical security kit. He has at last retired. Mostly. Sort of.
Related Content
- VCO using the TL431 reference
- Ultra-low distortion oscillator, part 1: how not to do it.
- How to control your impulses—part 1
- Squashed triangles: sines, but with teeth?
- Simple 5-component oscillator works below 0.8V
- A two transistor sine wave oscillator
The post A pitch-linear VCO, part 1: Getting it going appeared first on EDN.