my prototype of DAC

996 views
Skip to first unread message

Ondřej Lutera

unread,
Sep 28, 2012, 5:12:02 PM9/28/12
to audio-...@googlegroups.com
Hello,

I'm impressed by audio-widget. I'm working on my prototype with i2s isolation. I hope, it will work.

http://luta.7u.cz/imgLinks/dac.png (cadsoft eagle)

sorry for my english :)


Alex Lee

unread,
Sep 30, 2012, 3:33:18 AM9/30/12
to audio-...@googlegroups.com

Looks very impressive :-)

We will be very interested in the SQ that can be obtained with the isolation.

What is the power supply to the analog side and the XOs?

Alex

luta

unread,
Sep 30, 2012, 4:01:27 AM9/30/12
to audio-...@googlegroups.com
Hi,

thanks.

For XOs and AVCC of DAC is used two low noise LDOs TPS7A4901DGNT. For i2s isolation is used IL717. USB module is powered from USB and DAC from low noise power sources.

Børge Strand-Bergesen

unread,
Sep 30, 2012, 4:10:13 AM9/30/12
to audio-...@googlegroups.com
Cool stuff!

I'm almost done with the layout of an insulated module which will be
AB-1.2 compatible and run in isolated mode on analog boards made for
that.

I haven't yet looked at the analog board which may hold such a module.
Some way it needs to do DC-DC or AC-DC power conversion.

Børge
isomod_20120930.png

luta

unread,
Oct 3, 2012, 2:51:44 PM10/3/12
to audio-...@googlegroups.com
nice little module :) I worked on my usb module today. I flashed firmware over usb and dfu-programmer in Archlinux x86_64 (very fast flash wow).. but after usb disconect/ conect nothing happens..widget needs some init over pins like vbus_sense? or needs mclk for usb enumeration etc? (in boot mode module is enumerated fine)

thanks

Alex Lee

unread,
Oct 4, 2012, 2:05:21 AM10/4/12
to audio-...@googlegroups.com

You need vbus at +5v.

luta

unread,
Oct 19, 2012, 11:44:27 AM10/19/12
to audio-...@googlegroups.com
http://luta.7u.cz/imgLinks/audioweb/sdrwidget/DAC.JPG It works!

Dne pátek, 28. září 2012 23:12:02 UTC+2 luta napsal(a):

Alex Lee

unread,
Oct 20, 2012, 11:07:17 PM10/20/12
to audio-...@googlegroups.com
Hi Luta,


Excellent!  We will be very interested in the sound quality of your prototype with the i2s isolation.

Do you have any plans to produce more units?  Any plans to have a matching enclosure/ PSU to sell it as a ready to use unit?

Alex

luta

unread,
Oct 21, 2012, 4:39:16 AM10/21/12
to audio-...@googlegroups.com
Hi Alex,

Thanks. I'm going to measure my DAC in next few weeks. My DAC is based on i2s module -> IL717 -> PCM1794A -> I/V section LM6172 -> LT1028. As clock source on DAC side are two fox xpresso HC736 oscilators (low cost) - I going to do some jitter test - I hope.

Yesterday I only measured audio-out by DSO Nano scope. Looks like on low sample rates 44.1 or 48kHz MCU generates some noise on i2s (about 5-10mV on audio-out)..On 176.4 or 192kHz is audio-out clean. I'm going to measure it again on 60MHz scope in my work and look to source code..

I'm not planning to produce more units. I don't have much time to it. But maybe I will produce only usb modules for diy scene from Czech Republic. My module is pin compatible with Borge's module.

I will provide DAC schematic and board layout  under the GPL.

SDR/Audio-widget is great open-source project

Thanks all 

Dne neděle, 21. října 2012 5:07:17 UTC+2 Alex Lee napsal(a):

Ondřej Lutera

unread,
Oct 22, 2012, 8:21:18 AM10/22/12
to audio-...@googlegroups.com
first test on Xonar DX... -2dB and -6dB ..not so good result as I though


Dne neděle, 21. října 2012 10:39:16 UTC+2 Ondřej Lutera napsal(a):

Hobbit13

