The pages of Design Ideas (DIs) have recently been awash in a veritable cascade of designs for variable frequency oscillators with frequency ranges tunable over multiple decades:
- Self-oscillating sawtooth generator spans 5 decades of frequencies (Ref. 1)
- 555 VCO revisited (Ref. 2)
- 5 octave linear(ish)-in-pitch power VCO (Ref. 3)
- Tune 555 frequency over 4 decades (Ref. 4)
- Wide-range tunable RC Schmitt trigger oscillator (Ref. 5)
But despite the size of this crowd, a notable feature missing from all is provision for digital control (e.g., from an MCU GPIO pin) of the oscillation frequency. This DI will address that topic.
When starting the design of any digital to analog interface, the first question to be answered is how much resolution (bits) do we need? For the applications listed above, the answer isn’t obvious. That’s because of the extremely wide range of the analog quantity (frequency) involved, e.g., 100,000:1 for Christopher Paul’s 5-decade 10 Hz to 1 MHz sawtooth generator (Ref. 1).
5 decimal decades = 10 ppm and is equivalent to a linear binary resolution of 16.6 bits. So even if we went with the overkill choice of 16 bits (1/65536 = 15 ppm), we’d still lose resolution at the bottom end. The first least significant bit (lsbit) increment up from 10 Hz would comprise a 15 ppm of 1 MHz = 15 Hz jump to 25 Hz, nearly trebling the output frequency.
Figure 1’s circuit takes an approach very different from linear conversion. Working from mere 8 bit PWM, it makes LSBit incremental resolution constant and uniformly distributed at ~5% of output. Here’s how it works.
![]() |
|
| Figure 1. | Antilogarithmic 8-bit PWM gives s constant incremental ~5% per lsbit. Asterisked parts are 1% or better precision (metal film or C0G). |
Antilog conversion occurs in a four step ~1 ms cycle defined by the combined states of the GPIO PWM bit and D flip/flop decoded by the 4052 analog switch as shown in Figure 2.
![]() |
|
| Figure 2. | TW = antilog RTCT timeout = 1 to 250 counts = 2 to 500 µs, where PWM – see figure. |
The antilog conversion sequence is as follows:
- BA = 3: duration 12 µs. Timing capacitor CT charged to VDD – 1.24 V.
- BA = 2: duration TW = 2 µs to 500 µs. CT exponentially discharged toward VDD with time-constant RTCT = 43.4 µs.
- BA = 1: duration 0 to 498 µs. CT residual charge transferred to CSH sample and hold cap.
- BA = 0: duration 2 µs to 500 µs. CT residual charge continues to transfer to CSH.
At the end of each 4-step, 1024-µs cycle, CSH will converge toward a charge relative to VDD between 12 µV and 1.2 V, determined by the antilog of the 2 µs to 500 µs duration of phase 2 of the conversion sequence. The 1-µV typical input offset of the LT2066 makes this adequate for (reasonably) accurate digital to analog conversion. Convergence of VCsh to 8-bit precision takes a maximum of 8 cycles = 8.2 ms.
Final conversion of the resulting 5-decade current source to a 5-decade frequency output (the point of the exercise) can be done simply (if admittedly kind of crudely) with the circuit in Figure 3.
![]() |
|
| Figure 3. | A minimal 5-decade sawtooth oscillator that enables final conversion of the resulting 5-decade current source to a 5-decade frequency output. |
Or it can be done much more precisely with Christopher Paul’s DI by substituting Figure 1 for his original resistor-programmed current source (highlighted in yellow), as shown in Figure 4.
![]() |
|
| Figure 4. | Maximal 5-decade sawtooth oscillator, using Christopher Paul’s DI (Ref. 1). |
The plot of source current versus PWM are shown in Figure 5.
![]() |
|
| Figure 5. | Log (red) and linear (black) plot of source current versus PWM. |
References
- Paul, Christopher. "Self-oscillating sawtooth generator spans 5 decades of frequencies."
- Schüler, Uwe. "555 VCO revisited."
- Woodward, Stephen. "5 octave linear(ish)-in-pitch power VCO."
- Woodward, Stephen. "Tune 555 frequency over 4 decades."
- Schüler, Uwe. "Wide-range tunable RC Schmitt trigger oscillator."




