ESP32-based Internet Radio Streamer

A long time ago I bought an ESP32 module off of Ebay. I can’t really remember what for, but I did.

These things are dirt cheap, costing something like 4-5€ with shipping and feature a 32 bit dual core processor, plenty of flash and RAM and a wireless module supporting both WiFi and Bluetooth. They also sport a lot of GPIO and there is official Arduino support from the manufacturer ( https://github.com/espressif/arduino-esp32 ), so programming them is very easy. In fact, here is a guide to flashing the module with the Arduino IDE.

So the module arrived a couple of months later, in typical China-to-Greece-by-post fashion. By that time I had literally forgotten what I had bought it for. So it then lay there in a drawer for 4 or 5 years until I randomly came across an article that mentioned that it can output I2S! That was news to me, and obviously interesting.

After a brief google search I came across this project: https://how2electronics.com/simple-esp32-internet-web-radio-with-oled-display/ which then led me to this very cute library: https://github.com/schreibfaul1/ESP32-audioI2S

So I entered my favorite internet radio’s URL, plus my WiFi credentials into the code and loaded it to my ESP32 using the Arduino IDE. Surely enough, I saw in my serial port that the ESP32 connected to my WiFi access point and then opened successfully the streaming radio station. I could see on my oscilloscope that it was indeed outputting I2S. Excellent!

Then I hooked up a tiny DAC board that I had lying around (sporting an ES9023 chip – very practical since the ESP32 does not output an MCLK signal), and the thing worked flawlessly on the first try!

So I thought that I should do a carrier board for the ESP32 that would perform the following:

  1. Host the ESP32 board,
  2. Provide regulated power to the ESP32,
  3. Provide headers for serial port (programming), SD card, extra I/O, and perhaps for an LCD,
  4. Do galvanic isolation of the I2S signals,
  5. Provide buffered I2S output for connecting to an outboard DAC board,
  6. Have an on-board DAC with line level outputs.

Since this device would only stream internet radio (a.k.a. “heavily compressed audio”), the on-board DAC did not have to be anything special. So let’s go with the all time classic ES9023.

Let’s also do a relatively good power supply for the critical component (dac chip) but nothing extreme. The rest of the audio-related components can be powered by well respected LP5907 LDOs, while the actual ESP32 can be powered by a run-of-the-mill LM1117.

So this is what I came up with:

Gerbers were generated ( ESP32_DAC_v1_Gerbers (4856 downloads ) ) and an order was put into a well known Chinese board manufacturer.

A couple of weeks later the boards turned up:

And were promptly populated:

Here is the complete Bill of Materials for this board: ESP32_DAC_v1_BoM (6593 downloads )

A suitable power supply was also implemented and integrated into a proper case:

And here is the completed device in action:

This was a pretty simple and relatively low cost project, an ideal way to keep busy for a couple of winter evenings.

Also it is a good way to listen to high fidelity internet radio without needing to keep an entire PC and DAC powered up. So it’s good for the environment.

It would not be difficult to add an LCD that would display the artist and track that is playing.. perhaps sometime in the future.

Soekris dam1021 update

Hi guys, long time no see.

Easter time here, so I have some time to spare, so here it goes.

Update on my DAM build

My Soekris has had a number of upgrades performed to it over the last 2-3 years that I haven’t posted about and it’s about time that I did.

The first upgrade was a switch from Salas BiB 1.1 to an UltraBiB 1.3. I wrote about the upgrade on the official UltraBiB thread:

I was (and still am actually) one of the lucky few that got to beta test Salas’ new baby.

This thing is remarkable.When we swapped it in place of the BiB 1.1 in my Soekris, the improvement was immediately obvious and not subtle. There was a general improvement in clarity and silence, but the biggest improvement (imho) is that the music appeared to have more energy in the lower mid area, where before it was kind of “dry”. This was with Salas’ very first prototype, built with standard (non-boutique) components. The board that I built with audio grade capacitors in the filter bank and MUSE BP caps in the output sounded even better.

I do need to experiment further with different brands of caps (especially in the C2 & C3 positions) but in any case this is an excellent power supply, substantially better than the BiB 1.1, both subjectively (the way it sounds..) as well as objectively (measured performance).

The next upgrade was when I upgraded my firmware to the newer firmware (rev.1.21) that doubles the number of supported filter taps from 2K to 4K. Even the basic / included filters provided a substantial improvement in imaging and detail. Definitely a worthwhile upgrade.

The final upgrade was the design and implementation of my own XMOS-based USB receiver, specifically for the DAM:

The idea was to include just the right mix of features that would make sense for the DAM1021. So, I did include ultra low noise LDOs (LT3045 & LT3042), SDA oscillators, reclocking with a Potato FF, but I skipped galvanic isolation since the DAM already supports it.

The improvement it made in sound quality was remarkable. It’s funny how all digital devices that are supposed to be immune to I2S signal quality turn out to be.. well.. influenced by I2S signal quality. The USB receiver that it replaced was the DIYINHK XMOS receiver that I have used in my DAM, which was pretty decent at the time of purchase. But the newer XMOS family (XUF208) coupled with the ultra low noise LDOs and the reclocking apparently did the trick.

The funny thing is that the prototype I built was actually tested in a good friend’s DAM and has been living there ever since. Someday I’ll build another one for my DAM. For the time being, I’m busy with my AKMs and ESS’.

Update on the DAM board offering.

A few days ago Soren announced Rev. 7 of the DAM1021:

(picture courtesy of soekris.dk)

According to Soren, the new boards will include the following changes / improvements:

1) it use the same FPGA and same uC as usual, so should be able to use same firmware, there are some differences, so new firmware are needed and will autodetect board.

