I'm working on a hybrid analog/digital oscillator, based on an AVR microcontroller (ATtiny 84) for computing the pitch and a classic sawtooth core for generating the waveform.

It's starting to take a good shape, I have posted some schematics and I will probably shoot a video of the live sawtooth when I'm finished working on the prototype.

(calculation for the sawtooth core in EveryCircuit)

Here is the history:

About a year ago, when I was working for Arturia with Yves Usson (Yusynth) on the MiniBrute prototype, he taught me a lot of things about his sawtooth core VCO and the Lin/Exp converter, on how to compensate the temperature drift and how to tune it to have a good tracking over 10 octaves.

Immediately, I started imagining something bigger, a polyphonic 8 voice synth, but that would still need to be retuned from time to time (all the full analog polys have this problem).

As more recent polys use DCOs, I read Tom Wiltshire's explanation of the Juno DCO operation, with a master clock and dividers. It seemed the way to go, but the technologies used are a bit outdated, with the Arduinos/FPGAs/other cool digital stuff widely available these days.

So a few points came to my mind to make a better DCO. It had to be:

ANALOG! (well, at least the generated waveform, no DAC to generate it).

ready to use as soon as it is powered up, no warm-up time.

completely independent from ambient temperature changes.

precise in frequency.

capable of generating not only semitones, but also all the cents in between two semitones (continuous range).

easily controllable from a microcontroller (digital control).

compatible with a 1V/Oct input CV (analog control).

range covering (at least) all the MIDI notes.

Here is how it works:

The idea is to replace the clock divider from the Juno DCO by an independent microcontroller (no master clock needed, hence no phase problem across oscillators). Most AVRs have a 16 bit timer that performs like a charm for this purpose. It generates the reset pulse for the integrating capacitor generating the saw.

Unlike a VCO, that uses the slope (driven by the lin/exp converter) to determine the frequency, the operation is reversed: the frequency is defined by the reset pulse, and the slope needs adjusting to provide constant output level.

So the chip provides another signal, an analog one (using PWM) to set up the slope for output level compensation.

To control the pitch, I wanted both an analog and digital interface (hence the name Mixed Control). This way the synth's master controller can precisely ask the oscillators for a static note while analog modulation can be supplied from LFOs/EGs.

The SPI interface used for programming the chip is handling digital control, and it only needs 3 + N wires (where N is the number of oscillators to control). I could have used I2C, but an addressing system would not have been as easy to put together (and it might have been slower).

The AVRs all have a 10 bit ADC, that is used for analog modulation, as the pitch is computed in the chip (whereas in the Juno, it had to be the master controller to compute the pitch for each oscillator).

@yusynth: Yes, you'll be one of the first to hear it when it's done (Potard already had a snapshot of the uncompensated saw).

Maybe I'm not going to bother with a lin/exp converter for the slope compensation after all. This is tricky to set up, and it might be enough to roughly output a PWM signal with an exponential response directly on the 8 bit DAC (it would cover 120 notes over the 128 of MIDI, and would be more precise on the high end). I have to try to see how it goes.

@Tim: Yeah, that's the idea! Basically, this could be used in a modern synth (ie: microcontroller-controlled), without much effort (DAC calibration and tuning).

The Sawtooth waveform I've got is not perfect yet, there are still some non-linearities at the end of the discharge (meaning the slope is "too long"), but it actually sounds nice on a saw! Pity it would mis-shape the other waveforms though.. With most VCOs, you can directly do maths operations of the curves, since they are almost perfectly generated (amplitude and shape). But then I guess that's the difference between how you want it to sound and what you want to do with it.

I have some other (older) projects to finish these days, but I'll be back on this soon. I'll keep you guys posted _________________Forty Seven Effects

Indeed, with 10 bit resolution on the analog input I have to sacrifice precision if I want to have the whole range available, or I can choose to scan only a smaller section around the digitally set frequency for analog modulation, with higher precision.

This part still requires some work, I've seen techniques on the Atmel application notes to oversample the ADC to achieve 16 bit resolution, which would be quite better.

I also have some FM noise when I sample a simple pot between 0 and the chip's 5V supply, but maybe with an external "clean" CV it might be better._________________Forty Seven Effects

Using 16X oversampling, you can squeeze 12-bit resolution out of the ADC circuit on an ATMega/Tiny and still end up with a sampling rate of around 500Hz (doesn't sound high, but it's more than adequate for sampling a cv input).

Going beyond 12 bits just isn't worth it -- each bit will require 4X the oversampling.

The SPI interface used for programming the chip is handling digital control, and it only needs 3 + N wires (where N is the number of oscillators to control). I could have used I2C, but an addressing system would not have been as easy to put together (and it might have been slower).

Neat project Franky!

Why do you think the I2C addressing would have been a problem?
I agree the bandwidth may be too slow though._________________Free Tibet. Release the Panchen Lama from prison. Let the Dalai Lama return to his home.

Well the i2c would have required a way to setup the addresses for each oscillator, which is usually done with IO pins, and there are not a lot available (although the SPI originally uses more pins, setting 8 MCOs would have needed 3 dedicated address pins). And it's slower.

Plus, with SPI, I can have two (or more) oscillators listening to the same message (eg: I can set the global detune for all MCOs with only one message), as this is handled by a Listening pin that can be toggled on/off independently for each MCO._________________Forty Seven Effects

I changed the structure of the Saw generator, it's now using an OpAmp integrator instead of a transistor as a current source, much more predictable, stable etc..

The structure is almost the same as the Juno's DCO, for what can be decrypted from the service manual (as the sawtooth generator is potted into the MC5534 voice chip). By the way, I never found a schematic for this chip, I've seen clones pictures with a few transistors and what could be opamps, do you guys know if such a thing is available?

Now that the saw is looking good, I'm working on the amplitude compensation. This is done by sending more voltage to the input of the integrator when the frequency increases, with an exponential response (freq * 2 => amplitude * 2).

To minimise the number of components used in the process, I'm using the AVR to compute the exponential response.
There should be no drift at all this way, apart from the capacitor's own thermal drift. I guess this can also be minimised with a good material for the cap, but so far this is less of my concern than getting a clean output across all range.

The PWM controlling the amount of slope to inject to the saw is only 8 bit, so to properly cover the whole 10 octave range I'll have to split it in two, and increase the integrator's resistance above the middle of the range.

I'll post a draft of the schematic soon, when I cleaned it up according to the latest experiments._________________Forty Seven Effects

You could use the same approach I did when designing the MeeBlip. I sent a 16-bit word into two weighted 8-bit DAC channels - one channel as high byte, one as low byte. It works surprisingly well.

Here's a fragment of a circuit that I have been working on. It is a digitally controlled VCO which outputs triangle and variable pulse. An ATMega is used to generate the slope of the waveform using 2 summed PWM channels and the SYNC pulses.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum

Please support our site. If you click through and buy from our affiliate partners, we earn a small commission.