Designin a high qulity USB DAC
Aug 15, 2007 at 4:22 PM Thread Starter Post #1 of 20

_atari_

100+ Head-Fier
Joined
Jan 21, 2007
Posts
140
Likes
0
After building an Alien DAC I want to design my own USB DAC to use it in combination with a b22 amp:

http://hifi.gefaehrlich.org/some-decent-usb-dac/

In short it is an effort to build a high quality USB DAC taking a PCM2707 as USB/I2S conversion, upsampling it with a AD1896 (an to remove the jitter a bit), convert it to analog using two WM8740:

This is the first version of the schematics (the bigger version you can find on the web site).:




And this is a draft of a possible board layout:

dacboard.png


Now i got some questions:

- Is the 3.3V to 5V signal conversion using a buffer driver feasable? It should work. Any experience with that?
- Do you think this project is a good idea at all?
- Is using a transformer for coupling a good idea? can you recommend a high quality transformer with comparable size?


Thanks in advance

_atari_
 
Aug 16, 2007 at 1:05 AM Post #2 of 20
For a high quality USB DAC (currently in the process of designing one myself) I would recommend going
over to DIYaudio and checking out a few things about designing them. The
AD1896 may / may not be a good choice (modulation of jitter, rather than removal). But I could be wrong,
you definitely want to get a second opinion) and the Wolfson DACs are good, if you do not wish to come up
with your own I/V stage. Personally if I were going for high end (I am), I would use a DAC that has
current out so you can design the low pass filter and I/V stage yourself (most likely it'll beat the Wolfson DAC in sound).
In fact, that I/V stage probably has one of the most significant impacts on the sound.

For I/V conversion, you could do passive (but as many people have told me, DACs like to see a low input (0 ohm) impedance.
Something they can just dump all their current into.) I was going that route,
using 2 Lundahl transformers and a resistor in parallel, but decided it was the lazy thing to do and I
probably wouldn't achieve the great sound I'm looking for (didn't like the sound at all). If you used the
transformers for that DAC though (voltage out, you see) they'd probably work rather well.
But like I said, you don't have control over the I/V conversion and are limited to what's actually in the chip itself
(probably opamp based and cheap ones at that, NE5534...JRC4558...etc...). You want to be in control,
this is why I do DIY audio.

For the clocking, basically you have the incoming clock retrieved from the USB audio data and being spit out in I2S form.
This goes to your lovely asynchronous reclocker (AD1896 in this case) and is essentially reclocked to another clock
feeding into the AD1896. Whether this has any benefits or eliminates jitter is up for debate
(DIYaudio would be the place to go). Again, personally I shunned off that idea and opted for elimination of jitter at
the source (but we're dealing with USB here, so I'm not sure what I'd go for.)

What I'm doing is this:

PCM2707 -> PCM1794 -> LPF (before the amplification stage) -> I/V conversion -> Balanced out

All parts of that plan are subject to intense analysis and debating on which parts to use for the best sound.
It's honestly very difficult sometimes to choose the right option, so I'm opting for a separate board for the I/V
and other analog crap so I can swap out and see what I like. I guess I could also use a series of switches to see
whether asynchronous reclocking does any good (I have a few AD1896s somewhere...).
But one of the key points here is that you want to be in control of the I/V stage and filtering.

I remember routing my first PCB, and it looked very similar to that. It takes a quite a bit of time, discipline, and foresight
to really see what's going on. I highly suggest you head over to http://www.alternatezone.com/electronics/pcbdesign.htm
and read that article. It's very good, and taught me much of what I know about routing.
It also helps to get advice (like here!) on routing (coupling capacitors should be close to pins,
one unified but partitioned ground plane...).Guido Tent (of http://www.tentlabs.com)
also has very good information on routing, and the importance of component placement.
I won't go into too much detail (there's so much to explain!) but you feel much better
about doing PCBs after reading all that stuff. Old threads on http://www.diyaudio.com
and here are also quite valuable. Information on I/V conversion and techniques can of course be found
in these locations as well.

I wish you good luck!

~Thomas
 
Aug 16, 2007 at 2:57 AM Post #3 of 20
Would be a lot easier to just build a usb opus IMO...
 
Aug 16, 2007 at 6:31 AM Post #4 of 20
Quote:

Originally Posted by Nerull /img/forum/go_quote.gif
For a high quality USB DAC (currently in the process of designing one myself) I would recommend going
over to DIYaudio and checking out a few things about designing them. The
AD1896 may / may not be a good choice (modulation of jitter, rather than removal). But I could be wrong,
you definitely want to get a second opinion) and the Wolfson DACs are good, if you do not wish to come up
with your own I/V stage. Personally if I were going for high end (I am), I would use a DAC that has
current out so you can design the low pass filter and I/V stage yourself (most likely it'll beat the Wolfson DAC in sound).
In fact, that I/V stage probably has one of the most significant impacts on the sound.

[...]



hmmm. You are probably right (you are definitively right - but I doubt that
MY I/V stage will be better than the Wolfson's one in the first step - lack of
experience on my side). I think for the first prototype I will leave this out.
Perhaps it will be added as the DAC evolves (would imply that I change the
DAC chip itself)....

But still a good point.

Quote:

Originally Posted by Nerull /img/forum/go_quote.gif
For the clocking, basically you have the incoming clock retrieved from the USB audio data and being spit out in I2S form.
This goes to your lovely asynchronous reclocker (AD1896 in this case) and is essentially reclocked to another clock
feeding into the AD1896. Whether this has any benefits or eliminates jitter is up for debate
(DIYaudio would be the place to go). Again, personally I shunned off that idea and opted for elimination of jitter at
the source (but we're dealing with USB here, so I'm not sure what I'd go for.)
[...]



You are right this has to be investigated. The AD1896 is stating that it has a
FIFO and PLL build in.
My theory is that if you provide a clean clock for the AD1896 and the DACs
(must be the same clock - did some research in the mean time) the AD1896
should be able to queue the incoming data and reclock them one by one with
its internal clock.

Due to the fact that I want to use USB I have no real control over the source.
There is a big thread at diyaudio.com just discussing how to configure your
linux kernel to get a clean USB clock.
I also thought about designing a microcontroler to do this FIFO buffering.
But the AD1896 data sheet told me that this is already built into the chip.

Quote:

Originally Posted by Nerull /img/forum/go_quote.gif
What I'm doing is this:

PCM2707 -> PCM1794 -> LPF (before the amplification stage) -> I/V conversion -> Balanced out

All parts of that plan are subject to intense analysis and debating on which parts to use for the best sound.
It's honestly very difficult sometimes to choose the right option, so I'm opting for a separate board for the I/V
and other analog crap so I can swap out and see what I like. I guess I could also use a series of switches to see
whether asynchronous reclocking does any good (I have a few AD1896s somewhere...).
But one of the key points here is that you want to be in control of the I/V stage and filtering.



Ok, got it
wink.gif

I will probably do my own I/V stage - but that will be some real effort.
By the way - it sounds that you are designing something very similar -
do you have any link to take a look at what you are doing?

Quote:

Originally Posted by Nerull /img/forum/go_quote.gif
I remember routing my first PCB, and it looked very similar to that. [...]


It actually is my second PCB
wink.gif

You are right. This PCB is merely some scetch to see how it would look like,
what rough form factor you will need. I will definitively improve it.
But I am still unsure about the split ground. You are right everybody says use
one ground plane. But there are some papers suggesting a split ground plane
for analog and digital circuit, connected by driver chip.
The reason for this solution is: The digital noise is taken away from the
DACs. The split ground plane introduces more noise at the point
where it is split (therefore everybody suggest not to split it under the DAC).
But this point is at the 74*244.

I think it is a good idea to validate this over at diyaudio.com

Quote:

Originally Posted by Nerull /img/forum/go_quote.gif
I wish you good luck!

~Thomas



I think luck is what I need
wink.gif


Lets hope that something usefull will be the result.

But many thanks for your hints, advices and resources. I will rework my stuff according to your remarks.
 
Aug 16, 2007 at 6:59 PM Post #5 of 20
Hey, how did you choose C7,C8, C10 values??? Reference or plain copycat
biggrin.gif
 
Aug 16, 2007 at 7:37 PM Post #6 of 20
Quote:

Originally Posted by cling /img/forum/go_quote.gif
Hey, how did you choose C7,C8, C10 values??? Reference or plain copycat
biggrin.gif



All capacior values are currently just copycat values. For all bipolar ceramic caps (currently all 0,1uF) I will stick to 0,1uf -
if not the datasheets suggest otherwise. The whole design around the PCM2707 is currently a rough copy of the alien DAC.
But not all values are verified. Tomorrow I will post a new and revised circuit - so stay tuned
wink.gif
 
Aug 16, 2007 at 10:28 PM Post #7 of 20
The way your 2707 is setup does not look quite right to me. You can take a look at the hpdac page to see how to do this.

Also, if you are going to self power the 2707, you need a way to control that voltage is not applied to it before host is connected. I used a little AND gate on the HPDAC3 which you can see here: http://www.head-fi.org/forums/showthread.php?t=246429
 
Aug 17, 2007 at 1:00 AM Post #8 of 20
Personally, I don't care for the sharp (90deg) pcb traces, although I know some people use that style (doug
wink.gif
). I don't think it physically affects the signal (would electrons care that they are going around corners?), but a) I think it's uglier and b) and this one matters more, it's not the best use of pcb space - and that extra space can cost you, in terms of manufacturing.
 
Aug 17, 2007 at 2:36 AM Post #9 of 20
By the way, that schematic is way too big and makes this thread very annoying.

Quote:

Originally Posted by ezkcdude /img/forum/go_quote.gif
Personally, I don't care for the sharp (90deg) pcb traces, although I know some people use that style (doug
wink.gif
). I don't think it physically affects the signal (would electrons care that they are going around corners?), but a) I think it's uglier and b) and this one matters more, it's not the best use of pcb space - and that extra space can cost you, in terms of manufacturing.



