Simple USB DAC Design

New to XMOS and XCore? Get started here.
braddrew0
Junior Member
Posts: 5
Joined: Sun Sep 15, 2019 7:09 am

Simple USB DAC Design

Postby braddrew0 » Sun Sep 15, 2019 7:27 am

Hi Guys,

I've been procrastinating making a USB DAC for a few years now and I'm finally in a position where I'm going to make it a reality. I've spent the last month researching and then this weekend putting together a basic schematic. Before I move on to routing boards, I wonder if there's anyone here who can take a quick look and make sure I'm not missing anything obvious? It's based heavily on reference designs so it should be fine, but thank you anyway :)

Here's the general idea:

* It's a multi-board system - that way I can add and remove layers as I progress
* All boards will be two-layer to start, moving on to four-layer once I am more comfortable with the hardware
* Programming via SEGGER J-Link over JTAG
* The brains are an XU208-128 driving an AK4432 DAC

Board by board we have...

Main Power Board

* You probably can ignore this one - it's effectively a breakout for me to plug the three channels of my benchtop supply into in order to generate +V, -V and 5V cleanly (the +/-V are the +/- rails for the amps, not shown in this schematic)

DAC Power Board

* Generates 3.3V, 1.0V and a 'Power Ready' signal (which is used to drive the MCU reset)
* General logic is the 3.3V regulator starts up, is asserted as 3.3V by the ADM803, this enables the 1.0V regulator on a soft start (capacitor chosen for 5ms start time) which runs through an ADM1085 on 10ms delay to give the ready signal
* One thing I'm not certain about is the resistor sizing to drive the 'Power Ready' LED... I think it will work this way, but with R2 = R3, will it drop the voltage too far to provide a proper 'Ready' signal to the buffer on the DAC board? Should R2 be smaller (say 1k)?

USB to I2S Board

* This is basically the XMOS board - again very heavily reference design
* I don't have ESD or EMC protection on the USB lines - again, this is only a prototype, useful versions will have this
* Reset can happen from the main power board (ie PWR_RDY drops low) or by sinking the JTAG_RST signal (either by the JTAG programmer or technically I could just ground this pin to manual reset)
* The LED on X0D36 is for testing purposes - program number one will be getting that to blink to make sure it's assembled and configured correctly

I2S to Audio Board

* Again, not a lot to say - this is basically the reference design for AK4432
* I've tried to align the output port for I2S on the MCU (X0D16 - X0D19) to the physical pins on the AK4432 to prevent any crossover of tracks
* Likewise for the soft mute, power down and I2C lines


Thanks very much for taking the time to help me out! :)
XMOS-AKM DAC.pdf
You do not have the required permissions to view the files attached to this post.
User avatar
maxssau
Member
Posts: 9
Joined: Mon Mar 18, 2019 8:35 am
Location: Russia, Samara

Postby maxssau » Mon Sep 16, 2019 11:21 am

for i2S I/O use only one bit ports
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Mon Sep 16, 2019 1:40 pm

VDD (core @ 1v0) is recommended to be 375mA or higher but the ADP1712 is rated @ 300mA (MAX) so this may become an issue. Consider to use a higher current regulator for this rail.

reference:

H.1 of Schematic Design Checklist inside XU208 datasheet.

xu208_vdd.png
Suggest to apply ESD protection devices onto the USB D+ / D- lines. A very good choice, although a bit more expensive than others is the ESDS312 from Texas Instruments.

http://www.ti.com/product/ESDS312?keyMa ... art-number


Otherwise, there are many other ESD protection devices (SOCAY; Littlefuse, ONSEMI, etc.) and you could even insert an EMI filter in series with the D+ / D- lines which are < $ 0.10 USD from Asia - the following is a drop in replacement for other EMI filters that can be sourced through Digikey / Mouser to get started (at higher costs) before you consider to shift to sourcing from Asia. Often the components in North America are private label versions from Asia. Regardless of choice, be sure that you can source a valid replacement from at least 2 different suppliers for your PCB footprint.

KC p/n.WCM-2012-900T
Price USD0.04/pc FOB Taiwan
SPQ=3000pcs/reel
MOQ=36000pcs per shipment
LT=30days

Above p/n. is for USB 2.0 application

If you need higher current common mode choke or smaller dimension common choke, we can provide more spec sheet fyr.


Contact (we have on file):
Rex Chen
Your Best EMI Solution Partner
鈞寶電子工業股份有限公司/King Core Electronics Inc.
O.Phone: +886-3-4698855#201
e-mail: rex@mail.kingcore.com.tw
Address: 台灣桃園市平鎮區南豐路269號/No.269, Nanfong Road, Pingjhen City, Taoyuan County 324, Taiwan



For your PCB layout, use at least 4 layers in the design. Do apply impedance controlled traces for the USB 2.0 High Speed lines and highlight these regions for your PCB manufacturer. Respectively ask the PCB shop to perform TDR testing to validate that impedance control measures will applied for your design.

