Designing a Headphone Amp (with DAC) from scratch
Oct 28, 2008 at 8:28 PM Thread Starter Post #1 of 10

Ruediger Britzen

New Head-Fier
Joined
Oct 28, 2008
Posts
4
Likes
0
Hi there everybody,

although this is my first posting here, I have been reading this forum quite intensively trying to absorb all the information on the presented DIY-projects... :) Great jobs, fellows!

As my Beyerdynamic DT880 doesn't sound that great on an AV-receiver (well, as expected) I made up my mind (as many of you already did) on building a dedicated headphone amp with multiple inputs (USB, SPDIF optical, SPDIF RCA and analog). I spent the last two weeks on reading datasheets and searching the web for reference designs that I could possibly melt together according to my idea.

So far I have come up with a block schematic (and already some EAGLE schematics) on which I'd appreciate to get some feedback of you. The concept is quite similar to the Jambo DAC despite the fact that I added an analog stage based on an input stage with 2 TI OPA1632s, an A/D converter PCM4202 and a SPDIF transmitter DIT4192 and changed the signal path after the WMM8805. The Wolfson WM8805 will handle the clock regeneration and signal distribution. The Wolfson's output is planned to be an I2S-data stream that will be upsampled to 96 kHz/24 Bit using the SRC4192. After the SRC4192 the DA conversion is done by the PCM1796 and the signal is then finally amplified using the dedicated headphone amplifier TDA6120.

Control and status monitoring will be done by an ATmega16A using the I2C-interfaces (as far as applicable) and/or the discrete lines of the different ICs. Signal attenuation is done within the PCM1796.

http://ruediger-britzen.homepage.t-o...ith_WM8805.pdf

As master clock I intend to use the TentLabs XO. For the different voltages needed (+5V analog, +3,3V digital and +-15V analog) I'm thinking of using three independent power supplies from AMB laboratories (2 sigma11s and 1 sigma22).

Any comments? Thanks in advance!

Ruediger
 
Oct 28, 2008 at 8:41 PM Post #2 of 10
Are you gonna do all the DIY soldering and such?
What kinda budget do you have?
Do you wanna just get your toes wet, waist deep or over your head?
You want it to sound good, spooky, or unreal freaky?
 
Oct 28, 2008 at 10:08 PM Post #3 of 10
I cant think of anything much worse than converting your analog input to digital and SPDIF at that, just to convert it back to analog again
 
Oct 29, 2008 at 3:16 AM Post #5 of 10
I've had a similar project in the works for months now. It always gets backburnered because it's huge and unruly, but I've got about as far as you with it. I'm planning an all-in-one preamp/DAC/headamp. I wouldn't call myself an audiophile, I do this mostly for the fun of it and to say 'I made that!', but it should sound good anyway
wink.gif
.

The block diagram is on my whiteboard so I'll try to describe to you what I've planned, you may find it useful.

The basic design is to switch analog inputs using a relay-based selector, and to consider the multiple digital inputs as a single analog input. The internal DAC connects to one of the inputs of the relay switch, as do the external analog inputs. The analog signal then goes into a current buffer stage and is then split off to three PGA2320 volume controls. These are the only SPI parts in the whole shebang, and I've already written the code to control them for another project. Two independently controlled pre outs (design is to allow the preamp to control both an external power amp and external headphone amp) and the third to an internal headphone amp/current buffer.

The DAC will use WM8741 and WM8805. I haven't decided if I want to do ASRC, but if I choose to use it I'll probably go with SRC4192. It's a bit tricky to control and to solder though so it might get axed, personally I don't think ASRC is critical. I will use the WM8805's input mux to select between a couple optical/coax inputs. Before the WM8741 will be some kind of 2:1 mux (possibly simple FET-based switches, or relays) as an I2S switch between the WM8805 and the PCM2707 used for USB input.

These muxes will be driven by an MCP23008/MCP23016 I2C I/O expander, maybe with a simple 74 series address decoder to simplify the interface. Much of the user interface - buttons and LEDs - will be built with these chips too, they're handy and cheap. Putting everything on I2C makes the control code easier.

Control will probably be by ATmega328. Any reason for choosing ATmega16? It's old, slower, lacks memory, and doesn't have many peripherals.

Good luck, this is a big project, I hope you're aware
wink.gif
.
 
Oct 29, 2008 at 5:40 PM Post #6 of 10
@digger945:
1. Yes, I'm gonna do the soldering myself but I will order the PCBs because SMD-soldering get's much easier with a solder mask.
2. Budget is up to 1.5k€, shouldn't be the limiting factor
3. I estimate a project duration of up to 2 years. Don't get me wrong: I have a master's degree in electrical engineering and have done some stuff with controllers, power electronics, true RF (>500 MHz) and Win32-Apps programming. I intend to realize this project to learn something on digital audio processing and to compensate the long and dark and foggy winters/autumns in Northern Germany. So something "up to the eyes" is the answer to your question.
4. It should make me enjoy my music...

@dakiller:
I'd like to keep the analog tracks on the board as few as possible. So, there should only be analog components and tracks at the beginning and at the end of the processing. High sample rates with low clock jitters should do the trick according to Mr. Nyquist (at least I hope so).

@error401:
Thanks for the broad reply! That is an interesting idea of doing the multiplexing of the digital signals with the WM8805 and multiplexing the analog signal with the analog output of the DAC. But therefore you have to ensure that both analog signals at the input of the analog multiplexer are practically the same, haven't you? Isn't that quite an effort for the analog input stage? I'm used to the ATmega16A(32) from former projects but thanks a lot for the hint on the new ATmega product family!

