lingDAC - cost effective RBCD multibit DAC design

The industrial-looking filter might turn out to be overkill, we shall see :)

I built a one-inductor filter which copies fairly closely the response of the filter on the original PhiDAC (CLC) - its a little different in one capacitor value because the inductor's higher Q. I was curious to see if the extra effort of those two additional LC stages was really worth it. My wife did a listen on a few music samples and definitely preferred the more complex filter - it had 'better dynamics, more low level detail apparent'. To my ears the 3 inductor filter renders the higher notes of piano more faithfully, they're 'jangly' with the single inductor filter. For those who wish to save on the BOM cost though, the schematic of the single inductor filter's attached.

The next experiment in line is to compare NOS against 2XOS, with their dedicated filters.....
 

Attachments

  • NOS3rdLC.png
    NOS3rdLC.png
    40.5 KB · Views: 289
Frequency response measurement

Here's the FR plot for the 2XOS filter. The source is Foobar playing a 44.1kHz white noise track created in Audacity - its upsampled in Foobar by SoX to 88k2. The plot comes from Audacity which I used to record the output (at 192k) - stop band visibility is curtailed by Audacity's lower display limit of -90dB.

Note that to run at 88k2 the active filter - which provides the NOS droop correction - needs some R,C value tweaking to correct for 2XOS droop. 2XOS droop is much less severe (0.75dB @ 20kHz) than NOS droop (~3dB @ 20kHz).
 

Attachments

  • FRat88k2_2XOSfilter.png
    FRat88k2_2XOSfilter.png
    98.8 KB · Views: 241
Last edited:
Impressive result. It starts dropping fast slightly just before 20kHz, but at 30khz (where a plot is crossing vertical line) there is nearly 47dB difference.

I am looking forward for your listening test of NOS vs. 2xOS filter version.

BTW, How are lockdown restrictions in your area? Asking because most of South African react very negative to the lockdown. I think both China and S Korea have made extraordinary work to stop the epidemic and South Africa (unlike of US and many others) did chose a right strategy, but people are impatient. So I'd like to know how life is going after a main battle.
 
Last edited:
At present no restrictions at all in going around though various supermarkets/malls have temperature checks and QR code scans on entry. I'm still not leaving home without my mask though I notice perhaps 1 person in 20 isn't wearing a mask now. There's the threat of a 2nd wave to consider...
 
Here in the US, I'm stuck at home with only essential trips out allowed. I am a third grade teacher, and have transitioned to teaching via video conferencing with my class. Essentially, we have asked every parent to be a home school teacher. Families are so stressed by this reality that we have been advised to only send enough work home to prevent a backward slide, while providing some semblance of community through the screen. It will be interesting to see the long-term social consequences of this crisis.

Richard, I have to thank you for inspiring me to have a fresh listen to oversampling with TDA1387. For the first time, I have achieved some satisfactory results.

In the past, I've tried using Volumio for on-the-fly upsampling of locally stored 44.1K music on several occassions. Never liked it. For me, the added treble was not worth the loss of clarity and spatial realism. Volumio uses SoX, and it does have different quality level options, though I'm not sure which of the SoX phase response algorithms are employed.

Some have suggested that RPi is not a powerful enough machine to do this job well, and most agree that RPi audio is cleanest when CPU load and power consumption are kept low. I also suspected that the upsampling algorithm itself was smearing the audio. The only time I've actually LIKED the results of Volumio's resampling was when I was playing around with Burr-Brown DACs. It seemed that feeding upsampled 192K audio to PCM1793 and 1794A (thus bypassing--I think--their on-chip oversampling filters) made these DACs sound their best. But TDA1387 sounded best without it.

Yesterday I decided to have a go at upsampling my files prior to playback using XLD for Mac. This freeware utility batch processes audio files using SoX, and includes all the filter options. I ran the same Redbook album through three times, upsampling to 88.2K with all three of the "Very High Quality" options--Linear, Intermediate, and Minimum phase. Of course, this doubles the size of WAV files! (Using FLAC it is not so drastic....closer to a 50% increase). Worth it?

I did some listening over headphones last night and a bit through speakers today. Playing these upsampled files is clearly superior to on-the-fly upsampling via Volumio. The expected results of added treble are all here: sound stage is brought forward and widened a touch. Treble is cleaner and leaner, of course. Less sweet/rich and more transparent. Do I (gulp!) enjoy IMD in my treble? Maybe I like a little roll-off?

I am still assessing the subjective effects of oversampling on the time domain. Out of the filter options, I seem to be gravitating toward the linear phase because it sounds most precise, and seems to best preserve the dynamic realism and unique three-dimensional spatiality these DACs are renowned for. This could easily be sighted bias...as I believe a good deal of the NOS "magic" comes from phase coherence. I feel I am getting more of that imaging magic over speakers from the 44.1K files, although the transparency of 88.2K over headphones is quite nice. I certainly don't have reference equipment and can only report my unique results...and neither my full-range speakers OR my headphones (or any headphones, for that matter) have accurate treble response to begin with. Plus, all this social isolation has almost certainly compromised my judgment :)
 
Last edited:
@stellarelephant.
I don't know options in Volumio nor whether Volumio is using floating point internally, Foobar does. Did you try SoX on the fly resampler with default options in Foobar? (It is DSP addon).

