Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

USB Audio Codec / soundcard Part 1


I have decided that it is hight time to a) get back to doing some electronics b) get a (semi)decent audio equipment.

I would like to make something audiophile-like in terms of the overall quality, but without going 'crazy'. So rather an over-engineered and over-the-top system not a golden-cables-magic-pixy-dust stuff 😏.

Most of the time I'm listening to music from my PC, and most often I use headphones to do so. Thus it is most sensible to make a headphone amplifier together with a USB sound card to get a decent quality source for the amplifier. To make thins more fun I've decied to use an external (to the USB audio codec) Digital-to-Analog Converter (DAC). As so the whole setup will consist of an USB audio module with I2S output, an DAC and a headphone amplifier. Such set of devices is thought to be modular (e.g. allowing to exchange the DAC in the signal path) as I want to play a bit with it and test different DACs etc and also - maybe in the future - add additional sources of sound with S/PDIF or I2S output (e.g. a CD Transport). Let's start with the codec (pictured right/above on a somewhat early stage of development).

The choice of affordable, easy to get and easy to use USB audio integrated circuits is somewhat limited. I've spent several days searching for such devices, and found only a handful of them - there is a whole family of Texas Instrument/Burr-Brown PCM ICs, Dallas DS4201 and some ICs from Tenor, that I haven't found found datasheets for (not to speak of an reliable source for obtaining one). 

Among these chips only few have an I2S output and are available commercially; Tenors TE7022 and TE8802 are equipped with I2S output, but they are very hard to buy, and datasheets nor application notes are not accessible. As so, the device is based on good old PCM2707.

Whole device can be divided into three main sections - USB Audio Codec, I2S isolated output and power supply. First section is nearly an data-sheet application of PCM2707 with ESD protection devices added to the USB side (better safe than sorry). PCM2707 is configured to work with external power supply and with I2S output.


Differential signals from the USB (D+ and D-) go through U4 (integrated ESD protection diodes) and 22 Ω resistors (to limit the current from the port) to the PCM2707 (U3). D+ is pulled-up via a 1,5 kΩ to indicate that this is a full-speed device. VUSB (+5 V from the host) input is protected with a clamp to ground (D2 diode) and filtered with a 100 nF (C19) capacitor. A single ferrite bead can be added to the VUSB line to filter the digitial noise coming from the PC to the codec, although in this case - the codec is externally powered - it is not needed.

Decoupling of the digital power supply lines (VDD and VCCP) of the codec is treated over-zelous with a parallel combination of 100 nF, 10 nF and 1 nF ceramic capacitors, located very close to the supply pins. On the other hand, analog supply (VCCL and VCCR) is not filtered, as we do not plan to draw any current from the analog outputs of the codec - only I2S signal is used in this system. This digital signal is passed on to the output stage.


Output stage consists of an ADuM6400 digital isolator (U2) and DS90LV031A differential line driver (U1). I2S signal is isolated with the ADuM IC. This isolator also "isolates" the power - it can supply of up to 400 mW of stabilised 5 V or 3.3 V to the secondary side of the IC using an integrated DC/DC converter. Due to this fact strong decoupling on both side if the device is needed (as well as some other things e.g. proper PCB design). On the primary and secondary sides a set consisitng of a 10 μF os-con capacitor parallel with a 100 nF ceramic capacitors are used.

Isolated signals, on the secondary side of the U2 are connected to an LVDS differential line driver, that is used to drive the I2S signals into an HDMI cable (that is well suited for this usage, as it also uses four pairs of differential signal). This solution is taken from here (link). As my interface is proprietary, switching signals in the systems doesn't matter, as long, as the receiver will have signals (LRCK and MCLK) crossed in the same manner.

For decoupling of the U1 a set of four capacitors (1nF, 10 nF, 100 nF and 10 μF os-con) with a ferrite bead is used. Such set of capacitors is suggested by the driver datasheet. Ferrite bead is my addition, as the source of the supply - DC/DC converter in the ADuM IC is extremally noisy in high frequencies. The resistor R1 between the L1 and the decoupling caps of the U1 is added to "soften" the peak of the LC network on the input of the supply for the driver - reduce the quality factor (Q) of the resonant circuit here (see here for more details).

Power is supplied to the system from an external, stabilized, linear 3.3 V PSU. Due to high degree of decoupling in the system, the voltage regulator in the PSU will have to be able to work with highly capacitive load. In the board with the system supply voltage is filtered only with two capacitors (100 μF and 10 μF in parallel; the 100 nF capacitor is there only to lower the high-frequency impedance of the decoupling circuit). and passed further


The L2 and R2 form an LR filter for the USB codec, analogous to the L1 in the output stage. A ferrite bead together with the 10 μF os-con will ensure, that the high-frequency noise from the USB codec will not penetrate other sections of the circuit.

And this concludes the design of the system. Now I have to design the PCB, especially carefully around the ADuM isolator, as it generates a lot of noise due to the DC/DC converter within (there is a great white-paper around this topic from ADI). Stay tuned.

Don't be the product, buy the product!

Schweinderl