My students requested that I talk about voltage-controlled oscillators (VCO) and low-frequency oscillators (LFO) for audio work in my applied electronics course. (We’re in the last week, and they have everything they need to know for the final EKG lab.)

I spent some time Friday night and this morning designing, building, and testing a couple of VCO circuits—one for which frequency is linear with voltage and one for which frequency is exponential with voltage. Both can easily be turned into low-frequency oscillators by increasing the size of one capacitor.

The oscillators have two outputs: a square wave and a triangle wave. I chose a triangle-wave oscillator, because the design is simpler than for sine waves, and the students have all the concepts they need to understand the design.

The oscillator consists of two parts: an integrator to convert a constant current input into a constant slope: dV/dt = I/C, and a Schmitt trigger to change the current from positive to negative. Rather than using a Schmitt-trigger inverter chip, I made the Schmitt trigger from an op amp (a comparator would give crisper transitions, but that is not important at the low speeds we’re dealing with).

The op amp in the upper-left corner is a unity-gain buffer to isolate the input from the rest of the circuit. It isn’t really needed in this design, and it limits the input voltage range to the power-supply voltage (I used 3.3V).

The next op amp is the integrator, which turns an input current into a constant slope on the output voltage. The current through the capacitor is 10nF dV/dt.

When the FET is turned off, the current flows through R6+R7, and I= (Vin/2 – Vin)/ (R6+R7), so dV/dt = – Vin/(2* 10nF * 6.6kΩ) = -Vin / 132µs.

When the FET is turned on, the current is the difference between the current through R8 and through R6+R7, and so is (Vin/2)/R8+(Vin/2 – Vin)/ (R6+R7), which simplifies to Vin/(2*6.6kΩ), and dV/dt = Vin/132µs.

The lower-right op amp is an inverting Schmitt trigger with thresholds at 1/3 and 2/3 of Vdd. It turns on the nFET when the voltage of the triangle wave has dropped below the lower threshold and turns it off again when the voltage has risen above the upper threshold.

The upper-right op amp is just a unity-gain buffer to isolate the output from the oscillator.

My first attempt at this design used larger resistors for R6=R7=R8 and a smaller capacitor, but it had problems when the nFET turned off—the voltage continued to rise for a little while. The problem was that the drain of the FET had to be charged through R6+R7 before the current through the capacitor was reversed, and this took too long. Shrinking the resistors made the capacitance on the drain of the FET much less important.

The oscillator design is the same as for the linear one, but the diodes provide an exponential current from the input voltage. The input unity-gain buffer is now important, as it provides current limiting to prevent damage to the diodes. To get double the current through the FET when it is turned on, the diodes are put in parallel on the lower leg (a series arrangement on the upper leg like for the resistors would **not** halve the current).

I tested both circuits and they seem to work ok, with duty cycles close to 50% for the square wave. There are slight high-frequency glitches at the peaks of the triangle wave, so it may be worth replacing the output unity-gain buffer with a 40kHz low pass filter.

I measured and plotted the frequency as a function of voltage for VCO with diodes:

The frequency scaling of the diode-based VCO could be changed by replacing the input unity-gain buffer with an amplifier with a different gain.