Jump to content

General DAC Questions/Tech Thread


The Monkey

Recommended Posts

Turns out some of you are pretty obsessive about DACs. Fortunately, there's a lot of knowledge here about these silly machines, so I figured a thread dedicated to general DAC technology and questions could be useful.

I envision questions/discussions about various chipses that our preciousss DACses use, ciruit design, implementation, etc.

Here are some that I have to get started:

1) What is meant by a "true" or "fully" balanced DAC, and what would be some of the sonic advantages?

2) What are some of the iconic (canonical?) DAC chipses? And what are their characteristics?

3) What is your favored topology and why?

4) What's with this whole I/V thing?

Link to comment
Share on other sites

  • Replies 255
  • Created
  • Last Reply

Top Posters In This Topic

1) Fully balanced means the internal circuit is also balanced, and not just that you have balanced output jacks. The benefit of a balanced internal circuit means that internal noise gets rejected, just like a balanced cable rejects any noise that shows up. The downside is you have to double your circuitry, which costs more.

2) Wikipedia has some DAC types listed, along with their characteristics. The most common ones you read about are R2R and Delta-Sigma.

4) I/V stands for current to voltage conversion. The reason this pops up is because a lot of DAC chips are output in terms of current. In other words, instead of representing peaks and valleys as +1V and -1V, they do so as +1A and -1A (those aren't real numbers, but you get the idea). But the output signal needs to be in terms of voltage, so you have to do the conversion. Thus the importance of doing the conversion well. The reason DAC chips like to output current is because you can get better results controlling current, and so your specs are better.

(This doesn't concern DACs directly, but perhaps it is interesting to you: Voltage vs. Current Mode Control Curent Sharing in a PolyPhase DC/DC Converter.)

Link to comment
Share on other sites

Hey Dinny. I found this a very interesting read over at Computer Audiophile. I don't think the author will mind it being reproduced here. I have simply snipped out all the crosstalk in the thread.

We'll start with a multi-bit, or ladder DAC. We'll ignore all oversampling and filtering discussions for a bit, so bear with me :)

To understand this, we'll go over a few basics: In digital audio, a simplified view, which will do for now, is that audio is represented by a series of samples, taken equally in time. For our example, we will consider an 8 bit DAC, and the sampling rate (the space between samples isn't very important ).

An 8 bit DAC means that is takes in an 8-bit number, which represents a value between 0 and 255 ( in our example ) - this DAC is just to explain the theory.
This works using something called binary:
Each bit is is a 1 or a 0, and where they are in the word corresponds to magnitude, as follows
 128 64 32 16 8 4 2 1. so to represent, say 7, we write
0 0 0 0 0 1 1 1 - this equals "4 + 2 + 1" = 7 
and to represent say 78 we write
0 1 0 0 1 1 1 0 - this equals "64 + 8 + 4 + 2" = 78.

Now, for our DAC, we can map this into resistors, each one half in value to the previous one, with the idea that all the resistors being "turned on" sum up to the maximum output voltage of our DAC. We also need some kind of strobe signal to "latch" the data into all the resistors at the same time, and hold it there until the next one is ready.

So, we have a system that maps beautifully onto the data being sent in, so what can go wrong?
 Well, the first (and most troublesome problem) we have is that those resistors have to be pretty tightly matched - they have to be exactly multiples of 2 with respect to each other, which we can just about do for 8 resistors - the one representing the 1st bit must be 128 times exactly bigger in voltage output than the smallest one.

However, now consider a 16 bit DAC - the smallest one here has to be exactly 32768 times smaller, and in a 24 bit one 8388608 times smaller (and the next one up be 4194304 smaller). In addition, these resistors will probably vary with time and temperature, and they won't vary in the same way (one resistor being thousands of times bigger than another one means they are pretty dissimilar physically).


So what does this mean in terms of the output?
The biggest problem as I've said, is that the sums no longer quite add up, and they will vary as the signal varies - so an incoming sample that is say 2 bigger than the last one will actually end up being 2 and a bit bigger, or 1 and a bit bigger. There are other, more subtle problems involved, but this is the fundamental problem, which we can measure as distortion - distortion is a separate entity from noise, being something directly related to the signal. Note, however, that we can vary the input as much as we like, and the output will change more or less instantly between samples, depending on slew rate...

------

