whollender
Well-known member
I mentioned a while back in the Audio Library thread that I was interested in putting together a high quality (24 bit) audio board. I finally got to a point in my projects where a higher quality audio codec board would be helpful, so I dove in and put together 2 designs. One design uses a slightly better performance codec (a Cirrus Logic CS4270) than the SGTL5000, and the second uses the highest quality codec I could find that is easily hand solderable (the CS4272).
The CS4270 DAC has slightly better performance than the SGTL5000 (-105dB SNR / 87dB THD+N vs -100dB SNR / 85dB THD+N), but the ADC has much better performance (-105dB SNR / 95dB THD+N vs -85dB THD+N / 73dB SNR).
The CS4272 has much better performance on both the ADC and DAC (both have 114dB dynamic range and -100dB THD+N).
In my current project I only really need the slightly better performance that the CS4270 provides, but I wanted to tackle the really high performance design for fun.
My end goal is to put these designs up on OSH Park once they're finished so that anyone can make good use of them. I've mostly finished the actual design work and will start on the actual layouts for the boards pretty soon (I do this all in my spare time it may take a month or two before I finish), and I wanted to see if anyone in the community had any input or extra wishes that would be easy to incorporate before I start the layout.
I've attached schematics for the two boards, and I'll quickly go through the highlights of each design:
Both boards share the same power supply design. The CS4272 and the codec I had originally chose for my middle quality board (the PCM3060) both need a +5V analog power supply and +3.3V digital supplies. I didn't want to try to pull the +5V directly off of the USB supply (or Vin) because the nominal USB voltage can vary quite a bit (+/- 10% if I remember correctly) and can be really noisy. I chose to use a buck-boost converter to take either the +5V from usb or the 4-6V from 4x AA batteries and generate a stable 5.7V, and then LDOs down to +5V and +3.3V. The CS4270 based board can actually run off of a single 3.3V supply, so I could (and I might at some point) make a third board that is just powered off of the Teensy's 3.3V supply. The power supplies are heavily filtered to prevent noise from the switching supply to infiltrate any analog signals.
I tried to make the power supply pretty flexible (power off Teensy USB power or 4x AA batteries, or skip the switcher and use a 9V battery to power the LDOs), but I was thinking about possibly powering the teensy off the switcher as well in case someone was using batteries to power the switcher, and could use the +3.3V LDO to power the teensy as well as the codec digital supply.
Both boards also share the digital interface with the Teensy. There's a digital isolator IC that prevents any voltages on the codecs while the power supplies are ramping up, and some series resistors to slow the edge rate on the I2S signals and prevent too much EMI.
The board based on the CS4270 (NewAudioBoard.pdf) is pretty simple. The CS4270 has all single-ended analog IO, and only requires passive filtering. The output filters are based on the CS4270 datasheet's recommended analog output filter, with slightly larger coupling caps to match the input network. The input filter network is also based on the datasheet recommendations, and is set up for a maximum signal level of 10dBV (20dB headroom above line level), and provides the optimal impedance (1k Ohm) as seen from the CS4270 input pins. The analog IO connectors are all 2 pin headers (signal and ground). The performance of this board should be pretty close to the ideal for the CS4270.
The board based on the CS4272 (SuperAudioBoard.pdf) is much more complex. The CS4272 has fully differential analog IOs, and good performance requires active input and output drivers. I spent a long time looking for a good audio quality, fully differential opamp that has good performance on a single +5V supply (and easily hand solderable). The only amp that I could find was the THS4521 from TI. The CS4272 eval board uses NE5532 amps, but these are normal single-ended opamps meaning that at least 2 are required for each I/O, it's hard to get much common mode rejection, and they can't really run off of a single +5V supply. The THS4521 has better THD+N and noise specs than the CS4272 and should provide the highest possible level of performance.
The two input buffers are unity gain buffers that are a combination of the recommended CS4272 input buffer circuit and the THS4521 ADC driving circuits. The resistors are pretty low-valued to maintain the THS4521's phase margin, but this results in a pretty low input impedance. The 100pF caps are for common mode noise rejection, and the 2.7nF cap goes right on the CS4272 inputs for the best ADC performance.
The output buffers are 3rd order bessel filters with unity gain in the pass band and less than half a dB of roll off at 20kHz.
The coupling capacitors on the audio inputs/outputs are all somewhat oversized (100uF) with a -3dB corner frequency below 5Hz to combat distortion due to capacitance non-linearity.
The audio inputs and outputs use 3.5mm audio jacks with the tip connection being the positive differential input, the ring connection is the negative differential input, and the sleeve is ground. This setup allows the use of either fully differential signals on TRS audio connectors, or single ended inputs using mono audio connectors (negative input shorted to ground). Single ended outputs can be set up by using TRS (stereo) audio connectors, and leaving the negative output (ring connection) open.
The CS4272 board also includes a 24.576MHz crystal to allow the codec to operate in master mode and with different sampling frequencies (48kHz/96kHz/192kHz).
If anyone has any thoughts on the boards, or if there's something I can add or change to fit your needs better, let me know, and I'll see how easily or if I can incorporate it.
The CS4270 DAC has slightly better performance than the SGTL5000 (-105dB SNR / 87dB THD+N vs -100dB SNR / 85dB THD+N), but the ADC has much better performance (-105dB SNR / 95dB THD+N vs -85dB THD+N / 73dB SNR).
The CS4272 has much better performance on both the ADC and DAC (both have 114dB dynamic range and -100dB THD+N).
In my current project I only really need the slightly better performance that the CS4270 provides, but I wanted to tackle the really high performance design for fun.
My end goal is to put these designs up on OSH Park once they're finished so that anyone can make good use of them. I've mostly finished the actual design work and will start on the actual layouts for the boards pretty soon (I do this all in my spare time it may take a month or two before I finish), and I wanted to see if anyone in the community had any input or extra wishes that would be easy to incorporate before I start the layout.
I've attached schematics for the two boards, and I'll quickly go through the highlights of each design:
Both boards share the same power supply design. The CS4272 and the codec I had originally chose for my middle quality board (the PCM3060) both need a +5V analog power supply and +3.3V digital supplies. I didn't want to try to pull the +5V directly off of the USB supply (or Vin) because the nominal USB voltage can vary quite a bit (+/- 10% if I remember correctly) and can be really noisy. I chose to use a buck-boost converter to take either the +5V from usb or the 4-6V from 4x AA batteries and generate a stable 5.7V, and then LDOs down to +5V and +3.3V. The CS4270 based board can actually run off of a single 3.3V supply, so I could (and I might at some point) make a third board that is just powered off of the Teensy's 3.3V supply. The power supplies are heavily filtered to prevent noise from the switching supply to infiltrate any analog signals.
I tried to make the power supply pretty flexible (power off Teensy USB power or 4x AA batteries, or skip the switcher and use a 9V battery to power the LDOs), but I was thinking about possibly powering the teensy off the switcher as well in case someone was using batteries to power the switcher, and could use the +3.3V LDO to power the teensy as well as the codec digital supply.
Both boards also share the digital interface with the Teensy. There's a digital isolator IC that prevents any voltages on the codecs while the power supplies are ramping up, and some series resistors to slow the edge rate on the I2S signals and prevent too much EMI.
The board based on the CS4270 (NewAudioBoard.pdf) is pretty simple. The CS4270 has all single-ended analog IO, and only requires passive filtering. The output filters are based on the CS4270 datasheet's recommended analog output filter, with slightly larger coupling caps to match the input network. The input filter network is also based on the datasheet recommendations, and is set up for a maximum signal level of 10dBV (20dB headroom above line level), and provides the optimal impedance (1k Ohm) as seen from the CS4270 input pins. The analog IO connectors are all 2 pin headers (signal and ground). The performance of this board should be pretty close to the ideal for the CS4270.
The board based on the CS4272 (SuperAudioBoard.pdf) is much more complex. The CS4272 has fully differential analog IOs, and good performance requires active input and output drivers. I spent a long time looking for a good audio quality, fully differential opamp that has good performance on a single +5V supply (and easily hand solderable). The only amp that I could find was the THS4521 from TI. The CS4272 eval board uses NE5532 amps, but these are normal single-ended opamps meaning that at least 2 are required for each I/O, it's hard to get much common mode rejection, and they can't really run off of a single +5V supply. The THS4521 has better THD+N and noise specs than the CS4272 and should provide the highest possible level of performance.
The two input buffers are unity gain buffers that are a combination of the recommended CS4272 input buffer circuit and the THS4521 ADC driving circuits. The resistors are pretty low-valued to maintain the THS4521's phase margin, but this results in a pretty low input impedance. The 100pF caps are for common mode noise rejection, and the 2.7nF cap goes right on the CS4272 inputs for the best ADC performance.
The output buffers are 3rd order bessel filters with unity gain in the pass band and less than half a dB of roll off at 20kHz.
The coupling capacitors on the audio inputs/outputs are all somewhat oversized (100uF) with a -3dB corner frequency below 5Hz to combat distortion due to capacitance non-linearity.
The audio inputs and outputs use 3.5mm audio jacks with the tip connection being the positive differential input, the ring connection is the negative differential input, and the sleeve is ground. This setup allows the use of either fully differential signals on TRS audio connectors, or single ended inputs using mono audio connectors (negative input shorted to ground). Single ended outputs can be set up by using TRS (stereo) audio connectors, and leaving the negative output (ring connection) open.
The CS4272 board also includes a 24.576MHz crystal to allow the codec to operate in master mode and with different sampling frequencies (48kHz/96kHz/192kHz).
If anyone has any thoughts on the boards, or if there's something I can add or change to fit your needs better, let me know, and I'll see how easily or if I can incorporate it.