COMPUTER USB Audio-DAC
Transcript of COMPUTER USB Audio-DAC
The introduction above provides a nearlycomplete character outline for the circuitunder consideration. In brief, it is a 16-bitstereo version of a digital to analogue con-verter with USB interface. The converter maybe used for a range of audio applications. Butthe first thing that comes to mind is an exter-nal sound card for PCs and laptops without
such a card, or as an expansion cardin the event a second one is desired.
The circuit is conspicuously com-pact and simple by design, becauseit consists mainly of an integratedD/A-converter supplemented by twoopamps. This simplicity however,does not imply that the quality of
this ‘USB audio-DAC’ has been com-promised. On the contrary, we wouldlike to say. A short profile:
The DAC possesses an integratedUSB interface that complies withversion 1.0 of the standard. Itaccepts 16-bit stereo and monauralUSB data streams and is equippedwith an 8× oversampling digital fil-ter. The circuit contains an‘Enhanced multi-level delta-sigmamodulator’ and is compatible withsampling rates of 32, 44.1 and48 kHz. In addition, it has a digitalattenuator, a soft-mute function aswell as optical Suspend- and Play-back-indicators. And finally, there isno need for additional drivers whenused with Windows 98 (and later).
The description above sounds allvery nice, but it is the end result thatthis all leads to, that is more impor-tant. Well then, in a separate table,all the measuring results are sum-marised. Examining the results withmore than a cursory glance, you willhave to reach the conclusion that theperformance is very reasonable.
PCM2702
The heart of the circuit consists ofa PCM2702, a two-channel single-chip D/A-converter with integratedUSB interface controller. Figure 1shows the block diagram detailingthe internals of the IC. For moreinformation you may refer to the(condensed) datasheet printed else-
COMPUTER
44 Elektor Electronics 12/2000
USB Audio-DACA mini PC Sound CardDesign by T. Giesberts
This circuit is pre-eminently suitable for PCs and laptops that are notequipped with a built-in sound card but do have a USB interface.However, the ‘mini PC sound card’ can also be useful for otherapplications and various experiments.
nals, and the, so-called Feature Unit.The input terminal is defined as ‘USB
stream’. This input accepts two channelaudio data streams. The output terminal isdefined as a ‘speaker’. The Feature Unit sup-ports volume and mute control.
The built-in digital volume control can beadjusted from 0.0 dB to –64.0 dB in steps of1 dB. Each channel can be set independently,but master control of both channels simulta-neously is also possible. Mute is only avail-able in master control.
Interface #1 has three alternative settings.Setting #0 is the ‘Zero Bandwidth’ setting (akind of mute function). Setting #1 selects16-bit stereo and #2 is the 16-bit monauralsetting.
The PCM2702 requires a 12 MHz clock forUSB and audio functions. The on-chip oscillator with an external crys-tal (which is how it is used here) may gener-ate this clock. Or, if desired, an external clocksignal may be applied to pin XTI instead.
The IC includes an internal power-on resetcircuit, which automatically initialises thedigital logic when the power supply isswitched on. The PCM2702 is ready toreceive audio data after completion of thereset sequence and a connection to the USBbus.
The Circuit
The circuit (Figure 2) has largely been copiedfrom the evaluation board DEM-PCM2702from Burr-Brown. As can be observed,besides the PCM2702, the active componentsare limited to a dual opamp, a couple of gen-eral-purpose transistors and a voltage regu-lator. A handful of standard parts completesthe circuit.
We refrained from fitting a power supplyconnector and mini-jack on the PCB. As a con-sequence, either a mains power adapter or asmall PCB transformer (voltage >8 V, power>0.5 VA) may be used. A mains poweradapter with regulated output is preferred,because the ripple suppression ratio of the 5 Vregulator 78L05 (IC3) on the PCB is only 50 dB.
To connect active PC speakers, for exam-ple, a mini-jack or cinch connectors may beused. Cinch connectors permit the connectionof a normal power amplifier without the needfor a special adapter cable.
Because of the relatively large supply cur-rent (approximately 60 mA) it was not con-sidered appropriate to power the circuit fromthe USB bus (since the maximum current per-mitted is only 100 mA, a second device wouldincrease the current consumption to unac-ceptable levels). The PCM2702 has goodpower supply rejection which makes addi-
where in this issue.Control and audio data are both
transferred to the PCM2702 via pinsD+ and D–. All data to and from theIC are transferred at full speed. VBUS(pin 8) and DGNDU (pin 9) are alsoconnected to the USB bus. VBUS doesnot consume any power and is usedonly to detect the connection to the
USB bus.The PCM2702 has two interfaces.
Each interface is constructed bysome specific setting. Interface #0has only one setting. This settingdescribes the standard audio inter-face
The most important three connec-tions are the input and output termi-
COMPUTER
4512/2000 Elektor Electronics
Measurement Results(measured at 0 dB, 44.1 kHz unless otherwise indicated)
input signal USB audio datanominal output voltage 62 % Vcc (1.096 Veff bij5.000 V)bandwidth (10 kΩ load) 5 Hz to fs/2 (fs =32/44.1/48 kHz)amplitude at 20 kHz –0.25 dBanalogue filter bandwidth 30 kHz (2nd order 0.25dB-Chebyshev)output impedance 100 Ωsignal to noise ratio > 101 dBATHD+N (1 kHz, B = 80 kHz) < 0.0035 %
(20 kHz, B = 80 kHz) < 0.025 %IMD (60 Hz/7 kHz = 4:1) < 0.006 %channel separation > 116 dBstopband attenuation digital filter > 82 dBcurrent consumption < 60 mA
The distortion figures are, without exception, very good. The numbers for signalto noise and channel separation are no worse. The frequency response (mea-sured using a test CD) of the sound card is remarkably flat. For the benefit of thepurists, this graph has been reproduced here. The only irregularity consists of asmall amplitude increase that is caused by the Chebyshev output filter. It appearslike a large ‘bump’, but when closely examining the scale of the graph it is realisedthat the ripple is less than 0.25 dB!
Figure 1. Block diagram of the single-chip D/A-converter PCM2702.
COMPUTER
46 Elektor Electronics 12/2000
Figure 2. The complete schematic of the USB audio-DAC is remarkably simple.
Figure 3. The PCB is very compact, in part because IC1 and IC2 are SMD devices.
R5
1M
X1
12MHz
C3
18p
C4
18p
R8
10k0
R13
10k0
R10
8k25
R15
8k25
R11
100Ω
R16
100Ω
R2
22Ω
R3
22Ω
R4
22Ω
R1
1k
5
R9
10
k0
R14
10
k0
R12
22
0k
R17
22
0k
R6
47
0Ω R7
68
0Ω
C12
1n5
C15
1n5
C13
270p
C16
270p
C2
100n
C5
100n
C7
100n
C8
100n
C9
100n
6
5
7IC2b
2
3
1IC2a
C11 100n
C6 10µ63V
C14
3µ3
C17
3µ3
PCM2702
PLY
BC
K
VOUTL
VOUTR
DG
ND
C
AG
ND
R
AG
ND
L
AG
ND
P
TEST0
TEST1
TEST2
TEST3
SS
PN
D
DG
ND
U
VCOMIC1VBUS
VD
DC
DG
ND
VC
CP
VC
CL
VC
CR
AG
ND
ZERO
VD
D
XTI XTO
VC
C
D+
28
21D-
23
19
272517
18 24 26 20
22
16
15
14
13
12
10 11
1
4
6
7
8
2
35 9
T2BC557BT1
D4
SUSPEND
D3
PLAYBACK
C1
10µ63V
C10
10µ63V
D1
D21N4148
K1
1
2
4
3
USB
L
R
IC2
8
4
2x
5V
IC2 = OPA 2353UA2x
B1
B80C1500
C26
22n
C23
22n
C25
22n
C24
22n C22
470µ25V
C20
10µ63V
C21
100n
C19
100n
78L05
IC3
>9VDC
>8VAC
5V
C18
470n
000169 - 12
B1
C1C
2
C3
C4
C5
C6
C7 C
8
C9
C10
C11
C12
C13
C14
C15
C16
C17
C18
C19
C20
C21
C22
C23C24
C25C26
D1
D2
D3
D4
H1 H2
H3H4
IC1
IC2
IC3
K1
OUT1OUT2
R1
R2
R3
R4
R5
R6
R7
R8
R9
R10
R11R12
R13
R14
R15
R16R17
T1
T2
X1
000169-1
R L
T T
USB
>8VAC
>9VDC
~~
(C) E
LEK
TOR
000169-1
The amplifier selected for the output filteris an OPA2353UA. This is a high speed, sin-gle supply, rail to rail, low noise CMOS opampwith a maximum output current of 40 mA. Asa result of using this amplifier, an additionalpower supply is avoided and the output filtercan simply be powered from the same 5 Vthat is already present.
The outputs have to be DC decoupled, ofcourse. This is achieved with C14/C17 (3.3µFMKT; check that the pitch is either 5 or7.5 mm!), R11/R16 ensure that capacitiveloads will never be able to cause trouble.
R12/R17 make sure that C14/C17 arealways charged. This prevents a loud ‘pop’ ifthe loudspeakers are connected to the circuitafter this has already been powered up.
Two LEDs indicate the status of the circuit.
tional SMD capacitors unnecessary.RF decoupling is provided by stan-dard 100 nF ceramic capacitors (with5 mm lead pitch).
With the crystal oscillator, keep inmind that C3 and C4 act as Cload forthe attached crystal (here Cload =C3/2 + Cparasitic (when C3=C4); ifnecessary, the frequency may bemeasured at the XTO pin and isallowed to deviate by at most500 ppm).
This audio DAC, for a change,
does not use Sallen-Key filters, butuses Multiple Feedback filters (MFB)instead. The output filters are DCcoupled. This is possible becausethe Vcom output biases the opampsto exactly half of the power supplyrail. An additional advantage of theMFB filters is the relative insensitiv-ity to component tolerances. C11provides RF decoupling of the biasvoltage. Because these are only 2nd
order filters, the Chebyshev typewith 0.25 dB ripple was selected.This is a compromise between thesmaller bandwidth of the analogueoutput filter (better suppression ofthe mixing products in the audioband) and quality.
COMPUTER
4712/2000 Elektor Electronics
COMPONENTS LIST
Resistors:R1 = 1kΩ5R2,R3,R4 = 22ΩR5 = 1MΩR6 = 470ΩR7 = 680ΩR8,R9,R13,R14 = 10kΩ0 1%R10,R15 = 8kΩ25 1%R11,R16 = 100ΩR12,R17 = 220kΩ
Capacitors:C1,C6,C10,C20 = 10µF 63V
radialC2,C5,C7,C8,C9,C11,C19,C21 =
100nF ceramic, lead pitch 5mmC3,C4 = 18pFC12,C15 = 1nF5 1%
polystyrene/polypropyleneC13,C16 = 270pF 1%
polystyrene/polypropylene C14,C17 = 3µF3 MKT (Siemens),
lead pitch 5 or 7.5mmC18 = 470nF, lead pitch 5mmC22 = 470µF 25V radialC23-C26 = 22nF ceramic, lead
pitch 5mm
Semiconductors:D1,D2 = 1N4148D3 = green high-efficiency LEDD4 = red high-efficiency LEDB1 = B80C1500 (80V piv, 1.5A
peak), round caseT1,T2 = BC557BIC1 = PCM2702E (SSOP-28 case)
(Burr-Brown)IC2 = OPA2353UA (SO-8 case)
(Burr-Brown)IC3 = 78L05
Miscellaneous:K1 = USB connector, receptacle
style B (PCB mount)X1 = 12MHz quartz crystal PCB, order code 000169-1 (see
Readers Services)
Filter softwareOn the Internet, at the Burr-Brown website (http://www.burrbrown.com/applications) theprogram FilterPro may be found. The program that may be downloaded is called filter.zip,which contains, among other things, filter2.exe. This is a DOS program that enables the cal-culation of the well-known Sallen-Key filters as well as the MFB filters that are used here.Several parameters may be adjusted and the exact values of the E-96 series resistors can becalculated. The capacitors are automatically adjusted for the selected scaling resistors (E-12values), but it is also possible to choose your own values, this is particularly useful whenusing previously measured capacitors. Those who disagree with the choice of the Cheby-shev filter for this circuit, may modify the filter themselves to, for example, a Butterworthor a Bessel type.
D3 is lit up when the PCM2702 isplaying back audio data (Playback).D4 is lit up when the USB interruptsthe audio data stream to thePCM2702 (Suspend).
Construction
The PCB layout for the USB audioDAC is shown in Figure 3. It isremarkably compact, having dimen-sions of only 46 × 74 mm.
Both the PCM2702 and the dualopamp OPA2353VA are surfacemount devices. A considerableamount of soldering skill is required.The problems are only minor whensoldering IC2, but for IC1 a solderingiron with very small tip is absolutelynecessary (the pins have only a0.65 mm pitch!). Use desolderingwick to remove any excess solder. Toprevent overheating of the IC, allow itto cool down from time to time. Thisalso applies to the soldering opera-tion.
Once both SMD ICs have beencarefully soldered to the PCB, theremainder of the parts may be fitted.These are, without exception, stan-dard components of which there areonly a very small number, so noproblems are anticipated here.
Installation
We installed the circuit on a PC withWindows98SE. Windows98 (andlater) contains drivers for USB audioplayback as standard.
For testing purposes it is possibleto power the circuit using a 9 V bat-tery. The red LED (D4) should light.Once the connection to the USBcable is made (cable type A to B),the red LED should extinguishimmediately and a window shouldpop up with the message ‘Burr-Brown Japan PCM2702’. This is fol-lowed by the window ‘Add NewHardware Wizard’ which will wantto install the drivers for a ‘USB Com-posite Device’ (refer to Figure 4a).Once the drivers are installed, theWizard window will reappear whichnow will want to install a ‘USB audioDevice’ (Figure 4b). Having com-
pleted all of this, there should be, inControl Panel, under System Proper-ties in the Device Manager under‘Sound, video and game controllers’a ‘USB audio device’ and under ‘Uni-versal Serial Bus controllers’ a ‘USBcomposite device’ (Figure 4c). Ifanother sound card is alreadyinstalled, then using Control Panelunder Multimedia Properties in theAudio tab it is now also possible toselect ‘USB Audio Device’ as the Pre-ferred device for Playback.
We assume that every PC thesedays is equipped with a CD-ROMdrive. With a regular sound card, theanalogue output from the CD playeris normally directly connected to thiscard. This permits the listening to, orthe processing of, audio-CDs usingthe PC. If you would like to listen toaudio CDs using the USB audio DAC,then, in Multimedia Properties in the‘CD Music’ tab tick ‘Enable digitalCD audio for this CD ROM device’(refer Figure 4d). There are now fourcontrols in the ‘Volume Controls’window: one for ‘speaker’ (master),one for ‘CD Player’, one for ‘Wave’and one for ‘SW Synth’ (for MIDI, aSoftware Wavetable Synthesiser).
Practical Hints
There are older generations of PCmotherboard (not ATX) that do pos-sess a USB controller but do not havethe appropriate connectors fitted.Separate USB-dual-brackets areavailable (standard with two USBconnectors type A) with an 8 or 10way socket that may replace anunused expansion slot cover. If noexpansion slots are available, then itmay be possible to remove thebracket with the 25 way printer portand 9 way serial port and movethese to the break-out openings inthe computer case instead. The USBbracket may then be fitted in thenewly created space.
There are three variations (therecould be more) of the socket for thisbracket, so pay close attention to theheader pinout. The connections inthe socket are usually easilyswapped around. By carefully liftingup the plastic locking tabs andsimultaneously pulling on the wires,the individual connectors can beremoved from the socket.
(000169-1)
COMPUTER
48 Elektor Electronics 12/2000
Figure 4. The installation on the PC isnot particularly difficult. The textprovides a number of useful hints.
a
b
c
d