OK, I'm back, and I see in my absence there has been some discussion, which is good!
 As Peter has correctly pointed out, my simple little DAC I have been describing is simple - this is for the purposes of letting everyone keep up, so there are other implementations, but the basic problems of multi-bit DACs remain true - no matter what you do, at some point the mismatches between resistors or current sources become an issue, and especially around specific transitions. I'll skip over the 2's complement discussion for the moment, but we can return to it later, because I'd like to give a brief overview of Delta-Sigma implementations. Again, we'll start with a conceptual DAC, and be aware that there are implementations that vary from this, but we may talk about them later, OK? We've still got quite a lot of stuff to get through...

OK, so the problems with multi-bit DACs are mainly linearity/distortion ones caused by mismatches in the values that sum to represent our sample. So how about we get rid of ALL mismatches, by only having one on it's ownsome - there is no possibility of one current source being different to itself, right? And, if you only have one, and it's not too important the precise value of it, you can save money on all that pesky laser trimming of resistors.

So how can this possibly work?
Well, the answer to this is to think of the current source being able to switch off and on very quickly, and by "averaging out" the time it's on and off, and looking at it over time, you will get a really surprisingly accurate representation of the sample.
 The way the DAC determines how much the current source should be on is done by a thing called a "modulator" - this does some quite serious maths, but the upshot of it is you feed in a sample, and out comes a pulse train that represents that sample over time.

The main thing a modulator does is "noise shaping", which is where the error you get from the output being 1 bit long is fed back through a filter and accumulated, and again, through the magic of maths, all of that noise gets shifted up very high in frequency ( the noise is bizarrely required for the averaging of the output to work - it helps to linearise the output ). 
How high a frequency?
 Well the first types of DACs to use this sort of technology (think bitstream) had the bitstream running at just over 11MHz.


Now the more astute amongst you may have noticed that this technology effectively moves the problems of the DAC away from being linearity (because the DAC is now intrinsically linear), and into the filtering of the noise, and how well we can represent the widths of the pulses.
 To give an example of how good the linearity is, Peters 0.0008% THD figure works out to be 101dB, or linear to about 17 bits, whereas there are delta-sigma designs quoted at 120dB or more. BUT notice how important the widths of the pulses are in our delta-sigma? Surely any jitter in the clock will make these pulses artificially long or short? The answer to that is, unfortunately, yes.