As you criticized the multiple-conversion-idea I thought the concept over and now have the idea of leaving out the DIT4192 and multiplexing the two I2S-data streams (one from the PCM4202 and one from the SCRC4192) before entering the PCM1796. Do you have any recommendations on the analog multiplexer or would a standard 74LV157 do the job?

I'm also not sure whether to stick to the PCM2704 with its SPDIF output or if I should use a PCM2707 with an I2S output. I don't want to have the USB_Ground connected to the analog and digital grounds of the rest of the circuit and intended to insulate the PCM2704's SPDIF data from the WM8805 stream using a DA101C transformer. Has anybody done such an insulation with an I2S data stream? If yes, can I "simply" use three DA101C transformers for the signal, the word clock and the left/right clock?

Perhaps you might take a look at the updated block schematic:
http://ruediger-britzen.homepage.t-o...05_and_MUX.pdf

Thanks, Ruediger
 
Oct 29, 2008 at 6:04 PM Post #7 of 10
Mind that I haven't built any of this yet, but here are my thoughts:

The analog mux will almost certainly use relays, so it can switch pretty much any signal. Something similar to a Twisted Pear Darwin. I think you may be missing my description. I will have both a digital and analog mux. The digital (I2S) mux switches between the PCM2707 and S/PDIF receiver and feeds the dac. The analog mux switches the DAC output and RCA inputs to the following output stages. Then you wouldn't need your extra conversion step.

As for I2S switching I think a standard analog mux would be fine as long as its bandwidth is sufficient, but I worry that it will introduce jitter since it will need to switch the MCLK signal as well. A digital mux is an option too, and would certainly work, but again I'm unsure of the jitter performance and don't have the capability to measure it. I don't have enough physics knowledge to be aware of how FETs affect the signal they pass while in the triode region. Anyway, if I were going to use an electronic switch I think I'd make it a discrete one using FETs and some logic. I think I'd go with a relay here though for simplicity and because its a known quantity, I'm only planning 2 I2S sources so a single relay would do it.

As for input isolation, it's a nice idea but I've heard reports that people trying similar things have been met with poor audio performance isolating I2S like this (or with optocouplers for that matter). Theoretically with quality transformers I think you should be okay, but the bandwidth is much higher than S/PDIF and the requirements much tighter than Ethernet that these transformers tend to be designed for. I think you'd have problems with parts matching. If this is a requirement for you I think S/PDIF is probably a fine solution, especially with ASRC following. Jambo's DAC does this for USB input and it reportedly works well.

Since you're planning ASRC too you don't need to worry as much about jitter so maybe these concerns are less important for your design.
 
Oct 30, 2008 at 6:32 PM Post #8 of 10
Sorry in case I expressed myself unclear, I understood your concept of the two multiplexers. Concerning that I still see a problem of "equalizing" the analog output of your DAC and the RCA inputs the way that you can route one of the those two signals (with the analog relay mux) to the output stages without the necessity of re-adjusting the output stages. At least I guess that you'd like both signal paths to sound the same.

Because of the problem you described with the I2S multiplexing I chose the method of converting the analog signal into an SPDIF-signal before doing the multiplexing in my first block schematic. But you might be right, an audio grade relay is the straightest and easiest approach. If I don't get any further hints on the I2S-digital-multiplexer-problem I'll also ask TI for suggestions.

According to your recommendation the USB part will be done with the PCM2704 and I'm going to stick with the SPDIF-processing.

So, if I get this right, the major difference in our two designs is the analog path: Your's is pure (although you might have some work making the DAC output and the RCA input stage's output sound the same) while mine has to undergo an "inefficient" A/D-D/A-conversion. Let's see which one sounds more interesting... :wink:

Thanks for the hints, and I'll keep you updated using this thread! I have finished the EAGLE schematics for the DAC-TPA-part and the input stages and will now go for the WM8805 and the SRC. Hope to hear from you soon!

Ruediger
 
Oct 30, 2008 at 7:28 PM Post #9 of 10
Not sure what you mean by equalizing the inputs. In my mind it will be the same as if I fed an external DAC into one of the RCA inputs instead of putting it in the same box, unless you just mean volume level equalization? Since I've got digitally controlled volume controls I can easily account for that in the firmware and adjust the output level accordingly. For sound though I'm not sure why it'd be any different than using an external DAC; obviously the internal DAC will have its own output stage for bal->SE conversion.
 
Oct 31, 2008 at 3:26 PM Post #10 of 10
Well it's just a guess but if you want your analog path to sound like the digital one (I'm not only talking about the volume) you have to make sure that both signals (the analog one coming from your RCA input stage and the "former" digital one coming from your DAC) are practically the same at the input of the output stages. Or in other words: the output stage has to see the same signal (damping, bandwidth, complex impedance, etc.) when looking towards the DAC or at the RCA input stage. Sorry, I think I cannnot express that much better in English as I'm not a native speaker. And, as I said, it's just a guess and even if the paths have different characteristics I might not matter that much.

I will try to avoid that scenario by converting the analog signal as soon as possible, with as few components and traces as possible and as neutral as possible into a digital signal so that my TPA-Amp always gets it feed from the DAC. At least that's my idea, let's see if it works...
biggrin.gif


Ruediger
 

Users who are viewing this thread

Back
Top