Raspberry Pi I2S to SPDIF Hat

Discussion in 'Digital: DACs, USB converters, decrapifiers' started by Michael Kelly, Apr 30, 2016.

  1. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    The DAC case is being made as we speak. The first version had some issues and we re-designed it to correct them. SHould be a week or so before we get teh new ones back.

    Yes, the 502AES will come with a BNC to RCA adapter. But the voltage jumper is removed. We realized that using the lower voltage for RCA created issues on some systems. It seem many vendors do not follow the SPDIF over RCA spec exactly and expect the higher voltage. Note that this higher voltage is only by 200mv, so it won't damage anything. Plus it provides a bit more margin for cheap cables.

    Cheers,
    Michael
     
  2. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    Good reminder. I forgot about this myself!

    Yes trung25, you right in that the jitter is not specified. However, this is because there is no added jitter to the external clock. The driver sets the clock mode to PLL Bypass. You can see this path in the block diagram of the WM8804 clock system:

    [​IMG]

    XIN is driven by the selected NDK clock and goes direct to MCLK out. No PLL. While it is possible that there is delay in this path, BCLK and LRCLK are clocked from MCLK (in the S/PDIF TX block), so this delay has no effect.

    Now, the point about external MCLK in is valid. The NDK is not the best clock out there. It is a very good clock, but not the best. So I assume the external input would be via a small RF connector? There will need to be two inputs and a mux on board using the current select signals. IPEX seems to be suitable as it used by WiFi modules already. Thoughts?

    Cheers,
    Michael
     
  3. Grahad2

    Grahad2 Red eyes from too much anime

    Pyrate
    Joined:
    Jan 26, 2017
    Likes Received:
    1,162
    Trophy Points:
    113
    Location:
    Singapore
    U.FL is pretty standard so that should be agreeable to most people. MMCX might be worth considering also since you get more plug cycles out of it and it's also prevalent.
     
  4. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    IPX (sorry I always misspell it) is the same as U.FL. I like the look of MMCX. It's more money ($2 vs $.30) but not a deal breaker. Plus in my experience with WiFi, U.FL is hard for my fat fingers to easily manipulate.

    So, dual MMCX and a jumper to select between the on board and external clocks. Obviously the external clock source and cables are up to the user to figure out.

    Anything else?

    Cheers,
    Michael
     
  5. Clemmaster

    Clemmaster Friend

    Pyrate Contributor
    Joined:
    Sep 28, 2015
    Likes Received:
    3,268
    Trophy Points:
    113
    Well, if you really want to go all out, you could add galvanic isolation, too. Much like Allo does in their DigiOne.

    It's always a good idea to electrically isolate the DAC from the Raspberry Pi, especially since the TOSLink was removed.

    This, however, requires the user provides a power source to the clean side of the HAT (which is probably not a big deal. I do hope most people use the the DC jack on the 502DAC already. They would just need to power the Pi separately.

    All this adds up to the BOM and design costs, though. I don't know if you want to make 2 SKUs for the 502AES (+).

    Also, the TTL/CMOS to LVDS conversion chip(s) should be selected carefully.
    Anybody remembers what DACLadder used on his HDMI I2S board for Audio-gd DACs?
    Audiophonics show the chip they use on their equivalent HDMI board (hint, hint).
     
  6. Grahad2

    Grahad2 Red eyes from too much anime

    Pyrate
    Joined:
    Jan 26, 2017
    Likes Received:
    1,162
    Trophy Points:
    113
    Location:
    Singapore
    I think that jumper is still on the 502AES - as per the renderings - where you can choose if the 502 takes power from the RPi (and vice versa) or not.
     
  7. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    Actually they don't show it, but I happen to know it is the same TI part we use.

    As for the isolation, the 502AES has transformer isolation on the BNC and XLR outputs. I am not sure how far I want to carry the external clock option. I would need to know what folks would use to drive the clocks. The SiLabs family of isolators are pretty reasonably priced, but I would also need to create an isolated power supply (not much current though). I have done all this before for our embedded designs, so it's not rocket science!

    All this would likely push the price up a bit, maybe to $89 or $99.

    Cheers,
    Michael
     
  8. Clemmaster

    Clemmaster Friend

    Pyrate Contributor
    Joined:
    Sep 28, 2015
    Likes Received:
    3,268
    Trophy Points:
    113
    It'd be interesting to know what isolator the modern stuff like the ISO Regen or the Allo use.

    I read a comprehensive "review" of those isolators (I would need to Goolge search it) which showed the performance variation in terms of isolation and jitter.
    IIRC, the SiLabs were the worst, jitter wise. Shouldn't be a big problem since you're re-clocking on the clean side of the isolation.

    @Grahad2 : I don't think the 502DAC break the ground connection with the RPi when opening the jumper? There would need to be galvanic isolators for it to work reliably.
     
  9. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    This is what the WM8804 section looks like now:

    [​IMG]

    I am not sure about the 50 ohm termination on the external clocks since I do not have enough info on what will be driving them. I could always make it a jumper option.

    Let me know if this too much info! ;)

    Cheers,
    Michael
     
  10. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    You do not need to isolate the entire Pi from the 502DAC. Just the interfaces that go downstream, or in the clock case, come in from the outside. The Pi and DAC are tied to each others ground which is correct.

    Cheers,
    Michael
     
  11. trung225

    trung225 Facebook Friend

    Joined:
    Oct 22, 2015
    Likes Received:
    123
    Trophy Points:
    43
    I have a RPi Isolator board from Ian Jin in diyaudio, which completely isolates ground and power line between RPi and 502DAC, and trust me, it is a great addition to my Pi transport. If you gain three points in sound quality (SQ) by going from USB to RPi + 502DAC, adding i2s Isolator board help you gain two points more.

    But I don't think you need to add isolator to 502AES, because there are at least two RPi's isolator products with reasonable prices (around 50$) in the market. I think adding external-clock input can separate your product more effectively with competitor.

    If you want to add i2s output, your clocks need to be 45- and 49-family, as most of DACs support i2s I know need that MCLK.
     
    Last edited: Jun 30, 2017
  12. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    I am not sure about that statement regarding frequency. All the DAC chips I am aware of (TI, AKM, ESS and Crystal/Wolfson) can handle either set of frequencies automatically. Can you point to specific examples of gear that does require the limitation you mention?

    Of course, it may be a moot point. The driver for the WM8804 is fixed for the lower set of frequencies.

    Cheers,
    Michael
     
  13. Scott Kramer

    Scott Kramer Friend

    Pyrate
    Joined:
    May 3, 2016
    Likes Received:
    1,446
    Trophy Points:
    93
    @Michael Kelly Looking awesome, the start of a new i2s board! Fun times.

    The Isolator boards just started being avail in the last few weeks, was just setting up the 502DAC on one now to experiment!

    Also saw @trung225 has one going somewhere on the diyforums...

    The WM8804 is max 22/24 or 27 in PLL mode. That will limit the i2s capability having spdif on the same board, unless you come up with a different or additional circuit.

    t1.png

    [​IMG]
     
    Last edited: Jul 31, 2017
  14. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    AFAIK the Pi itself (or perhaps the Linux kernel) is limited to 24-bit@192Khz, so 22/24 is not a limitation.

    Cheers,
    Michael
     
  15. hifiandrun

    hifiandrun Almost "Made"

    Contributor
    Joined:
    Nov 2, 2016
    Likes Received:
    489
    Trophy Points:
    63
    Location:
    Boston
    Hi Michael,

    Is it possible that you reserve larger area on your digital only board for those two clocks, the larger size soldering-spots could fit with the Crystek CCHD-957 clocks, and insider soldering-spots would fit NDK clocks. This way, everyone has two options, the NDK or the CCHD-957. I read comparison reports based on other USB/SPDIF converters that different clocks tended to have different sound signatures - but doesn't mean one better than another. The CCHD-957s yield accurate and crystal clear sound meanwhile the NDKs were warm and musical. I guess it would come down to sound preferences and system synergist.

    Anyway, I am looking forward to seeing your new DAC products, Cheers!
     
  16. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:

    I will look into it. I have done that before. But, there's actually far less room than you think, with the need to keep the various sections away from each other for noise reasons. I am not sure I can do that and keep the isolated clock inputs.

    One thing I noticed is that a couple of the clock generator board vendors had isolated outputs, which means maybe I don't really need isolated clock inputs. If that's the case then having the bigger crystal footprint option is much more likely.

    Cheers,
    Michael
     
  17. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    After some thought I will not add the second set of crystal. It is reasonable to have the external input for those who want to try other clocks, but it does not make sense to add pair of $20 Crysteks. What about Trent crystals, or Abracon, etc, etc.

    I think the feature set is pretty solid at this point. Thanks for the input!

    Cheers,
    Michael
     
  18. Xen

    Xen Friend

    Pyrate
    Joined:
    Sep 30, 2015
    Likes Received:
    207
    Trophy Points:
    43
    Location:
    Houston, TX
    I have a first production run 502DAC withr the headphone jack. It's been only the past few days that I have actually had a chance to setup the system and play around with it.

    With the jumper J1 W1 shorted, I have tried to power both the Hat and a genuine RPI3 RevB board through only the 5V DC jack, with the USB power disconnected. I am using a bench power supply at 5.00 - 5.25V (tried multiple times, upping voltage slightly) with up to 3A of current, which should be plenty of volts and amperes. The Pi is unable to completely boot. It attempts to boot, then goes through an infinite number of reboot cycles.

    Powering the Pi3 through its USB and the 502DAC with the bench power supply works. However, its a bench power supply and it's designed for accuracy and stability, not efficiency. It supplies 5.15V @ 0.05A to the hat, which is just overkill. I was planning on building a small and simple LPS to move the efficiency up without changing accuracy and stability by much. I could design duplicate 5V modules to supply power to both separately, but it would be a bit simpler and cheaper if I could power both through the 502DAC.

    Error message, repeated many many times.
    Code:
    Jul  6 00:30:16 moode kernel: [    3.676816] usb 1-1.1: new high-speed USB device number 5 using dwc_otg
    Jul  6 00:30:16 moode kernel: [    3.676910] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.676941] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.676966] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677066] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677088] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677109] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677170] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677193] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677218] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677289] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677312] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677336] NYET/NAK/ACK/other in non-error case, 0x00000002
    Jul  6 00:30:16 moode kernel: [    3.677380] usb 1-1-port1: cannot reset (err = -71)
    
    Anyone else have this problem of the Pi not booting when powered through the 502DAC? I have seen many have been able to power both through the hat.

    EDIT: Corrected jumper label.
     
    Last edited: Jul 6, 2017
  19. Lasollor

    Lasollor Friend

    Pyrate
    Joined:
    Apr 18, 2016
    Likes Received:
    367
    Trophy Points:
    63
    Location:
    Japan
    I also have an earlier model with the headphone out and I'm using an ifi iPower to power both the 502DAC and the Pi through the 502DAC.
    It worked right out of the box.

    The manual says
    "Jumper W1, when installed, allows the Hat and the PI to be powered together regardless of the source. When jumper W1 is removed external 5V power must be supplied to the HAT via J1. See section 8 for the location of P1, W1 and J1. "

    Maybe you don't have the W1 jumper installed?
     
  20. haywood

    haywood Friend

    Pyrate
    Joined:
    Oct 22, 2015
    Likes Received:
    763
    Trophy Points:
    93
    I still have the second run test hat as well and am able to power it and the Pi3 through the DC jack using this power supply (ebay link) with 5v @ 2.5A. I also used a generic 5v 1A adapter I had at the DC plug when Michael and I were trying to rule out causes of the high frequency squeal of doom though so it's not requiring a lot of power. If possible can you try booting just the Pi with your power supply or try the Pi3 and hat with the standard Pi wall wart and see how that goes?
     

Share This Page