unread,
Oct 30, 2012, 6:20:55 AM10/30/12
to audio-...@googlegroups.com
Looks good to me, distortion is below -110dB, isn't the Asus Xonar the limiting factor?

If you stick to 48Khz/24bit stereo, USB1 will do, and AD makes very good USB isolators, that are easier to implement. (difference in soundquality between 48 and 96KHz is negligible).

Interesting design!

Ondřej Lutera

unread,
Oct 30, 2012, 6:42:46 AM10/30/12
to audio-...@googlegroups.com
Hi,

Yes probably is Xonar limiting factor.. But 2. harm. is product of DAC.. thd+n is very low but with rising sample rate it rises..even if input sampling rate is still 44.1k. On  44.1k is about 0.0009% but on 88.2k is 0.0015% (xonar input on 44.1k)

But bigger problem is some vf noise on audio-out.. 5-10 mV f > 10 MHz seems like some noise from wordclock i2s .. Noise is present only if USB is plugged and MCU generates zero samples (wordclock enabled).. maybe bad board layout..

Hobbit13

unread,
Nov 2, 2012, 8:18:46 AM11/2/12
to audio-...@googlegroups.com
Do you have schematics or eagle files of the whole dac? (I have found them for the USB module)

The module looks OK, not that different from the original one. 

Can you bypass the I2S isolator? Maybe for 88.2KHz the loop-back latency introduced by the isolator is too high. The propagation is delay for that part is 10ns. The AVR chip syncs the masterclock from the DAC board to the Data and bitclock it sends. The masterclock is 24.57MHz (I assume), thus 10ns delay generates a phase shift of 90drg in the masterclock that is received by the AVR. For the bitclock (88.2k*24*2) the 10ns delay results in a 15drg phase shift. Simplifying things quite a bit, one could say there is a 30drg pahse shift between the masterclock of the PCM1792 and the Bitclock. Maybe the 30drg is above the limit, and the 15drg in 44.1KHz mode is below the limit?

cheers

Hobbit13 

Ondřej Lutera

unread,
Nov 2, 2012, 1:50:52 PM11/2/12
to audio-...@googlegroups.com
I think..If the phase shift is stable, then it does not matter..

seems like product of ultra fast I/V and DAC.. maybe noise from digital side of PCB because is correlated with bitclock.. or product of delta sigma or noise shaping..I am going to do some other tests

no. schematic isn't public for now.. I am working on it and learning on it :)


Dne pátek, 2. listopadu 2012 13:18:46 UTC+1 Hobbit13 napsal(a):

Hobbit13

unread,
Nov 5, 2012, 3:32:46 AM11/5/12
to audio-...@googlegroups.com
Hi Ondrej,

Delay is indicated to be 10 to 15ns, so it won't be perfectly stable. But I was referring to a constant, but too high offset between bit clock and masterclock. But page 17 of the PCM1792 datasheet explicitly states that the master clock and bit clock do not need to be in phase, they may even shift 6 bit clock ticks before reclocking is needed. So my theory does not held stand. 

You could look at the closed loop gain-frequency plots of the opamps used in the I/V state. They often have a sort of resonance frequency, for which the gain is much higher as for other frequencies, if a clock signal lies within such a resonance frequency it might cause analog noise. Rebuild the opamp stage including the feedback resistors / caps into LTSpice and correct the gain function for the opamp. 

Ondřej Lutera

unread,
Nov 6, 2012, 8:37:13 AM11/6/12
to audio-...@googlegroups.com
Some photos from scope : http://luta.7u.cz/imgLinks/audioweb/sdrwidget/scope/

first two pictures views DAC output noise with zero samples - maybe is a product of pcm1794 multibit delta-sigma architecture and noise shaping

Dne pondělí, 5. listopadu 2012 9:32:46 UTC+1 Hobbit13 napsal(a):

Ondřej Lutera

unread,
Dec 27, 2012, 2:54:20 PM12/27/12
to audio-...@googlegroups.com

Alex Lee

unread,
Dec 31, 2012, 10:55:28 PM12/31/12
to audio-...@googlegroups.com
Very impressive :-)

When you are ready I would like to order a built unit (preferably with enclosure) from you :-)

Alex

Ondřej Lutera