I actually only use 90 degree turns when it is more space saving -o soetimes the 45 degree stuff forces wider turns. I do think it looks nicer, too. But, for very high frequency, it apparently does matter. I doubt it does here, but most people will tell you that best practice is 45 degree.

As a side note, you know that electrons actually move at low speed -- the high speed is attained by the flow. When you turn on the water, it is instant even though it takes any particular water molecule a long time to get from the water tower to your sink.
 
Aug 17, 2007 at 7:25 AM Post #10 of 20
Quote:

Originally Posted by Nerull
But like I said, you don't have control over the I/V conversion and are limited to what's actually in the chip itself
(probably opamp based and cheap ones at that, NE5534...JRC4558...etc...).



Modern high end DACs with voltage out are not just DACs with current out and a built in I/V conversion stage, they are generic voltage out designs. It's two different architectures and both can be made to sound very good. I won't go into whichever is better, but voltage out DACs are often easier to use.

Quote:

Originally Posted by Nerull
What I'm doing is this:

PCM2707 -> PCM1794 -> LPF (before the amplification stage) -> I/V conversion -> Balanced out



You really should consider doing the I/V conversion before any filtering. You said it yourself, DACs like to see a low impedance. Adding a low pass filter before the I/V conversion raises the impedance significantly.
 
