@GK.. re.. the AD639.. I never worked with it before but I would sure like to play.
If anyone has a spare one just lying about ... send it over
There's a nice 1Hz - 1Mhz sine wave generator in Linear Technology Application Note 47, page 53, by Jim Williams.
It has a VCO input from 0-10V, with 0.25% linearity and 0.4% distortion ..
The AD639 needs a low distortion triangle wave. Any distortion or non-linearities or differences in ramp-up vs ramp-down times manifest as various distortions in the output sine or cosine waves. The app note has a nice explanation of how he generates a low distortion triangle wave. Basically an integrator with a comparator on the output fed back to the input to control a JFET which switches the control voltage onto the integrator's input for charging and off for discharging. He uses a ±15V level shifter at the output of the comparator to turn the JFET hard on and hard off so it switches fast and clean at the 0V transition. The charging current in and out of the summing node of the integrator is tightly controlled, and 2 additional JFETs provide temperature stability.
There's an interesting diode bridge that provides a bipolar reference to the comparator in opposition to the comparator's output, so that it can integrate up or de-integrate down. My first thought for this would be to use an analog switch to switch between positive and negative references, but one soon realizes they are too slow, and can only switch between 40-60ns. This would limit the frequency and introduce distortion at the crossover point. Maybe there are faster switches, but I didn't look very hard, and they will certainly get more costly. The 60ns SPDT switches are over $1.00. However, the switching diodes he used , IN4148, are cheap and fast, 4ns or better. It's a great use for a diode bridge that I'll have to remember for the future!
The side effect of the triangle wave and comparator output is that you can also pull a triangle and square wave from it too.
This VCO is interesting in that it's a low cost analog solution and its just fun to explore the way it used to be done
DDFS offers a much wider range, is much more versatile and way more agile, and can achieve equal or better linearity and THD.