Additionally, now we definitely require filtering on the DAC output, the output can't change as quickly as the multi-bit DAC. I'll follow this point up later, as it turns out this doesn't matter :) take my word for it at the moment, we'll come to it! So, for a brief summation as to the pros and cons of each technology (at it's most basic).


Multi-Bit -- 
Pros: Less sensitive to jitter than delta-sigma, 
"easy to build" in digital processing terms, no HF noise additions
. Cons: 
Inherent linearity problems in general, real problem with zero-crossing
, very hard to match
, likely to vary in performance with temperature
, expensive.

Delta-Sigma -- 
Pros: 
Inherently very linear
, can be very quiet, 
can get excellent performance at low cost
, very likely to be more stable
. Cons: 
Harder in processing terms
, guaranteed more HF noise
, more susceptible to jitter
, can be susceptible to idle tones.

------

Right, as Peter would like me to elaborate more on WHY a delta-sigma needs to operate at such high rates:
 If you imagine that your pulse width was the same speed as the sample, then your new super awesome DAC would have a S/N ratio of 6dB. Oops!
 So, as I was trying to say earlier, the job of the modulator is to noise shape the data. Due to some clever maths, it redistributes the noise in a much higher bandwidth, such that it's much higher in frequency than any possible audio content, but in-band it's super low. The efficiency of this can be measured by a modern delta-sigma DAC (like the Sabre, as mentioned by Peter).

Now the way that the noise is "shaped" comes into play here. DSD (as used on SACD), which is basically using delta-sigma as a medium, runs at 2.8224MHz, 1 bit ( which is much slower than the 11MHz rate I mentioned earlier). This is problematic, as there is less spectrum to spread the noise over, so the noise rises very sharply above 20kHz.

And secondly, (and I'll cover this when I get round to writing about filtering), sine waves are excellent test waveforms because:
 They have no impulses - so we can guarantee that in our measurements, it doesn't really matter where we start or stop. 
They are spectrally pure - ALL of the energy in a sinewave is contained in the fundamental
. We can recreate what they should be mathematically, perfectly.
 And lastly, thanks to the work of Fourier, Nyquist, and Shannon, we know that for a band-limited signal, we can reproduce it EXACTLY by combining sine waves (of different frequency, amplitude and phase).

------

Righty-ho, I'm back, with a bit about filtering, why it's needed, how some people do it, and (hopefully) a super-duper google spreadsheet to illustrate some points!

So, we know that in digital audio, we sample the audio at a frequent, consistent rate (say 44100 times a second). We note the value of the sample, store it, and when we want to play it back, we feed the same data into our hypothetical DAC (imagine our simple 8 bit DAC from earlier) at the same speed. Voila! We get back our original waveform! Or... do we?

Most people think that if you sample a 20kHz sinewave at 44100, you get a triangle shaped waveform out, because there are only 2 samples per cycle, right? I've linked to a Google spreadsheet that (theoretically) anyone can open - go to the bottom and press "Edit" to begin the fun and games - it will plot data that represents a sine wave sampled at 44.1k.

Sinewave

IF something has happened, you will see a spreadsheet with a graph on it. Go to the bottom and press "Edit". There should be a frequency box that you can change. If you type in say 1000 into the box, you will see a nice sinusoid type of thing. Brilliant!
 Now, try say 6000, 20000, 24100, and finally 43100.

Let me know if this works, and what you think,

------

Thanks Clay, now this is where I can start to explain what is actually happening with sampling. I'm desperately trying to avoid the maths, so here we go:
The spreadsheet isn't quite what happens with a NOS filterless DAC, but it is close! Every DAC will have the ability to hold the output between samples ( so the graph will have flat bits between samples, and only change on sample transitions ).

What you are seeing here is imaging. The act of sampling something means that you are linking it forever and ever with the clock that is doing the sampling. The fascinating thing is that the set of samples you create can represent the thing you want to sample, but also it's mirror in frequency around the clock you sampled it at, and that mirror. 
Whenever you sample, each point can represent a point on an infinite spectrum, mirrored around the sample clock.
 So, in our example, we put in 1000Hz - what happens is that you also create tones at 43100Hz, 45100Hz, 87200Hz, etc. etc. which are basically all mixed together.

Now because of the scale of the graph, these higher frequency components are invisible compared to the tone we have sampled.
 When we put in 20000Hz, we also get a tone (of the same size) at 24100Hz. Because they are relatively close in frequency, we start to get horrible beating between them.

So, does this mean that all digital audio is broken? Well, this is where filters come in. If you experiment in the spreadsheet, you will see that as the frequency you type goes over 22050, the frequency of the sinusoid appears to come down - this is aliasing. Any frequency over the sample rate over 2 will "fold" back over Fs/2, so if you just use a filter to ensure that nothing over Fs/2 gets into the ADC, you can avoid this.


So, how can the DAC avoid recreating all of these infinite high frequency tones? Well, if it knows that the original ADC had a filter around Fs/2, it therefore knows that there cannot be anything to reproduce above Fs/2. And this is where the anti-imaging or reconstruction filter comes in ( which can be done digitally, or in analogue). I'll let people think about what this means,

EDIT: it occurs to be people may get hung up on the spreadsheet - it's very simple, and if you were to put the resulting data through a properly filtered DAC, you would get out perfect sinewaves (for frequencies up to 20k or so). /EDIT

------

Peter, thanks for trying it again. The most obvious analogy as to what is going on is filming a car wheel. If the car is going slowly, the film shows the wheel spinning in the right direction. As the car speeds up, at some point the camera takes a photo at the same point of the wheel revolution every frame ( so the wheel seems to stop ), and then, as the car accelerates still further, the wheel appears to go backwards.... so in sampling, you start sampling multiples of sine waves...

So, how does filtering help here? Let's imagine a 10kHz sine wave. Now we know that the unfiltered output from our DAC will have the genuine 10k tone, plus "images" at 34.1k, 54.1k and so on. If we perform filtering, so that we guarantee the output has no images, we are left with the fundamental, perfect 10k tone and nothing else.

So how do we do this filtering?
In the early days of digital audio, this was done using an analogue filter - this was tricky, because at 44.1k, you want to have as little attenuation as possible at 20k ( the top limit of hearing ), and as much attenuation as possible as quickly after that.
 Then it was worked out you could do the majority of filtering digitally, by oversampling. That is, we take in 44.1k and output something higher in sample rate but filtered, to allow the analogue filtering to have much less work to do.


Here is another chart, this time showing a 10kHz sine wave, and the same data oversampled by 4x using a butterworth IIR filter.

iir

The code for generating this data is at the bottom of this post, and the butterworth code was taken from:
Butterworth / Bessel / Chebyshev Filters

The IIR is not fantastic, but shows the concept, I think!

NB: in the above example, the DAC is converting at 176.4k, so the analogue filter would typically start rolling off at 88.2k. 
NB2 I would show 20k, but the IIR filter I've demonstrated is not fast enough. The concept, though remains absolutely correct, PROVIDING you can get a filter that is sharp enough

(code snipped)

------

Right. Having seemingly scared some people on the forum with my scary graphs and whatnot, some people may be saying: "But I've got a NOS, filterless DAC and it sounds great!"
 Well, in this case, we have to consider that everything I've said involves why we need a filter, and what happens without it.
 Now consider this. The human auditory system does not have infinite bandwidth! So, NOS DACs can work because your amplifier, and speakers and ears will not have infinite bandwidth - can you hear the alias at 43.1kHz? No!

Unfortunately, you will have all this HF stuff that is bizarrely related to the signal, in places where the designers of your amp and speakers are definitely not expecting it. This will make a filterless DAC extremely sensitive to other things in your system (including you!), and the characteristics of the source material. Additionally (and bizarrely) a properly implemented filtered DAC will have a less droopy output in frequency response terms.

So, there, in a nutshell, is why I think filterless DACs are not for everyone.

Link to comment
Share on other sites

1) What is meant by a "true" or "fully" balanced DAC, and what would be some of the sonic advantages?

I'm not sure NekoAudio's post is detailed enough for you, and Hopstretch's post probably too detailed, so I'll take my own stab at this one (can't speak to the other questions). Fully balanced means the DAC (unit) has at least 2 "logical" DACs (ICs) per channel to create differential output - L+, L-, R+, R- (each "minus" referring to inverted phases of Left or Right). A DAC (unit) that is not balanced won't have these two logical DACs (ICs) and will phase-invert in the analog output stage instead of starting at the D/A conversion process. Most DACs (ICs) are stereo making it possible to get away with only 1 DAC (IC) in each channel (for the manufacturer cheapskates), but more ideal is more DACs (ICs) in each channel to lower noise/distortion/etc. Some DACs (ICs) are mono-channel, which means there needs to be 4 of them (at minimum) to achieve a differential output. The PCM1704, for example, is a mono-channel DAC, so for a DAC to be fully balanced with it, 4 of them need to be in use (2 per channel). And to kinda answer your second question, the PCM1704 is one of the well-regarded DACs.

Link to comment
Share on other sites

So here's a newbie question: how does output stage factor into being "fully balanced" with regards to fully differential (or is it fully discrete?) and using op amps?

Hopefully I used the right terms and the question makes sense.

By the way, great thread idea Monkey.

Link to comment
Share on other sites

It does make (sense) but with a bit of a cut...

how does output stage factor into being "fully balanced" with regards to fully differential?

You can have a "balanced output" DAC chip, that is with -L, +L, -R and +R signals at its output, and a single ended output stage.

Example: Benchmark DAC, chip AD1853 with differential (balanced) outs, goes into single L and R signals. Afterwards, a couple of opamps create the inverted signal from this "hot" single ended signals for the XLR outputs. Is what we call "not true or real balanced" DAC (source component, not the DAC chip itself). So if you have a Benchmark DAC, the "purest" way to hear it is using its RCA outs.

(or is it fully discrete?) and using op amps?

This relates to the hardware used for the output stage, does not matter if it is balanced or not. An opamp has lots of microscopic components inside, while a discrete out just has the components you can see on the pcb. It is agreed that the complexity of the opamps, and their "multipurpose" design, is worse than a well done and more simple discrete purpose circuit.

Example: most DACs use opamps on part or all of their output stages, while units as the Pass Labs D1 uses a discrete and very simple stage with just two mosfet and some resistors on the signal path.

Our catlover friend (Neko) will probably agree that DACs as its own design are discrete-passive: it uses transformers to convert the output from the DAC chip to a line signal.

Regarding I/V: some DAC chips are able to output a voltage signal as well, but they measure (much) better if configured to output intensity.

Example: Sabre chips on Buffalo DACs.

Link to comment
Share on other sites

It is agreed that the complexity of the opamps, and their "multipurpose" design, is worse than a well done and more simple discrete purpose circuit.

Our catlover friend (Neko) will probably agree that DACs as its own design are discrete-passive: it uses transformers to convert the output from the DAC chip to a line signal.

Well, some will argue modern op-amps can do an extremely good job and would consider them a comparable choice to discrete implementations.

My opinion in this specific case is pretty obvious, as Azazel says, but I'm totally in agreement with him where sometimes active or complex gives you better results than passive or simple. I am using an active pre-amp at the moment (although I have some uncooked ideas for an active pre-amp design).

Here's an interesting publication: opamp_distortion.pdf. (Hopefully that link is right--it's being super slow to download so I can't check it at the moment. I could email it to anyone if they want; it's about 30MB.)

I still don't believe sine and sweep measurements are good enough to capture the performance of analog audio output circuits though. :)

Link to comment
Share on other sites

My opinion in this specific case is pretty obvious, as Azazel says, but I'm totally in agreement with him where sometimes active or complex gives you better results than passive or simple. I am using an active pre-amp at the moment (although I have some uncooked ideas for an active pre-amp design).

Yep. I have still to find a better preamp (or a unit whose performance I like more) than my passive S&B unit (Music First, Bent Audio). However passive/transformer "fan" I am, I preferred the sound of my Buffalo DAC using its IVY active output stage better than a passive one (Lundahl trafos).

As for DAC chips in particular... yes I too have liking for the classic BBs (pcm63, pcm1702 and 1704), and the latest ESS Sabre are great flavour of the season, but it is clear to me that is much more important how the maker/designer "cooks" than the ingredients they use. Good PSU, good pcb design, good digital front-end design, and last but no least digital filtering and signal manipulation.

Link to comment
Share on other sites

Finally taking the plunge into this murky arena so this thread is well appreciated. I have a lot of reading to do to catch up as I have ignored dacs for the most part. My previous player used the PCM56 which is common garden but had a very natural sound. The "new" dac is PCM1702 and sounds detailed and natural thus far.

I may just ended up starting one on modding dacs to complement this thread as this is where I will be heading.

..dB

Link to comment
Share on other sites

Here's another general question. Do you think that some DACs are inherently better suited to headphone listening than to speaker listening and vice-versa?

In my experience, listening with headphones tends to bring everything closer to you.

Personally I prefer to pair my HD800 with a DAC with a fairly even distribution of the various frequencies in order to be able to accurately follow each instrument in the recording. An example would be my own Weiss DAC1-MK2.

However, when I A/B'ed the Weiss and an Audio Note DAC 3.x Signature in a high-end speaker rig the Weiss made me feel a bit more distanced from the sound, because it didn't highlight anything in particular in the recording. The Audio Note on the other hand brought out the midrange which gave that upfront and personal feeling that makes your foot tap.

This is not to say that the Weiss didn't do this, only that the Audio Note enhanced the foot-tapping experience. I still believe that the Weiss was the most true-to-the-recording DAC of the two, but the Audio Note was arguably the most musical and fun.

Link to comment
Share on other sites

  • 2 weeks later...
Is it bad to take the balanced out of a DAC and plug it into the unbalanced input of an amp, say with XLR-to-RCA ICs?

Assuming the balanced output stage of the DAC is the better one that's how I would do it. It is worth checking how each output is developed, for example on the Hertsens the SE output is essentially just half the XLR output (the in phase portion) so there should be no difference between taking the SE output from the RCA jacks or using XLR to RCA cables. But some DAC's have a great balanced output stage but then run that signal through add'l circuitry to create the SE output. In that case I'd probably use XLR to RCA cables.

Link to comment
Share on other sites

You have to check to make sure. Most XLR to RCA ICs short two of the pins and it is possible if the output stage is not designed for this then output will have issues and possible damage. :eek:

If you custom make your cable without the pins shorted though I can't see any issues. :cool:

Actually most pro gear that I've used automatically senses the short and bumps the gain on the in phase signal by 6db which is pretty cool. :cool:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.