Aug 17, 2007 at 9:36 AM Post #11 of 20
Quote:

Originally Posted by Cauhtemoc /img/forum/go_quote.gif
Modern high end DACs with voltage out are not just DACs with current out and a built in I/V conversion stage, they are generic voltage out designs. It's two different architectures and both can be made to sound very good. I won't go into whichever is better, but voltage out DACs are often easier to use.


For this version I will stick to the WM8740. The reviews are very good and the small size of the PCB is quite useful for mid-size amps.

Perhaps there will be another version with a discrete IV stage and a different DAC chip. But this will be a different project
wink.gif


But more updates later this day.
 
Aug 17, 2007 at 2:28 PM Post #12 of 20
Today I found some time to update the schematics and rip apart and rearrange a lot of the board. Everything still very much in the design stage but evolving (and hopefully improving
wink.gif
).
This is what I have done:
  1. The WM8740s got some decoupling capacitors for VMIDL and VMIDL (C34-C41)
  2. There is now a puldown resistor for VHOST on the PCM2707 (R10 - 3K3, drawing somthing like 1,5 mA - should be ok for the Computer)
  3. There is now a pull up resistor for D+ (1k5 - the datasheet it MUST NOT be enabled when VBUS is not active -I will com up with a sulotion for that)
  4. C7, C8, C9 and C10 changed to 1uF according to the PCM2707 datasheet.
  5. Added jumpers to switch between balanced and unbalanced operation. Capacitor based decoupling removed (must be done externaly).
  6. TEST of PCM2707 connected to ground
  7. DATA of PCM2707 is pulled upu with 3k3 resistor
  8. VCOM got its own electrolytic decoupling transistor (value undecided- can be small).
  9. The AD1896 is configured to run at 128fs, resulting in a 96kHz operation. The same clock is used as system clock for the DACs.
  10. The whole PCB got an makover - more 45deg lines (if nothing else was possible) - still very prelimnary!
  11. Updated the first post to make it more readable and to reflect the current changes.