Default options work well for me. For the best results upsample by integer number 2 or 4. By example 44.1kHz source to 88.2 and 48kHz source to 96. You probably did, just to be sure.

[EDIT] I hear that RPi 3 B have a hardware instructions for floating point. Earlier versions do not. Keep it in mind when resampling on RPi. You need hardware FP 32-bit (at least) for on-fly resampling.

I use PC, I wasn't aware of. All Intel CPU's include hardware support.
 
Last edited:
If using SoX as a Foobar plug in (as I do) its important to note that merely selecting the output sample rate in SoX doesn't change the hardware settings. The hardware (on mine its the CM6631 USB interface) needs to have its sample rate selected independently from SoX/Foobar to enable output at 88.2kHz. Hardware changes are made via the Sound - Playback tab, Properties button (assuming Windows here).
 
High frequency distortion/imaging

Here's a look at out-of-band output from the NOS filter. The stimulus signal is 15kHz playing out at 44.1kHz from Foobar. The lowest image frequency of 15kHz is 29.1kHz - it shows up here around the same level as the 2nd harmonic distortion (at 30kHz).
 

Attachments

  • 15kHz_44k1.png
    15kHz_44k1.png
    82.5 KB · Views: 315
If using SoX as a Foobar plug in (as I do) its important to note that merely selecting the output sample rate in SoX doesn't change the hardware settings. The hardware (on mine its the CM6631 USB interface) needs to have its sample rate selected independently from SoX/Foobar to enable output at 88.2kHz. Hardware changes are made via the Sound - Playback tab, Properties button (assuming Windows here).
If this settings in Windows does matter to you, it is indication of outputing audio through the Windows Direct Sound mixer. By using DS mixer you can ruin your listening tests and measurements, it is why it is important.

With Foobar there are two cases where it can happen:

1. You have selected in Foobar output DS:[your driver name], not a WASAPI:[your driver name] nor ASIO:[your driver name]. Select one of these two.

2. You did select WASAPI output in Foobar, but you didn't give application exclusive access in Windows sound properties. My Foobar complains in such case.

A proper Windows configuration for WASAPI is as below, example with pictures on Win7 :
1. Properties for your driver.
2. Volume 100% and balance 100%.
-. Disable all enhancements, next tab (no picture)
3. Exclusive mode and priority.

When all is set and application wants to use WASAPI exclusive mode (Foobar does), Windows setting for sample rate and bit depth (the last picture) do not matter.
 

Attachments

  • Sound_panel.png
    Sound_panel.png
    63.9 KB · Views: 306
  • Volume.png
    Volume.png
    40.6 KB · Views: 299
  • exclusive_mode.png
    exclusive_mode.png
    43.9 KB · Views: 291
Last edited:
THD 1kHz

Here's the 1kHz distortion plot for the PhiDAC Quad with NOS filter. To get this plot I applied a Q=3 notch filter at 1kHz to allow me to amplify the harmonics which otherwise wouldn't show up on Audacity's FFT being as they're below -90dB. The applied gain after the notching is 40dB so the 2nd harmonic level is -91.7dB (add -40dB to the left scale) and the others are beneath that.
 

Attachments

  • 1kHzTHD.png
    1kHzTHD.png
    91.2 KB · Views: 283
@abraxalito. In the event you still didn't manage to bypass DS mixer but afraid to ask, I have to add that Foobar do not have WASAPI nor ASIO support in default installation. WASAPI as ASIO support is implemented as addons, downloadable from the same Foobar website.
A link for WASAPI: foobar2000: Components Repository - WASAPI output support
and ASIO: foobar2000: Components Repository - ASIO support

After installing WASAPI add-on there is an option to set for WASAPI in Foobar Advanced->Playback->WASAPI->High worker process priority
It works together with application priority option in Windows Sound panel (the last picture). Hope it helps.
 
News update

We've been in contact with our wound components factory and although they've been back in operation for a few weeks now they're preoccupied with producing power supplies for mask-making machines. I'm sure you'll agree this is a far more urgent use of their time than winding coils/transformers for DACs.

So, given the PhiDAC Quad relies on custom-wound inductors in its filter it means DIYers either wind them themselves or buy them ready-made from me as part of the built-up and tested filter daughterboard. I don't intend to wind inductors manually myself and sell them individually or as part of kits. Of course this means that the filter modules are going to be a bit expensive, containing as they will my labour. I'll work on estimating how expensive over the next few days. The main DAC motherboard will still be available as a kit as originally envisaged.

If anyone has any other ideas, I'm all ears. I can do various options of filter daughterboard - using 1, 2 or 3 inductors if there's any interest in simpler filters (which of course will also be cheaper).
 
NOS filter frequency response

I've been building up 3-inductor NOS filters for the past couple of days so here's the frequency response of a representative one. The stop-band rejection is showing as better than 60dB above ~27kHz which isn't at all dissimilar to the result in LTspice. The price paid is extra attenuation of the very top end of the band, above ~18kHz. Those whose hearing goes up that high might consider running 2XOS :)
 

Attachments

  • Window001.png
    Window001.png
    37.9 KB · Views: 100