Audio DAC: The DAC Board Doesn't Work

Audio DAC: Part II

Let’s start by doing a quick recap. I’ve gotten my USB <-> I2S setup working the way I like; the CP2615 is outputting what appears to be good I2S data on my oscilloscope.

The DAC Board

I also designed and ordered DAC boards. The schematic was actually fairly simple to design, since I mostly followed the TI reference designs for their PCM5242. This board was a bit more complex than the initial one for two reasons: more passives and having to create 3.3V. Neither is particularly hard, but it did indeed make for more places that things could go wrong.

So Many Packages

Well, I realized quickly that I had been sloppy about selecting footprints when I created the board files. I ended up having to order far too many package variants for my passives. I had selected 0402, 0603 and 0805 packages. Not only did I have to order them all, populating them was annoying because I kept having to find the part, apply solder paste, placing one or two parts and then do it again for another resistor with the same value but a different part. PROTIP: Be consistent in package sizes unless you have good reason not to!

The Good News

I was able to use my $20 Toaster Oven to reflow solder the board, which was good. I used some flux and touched up some of the areas that needed some cleanup, but all things considered, the board looked great! For good measure, I brought it to work where I was able to use a microscope to verify that everything was connected pretty well.

On first power-on, the little blue LED I used to indicate that the +3.3V power rail was being created correctly came on! So far so good! I used my oscilloscope to verify that the signal integrity looked good for all the inputs. I checked that the PCM5242 was creating its internal clock correctly, and indeed it looked good. Finally for the check of the DAC output and….. nothing?

The Bad News

Well that isn’t right. There should be some output, right? I double checked the datasheets for the CP2615 and the PCM5242 to make sure that the data format was correct: 24 bits I2S, 48KHz sample rate. The input data certainly looked right. But no output. This was an annoyance mostly because there was no great way to figure out what was wrong, so I reached out to the TI E2E (Engineer-to-Engineer) forums (ticket).

Fortunately, Paul_Frost was quick to help me figure out what was wrong: in hardware mode, the timing requirements for the input master clock are very strict. The 12MHz master clock created by the CP2615 chip was not compatible with the clock that the PCM5242 required. It turns out that the PCM5242 needs a power-of-two multiple of the sample rate (e.g. 256 x 48KHz = 12.288MHz), and 12MHz was not close enough. I had apparently been too quick in reading the datasheet section on this, as I had seen a requirement that the clock was +/- 4% and since 288kHz / 12MHz is 2.4%, I had thought I was in the clear. I was wrong.

What This Means

Paul_Frost pointed to a section of the datasheet that will help me work around this issue. Essentially I have to route the 12MHz input clock through a GPIO, using it to generate its own clock from that and then use another GPIO to output that clock back to the I2S interface. This is annoying because it requires using Software mode, which I did not design for (the I2C and GPIO pins are not routed anywhere). So this will require a board spin.

This is also a bit annoying because I had hoped to avoid a micro controller in this first design, for simplicity of design. Sure, I could go shopping for another DAC or for another USB to I2S solution that is more directly compatible with this DAC, but two things kept me from that:

  1. There seem to be rather few USB <-> I2S solutions. TI has discontinued the family used in their reference designs for some reason, with no replacement.
  2. Adding a micro controller on board brings along with it a decent amount of overhead for actually programming the thing. I really don’t want to complicate the design yet with this.

To this end, I’ve chosen to simply bring out the GPIO and I2C pins to headers, and then I’ll use an Arduino or something that I already have to configure the DAC. I don’t love this, but I think it’s the simplest thing to do for now.

For Next Time

Let’s redesign this board a bit, and hopefully we’ll get audio output! Unfortunately this isn’t a fast process, partially because I don’t have as much time as I’d like to work on this, and partially because OSHPark, while they have great boards, take a few weeks to turn around a board (it’s the price you pay outside of the $8 per 3 boards–rather fair I’d say).

Issues to Address

  1. The input connector is flipped
  2. Too many different packages on passives
  3. No DAC output