2) The shift registers are now also in the smaller qfn packaging as used on other boards, so I don’t need to stock the tssop types anymore….

3) Output shift registers now running at 1.4M/1.5M sample rate, making FIR2 filter different. Will require new filter file, but plan to use same filter file for both old and new boards, firmware will load filters as needed.

4) The R-2R network is now 24+3+1, ie 24 bit classic R-2R network, 3 bit thermometer network, plus the sign, total 28 bits.

5) Yes, still same Si514 clock, but now in a small package (like I use on other boards), and it drives the shift registers directly, no added jitter by going though the FPGA. People who want to bitch about the Si514, please go elsewhere, we have heard you multiple times….

6) The clock Power supply is separate and use a LP2907 low noise regulator.

7) New vref supplies, like used on the dac2541. For those who want details, yes it use a opamp with transistor buffer, with a polymer output capacitor. Lower vref impedance from DC to Megahertz.

8) Those are powered at +-5.4V from LM317/LM337 pre regulators.

9) Output opamps are opa1678.

10) Power in are now DC only, optimal is +- 9V.

11) The board is mechanical and almost electrical compatible with previous version of the dam1021.

12) J9 is 4 bits user i/o, planning to use it for additional SPDIF inputs.

13) The non isolated serial management port is now TTL levels, not real RS232 levels. So get the right USB to serial adapter….

So quite a few changes, with the most significant being the Si514 having its own regulator (mentioned at a later post in the thread) and driving the shift registers directly. Plus new VREF supplies.. These improvements should be pretty audible.

It looks like the only flavor that will be available will be the dam1021-12.

We’ll see how it will go.

Dual Mono AK4493 DAC (MK II)

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)

This is the 4-layer PCB:

And this is the BoM (v1.9) in xls format: Dual AK4493 DAC (main board BoM) (18563 downloads )

The finished board looked like this:

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.

  1. Reclocking is indeed a good idea, offering both measurable improvement in jitter as well as better sound quality.
  2. 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.
  3. 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).

The hardware of the controller is the same that was used with the Dual Mono AK4490 DAC.

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.

Download it here: aKduino v3 (67563 downloads )

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.

Allo DigiOne S/PDIF HAT

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..

The Raspberry Pi 4 Model B: Game changer for audio?

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).

An “Audio Grade” Raspberry Pi

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:

RPi 3:

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.

That will probably be a summer project..

Linear DC Power Supply Basics

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.

Soekris dam1021 Frequently Asked Questions & Resources

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.

F.A.Q.

Q: Where can I get firmware, manuals, etc?
A: http://www.soekris.dk/download.html

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: How do I upload new firmware?
A: Through the serial port(s). See: https://www.dimdim.gr/2015/02/soekris-r-2r-firmware-upgrade/

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: Is there a way to run truly “NOS”?
A: Yes: http://www.diyaudio.com/forums/digital-line-level/269776-filter-brewing-soekris-r2r-post5452884.html  ???  Beware that the specific filter is not compatible with the current DAM firmware (rev 1.19), since it now supports 4K taps (it used to support 2K taps).

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.

Q: What does the dam1021’s output buffer schematic look like?
A: The circuit has changed since the first revision. The current (rev.4&5) circuit looks like this: http://www.diyaudio.com/forums/vendor-s-bazaar/259488-reference-dac-module-discrete-2r-sign-magnitude-24-bit-384-khz-post5347636.html