unread,
Jan 1, 2013, 12:33:49 PM1/1/13
to audio-...@googlegroups.com
Hi Alex,

thank you. I'm sorry, but I will not provide built units. It's only DIY :) my hobby and I don't have much time to made units for others. But I can help you over mail with "howto" build it :)

The prototype with PCM1794 works good but it hasn't very good pcb layout so I dont recommend it to build. I have new pcb layout with some changes in schematic (Flea power supply for XOs, slow rolloff,better LPF filter,better layout, 0.1% mini melf rezistors in I/V,...) but not tested yet and not shared. If someone test it, I share it for all. This prototypes isn't cheap. As DIY with enclosure it's over 200$ (only material)

In my country PCM1794 isn't good renown against AD1955. AD1955 is probably better DAC with better performance in 24bit/192k and I will focus on it. It's much more complicated design with software initialization over SPI.

Ondrej

Dne úterý, 1. ledna 2013 4:55:28 UTC+1 Alex Lee napsal(a):

Ondřej Lutera

unread,
Jan 2, 2013, 6:32:37 PM1/2/13
to audio-...@googlegroups.com
Hi,
Today I installed toolchain 3.4.1 and compiled firmware from git. I would like to study firmware sources..

But I had some issues with CFLAGS. I edited ../src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/subdir.mk , src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/subdir.mk and src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/subdir.mk and added $(CFLAGS) for compile header files features.h and usb_descriptors.h which are included in  USBB drivers

After this firmware was compiled well
Maybe I did something wrong :)

Ondrej

On Friday, September 28, 2012 11:12:02 PM UTC+2, Ondřej Lutera wrote:

Alex Lee

unread,
Jan 3, 2013, 8:48:28 AM1/3/13
to audio-...@googlegroups.com
Hi Ondrej,

That's fine :-)  I have the capability to build the unit, but I have not enough time :-)

When I can find a volunteer to build the unit for me, I will get in touch with you.  Or if you find someone who can build it for a fee, please let me know.

For the sound quality with i2s isolation, I think $200 or more is reasonable :-)

Thanks.

Alex

Ondřej Lutera

unread,
Feb 14, 2013, 2:25:02 PM2/14/13
to audio-...@googlegroups.com
Hi,

I'm still working on second version of PCM1794A DAC..

maybe bad question but why are connected together GCLK pins with SSC SCK/LRCK clock? Is possible to disconnect AD GCLK and SCK if I don't using AD converter (I think yes)? And what about DA GCLK? Is this for generate clock from PLL and 12 MHz MCU oscilator - compatibility with sdr-widget or is it needed by SSC (dont know)?

I looked in the datasheet and the source files, but I'm not sure.

Thanks

On Friday, September 28, 2012 11:12:02 PM UTC+2, Ondřej Lutera wrote:

Alex Lee

unread,
Feb 14, 2013, 9:12:52 PM2/14/13
to Audio-Widget

GCLK is used to generate the i2s SCLK for the DAC.  The DAC is run in slave mode.

If there is no ADC you can leave out the ADC side connections.

However, the MCLK to OSC1 is mandatory.

Alex

--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alex Lee

unread,
Feb 14, 2013, 9:16:57 PM2/14/13
to Audio-Widget

Also, i am interested in your second version.  Please make one more for me if possible.  i will pay for both the parts cost and the construction cost.

i want to find out the difference in SQ with the i2s isolation.

Alex

Ondřej Lutera

unread,
Feb 15, 2013, 2:43:34 AM2/15/13
to audio-...@googlegroups.com
Hi Alex,

Thank you.. So GCLK generates SCLK and SSC synchronizes DATA and LRCK with GCLK, its true?

Ondrej

Alex Lee

unread,
Feb 15, 2013, 2:49:42 AM2/15/13
to Audio-Widget

yes.

Ondřej Lutera

unread,
Mar 23, 2013, 9:16:58 AM3/23/13
to audio-...@googlegroups.com

Alex Lee

unread,
Mar 23, 2013, 9:24:52 AM3/23/13
to Audio-Widget

Excellent !!!

How about the SQ?

Ondřej Lutera

unread,
Mar 23, 2013, 9:34:24 AM3/23/13
to audio-...@googlegroups.com
Thanks!