JLCPCB.COM appears to be a pretty fair shop to work with but we have only had experience with a single purchase so far. For volume PCBs there is Suntak / China Fast Print / Kingford PCB and others.
You do not have the required permissions to view the files attached to this post.
niektb
Member
Posts: 13
Joined: Tue Mar 26, 2019 8:38 am

Postby niektb » Mon Sep 16, 2019 4:23 pm

I'm currently using the ADP1712 and i'm experiencing some issues that could be related to power (though i haven't had the time yet to precisely investigate)... I'm planning to swap it for the MAX1589 which is capable of 500mA output. It also has a reset output :)
And indeed, make sure to use 1-bit ports! otherwise your software is likely not going to work!
Maybe I overlooked it, but i couldnt find a master clock oscillator for the i2s signals and the DAC!


What kind of quality are you looking for for your DAC, i think there are better options available. Those 100nF's at the output are incorrect, should be 1uF according to the datasheet :)
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Mon Sep 16, 2019 4:33 pm

Careful on the MAX1589 as the input range is limited. So this part CANNOT be mated to your +5V voltage rail (+3V6 is the MAX input range). Maxim is great but expensive and often single source on their footpints so if they discontinue the component then you will have to do a board respin (unless you consider an alternate replacement in your design today for safety - we do that all the time and stuff only one of the 2 components during assembly time).

Any reason why you are not considering a switching power supply or perhaps a module from TI that incorporates all required parts onboard? The switching power supply will be more efficient so less heat in the conversion process. Just a thought.

For example:

http://www.ti.com/product/LMZ10500

Otherwise, ONSEMI has many tiny and low cost LDOs as well to review.
User avatar
akp
Respected Member
Posts: 314
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Mon Sep 16, 2019 8:13 pm

The truly paranoid might worry about beat frequencies with a switch mode supply.
niektb
Member
Posts: 13
Joined: Tue Mar 26, 2019 8:38 am

Postby niektb » Tue Sep 17, 2019 9:48 am

@akp: it is common audio engineering knowledge that switching supplies introduce a lot of switching noise into the chain and that they have an audible impact (subtle but surely audible) on the resulting audio. Saying that only the truly paranoid worry about that is nonsense... Now of course you won't hear the difference on 'grot box' speakers but hence i asked what kind of audio quality the TS was looking for :)

@MAX1589: indeed, you should hook it up to your 3v3 rail if you plan on using it (and make sure your 3v3 supply can supply an abundant amount of current)
User avatar
akp
Respected Member
Posts: 314
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Tue Sep 17, 2019 10:12 am

Thanks. Perhaps I should have noted it was a little ironic, having a laugh with the hifi set. No one should ever use a class D amp either of course. ;-)
braddrew0
Junior Member
Posts: 5
Joined: Sun Sep 15, 2019 7:09 am

Postby braddrew0 » Tue Sep 17, 2019 10:18 am

Thanks for the replies! I'm disappointed I missed the current requirement on the 1.0V line... I'll upgrade this to a 500mA version.

Also thank you for the advice on the 1 bit ports - I just assumed that a 4 bit port could be used as four 1 bit ports but I guess that's not the case? If I'm reading the datasheet correctly, the only 1 bit ports are X0D00, 01, 10, 11, 35, 36, 37, 38 and 39? I'll move across to the 35-39 range as I'm using 01 and 10 for the QSPI Flash.

niektb - thanks for your help, but can I ask what you mean when you say you can't see the I2S clock? I understand the USB clock and I2S clock are at different frequencies, but I thought this was managed internally by the PLL and the frame/bit clocks were generated on those lines? Also not overly concerned with having great quality at this stage - once I get it working then I'll look towards improving the sound.


Thanks again! :)
niektb
Member
Posts: 13
Joined: Tue Mar 26, 2019 8:38 am

Postby niektb » Tue Sep 17, 2019 10:44 am

Yup, you can't use a 4-bit as 4 1-bit ports (only the other way around). 35-39 range will work fine :)
also check your I2C pins! don't remember exactly but if i recall correctly you can't perform read operations in i2c master mode if you don't connect i2c to 1-bit ports...

I made the same mistake with my first prototype but alas... :/
Quoting the USB Audio Design Guide:
The master clock must be supplied by an external source e.g. clock generator,
fixed oscillators, PLL etc to generate the two frequencies to support 44.1kHz and
48kHz audio frequencies (e.g. 11.2896/22.5792MHz and 12.288/24.576MHz
respectively). This master clock input is then provided to the CODEC and the XMOS
device.
So in addition to a 24MHz oscillator for the USB you also need to connect a clock source to another 1-bit port (and also supply that same clock to your DAC if it hasn't a built-in PLL)

@akp: i work at a hifi brand so i felt a little offended :)

Who is online

Users browsing this forum: No registered users and 1 guest