As mentioned in a previous post, I wanted to build an integrated DAC and streamer to go with my XP-7 headphone amplifier. My search for a suitable DAC led me to the PCM1794A and further searching led me to the slowdiyer who, yet again, had built exactly what I wanted.
A previous build had me attempting to incorporate a Pi (for streaming duties) with a DAC HAT into an amplifier build. I had to omit the Pi in the end because I couldn’t get rid of noise. It was most likely the power supply, so hopefully the filtered supply for the Pi used in this build, designed by slowdiyer, should help in that regard. At its heart is a Meanwell IRM 20-5 AC-DC encapsulated module with a switching frequency of 65kHz. Low-pass filtering to reduce ripple is provided by a CLC pi filter. I must admit that I got hopelessly lost here trying to work out values for the inductor but the advice given was to ensure that the supply doesn’t drop too much below 5V or the Raspberry Pi will switch off. I chose an inductor from the AIAP-3 series and worked from the datasheet to get a value. The datasheet gives the inductance value, the maximum resistance (DCR) and maximum current of the inductor, bearing in mind the Pi needs at least 2A. Looking at an inductor (150uH) with a 2.22A max rating shows a DCR value of 0.129 ohms so using ohms law, the voltage drop here would be 0.28V. Decreasing the inductance value to 100uH gives a higher max current draw of 2.79A and lowers the voltage drop slightly to 0.25V. I’ve had the Pi running on this supply and haven’t experienced any problems.
The DAC board requires 12V and 5V supplies and this comes from another slowdiyer designed PCB. The PSU is a regulated power supply available in a number of formats and for this build I have chosen the Triple PSU which incorporates dual rails and an auxiliary supply. Regulation comes from the use of LM317/337 regulators with the voltage set by the use of two resistors, the values of which can be found using an online calculator. It can be difficult to get a precise voltage using standard value resistors and so on some boards a trim pot is used or, as Rod Elliott does on his P05, using two parallel resistors. The datasheet recommends R1 to be 240ohms – this requires R2 to be 2064 ohms for the 12V supply, so I used 2.1Kohm. For the 5V rail I used 330 for R1 and 1K for R2 to give 5.04V. Two toroidal transformers of 15VAC are used, 12-0-12 and 9-0-9. Although one transformer could do the job, the drop from 12V to 5V would generate a lot of heat at the regulator. The LM regulator ICs require approximately 3V more than the desired output, which needs to be taken into account when choosing a transformer.
One of the problems of the Raspberry Pi has been the audio quality, hence the proliferation of DAC HATs. The form factor of these in conjunction with the Pi makes case building a bit of a nightmare, with connectors on three sides. A solution comes in the form of a Sample Rate Converter (SRC) board with an I2S interface which utilizes the AK4137 chip. This provides a master clock, missing from the Pi, and is supposed to reduce jitter. The digital signal is inputted to the Pi from the USB or ethernet ports or from the onboard WiFi, through the Raspi HAT then onto the DAC via some jumpers. Only the side of the Pi with the data ports needs to be exposed, and even this could be dispensed with if you just require WiFi.
I couldn’t find much information about these boards except for an occasional post on a long thread on DIYAudio. There are two versions; a standalone option which has a display, and the HAT version for the Pi, which is what I bought (Edit 09/2021): This board seems to be discontinued now). The display version would be nice to have, but as the SRC outputs at a fixed bit depth and sample rate, it seems superfluous except possibly for an easy visual check and aesthetics of course. The Pi is loaded with Volumio 2 and the Raspi 4137 is configured in Volumio using the HiFiBerry DAC settings.
The board can output PCM up to 32bit 384kHz and DSD up to DSD256. There are also a number of filter options to choose from. All the options mentioned above are selectable via a series of jumpers (K1-K10) and a detailed guide for this can be found below. It would be nice to have these selectable by a switch but for my purposes this will do fine. Archimago has a good post on filters and sample rates which makes for interesting reading.
|Select output mode|
|DSD64||Short circuit||Short circuit|
|DSD128||Not connected||Short circuit|
|DSD256||Short circuit||Not connected|
|PCM||Not connected||Not connected|
|Bit depth selection|
|PCM Bit depth||K3||K4|
|16bit||Short circuit||Short circuit|
|20bit||Not connected||Short circuit|
|24bit||Short circuit||Not connected|
|32bit||Not connected||Not connected|
|Sampling rate |
|PCM Sampling |
|44.1kHz||Short circuit||Short circuit||Short circuit|
|48kHz||Not connected||Short circuit||Short circuit|
|88.2kHz||Short circuit||Not connected||Short circuit|
|96kHz||Not connected||Not connected||Short circuit|
|176.4kHz||Short circuit||Short circuit||Not connected|
|192kHz||Not connected||Short circuit||Not connected|
|352.8kHz||Short circuit||Not connected||Not connected|
|384kHz||Not connected||Not connected||Not connected|
|Short delay slow roll-off||Short circuit||Short circuit|
|Slow roll-off||Not connected||Short circuit|
|Short delay sharp roll-off||Short circuit||Not connected|
|Sharp roll-off||Not connected||Not connected|
|Activate DoP Mode|
|Active DoP||Short circuit|
|Disabled DoP||Not connected|
|Raspi Pin Number (DOUT)||DAC CONNECTION|
For the DAC itself I chose a semi-populated board from Ebay utilizing the PCM1794A as mentioned above and previously. According to the datasheet the PCM1794A device uses the SCK input as the system clock and automatically detects the sampling rate of the digital audio input when valid BCK and LRCK clocks are supplied. Output can be up to 24 bit /192kHz. Although it has internal filters, these can be bypassed by the Raspi SRC board.
All the SMT elements are pre-soldered leaving the op amps, terminal connectors and film caps to be bought and fitted. The supplied schematic has OPA2604 and NE5534 op amps. The OPA2604 are obsolete, so I used NE5532AP as I had some already. Because I used DIP sockets these can be easily rolled if I feel the need or want to experiment. The film caps are Wima 2.2nF polypropylene.
For my first test I used my workspace setup so the DAC is connected to my ESP P88 preamp and Pass ACA amplifier. I set the Raspi SRC board to 24/96 with a sharp roll off filter and streamed music to it from my NAS using Bubble uPnP on my phone. Everything worked on the first attempt which is always a relief. In case you are wondering, the music in the video is Fratres by Arvo Part and performed by the fantastic Third Coast Percussion.
A test with the XP-7 headphone amp passed with flying colours; it all sounds really good, with no noise that I can hear although I was told by my better half that it may look better in a case.
I bought the enclosure from a seller in China I’ve used previously. It’s not just about price, for me the quality, finish and construction style are second to none. I would go as far to say that these enclosures are easily on a par with the Modushop ones, at least in the non-heatsinked styles. This particular enclosure has a 3 mm backplate, top and bottom panels, 4 mm sides and an 8 mm front and cost £56 including postage to the UK. If you do some searching you can often find examples with AC inlets, RCA jacks and so on, already machined out. The case I chose had a cutout for the IEC inlet only, so I had to deal with the power switch, Raspberry Pi ports and RCA jacks. You can get these machined from various online fabricators but it can end up costing more than the enclosure itself. I drill and hand file the back panel cutouts myself; they could be neater, but this is DIY and I’m working with what I’ve got. I also had to wait for a break in the weather as my casework has to be done outside. It has been very wet and windy here in the UK for the last couple of months and so it wasn’t until Christmas Eve that I managed to get the drilling completed.
The power wiring is such that the rear panel switch only breaks the circuit for the two toroidal transformers, the Raspberry Pi remains always on unless turned off at the wall socket. The Pi needs to be shutdown through software before power is disconnected or the SD card can become corrupted. I know I’ll forget to do this and I don’t want to have to get the card out to upload a new image to it. This way I can power down the Pi when I remember without worrying about it.
On a final note, much of the credit for this build must go to Slowdiyer. I really like this site as projects are often made available but they aren’t step by step guides. You’re encouraged to do some of the research yourself, but help is always at hand and freely given if you get stuck. The PSU PCB Gerber files are available from the Slowdiyer website and I had mine manufactured by JLCPCB as usual.