But to answer some of your questions:

Quote:

Originally Posted by cling /img/forum/go_quote.gif
Hey, how did you choose C7,C8, C10 values??? Reference or plain copycat
biggrin.gif



In the first step I used the values as stated for the Alien DAC - but now I updated it according to the data sheet.
I will decide later if I will change all 0805 caps to 1uF. This should make assembly easier.

Quote:

Originally Posted by dsavitsk /img/forum/go_quote.gif
The way your 2707 is setup does not look quite right to me. You can take a look at the hpdac page to see how to do this.

Also, if you are going to self power the 2707, you need a way to control that voltage is not applied to it before host is connected. I used a little AND gate on the HPDAC3 which you can see here: http://www.head-fi.org/forums/showthread.php?t=246429



Yes, I have found that problem too. I dont want to use an AND gate. I think I will change it to a transistor later?? Don't know yet. A complete and gate is an additional chip, eating up a lot of precious board space.

Quote:

Originally Posted by ezkcdude /img/forum/go_quote.gif
Personally, I don't care for the sharp (90deg) pcb traces, although I know some people use that style (doug
wink.gif
). I don't think it physically affects the signal (would electrons care that they are going around corners?), but a) I think it's uglier and b) and this one matters more, it's not the best use of pcb space - and that extra space can cost you, in terms of manufacturing.



I have tried to introduce more 45deg traces - but it makes life a lot harder. For now it looks nice (excepting some problem areas). But for now the correctness of the schematic is my main aim. Then I will begin to finalize the PCB.

There is one VERY big question left: I am currently thinking about using transformers for output coupling. This gives a very easy way to switch between balanced and unbalanced output. Has anybody experience in using it and how it compares sonically to using capactior DC coupling?

Some last remark: The page for the DAC has changed from a blog post to a real page. Nothing real new, except the URL.
 
Aug 19, 2007 at 11:21 AM Post #15 of 20
I updated the schematics and the pcb, incorporating the AND gate and cleaned up the mess.

But still in question how to design the final output stage for the DAC.

Perhaps I will change to the AD1955 and use a transformer based I/V stage..

Any suggestions?
 

Users who are viewing this thread

Back
Top