I'm sorry but I'm listening only on Beyerdynamic DT860 + TPA6120 headamp for now.. Sounds very good! Better than first prototype. But we will try it on DPA222 and mosfet DPA330 with VMAII loudspeakers in few weeks.. DPA is Czech amps from Pavel Dudek and VMAII is Czech speakers from vmaudio (very good)  http://www.vmaudio.cz/clanky_pokracovani/vma_2.php http://www.diyaudio.com/forums/solid-state/152945-pavel-dudeks-upupa-epops-amplifiers-ii-20.html and probably on  DPA223 + Totem100 (low cost loudspeakers but very good too) http://www.loudspeakersoft.com/TOTEM100.html (sorry only cz pages)

Alex Lee

unread,
Mar 23, 2013, 9:41:06 AM3/23/13
to Audio-Widget

Good.  It confirms that i2s isolation (and power supply tweaks) can improve SQ significantly.

Alex

--

Ondřej Lutera

unread,
Mar 24, 2013, 4:58:16 PM3/24/13
to audio-...@googlegroups.com
Some measurements : http://luta.7u.cz/imgLinks/audioweb/sdrwidget/DAC2/ seems like PCM1794A has worse right channel.. :( It's second version DAC with big changes in layout and used material..

I tested:

1) analog channels in first prototype - cut wires on DPS and switch channels.. analog side is ok
2) check data on digital side - ok
3) changed values of Rf and Cf in IV..

Made new PCB with diferent (much better) layout.. better IV section, vishay melf in IV, paired resistors and capacitors etc..problem still persists

Yesterday I checked:
1) SW swapped channels..
2) HW invert LRCK..
3) Increase IREF resistor = decrease Iout from IV..

nothing helps.

So maybe its feature :)) PCM1794A is cheaper than orig. old PCM1794.. maybe someone didn't make changes in datasheet :)

Ondřej Lutera

unread,
Mar 24, 2013, 5:00:48 PM3/24/13
to audio-...@googlegroups.com
of course.. DAC is new IO .. texas sample! original.. in IV new AD8066.. in LPF new OPA827

Ondřej Lutera

unread,
Apr 28, 2013, 2:00:35 PM4/28/13
to audio-...@googlegroups.com
We did listening tests and sounds very good on Hi-End audio system (13000$).. But..