Resources

Official thread on diyaudio.com: http://www.diyaudio.com/forums/vendor-s-bazaar/259488-reference-dac-module-discrete-2r-sign-magnitude-24-bit-384-khz.html
Filter brewing thread: http://www.diyaudio.com/forums/digital-line-level/269776-filter-brewing-soekris-r2r-147.html
Soekris’ DAC implementations : http://www.diyaudio.com/forums/digital-line-level/267948-soekris-dac-implementations.html
Wiki: http://www.diyaudio.com/wiki/Soekris_R2R_DAC?
HiFiDuino : https://hifiduino.wordpress.com/
Randytsuch : http://randytsuch-audio.blogspot.com/2015/11/soekris-r2r-dam-dac.html
moredamfilters.info: https://web.archive.org/web/20161025204639/http://www.moredamfilters.info/

..and of course my posts about the dam1021:

Main Soekris DAC page: https://www.dimdim.gr/diyaudio/soekris-dam1021-sign-magnitude-r-2r-dac/
dam2012 s/pdif inputs board page: https://www.dimdim.gr/diyaudio/soekris-dam1021-spdif-usb-board/
ArDAM1021 page: https://www.dimdim.gr/arduino/ardam1021-project/
ArDAM1021 Lite page: https://www.dimdim.gr/arduino/ardam1021-lite-project/
dam1021 Vref mod : https://www.dimdim.gr/2015/09/soekris-dam1021-vref-mod/
dam1021 firmware update info : https://www.dimdim.gr/2015/02/soekris-r-2r-firmware-upgrade/

Let me know if I missed anything (I’m sure I did..).

I’ll try to keep this FAQ updated.

Linear power supply for the Raspberry Pi: is it worth it?

Pretty much everyone agrees on this one, still, it took me a while to get on the bandwagon. Probably because I am not using an RPi as my main transport..

In order to test this I needed a proper linear power supply, capable of outputting at least one “real” amp at 5V. It would also have to be as low noise as possible. After some searching I ended up picking the TPS7A4501 for the job. Since its output voltage is adjustable, it would also come in handy for various projects. So I designed a PCB that would do a proper job of “hosting” the regulators along with the necessary rectification and filtering stages and had a bunch of them made.

I also ordered a proper custom-made toroidal transformer, one that would have 5 secondary windings, each of them outputting 6VAC at 1.5A and one sixth winding outputting 3V at 2A. The end game would be to replace all of the RPi’s on-board switching regulators with linear ones.

But for starters I’d just power the RPi with 5V via its USB port. Here are a couple of RPi 3s being powered by my linear supplies. This setup would be used to compare the Allo.com original Boss with its new “v1.2” version. More on that in another post.

Power draw on the linear power supply was measured to be at about 500mA @ 5V.

My “reference” 5V SMPS is this one:

It’s an old but beefy switching mode power supply from an old HP tablet. It’s specc’ed at 5.3V @ 2A.

In order to be as impartial as possible, I took the setup to a friend’s house and had him and a couple of other friends audition the RPi powered either from the SMPS or by my linear power supply.

In both cases, the RPi was running Archphile and was connected to my upgraded-with-ES9028Pro-and-Mercury-Buffalo III DAC via USB.

The difference between the two power supplies was immediately obvious. It was like with the SMPS we had an at-best mediocre source – DAC combination, while with the linear power supply the setup became “proper”, it sounded “in-place” among my friend’s high performing system. The sound stage became better defined, the detail level went up, overall the presentation was more realistic. In other words, it was like the jitter of the system went down, but perhaps the noise levels in the system also decreased.

In other words, IMHO no serious audiophile should be powering his RPi by a run-of-the-mill 5V SMPS, even if he is using it as “just a USB transport”.

Arduino controlled Dual Mono AK4490 DAC (Part 3)

Following up on Part 2, it’s time to talk about the output stage.

This output stage is the brainchild of my friend Kostas, all I did was lay out the PCB.

It is a fully discreet single-ended class-A output stage, outputting ~2.4V RMS.

This is its schematic:

This is the PCB:

And this is the BoM: AK4490 dual mono DAC - Discrete Analog stage BOM (158956 downloads )

