Time flies when you’re having fun. Or are just too busy with things, in general.
It’s been two and a half years since I posted about my Dual Mono AK4490 DAC. That DAC has been built and is in use by at least 6 people, other than myself. All of them have been very satisfied with its performance.
But since then quite some water has passed under the bridge.
Among other things, the AK4493 chip came out, and it was just that much different than the AK4490 that I had to update my design to accommodate it.
Feature-wise it was pretty enticing. It looked more like a limited performance version of the AK4497 than an upgraded version of the AK4490. So I had to try it out.
Since I was going to update the PCB design, I thought I might as well improve on as much as I could. So, the new board would:
Include a new reclocking solution. I went for the best specc’ed chip out there, the famous Potato Semi PO74G374A. One chip would take care of the all of the I2S lines for both DAC chips.
Add a couple of external 1.8V DVDD power supplies.
Make some optimization of the LT3042 local regulators’ layout, in order to accommodate larger package capacitors (1206) where it would make most sense.
Give access to the zero-detect lines of one of the dac chips. These pins could be used to easily implement auto muting of the output stage.
Give access to the Enable pin of the Si570/Si544. The use of this Enable pin will be explained later.
In addition I would use the then new Si544 programmable oscillator, offering improved performance over the Si570. This did not require any changes to the pcb.
This is the updated schematic:
(Right click, Save Image As.. to download it in full resolution)
The design consideration, powering scheme and clocking considerations remain the same as with the original design. There is not much sense in repeating the same text here. I will make a few notes though, based on the experience gathered from building, testing and listening to several such DACs.
Reclocking is indeed a good idea, offering both measurable improvement in jitter as well as better sound quality.
The pre-regulators that power this board matter. A lot. Especially the ones for AVDDL & AVDDR. We got the best (audible) results by using a couple of paralleled LT3045s.
In a resolving system, any change in anything makes audible differences. I was particularly surprised to hear how much of a difference having correct (and uniform across my devices / stereo components) electrical phase in my power cords made.
Also, having a properly designed and implemented USB to I2S receiver is very important. Early on I realized that it would be best if I designed my own XMOS-based receiver board, custom tailored to my needs. It would also include some light USB line conditioning and an AK4118-based S/PDIF receiver with 4+2 inputs. I would then standardize my DAC designs with this inputs board in mind, including properly supporting it in my Arduino code.
And so this board came to be:
Describing in detail this board is beyond the scope of this post, but suffice it to say, building it is not for beginners. Plus you will need XMOS’ xTAG programmer to burn firmware into the XMOS chip. If anybody is feeling particularly adventurous, drop me a line and I’ll see if I have any PCBs left.
Now, regarding the Arduino code needed to control this board(s), it is not very different than that used to control the AK4490s. The main differences are:
It has been adapted to enable the AK4493s’ PCM/DSD auto detection feature
It has support for all of the AK4493’s digital filters
It has support for triggering a muting relay
It now supports the Si544 instead of the Si570
It offers full compatibility with my XMOS / SPDIF board.
There are a number of to-do’s though, such as displaying the bit depth of the incoming PCM signal (from the USB port), plus more information on the incoming DSD stream (such as whether it is in DoP or Native format).
In this download I am including the modified versions of the libraries (as mentioned in the above linked post) as well as the necessary font files. Be sure to extract the contents of “Libraries (place in Libraries folder)” to your Arduino IDE’s “libraries” folder.
Regarding the output stage, it is the same design that was used for the AK4490 DAC. However its output level is slightly lower than that of the AK4490 board since the AK4493’s VREF voltage is limited to 5.25V, compared to about 7V of the AK4490. This difference in volume is easy to compensate for by changing a few resistors on the output stage.
Here is a pic of the 3 boards in action:At the time of this writing there have been built 4 DACs based on this updated DAC design PCB.
If anybody is interested in building this DAC drop me a line. I have a few spare boards lying around.
First off, I’m ashamed to admit that I had this little gem in my possession for about 2 years before I finally got the chance to put it through its paces.
After all, it’s just a s/pdif output device for a Raspberry Pi, right? I mean, it’s just s/pdif, how good could it be?
It turns out it can be pretty damned good! But I’m getting ahead of myself.. Let’s start at the beginning.
The DigiOne is a HAT compatible with most if not all RPis and supported by most if not all audio distributions. It is intended to be plugged-in directly on top of the RPi, with no need for an isolator HAT. Plus, it is designed to be powered by the RPi via the GPIO header, so no need (or provision) for an external power source.
The DigiOne utilizes a WM8805 to convert the RPi’s I2S signal into s/pdif. The WM8805 is run in master mode, so as to minimize jitter due to the RPi’s problematic I2S clocking scheme. The WM8805 is clocked by the same oscillators that are used to reclock the s/pdif signal.
The WM8805’s s/pdif output goes through an Si8641 150MHz galvanic isolator and is passed to the “clean” side of the board.
There the signal is reclocked by a high quality flip-flop clocked by high quality NDK oscillators (housed inside a metal box, used for shielding against EMI/RFI). There exist two oscillators, one for the 44.1K family and one for the 48K family of sampling rates. The output of the oscillators is put through NB3L553s for buffering and isolation.
The entire isolated part of the board is powered by a DC-to-DC converter that offers galvanic isolation. Following this converter there exist a large number of LDO regulators and filter components. An LT3042 regulator is used to power one of the most critical parts of the circuit: the flip-flops that do the final reclocking.
So, very solid engineering all around. But how well does it sound?
The answer is, surprisingly well for the money.
My RPi stack included an RPi 3 with the DigiOne, powered by Salas’ new L-Adapter power supply and running Archphile. The music was coming from my NAS. No audiophile ethernet switches were employed. 😛
Pitted against that I had my Logitech Squeezebox Touch running the EDO plugin for up to 192K s/pdif from its coax output and my relatively pricey Pioneer DV-LX50 Universal Player (using its coax s/pdif output).
The music used was Dire Straits’ SACD album (having selected its CD (and not SACD) layer) which was also accurately ripped to my NAS.
Output from the s/pdif transports went into an AK4118-based s/pdif receiver of my own design which in turn feeds my dual mono AK4493 DAC. The DAC’s output goes through a Salas DCG3 preamp into my Hypex amp.
First up was the Pioneer. It had been a while since I had listened to it through its s/pdif output so I was in for a bit of a shock. Its output sounded coarse, strained, tiring. For a moment I thought that it was due to the SACD’s mastering (the CD layers of SACDs are rumored to be mastered intentionally bad so as to give the impression that the SACD layers sound even better than they actually do), but that changed when I switched to the Squeezebox. Things got noticeably better, actually listenable. Not exactly close to what I had been accustomed to using the Squeezebox’s USB port, but closer.
Then I switched to the DigiOne. Wow! All of the “coldness” of the music was gone, the stage gained depth and width, the music became more detailed and lifelike. This was definitely a step up.
I would dare say that this s/pdif setup came in fact close in SQ to my USB setup. This was a very pleasant surprise.
Now I need to do some A-B testing between the DigiOne and the USB output of the RPi. So to-be-continued..
About a month ago the Raspberry Pi 4 was announced, pretty much blind-sighting everybody.
For the last (many) years, since the announcement of the RPi 2, we had been used to relatively minor incremental upgrades every time a new RPi came out.
Usually the new processor was a bit faster, we got WiFi and BT, then better WiFi, then faster (almost) GbE network, etc. But until now, all of these connectivity options had to be accommodated by a single USB 2.0 port on the SoC.
But this year everything changed. We got a new SoC (the BCM2711), one that finally supported an RGMII interface for a true GbE port, plus a PCI Express port that is used to give USB 3.0 & 2.0 connectivity at useful speeds.
We also got more processing speed and more RAM options, up to 4GB of fast LPDDR4 memory, dual HDMI outputs, etc.
So, all of the above specs mean that the RPi is definitely faster and more capable than ever as a desktop replacement. But is it indeed a better audio streamer for us audiophiles?
For starters, it’s been almost a month since its announcement and availability (I got my unit delivered just 3 days after its announcement) and AFAIK the well-known audio distributions do not yet support it.
Then there is the increased system complexity and power consumption that comes with the new architecture. More power consumption and more ICs usually mean more noise. More noise is never good news for audio.
So I had to do some testing. The idea was to compare the RPi 3 that I had for a couple of years now to the RPi 4.
To keep the playing field as level as possible both of them were running the exact same software (Raspbian Buster Lite, since ATM that is pretty much the only OS that supports both of the platforms) with MPD loaded and were powered by the same (excellent) Salas L-Adapter power supply.
Connection to my DAC (DIY dual AK4493, very detailed) was through USB 2.0.
The music streamed from a NAS box over Ethernet.
I had a friend over in order to at least try to have a bigger sample size (of ears).
The music used was a handful of tracks that we always use for such comparisons (well known material).
We listened using the RPi3, then shut it down and booted up the RPi4, listening to the same material.
Much to our surprise, we actually preferred the sound of the RPi3!
The RPi4’s presentation had something of a “fatiguing” effect. The sound was a bit more “coarse” that that of the RPi3.
We are not talking about big differences here, but they were there. Note that my system is pretty resolving, every change to any component is audible, so YMMV.
I’m not saying that my (our) results are 100% conclusive, but in any case it seems like I’ll be going ahead with my “Audio Pi” project after all (I was considering waiting for the Compute Module 4 to come out).
Not much free time these days so updates have been slow.. but I have a lot of interesting stuff cooking in the back burner.
One of them is an audio grade RPi.
Essentially it will be a Compute Module 3 on a mainboard loaded with ultra low noise linear power supplies and some necessary peripherals.
The idea came to me quite some time ago but it wasn’t until last November that I decided to actually go ahead with it.
The proof-of-concept PCBs for the mainboard were done by December.
It appears that even the PoC board, with average quality power supplies, has a cleaner I2S output compared to a standard RPi3 powered by an equivalent linear power supply:
Audio grade Pi:
The next part was the PoC board for the USB Hub & Ethernet controller. That took a bit more time and a 4-layer PCB with numerous 0402 sized components but it too ended up just fine (with the exception of a bad RJ45 footprint..).
So now I have a fully functioning set of boards with average quality power supplies that already performs better than my Squeezebox Touch as a USB transport.
Next step is to design a single board integrating all of the components plus ultra high quality power supplies.
I apologize in advance if this sounds a bit elitist on my part, but it amazes me just how many DIY audio hobbyists need help planning their power supply solutions.
And I’m not talking about “Salas or LPS-1” discussions, I’m talking about “what voltage should my transformer put out” type of discussions.
So I’ll attempt to clear up the basics.
First up, you’ll need to know your load. This means voltage and maximum current requirements. Based on those, you will know what your options on power supplies will be. The options are too many to get into – switching vs. linear, series vs. shunt, LDOs vs. batteries, etc etc.
The point of this post is not to help you select a power supply topology – that decision is largely subjective anyway.
For our exercise, we’ll assume that our load requires a power supply capable of outputting 5V at up to 1A. We’ll also assume that we’ll be making a “classic” LM317 regulator based power supply.
This is the part of the power supply’s circuit that we’ll be focusing on.
Our task is to select a proper power transformer, rectification stage and filtering capacitor.
Selecting the transformer’s output voltage
Looking at the LM317’s datasheet we see that it requires an input-to-output voltage difference of at least 3V to function properly. This means that in order to get regulated 5V at its output, its input unregulated voltage will need to be at least 8V.
To get 8VDC after rectification and filtering, our power supply will need to supply at least 7V AC. This 7V AC will become 7 x 1.414 = 9.9V – 1.8V (worst case voltage drop on the rectifier diodes) = 8.1V DC.
In real life we will need to take into account possible “sagging” of the power grid by a few volts during certain hours of the day, so it would be a good idea to compensate for that by choosing a transformer with an output voltage slightly higher than the theoretical one. In our case, instead of 7VAC a safer choice would be ~8VAC.
Selecting the transformer’s power rating
Power rating in transformers is expressed as “Volt Ampers” (VA), also known as Watts. It’s the product of the transformer’s output voltage times its rated output current. So a transformer that is characterized as “12V 120VA” is capable of outputting 12VAC at 10A.
Going back to our example, we’ve stated that our load requires 5V at 1A. We have already calculated our transformer’s necessary output voltage to be 8VAC, so 8 VAC times 1A equals 8VA, right? I’m afraid not. This is the most common pitfall for electronics hobbyists when it comes to power supplies. They assume that a transformer rated at 12VAC @ 10A can in fact still deliver 10A after the voltage has been rectified and filtered. But that can not happen. If it did, it would mean that the transformer is outputting more power than what is being put into it.
The thing is, the total power that can be “transformed” by a transformer is fixed, so since the rectification and filtering results in a DC voltage higher than the available AC voltage, the corresponding maximum current must be smaller.
So in our case, to get 1A DC out of our 8VAC transformer we will need a transformer rated for at least 1.5A of current, so 8 x 1.5 = 12VA.
Realistically, to have the transformer running cool and noise-free, we’d double that and go for about 25VA.
Component selection: Rectifier diodes
In order to keep the diodes running cool and reliably you should choose parts rated for at least three or more times your expected load current. This is especially important when building shunt power supplies which draw constantly relatively high currents. For audio circuits opt for ultra fast recovery diodes, such as the MUR series (~25ns). In case of high currents (>1A) be sure to either mount the diodes at least a few mm off the board (in case of radial parts) or use heat sinks (in case of diodes that can accept them). Each diode drops up to about 0.9V, so when they are passing ~1A of current they will need to dissipate almost 1W of heat. That is quite a lot of heat for a small part.
Component selection: Filter capacitor(s)
The filter capacitor is a hard-working component. It has to charge and discharge about 100 times a second (120 times in the US), so as to smooth out the fluctuating voltage that comes out of the rectifying stage. The more current the load is pulling, the harder the capacitor has to work. In our example, since the capacitor is quite possibly charging to the maximum available voltage coming out of the rectifiers, its voltage rating has to be at least (8VAC x 1.414) – 1.8 = 9.5VDC. Taking into account the fact that transformers under no load output a voltage that is higher than their rated voltage, you should go for a capacitor with a voltage rating that is reasonably higher than the minimum required.
Regarding the value of the capacitor, things are just a bit more difficult to figure out, but in the end it all boils down to one thing: how much voltage ripple are we OK with (a.k.a.: is our regulator and load able to tolerate). Once we have determined that, all we need to do is do the math. An excellent description of the theory behind this is this page: http://www.skillbank.co.uk/psu/smoothing.htm
So, C = Iload / 4 * f * Vpk-pk ripple. For example, let’s say that we would be OK with 0.5V ripple. We have: C = 1A / 4 * 50 * 0.5 = 1A / 100 = 0.01F = 10.000uF
One last thing you should keep in mind is the ripple current rating of the capacitor. A good guesstimate is a value at least two times your expected load consumption, but that may vary a lot when you get into high performance audio grade power supplies. For more information (that is beyond the scope of this post) have a look here: http://www.skillbank.co.uk/psu/ripple.htm The spreadsheet linked at the bottom of the page is a great resource.
It has come to my attention that the “Contact me” form add-on I’ve been using was kind of buggy. The kind of buggy that apparently led to me receiving approximately half of the messages sent to me.
This has been going on for (most likely) about a year and has been fixed only lately (since about a month ago).
So, if you’ve tried to contact me via this form in the past but have received no reply, it was due to this bug. I definitely reply to everyone that contacts me, even though at times it might take me quite some time.
So, anyone who’s tried to contact me with no success, please try again.
It’s been almost 3 and a half years since the introduction of the dam1021 to the DIY audio community.
In these 3 years there have been sold close to 2500 units (according to a serial no. that I noticed on a picture of a rev.5 unit) that have made a large number of audiophiles very happy.
The dam’s main thread at diyaudio.com is about 740 pages long, and while the first post has been edited to keep the specs and the firmware info up to date, there are still certain questions that keep popping up over and over again.
In this post I’ll try to address as many of them as I can.
Q: What are its power requirements? A: According to the manufacturer, power should be supplied by a transformer with two secondaries at 7 to 8 volts AC. The transformer should have a rating of at least 5VA. Alternatively, you may power it by a bipolar DC power supply outputting between +/-7.5 and +/-15 Volts. Power consumption is ~160mA for the positive rail and ~60mA for the negative.
Q: Does it support DSD? A: Yes, DSD64, DSD128 and DSD256 (only native) has been supported since firmware rev. 1.06 (released May 2016) through the I2S input. DSD does get converted to PCM in order to be converted to audio by the R2R ladder (obviously.. we’re talking about an R-2R DAC).
Q: How do I control input selection? A: Input selection is done either by connecting switches to J3 (see manual for more details) or by commands sent through the dam’s serial ports. There also exists an “auto input selection” feature.
Q: How do I control volume? A: Either by connecting a pot to the relevant pins on J3 (see manual) or by commands sent through the serial ports.
Q: What if I want to add IR remote control? A: You’ll have to use a microcontroller like an Arduino. I’ve done two such projects, ArDAM1021 and ArDAM1021 Lite.
Q: What is the latency from digital input to analog output? A: About 1mS. link
Q: How come the new firmware (rev. 1.19) does not play as loud as the older firmwares? A: According to the manufacturer “The new 1.20 firmware and 4K filters have zero at -2 dB, the dam1021 then add 1 dB gain, resulting in zero at -1 dB with 1 dB margin, ie when volume level is set to 0 then it’s 1.26V rs output at resistor network, about 1.9V at buffered single ended and 3.8V buffered balanced.” link
Q: Can I use a pair of them as a 2-way digital crossover? A: Yes, in theory you can, but it’s not fully supported by the manufacturer. Read below to understand why that is so.
Q: Can I sync several DAMs, for example to implement a digital crossover? A: According to the manufacturer “multiple dam1021 running on same clock will sync to within a few uS” link
Q: How do I actually implement the HP and LP filters? A: You need to design your own custom filter files and load them. “the dam1021/dam1121 have the hardware with support for up to 15 IIR biquad filters per board” link Not for the faint of heart.
Q: I have “ Rev x”, do I need to do power mods? A: If you have a Rev. 1 board you do need to perform the mods. Later revisions are OK. Rev. 5 has 20 x 100uF Samsung caps so definitely no need for power mods. link
Q: What can I do to make the DAM sound better? A: a) Don’t use the buffered outputs. Their SQ is inferior to the unbuffered outputs.
b) Use a proper power supply. The better the PS, the better the sound. In my experience, the best one so far is the Salas UltraBiB.
c) Use a custom filter pack. Beware that custom filter packs may not support DSD or take advantage of the increased available number of taps made possible by the latest (rev 1.19) firmware.
d) Be sure to insulate the screw mounting holes from the (grounded) chassis by using non-conductive screws or some other method.
Q: I’m feeding my dam1021 audio from my RPi’s I2S output. Why does some music play fine while some does not? A: Most audio RPi distributions output whatever they find in the music file without altering it, like for example a 44.1K/16bit FLAC file will produce a 16bit I2S signal. But the dam1021 only supports 32bit I2S signals. The solution is to force the RPi to only output 32bit I2S. Different audio distributions have different ways of accomplishing that.