Do-It-Yourself DAC Construction Some tips and Plans by Sheldon D. Stokes Some of the best sounding audio systems I have heard are based around home-made or highly modified components. Often this yields a component that is cheaper than similar performing commercial products. One popular example of this is the venerable Dynaco ST-70. In the digital audio world this is especially true. Another factor that favors home-brew equipment is the fast pace of improvements to digital playback devices. It's akin to buying a personal computer, your pretty much assured that in a month or so, your PC (or one with similar performance) will cost less to buy again. I find it ironic that I am spending time working in a medium that I have been bashing for about 6 years now. My story is one that is shared by many young high-end audio types (I resent the term audiophile; it sounds like some sort of sex-crime), my first stereo system beyond boom-box quality included a CD player. When I bought my CD player, I was a freshman in college. I thought it was fantastic, what dynamic range, what clarity! It was so much better than my cassettes. I bought CDs like crazy. After a couple of months I started to notice that the cymbals on my cassettes were often more life-like. Cymbals on my CD player sounded like high pressure air escaping. About this point I upgraded my speakers and receiver to an integrated amp and better quality speakers (the speakers were not very special, so they will remain nameless). I bought a Denon integrated amp, this was a real improvement, but showed up the flaws in my CD player even more. A month or so after I got my new equipment, I started reading The Absolute Sound, I bought it at my schools bookstore. I am not sure why I coughed up so much money for an unheard-of magazine. They were saying some outlandish things, like what wire you use affects the sound. And which way the plug is facing can affect the sound. I though these guys were sniffing too much tape head cleaner. But the one universal thing that they all were saying is that CD don't sound as good as LPs. Could this be true? those old scratchy things I abandoned in high school for cassettes. Then I went out and bought a Police CD (I like their older stuff), It was a real ear-bleeder, I still keep it around to show how bad digital can be. That was the last straw; a friend and I drove an hour to hear a good turntable. Hearing a decent analog setup was a religious experience for me, and I was a complete convert. I gave a talk in my Physics seminar on the limitations of digital signal processing and the shortcomings of the present digital standard for capturing the nuances of music. I also bought a turntable (I'm now on my fifth). Anyway, digital has come a long way sense those days. It's now pretty good, but you will have to pay a lot to get a state-of-the-week technology. Last summer, I bought a broken CD player (it was skipping) and fixed it. It sounded better than the "High-End" player I was using at the time, so I sold my old player and decided to use the cash to buy a cheap DAC, as the new player had a digital output. I was also toying with the idea of building my own DAC, I had been hanging around with Scott Dorsey and I saw (and heard) the beauty of DIY audio. I called the chip manufacturers and got samples of the major chips I needed for the project. To fully appreciate contemporary digital design, a basic knowledge of digital sampling theory is needed. If your livelihood comes from this area, or you've read this type of thing before, then skip the following paragraphs. The standard that Sony and Phillips created is an audio signal a sampled at 44.1 kHz and stored as 16 bit words. The number of bits represents the number of amplitude levels possible. Sixteen bits represents 65536 different possible amplitude levels. And the sampling rate affects the bandwidth of the stored signal. When a signal is digitized, it's akin to taking very fast pictures of a moving scene. As the signal is "moving" in time, the A/D converter circuitry samples the voltage of the wave form, converts it to a number (between 0 and 65535), and stores it. It is doing this at 44100 times a second. There are different sampling rates (I.e.. DAT), but I'm using the CD standard for discussion. But life is not that simple, there is a problem of aliasing when digitizing a wave form. Aliasing is a phenomena which high frequency information is folded over to lower frequencies. Nyquist theorem says that to avoid aliasing we must sample twice as fast as the highest frequency wave form. It is easy to visualize if you have ever seen a wagon wheel in an old western movie. Figure 1 shows what I'm describing. A movie is a series of discrete pictures shown in rapid succession. When the wagon is just starting, the spoke is turning slowly and its motion is easily captured by the 24 Hz sampling rate of the film. As it speeds up (to 6 Hz), the limitations of the sampling rate become more obvious, there are only four frames per revolution, so the spoke is moving 90Á per frame. If the wheel speeds up more, to 18 Hz, the spoke actually moves 3/4 of a revolution per frame, but it looks like it is moving backwards, because the wheels frequency is more than half of the sampling rate. In the audio world, half of the sampling rate is 22.05 kHz. This is just outside our range of hearing (actually military studies have shown that we are capable of sensing very high frequencies, and that helps us localize sounds). So on the recording end there has to be very steep filters to allow 20 kHz signals through with no attenuation but not let anything above 22 kHz through. These brick wall filters produce all kinds of nastiness down in the audio range. The only way around this problem is to sample at a higher rate. When the digital data is converted back to analog, there is noise created due to the discrete nature of the process. So a filter is used in the digital to analog conversion process also. Because the data is digital, we can play some math games with it before we convert it back to an analog wave. A technique called oversampling us commonly used. There are many different implementations of this, from custom algorithms "down-loaded" to DSP chips, to off the shelf chips. I am using the latter approach, because I do not have a great deal of experience with digital filtering, so chances are that I couldn't do any better than the guys making the standard chips. I simple explanation of oversampling is that the original data is stretched out (in time) and extra data points are interpolated in between the actual data points. This stretches out the frequency difference between the pass band and stop band by the number of times oversampled. The result is that a much more shallow filter can be used. With less nastiness thrown into the audio band. An Audio DAC consists of four parts; they are listed in Figure 2. I'll summarize each parts main function: Decoder: Takes the serial data stream (S/PDIF format) and extracts the bit, word and frame clocks as well as the data. The Sony/Phillips Digital Interface Format has the sampling rate clock imbedded in the data stream. The decoders job is to recover these clocks and keep them as stable as possible. The Decoder chip also gives information about the data stream, like if it was recorded with pre-emphasis, what it's sampling rate is, etc. This is an area that I am heavily experimenting in. If the decoder does it's job, then what transport or cable you're using should not matter. The Crystal decoder is a very nice chip, but it's not perfect, and thus, I hear differences with digital cables and transports. I am currently working on a design that uses the Analog devices AD1890 chip to buffer the data and reclock it. I am still working out the design. Watch this space. Digital Filter: This uses a Finite Impulse Response technique to interpolate (fill in the blanks) some samples between the actual audio samples. The chip I used is an eight time over-sampling filter. This speeds up the clocks by eight times, and moves the quantization noise caused by the digital to analog conversion up to a very high frequency (352 kHz). The Crystal CS4328 bitstream DAC oversamples 256 times as part of it's conversion process. There is no reason that eight times should sound better than two or four times. It's all in the execution. DAC: These chips are the heart of the Audio DAC box. These chips take the serial data stream, read it in and calculate a voltage (or current) based on the value of the data. There is two ways to do this conversion. The traditional is using a ladder DAC, this technique reads all 16 bits of data and calculates a voltage based on the binary value. The second method, is using a bitstream technique which basically re-weights all the bits (so they are all equal; i.e. no MSB or LSB) then integrates the bitstream. These chips are half digital devices and half analog devices, so special care has to be taken in grounding and powering them. Analog Stage: This takes either the voltage from the bitstream DAC chip or the current from the ladder DAC chip and converts it to a voltage if necessary, adds some gain and buffering and sends the signals out to your pre-amp. This stage is the most critical in a DAC. In most DACs the de-emphasis filtering is done in this stage too. Some digital filtering chips do the de-emphasis filtering in the digital domain, but I haven't played with this technique. The first DAC I built was based on the Crystal Semiconductor CS8412 Decoder chip, and the CS4328 Delta Sigma DAC Chip. The CS4328 also contains a mosfet buffer so the chip does not need an external analog stage. However I have heard that A small improvement can be made by buffering this chip with an AD811 buffer. I am of the belief that signal paths should be a short as possible, so I haven't included it here. The power supply of this DAC is very important, the S/N ratio of this DAC is about 94dB but the power supply rejection ration is only 60 dB. So the cleaner your power is the better. I used a low impedance regulator for the analog supplies. It uses a dual op-amp, driving pass transistors, and referenced to a pair of zeners. A diagram of this regulator is shown in Figure 3 and is also shown in my schematic of the CS4328 DAC. I also use this regulator in the Burr-Brown DAC for the analog portion of the DAC chips. I have tried a number of different power supply designs, and I have found that they all sound different. The Crystal DAC seems to be much more sensitive than the Burr-Brown DAC. There are many different regulation schemes, and you should design your own that conforms to your particular form of lunacy. I had considered making the Burr-Brown DACs analog regulators (and rectifiers) solely from vacuum tubes. But there is solid state devices and solid state regulation in the DAC chip itself. So I decided that such extreme measures would be nullified by the DACs own internal workings. Without further ado, the CS4328 Schematic is shown in Figure 4. As you can see from the schematic, it is fairly simple. But don't let simplicity fool you, the folks at Crystal Semi. did their homework and both chips perform very well. I have also designed a layout for this DAC. It is double sided, with a ground plane on the component side and a signal and power side on the bottom. The layout I show here is the same circuit I am currently using. I got a case from Sescom, and am using a nice IEC filtered power entry module I got as a sample. The layouts included here use a nice potted torroid transformer, it's expensive, but cool. The board outline is exactly 5" x 6" in case it is reduced in printing. The only off-board components are a power switch, phase invert switch, fuse and power cord, and input and output jacks. The signal side layout is shown in Figure 5. The ground plane is shown in Figure 6. It is the component side. A version with component outlines and a components list is also shown in Figure 7. Note the split in the ground plane between the digital and analog sections. For those of you who are more adventurous, I have also built a larger, more complicated, higher performance DAC. It uses the same CS8412 decoder chip, but is followed by a Burr-Brown DF1700 Digital filter chip, then by two B-B PCM63P-K 20-bit ladder DAC chips. The output of these chips is fed to a 12AT7 vacuum tube for gain and buffering. The schematics appear in Figures 8-9. The layout for this DAC is done all on one board, but the power supply and regulation can be separated into a second board. This design uses two beautiful toroidial power transformers from Toroid Corporation of Maryland. These transformers are expensive, but perform well and have low stray field emission. I use a separate transformer for the digital supply. The analog transformer is a tube pre-amp transformer that Toroid Corp. makes. It has a 260 volt tap, a 12.6 volt tap and a 6.3 volt tap. I had them add another 12.6 volt center tapped winding also. If you wanted a lower cost alternative, four separate non-toroid transformers could be used. The DAC board is a double sided 7.5" x 10" board, with a ground plane and signal plane like the smaller DAC. This larger DAC also provides a de-emphasis network. Everything is contained on the board except switches for power and digital phase invert, LEDs, power cord, transformers, and input and output jacks. Notice on the ground plane side, the ground plane is split into an analog and digital plane, and is only connected at one point. This is to minimize digital noise from leaking into the analog side. I am using this same circuit, but I have etched 5 separate boards for each of the pieces, and I am using free standing transformers. The whole mess is screwed to a piece of plywood using standoffs. This modularity allows me to continue to experiment with new ideas and new chips. I consider my DACs as a work in progress, and will probably remain that way as long as new chips are coming out. I am reticent to put it in a case until I stop changing and tweaking things. Besides it's more of a conversation piece when it's out in the open; it adds that mad scientist feel to my apartment. The layouts are shown in Figures 10-12. This DAC has some very unorthodox features. And I can't stress enough that these designs were made using my design compromises. The first "strangness" is sitting at the output of the DAC chips. The PCM63 DAC chips output a current that is proportional to the "number" they are converting. The textbook way to convert this current to a voltage is to use an op-amp (current feedback flavor). There are some problems with using an op-amp, first the DAC current changes very quickly, and can drive some op-amps into slewing induced distortion (this shouldn't be a problem if you use the AD811; which has a DC to ultra violet bandwidth. Just shine a light into pin 3). The other compromise with an op-amp is that it is another bunch of semiconductor that the signal has to go through. As I've stated so many times before I feel that less is more, so opted for a simpler approach. WARNING: If you design or regularly work with DAC chips this may give you the willys. I use a resistor to ground right off the current output pin of the DAC chip. This converts the current to a voltage (via Ohms law). The one problem with this is that the DAC chips have an internal diode across the output and ground to short out any DC present on that pin, so the chip isn't hurt if some other circuit element fails. This means that any voltage generated at this pin from the resistor should be much less than the diode turn on voltage (0.6v). The max. current output from the DAC chips is 2mV (when hooked up to the offset pin) and I used a 150 ohm resistor. This results in a max. voltage of 0.3 volts. This is still in the linear region of the diode. I played with different values and found 150 ohms to be optimum. Lesser values require too much gain and the noise from the analog stage becomes slightly audible. With the 150 ohm resistor this DAC is will below the S/N ratio of any of my other components (it's dead quiet). Fortunately the DAC chips have a uniform output impedance over the audible range, so this approach works well. I had been thinking of trying this idea, but thought it would compromise the performance of the DAC chips. When I heard a rave about this approach from Peter Campbell, who had modified his CD player. The other unorthodox thing I am doing is not using a low pass filter in the analog stage. A low pass filter is usually used to eliminate quantization noise. But with eight times over-sampling the quantization noise is at 352 kHz. This is a bit past the hearing of most people, and outside the bandwidth of the tube stage (which is flat from 3 Hz-280 kHz). So the bandwidth of the tube stage acts like the filter. The combination of the resistor and the lack of output filtering gives this unit a sound like no other DAC I have heard. This soundstage is wide and deep and "open". Instruments sound more natural than any digital component I have heard. The quantization noise can be seen on a scope, but as I said earlier it is WAY out of band. The analog stage is made extremely simple by these techniques, and I feel the benefits are obvious when listening to this unit. I socket all my chips so I can easily use them again. I know that my current DACs are just a stepping stone to something bigger and better. I also use coax for digital transmission. I have not designed any optical inputs because I feel that optical is inferior to coaxial, and coaxial is cheaper and easier. And any player that has an optical output CAN have a coax output even if there isn't one on the back(the signal is electrical before it gets converted to optical). To learn more I suggest that you call Crystal Semiconductor and Burr Brown and get the data books. The Crystal data book is very informative and will teach you quite a bit about digital audio and these specific chips. They can be reached at the following numbers Crystal Semiconductor Burr Brown (800) 888-5016 (800) 548-6132 Data Book Volume 1 IC Data Book Supplement Vol. 33C If you have specific questions I can be reached at: Sheldon Stokes Box 5725 Clarkson University Potsdam NY 13676 stokes@bart2.larc.nasa.gov Home: (315) 265-7920 Office: (315) 268-DUCK On the following pages is component outlines and parts lists. I got most of my passive components from Digi-Key (800) DIGIKEY. I got my Chips directly from Crystal and Burr-Brown. Some other companies that you might be interested in are: Toroid Corp of Maryland Sescom 608 Naylor Mill Rd. 2100 Ward Drive Salisbury, MD 21801-9627 Henderson, NV 89015-4249 (Transformers) (Cases) I would like to thank Norman Tracy for his help and encouragement. He gave me the incentive to build my own DAC. I would also like to thank Scott Dorsey for his technical expertise and parts stock. And I would like to thank Crystal Semiconductor and Burr-Brown for the free samples. Below is a parts list for the two DAC designs: (DAVE, PUT PARTS LISTS HERE) I am currently a graduate student at Clarkson University in Northern NY. My field of study is turbulent flows. However I have been interested in electronics from a young age. My parents bought me a Heathkit Jr. experimenter when I was in first grade, "And that was the beginning of the end." My system consists of: Turntable: VPI HW19 Jr. w/MKIII platter Arm: Eminent Technology II Cartridge: Benz Micro Gold or Blue Point (modified) Transport: Modified Kyocera D/A Converter: You know this one Pre-amp: Counterpoint SA-1000 Power Amp: Counterpoint SA-100 Speakers: Eminent Technology LFT-VI Cables (speaker): Kimber 4TC (Double Run) Cables (interconnect): Belden 89269 (W/ Canare F10 plugs) Digital: Litz Braid (W/BNCs) Accessories: Record Doctor Vacuum Home-brew MC Demag Tiptoes, and Bricks and Cinder blocks (as Component Stand) Favorite Album: I have Hundreds, but: Buellgrass, Big Day At Ojai (K2B2 Records) or Sonny Boy Williamson, Let's keep It To Ourselves or, or, or, .......