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 shows 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.
In Part 1, we saw how to make an oscillator whose pitch, as opposed to frequency, can be made proportional to a control voltage. In this second part, we’ll look at some alternative ways of arranging things for other possible applications.
Wow the engineering world with your unique design: Design Ideas Submission Guide
To start with, Figure 1 shows a revised version of the basic circuit, built with B-series CMOS to allow rail voltages of up to 18 or 20 V rather than the nominal 5 V of the original.
Figure 1 A variant on Part 1’s Figure 2, allowing operation with a supply of up to 20 V.
Apart from U2’s change from a 74HC74 to a CD/HEF4013B, the main difference is in U1. With a 12 V rail, TL062/072/082s and even LM358s and MC1458s all worked well, as did an LM393 comparator with an output pull-up resistor. The control voltage’s span increases with supply voltage, but remains at ~±20% of Vs. Note that because we’re only sensing within that central portion, the restricted input ranges of those devices was not a problem.
Something that was a problem, even with the original 5-V MCP6002, was a frequent inability to begin oscillating. Unlike the 74HC74, a 4013 has active-high R and S inputs, so U1a’s polarity must be flipped. It tends to start up with its output high, which effectively locks U2a into an all-1s condition, forcing Q1 permanently on. That explains the need for R5/C5/Q2. If (when!) the sticky condition occurs, Q2 will turn on, shorting C2 so that Q1 can turn off and oscillation commence. A reverse diode across R5 proved unnecessary at the low frequencies involved.
This could also be built using the extra constant-current sink, shown in Part 1’s Figure 4, but then U1 would need to have rail-to-rail inputs.
A version that lacks any logic
This is an extension of the first version that I tried, which was built without logic ICs. It’s neat and works, but U1a could only output pulses, which needed stretching to be useful. (Using a flip-flop guaranteed the duty cycle, while the spare section, used as a monostable, generated much better-defined reset pulses.) The circuit shown in Figure 2 works around this and can be built for pretty much any rail voltage you choose, as long as U1 and the MOSFETS are chosen appropriately.
Figure 2 This all-discrete version (apart from the op-amps) uses a second section to produce an output having a duty cycle close to 50%.
U1b’s circuitry is a duplicate of U1a’s but with half the time-constant. It’s reset in the same way and its control voltage is the same, so its output pulses have half the width of a full cycle, giving a square wave (or nearly so). Ideally, Q1 and Q3 should be matched, with C3 exactly half of C1 rather than the practical 47n shown. R7 is only necessary if the rail voltage exceeds the gate-source limits for Q1/3. (ZVP3306As are rated at 20 V max.)
Purity comes from overclocking a twisted ring
The final variation—see Figure 3—goes back to using logic and has a reasonably sinusoidal output, should you need that.
Figure 3 Here the oscillator runs 16 times faster than the output frequency. Dividing the pulse rate down using a twisted-ring counter with resistors on its 8 outputs gives a stepped approximation to a sine wave.
The oscillator itself runs at 16 times the output frequency. The pulse-generating monostable multivibrator (MSMV) now uses a pair of cross-coupled gates, and not only feeds Q1 but also clocks an 8-bit shift register (implemented here as two 4-bit ones), whose final output is inverted and fed back to its D input. That’s known as a twisted-ring or Johnson counter and is a sort of digital Möbius band. As the signal is shifted past each Q output, it has 8 high bits followed by 8 low ones, repeated indefinitely. U2c not only performs the inversion but also delivers a brief, solid high to U3a’s D input at start-up to initialize the register.
U2 and U3 are shown as high-voltage CMOS parts to allow for operation at much more than 5 V. Again, U1 would then need changing, perhaps to a rail-to-rail input (RRI) part if the extra current source is added. 74HC132s and 74HC4015s (or ’HC164s) work fine at ~5 V.
The Q outputs feed a common point through resistors selected to give an output which, though stepped, is close to a sine wave, as Figure 4 should make clear. R4 sets the output level and C4 provides some filtering. (Different sets of resistors can give different tone colors. For example, if they are all equal, the output (if stepped) will be a good triangle wave.)
Figure 4 Waveforms illustrating the operation of Figure 3’s circuit when it’s delivering ~500 Hz.
The steps correspond to the 15th and 17th harmonics, which, though somewhat filtered by C4/R4, are still at ~-45 dB. To reduce them, add a simple two-pole Sallen–Key filter, like that in Figure 5, which also shows the filtered spectrum for an output of around 500 Hz.
Figure 5 A suitable output filter for adding to Figure 3, and the resulting spectrum.
The 2nd and 3rd harmonics are still at around -60 dB, but the others are now well below -70 dB, so we can claim around -57 dB or 0.16% THD, which will be worse at 250 Hz and better at 2 kHz. This approach won’t work too well if you want the full 4–5-octave span (extra current sink) unless the filter is made tunable: perhaps a couple of resistive opto-isolators combined with R14/15, driven by another voltage-controlled current source?
All that is interesting, but rather pointless. After all, the main purpose of this design idea was to make useful audible tones, not precision sine waves, which sound boring anyway. But a secondary purpose should be to push things as far as possible, while having fun experimenting!
A musical coda
Given a pitch-linear tone source, it seemed silly not to try make some kind of musical thingy using a tappable linear resistance. A couple of feet, or about 10kΩ’s-worth, of Teledeltos chart paper (which I always knew would come in handy, as the saying goes) wrapped round a length of plastic pipe with a smooth, shiny croc clip for the tap or slider (plus a 330k pull-down) worked quite well, allowing tunes to be picked out as on a Stylophone or an air guitar. Electro-punk lives! Though it’s not so much “Eat your heart out, Jimi Hendrix” as “Get those earplugs in”.
—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
- A pitch-linear VCO, part 1: Getting it going
- 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 2: taking it further appeared first on EDN.