The BoM includes part numbers for most parts from Mouser. The only parts that are not in production and must be found elsewhere are the UPA68H. Ebay is a good bet. Chances of getting fake parts are pretty small, but just in case do this to double check the ones that you bought: http://www.diyaudio.com/forums/analog-line-level/296406-salas-dcg3-preamp-line-headphone-post5330311.html (Thank you Salas for the info and the idea to use them in the first place!)

The only parts that need matching are T8A with T9A and T8B with T9B. There’s no need to go crazy with the matching – within 5% should be enough.

Power should be ideally +/-16VDC. A bit less is OK (I did my initial testing with +/-12VDC) but more will most likely damage the board. The board is running in class-A so current draw is constant. A power supply with 100mA current capacity should be enough.

Bias current is adjusted by the multi-turn trimmers R26A and R26B. They should be adjusted to their mid value before soldering to the board (~1K). To adjust bias just measure current consumption at one of the rails while turning the pot. Adjust for ~25mA total current draw per rail and per channel. Current draw on the negative rail should be about 1mA higher than on the positive rail. Bias should be re-adjusted if the power supply voltage needs to change.

After bias adjustment and with no input signal you should check for DC at the outputs. If everything went well you should be seeing anywhere between 0 to a few mV of DC voltage.

A few design notes:

  • This design is inverting. I’ve set up my AK4490 code to also invert the 4490’s outputs so as to end up with a non-inverting overall output. But it doesn’t seem to be making much of an audible difference, since I can’t hear a difference as I’m switching between inverting and non-inverting output.
  • There is provision for a relay that switches between the default filter for PCM (-3db @ ~90KHz) to a more proper filter for DSD (-3db @ ~50KHz). This feature has not been tested yet..

Regarding the resistors, we’ve chosen to go with mini MELF resistors (type 0204) because of their high quality and in general excellent reputation for audio. We are aware that some of the necessary values ATM are kind of hard to source so we’ve included notes in the BoM with the really critical parts and valid value ranges for the less critical other values. Note that “+/-5% from initial value” does not mean that the parts tolerance can be 5% – it means that instead of for example a 10K resistor you can use a 10K + 5% = 10.5K part. It still has to be matched to its counterpart, of course.

I am including these substitutions, as reference:

Instead of the proposed 604R : —-> https://gr.mouser.com/ProductDetail/Vishay-Beyschlag/MMA02040C6190FB300/?qs=sGAEpiMZZMsU0eETUM64Jwu1lXnAfA1Az%2fUBmHPWxBQ%3d
Instead of the proposed 62R —-> https://gr.mouser.com/ProductDetail/Vishay-Beyschlag/MMA02040C5909FB000/?qs=sGAEpiMZZMsU0eETUM64JzhzDaxYafIopmV6xoU7Pd%2faEeFyYr39dw%3d%3d
Instead of the proposed 49,9R —-> https://gr.mouser.com/ProductDetail/Vishay/CMA02040X3909GB300/?qs=%2fha2pyFaduinSoUQ%252bxM%252bcspKJgxV2WgydeZC1mFkJQ0%3d
Instead of the proposed 499R —-> https://gr.mouser.com/ProductDetail/Vishay-BC-Components/CMA02040X4700GB300/?qs=sGAEpiMZZMsU0eETUM64J9XrXp4g00LTnadULizxluo%3d
Instead of the proposed 33R —-> https://gr.mouser.com/ProductDetail/Vishay-Beyschlag/CMA02040X3309GB300/?qs=sGAEpiMZZMsU0eETUM64J5DAE%2fHuiq02KfqnEeQjWns%3d
Instead of the proposed 10R —-> https://gr.mouser.com/ProductDetail/Vishay-Beyschlag/CMA02040X1009GB300/?qs=sGAEpiMZZMsU0eETUM64J5wRh77yguxgpX8F3yMYvKE%3d

The value of two of the required 1K resistors (the R20A & R20B) is critical, so you should use these —-> https://gr.mouser.com/ProductDetail/Vishay-Beyschlag/CMA02040X1001GB300/?qs=sGAEpiMZZMsU0eETUM64J5DAE%2fHuiq026nqxTapoB%252bc%3d
for the other 6 non-critical 1K resistors you can use these —-> https://gr.mouser.com/ProductDetail/Vishay-Beyschlag/CMA02040X1201GB300/?qs=sGAEpiMZZMsU0eETUM64J5DAE%2fHuiq02Tdrq8lX57XI%3d

The value of the 120R resistors is critical, so are the tolerance of the 49.9R (substitution for 39R) resistors. Their values should be matched.

This concludes Part 3. The next post will detail how everything works together.