[sdiy] I2C DAC

ASSI Stromeko at nexgo.de
Tue Jun 22 22:41:16 CEST 2010


On Tuesday 22 June 2010, Bruce Duncan wrote:
> I've been looking into DACs lately with regards to Audio vs
> Control. From what I understand the main difference is that audio
> DACs have interpolation filters built in to reduce out-of-band
> spectra. They also oversample to place the frequency of the
> "image" that creates inverted copies of the signal into a region
> that makes it easier to filter down-line.

The quick, over-simplified rundown on DAC:

Almost all audio DAC these days are using a delta-sigma modulator at 
their core.  They achieve high resolution and good SNR in the audio 
band by re-producing a signal at much lower resolution and much higher 
frequency.  The noise created by that modulation process is shaped so 
that it appears predominantly at much higher frequencies than audio 
and is easy to filter.  Generally, delta-sigma modulators have 
mediocre DC accuracy that varies quite a bit over the output range 
(the end-of-range values are especially problematic and severe offset 
and gain errors are to be expected).  They can also have problems with 
so-called idle tones, these happen if the converter is asked to output 
a DC value.  Also, the time it takes to settle to some DC accuracy 
going from one code to another depends on both the distance and the 
magnitude of the codes.  You really don't want to ask an audio DAC to 
output 1.6384V because it never will, but you can easily ask it to 
output two sine waves of 1kHz+-200Hz with +-1.024V peak amplitude and 
an SFDR of >80dB.

Instrumentation DAC these days are most often resistor ladder DAC.  
This is quite literally a digital version of a potentiometer made of a 
chain of unit resistors and switches for every single code the 
converter can deliver.  This makes them more expensive at the same 
speed, but the DC accuracy is very good (the reference voltage 
determines a good deal of the accuracy).  Provided you follow the DAC 
with a good amplifier, settling time and and accuracy are much better 
than for an audio DAC and there are often facilities to null any 
residual gain and offset errors.  Going back to the example above, the 
instrumentation DAC will have no problem with the first task, but you 
may not like what it does on the two-tone test.

> Would I be correct in saying that these features are more important
> when playing back sampled material vs generating signals like a
> digital OSC? Oversampling a 12bit sine wave at x256 that is 48kHz
> and interpolating between steps and then outputting at the same
> sample rate 48K does not create any new data..or does it.

Sampled and generated material really are no different to a DAC.  
Again, think audio = correct spectrum and instrumentation = correct 
voltage (or current).  One thing that factors into the decision if you 
digitally generate waveforms: if you don't do the envelopes in the 
digital domain or use a multiplying DAC, you probably won't need much 
more than about 12-14bit resolution as you don't need any headroom for 
dynamics.

> Would the sound be any better using an audio DAC vs a voltage out
> control type dac given the same sample rate and bit depth?

Different.  Some instrumentation DAC (especially the older R2R) will 
exhibit switching noise on each code transition that will totally 
dominate the audio (they're not meant to be used without a sampling 
stage behind the DAC).  That said, some modern instrumentation DAC 
have really low glitch energies and probably beat an audio DAC from 
ten years ago in almost all respects except resolution (and even that 
can be done if you throw enough money at it).

> These are the questions I ask myself.
> 
> The main reason is that audio DACs nead an I2S or codec interface
> and that is a lot more difficult to find than a SPI port on many
> uC.

I²S can usually be rigged from an SPI hardware port unless there is 
really no way to toggle an output from an internal trigger condition 
on that particular uC.  But for what you want to do, I'd probably use 
a multiplying DAC with another DAC (or channel of the same DAC) 
providing the reference voltage for the multiplication.


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




More information about the Synth-diy mailing list