[sdiy] Idea for DCO

Tom Wiltshire tom at electricdruid.net
Sun Jul 13 01:01:30 CEST 2008


On 12 Jul 2008, at 01:18, Stewart Pye wrote:

> Hi,
>
> I've been thinking about attempting to build a VCO that has the  
> integrator capacitor reset by a microcontroller. For now lets  
> assume the VCO design is similar to the ASM1. It would still have  
> the expo converter, but it could be built using standard (cheap)  
> transistors and no tempco resistor. The expo converter is just  
> there to charge the integrator capacitor. The comparator would be  
> omitted as the discharge FET would be triggered by the  
> microcontroller. The linear CV would go into a 16 bit DAC and the  
> micro would calculate time period required for the reset pulse.
>
> There would be a timer interrupt keeping track of the capacitor  
> reset timing. In the background you sample the ADC, convert it to  
> the value needed to be loaded into the count register and keep  
> storing the value until it's time to reset the VCO. When it is time  
> to reset the VCO you take the timer reload value of the last sample  
> and put that into the count register. So the next cycle will have  
> its period determined by the last ADC sample taken.
>
> Has anybody tried something like this before? Am I missing any  
> obvious flaws in this scheme.

This is definitely doable. The Juno 106 is an example using a similar  
scheme, but with counter chips rather than uPs for the reset timing.  
The recent DSI Prophet 08 uses a dsPIC uP to generate timing pulses  
for 2 voices, or four oscillators.

The problems Magnus raises (microprocessor timing details and  
resolution of the CV ADC) are definitely issues that need to be  
considered, but in practice they won't prevent you coming up with a  
perfectly reasonable design. The Juno 106 used 16-bit counters for  
its reset timing, and it was able to provide pitch changes that are  
smooth across most of its range. By the time you use 32-bit counters  
on a dsPIC like the Prophet 08, you can forget problems of stepping  
or timing accuracy. There'll be no dirt there at all unless you put  
it in (hence the inclusion of an "oscillator slop" parameter on the  
Prophet).

The exponential conversion can take advantage of the fact that one  
octave is a factor of two, and the binary number system is base-2, so  
binary shifts allow simple multiplication by powers of two. This  
helps reduce the amount of memory needed for accurate exponential  
lookup tables. Errors from the table lookups can be reduced by linear  
interpolation between the values. Frequency accuracy to better than  
thousands of a Hertz are possible. This is still easily achieved on a  
fairly basic uP.

Regards,
Tom





More information about the Synth-diy mailing list