I have some problems with playing under windows + foobar + asio plugin + uac2 asio driver. Sometimes foobar freeze while I changing song or while I shift song. But after clicking stop and then play everything is OK. seems like some feedback problem on PC side..:(

Alex Lee

unread,
Apr 28, 2013, 9:05:30 PM4/28/13
to Audio-Widget
1.  Try another PC - it may be an issue with the USB port;
2.  Try Linux or Mac OSX
3.  Are you using the latest firmware and driver?

Alex

Ondřej Lutera

unread,
Apr 29, 2013, 2:54:07 AM4/29/13
to audio-...@googlegroups.com
1. tried (friends desktop with win7, my laptop hp 4340s with win8 (actual),6 years old laptop win7, I will try another desktops) 
2. tried - no problems on Archlinux 64b
3. yes, but maybe I will try older fw

Is there some debug info on uart? 

Regards

Ondrej


Dne pondělí, 29. dubna 2013 3:05:30 UTC+2 Alex Lee napsal(a):

Hobbit13

unread,
Apr 29, 2013, 3:33:28 AM4/29/13
to audio-...@googlegroups.com
AudioWidget is not is very stable device in my opinion. I often have strange bit errors. Then restarting a song helps. Happens more often when there is a lot of load on the PC (like during virus scan). On higher bitrates, it also happens more often, in UAC1 modus it is much more stable.
With longer USB cables or USB hubs things get worse. And the quality of the I2S master clock matters. Firmware updates did not improve matters in my case. 

Unfortunately, I never really got grip on a "single" cause of the problems.

cheers

Hobbit13
Message has been deleted
Message has been deleted
Message has been deleted

Ondřej Lutera

unread,
May 10, 2013, 9:34:56 AM5/10/13
to audio-...@googlegroups.com
I tested DAC in Ubuntu 13.04 on HP 4340s and no problems.. Problem occurs only in Windows with UAC2 and ASIO (Foobar or JRiver MC).. I will try to analyze problems over USB analyzer from pakets and NetMon.. 

Dne pondělí, 29. dubna 2013 9:33:28 UTC+2 Hobbit13 napsal(a):

Alex Lee

unread,
May 10, 2013, 10:04:21 AM5/10/13
to Audio-Widget

You might like to try setting foobar to " real-time priority".

Alex

Alex Lee

unread,
May 10, 2013, 10:06:09 AM5/10/13
to Audio-Widget

Borge/Nikolay,

Any chance the latest ASIO driver was built with "debug" rather than "release" ?

Alex

Nikolay

unread,
May 10, 2013, 10:48:11 AM5/10/13
to audio-...@googlegroups.com
I don't know, latest driver was making Børge, but size of release version asiouac2.dll is about 100K, debug ~500K.

Nikolay

пятница, 10 мая 2013 г., 21:06:09 UTC+7 пользователь Alex Lee написал:

Ondřej Lutera

unread,
May 10, 2013, 1:26:25 PM5/10/13
to audio-...@googlegroups.com
Hi Alex,

thanks for reply... I must say that JRiver MC is much more stable then Foobar. UAC1 is without bugs.. UAC2 in foobar has problematic only in scrolling (e.g. from 1:00m to 1:45minute)  and changing songs in playlist.. In JRiver MC for now I trying to reproduce freezes but today its ok..dont know why :/ . I will try another player with asio support.. I dont like JRiver MC..

I have widget in mode usbi2s , uac2_audio and for now enabled log 2 sec ( where is log? uart?)  quirks none, last firmware.

Thanks

Dne pátek, 10. května 2013 16:04:21 UTC+2 Alex Lee napsal(a):

Børge Strand-Bergesen

unread,
May 10, 2013, 2:13:59 PM5/10/13
to audio-...@googlegroups.com
Alex, the latest driver was a release build. Let me know what you are looking for and I can build a debug version.

Børge

Ondřej Lutera

unread,
May 10, 2013, 3:32:05 PM5/10/13
to audio-...@googlegroups.com
So maybe is something wrong in foobar asio plugin. For now I tested:

JRiver : Today only one times some metalic noise but no freeze today
Foobar: sometimes freezes while changing or rolling song (I can reproduce it)
cPlay : no freezes.. stable..testing for now.
WinAmp: freeze when rolling song...

I'm looking for another windows music players with asio..  maybe best way is return to Linux  :)

Dne pátek, 10. května 2013 19:26:25 UTC+2 Ondřej Lutera napsal(a):

Børge Strand-Bergesen

unread,
May 10, 2013, 4:07:26 PM5/10/13
to audio-...@googlegroups.com
Here are the three build varieties. To switch between them do as following:
- Stop player program
- Close player program
- Make a backup and then copy asiouac2.dllxxx to C:\Program Files
(x86)\Audio-Widget\asiouac2.dll
- Start player program again

To view debug messages use

http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

I hope this helps.


Børge
asiouac2.dll_release_with_trace
asiouac2.dll_debug
asiouac2.dll_release

Ondřej Lutera

unread,
May 10, 2013, 4:11:18 PM5/10/13
to audio-...@googlegroups.com
Thank you very much !  I will test it as soon as possible.

Dne pátek, 10. května 2013 22:07:26 UTC+2 Børge Strand-Bergesen napsal(a):

Børge Strand-Bergesen

unread,
May 10, 2013, 4:13:40 PM5/10/13
to audio-...@googlegroups.com
You can download Visual C++ express _2008_ and build the driver
yourself if you find anything missing. The Release with Trace option
is probably the best one for debugging. Line 726 and onward describe
the Windows driver build:
https://github.com/amontefusco/sdr-widget/blob/audio-widget-experimental/AW_readme.txt

Børge

Ondřej Lutera

unread,
May 10, 2013, 4:36:56 PM5/10/13
to audio-...@googlegroups.com
For now I tested very quickly debug version of asio.dll on one song. Here is log. One song playing and changing position of song over slider.. last change caused freeze = end of log.

Dne pátek, 10. května 2013 22:13:40 UTC+2 Børge Strand-Bergesen napsal(a):
AW-HP.LOG

Ondřej Lutera

unread,
May 10, 2013, 4:42:22 PM5/10/13
to audio-...@googlegroups.com
foobar stops device every time when "scrolling" song.. cplay no..

Dne pátek, 10. května 2013 22:36:56 UTC+2 Ondřej Lutera napsal(a):

Ondřej Lutera

unread,
May 12, 2013, 8:37:46 AM5/12/13
to audio-...@googlegroups.com
I have working asio driver source codes in my Visual Studio 2008 and I will try to understand it (build and dll works). For now I think that problem is in foobar asio plugin..maybe..so I will try to write his author. No source-codes are available :/ Foobar stops and starts asio device in every manual changing of song in playlist etc..Sometimes widget doesnt stop enough fast..

Dne pátek, 10. května 2013 22:42:22 UTC+2 Ondřej Lutera napsal(a):

Ondřej Lutera

unread,
May 12, 2013, 8:45:20 AM5/12/13
to audio-...@googlegroups.com
Can someone reproduces it in foobar with asio and uac2 mode? thanks

For now best settings in foobar is:
Playback->Output:Buffer length around 1500ms
Playback->Output->Asio:Run with high process priority
Advanced->Playback->Thread Priority->Use MMCSS

For advanced resampling I'm using SoX resampler with 2-4x upsampling (not used while debugging foobar problems of course)

Dne neděle, 12. května 2013 14:37:46 UTC+2 Ondřej Lutera napsal(a):

Ondřej Lutera

unread,
May 24, 2013, 2:07:35 PM5/24/13
to audio-...@googlegroups.com
Nobody cares?
from log:

00000383    61.03800583    [1476] ASIOUAC: Audio DAC task.Stop is OK   
00000384    61.05775833    [1476] ASIOUAC: Audio feedback task. Try stop...   
00000385    61.07714844    [1476] ASIOUAC: Audio feedback task. Wait current job ending ...   
00000386    61.09962082    [1476] ASIOUAC: Found critical error with ErrorCode: 000003E4h   
00000387    61.09982300    [1476] ASIOUAC: OvlK_Wait failed. ErrorCode: 000003E4h   
00000388    61.09986496    [1476] ASIOUAC: Audio feedback task OvlK_Wait failed. ErrorCode: 000003E4h   

This cause that bool USBAudioDevice::Stop() return FALSE, then in AsioUAC2::stop ()

    if(retVal == ASE_OK)
    {
        m_device->SetNotifyCallback(NULL, this);
#ifdef _ENABLE_TRACE
        debugPrintf("ASIOUAC: Device stoped successfully!\n");
#endif
        started = false;
    }
retVal is false and started is true forever..then AsioUAC2::start () never starts..

question is..what is error code 000003E4h  and what causes this error...


Dne pátek, 10. května 2013 22:36:56 UTC+2 Ondřej Lutera napsal(a):
For now I tested very quickly debug version of asio.dll on one song. Here is log. One song playing and changing position of song over slider.. last change caused freeze = end of log.

Nikolay

unread,
May 26, 2013, 10:09:41 PM5/26/13
to audio-...@googlegroups.com
Hi Ondřej,

About error code (see MSDN):
ERROR_IO_INCOMPLETE
996 (0x3E4)

Overlapped I/O event is not in a signaled state.

Low level USB driver returns this error.
I don't know the causes of this error, in my case all 3 devices (2 Audio-Widget and SDR-Widget) work very well with a variety PC (includes netbook with low performance)

Nikolay

Ondřej Lutera

unread,
May 27, 2013, 11:09:58 AM5/27/13
to audio-...@googlegroups.com
Hi Nikolay

thanks for reply. Do you use Foobar with audio-widget?

Ondřej

Dne pondělí, 27. května 2013 4:09:41 UTC+2 Nikolay napsal(a):

Nikolay

unread,
May 28, 2013, 12:49:09 AM5/28/13
to audio-...@googlegroups.com
Hi Ondřej,

yes, I use foobar2000

Nikolay
Reply all
Reply to author
Forward
Message has been deleted
0 new messages