Raspberry Pi I2S to SPDIF Hat

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

  1. weaver

    weaver Rando

    Joined:
    Nov 15, 2019
    Likes Received:
    10
    Dislikes Received:
    0
    Trophy Points:
    3
    Location:
    UK
    I currently have a PI2AES on order (just over two weeks now) which is specifically to pair up with a Metrum Onyx. If this board and modified plate is happening relatively soon (sorry, no real idea what your fabrication time would be) I'd be happy to add one to my order before it ships. Thank you!
     
    Michael Kelly likes this.
  2. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Joined:
    Apr 22, 2016
    Likes Received:
    1,015
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Rhode Island, USA
    Home Page:
    It will probably be three weeks or so before I have some in hand. What I have done before and I will do again is to give out a handful of prototypes to make sure everything is solid before I offer it as a product. So I would assume you and a few others would want to be on that list? Given how inexpensive the board will be to make I should be able to put together at least 10 to start.

    Anyone who wants one should send an email to the support email on our website. I don’t always check messages on this site even though I do try to check the site itself every day.

    BTW, your order will go out on Monday. I just picked up 24 units from my assembly house to test over the weekend.

    Cheers,
    Michael
     
    weaver likes this.
  3. weaver

    weaver Rando

    Joined:
    Nov 15, 2019
    Likes Received:
    10
    Dislikes Received:
    0
    Trophy Points:
    3
    Location:
    UK
    Thank you. I have already sourced a number of different options for making the I2S connection as suggested in previous pages so can hopefully get up and running as soon as the board arrives. A neat all in one box solution would be good when available so yes will mail via the site. Thanks again.
     
    Michael Kelly likes this.
  4. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Joined:
    Apr 22, 2016
    Likes Received:
    1,015
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Rhode Island, USA
    Home Page:
    The new PI 4 allows boot from USB, so a USB stick or external drive could hold the OS. Not 100% sure about the process, and it is new, so well see what actually comes of it.

    Cheers,
    Michael
     
  5. msommers

    msommers High on Epipens

    Friend
    Joined:
    Nov 6, 2016
    Likes Received:
    2,366
    Dislikes Received:
    34
    Trophy Points:
    113
    Location:
    Calgary, Alberta
    Home Page:
    Given Michael's change of stock switcher PS from 12->24V and the PIAES' voltage range, I pulled my head out of my rear and realized that the LPS powering the MCTH (now collecting dust since SW51's arrival!) is rated at 28V 2A. Queue the 10 minute comparisons to the stock switcher PS: not a ton to speak of! I would say the HF feels a bit more relaxed and background slightly less grey...but really at the end of the day there is not a big difference for me to justify spending hundreds of dollars for a nifty R-Core LPS (though I'm partly neurotic so I likely will if I find a good deal...ha).

    In any event, I'll have to dig up the stock switcher and sell the MCTH since I don't think I'll be using it any time in the future. And kudos for finding a very cost-effective quality power supply to work so well with your device @Michael Kelly -- excellent, excellent work here.
     
  6. haywood

    haywood Almost "Made"

    Joined:
    Oct 22, 2015
    Likes Received:
    232
    Dislikes Received:
    1
    Trophy Points:
    43
    Last I looked they hadn’t gotten usb boot working on the Pi 4 yet but the hardware supports it and it’s still planned.

    I wouldn’t worry too much about failing sd cards though, it happens but is pretty rare in my experience and since I do some dev on one I write to the card way, way, way more often than the average user would. Just make sure you buy a quality brand from a reputable dealer.
     
    lehmanhill and Michael Kelly like this.
  7. lehmanhill

    lehmanhill Almost "Made"

    Contributor
    Joined:
    May 3, 2018
    Likes Received:
    114
    Dislikes Received:
    0
    Trophy Points:
    43
    Location:
    Michigan US
    I don't have the experience of haywood, so take my comments as from the amateur that I am. I wonder if the difference is that the Pi is "on" 24 hours a day and that there may be some small writes going on in the background?

    Regarding booting from a USB, Google the question and you will find several software approaches that allow boot from a USB, even on earlier Pi's. I understand that you have to start from an SD card, run the software patch, and then you are stuck only booting from the USB.

    As haywood says, you may not need to worry about this, but my most recent attempted fix is to use a smaller capacity, SLC industrial SD card. After all, the OS is often less than 1 Gb. I found Advantech 1 Gb SLC SD at Mouser for less than $15 which is more expensive, but not crazy more expensive than a consumer SD. If you look into this, note that not all industrial cards are SLC, some are pSLC.
     
    Michael Kelly likes this.
  8. LetMeBeFrank

    LetMeBeFrank Won't tell anyone my name is actually Francis

    Friend
    Joined:
    Aug 4, 2017
    Likes Received:
    2,030
    Dislikes Received:
    4
    Trophy Points:
    93
    Location:
    Indianapolis
    There shouldn't be much reads or writes to the OS drive once the system is booted and idling, since it loads the files it needs into RAM.
     
    Michael Kelly likes this.
  9. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Joined:
    Apr 22, 2016
    Likes Received:
    1,015
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Rhode Island, USA
    Home Page:
  10. Scott Kramer

    Scott Kramer Friend

    Friend
    Joined:
    May 3, 2016
    Likes Received:
    1,069
    Dislikes Received:
    1
    Trophy Points:
    93
    IMG_0044.png

    Wanted to mention there's MasterClock and BitClock avail on the headers-->

    for you Dangerous Convert-2 guys out there it could probably be used (it has a selectable MCLK or BC clock input).

    I don't have @Michael Kelly's latest board, but the 502dac works great on my old psaudio- and it correctly switches 48/44.1 -- breathes new life into it (clarity) with the modern NDK clocks. [used sma connector for space, that could be bnc]

    Not sure it warrants a header board, but you never know. Thanks!

    ***WARNING, be careful trying this on the 502DAC, it's unbuffered: meaning easily damaged from voltages or even static if there is some mismatch-- used here to demonstrate and know the psaudio circuit
     
    Last edited: Nov 21, 2019
    Jerry, LetMeBeFrank and Michael Kelly like this.
  11. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Joined:
    Apr 22, 2016
    Likes Received:
    1,015
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Rhode Island, USA
    Home Page:
    Pinouts are different so I'd need to make a new board for the 502DAC. Plus I would have to buffer it since the signals from the 502DAC are not buffered.

    But if there is enough interest....?

    Michael
     
    Scott Kramer and ToonMechaMan like this.
  12. Scott Kramer

    Scott Kramer Friend

    Friend
    Joined:
    May 3, 2016
    Likes Received:
    1,069
    Dislikes Received:
    1
    Trophy Points:
    93
    Thanks Michael... added a warning, yep, maybe 2 people will try it haha! And grrr, you changed the pinout ;) maybe it was an accident but it followed original hifiberry digipro/dacpro.
     
    Last edited: Nov 21, 2019
    Michael Kelly likes this.
  13. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Joined:
    Apr 22, 2016
    Likes Received:
    1,015
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Rhode Island, USA
    Home Page:
    Any pinout I chose was based on how the signals flowed on the board, so just random!

    Regards,
    Michael
     
    hifiandrun and Scott Kramer like this.
  14. dreambox

    dreambox Rando

    Joined:
    Mar 1, 2019
    Likes Received:
    11
    Dislikes Received:
    1
    Trophy Points:
    3
    Location:
    Italy

    It was me ;)
    And I am happy you found this improvement as well.
    As I see you power both (RPi + PI2AES) from the battery. Try to separate, providing 12V only for PI2AES, and use some decent power supply for RPi, this way my system sounds the best. You will save battery as PI2AES consume very few.. And noise generated within RPi circuity will be also isolated.
     
    hifiandrun likes this.
  15. dreambox

    dreambox Rando

    Joined:
    Mar 1, 2019
    Likes Received:
    11
    Dislikes Received:
    1
    Trophy Points:
    3
    Location:
    Italy
    Need help. In my DAC, I want to replace USB (I2S) board with PI2AES. Is it correct correlation of the I2S outputs in these boards?

    (PCM2706) LRCK = (PI2AES) pin 9 LRCLK Buffered I2S Left/Right (Word) Clock
    (PCM2706) BCK = (PI2AES) pin 10 BCLK Buffered I2S Bit Clock
    (PCM2706) DATA = (PI2AES) pin 8 SDO Buffered I2S Data

    [​IMG]
     
    Michael Kelly likes this.
  16. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Joined:
    Apr 22, 2016
    Likes Received:
    1,015
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Rhode Island, USA
    Home Page:
    Unfortunately, that will not work. The design of the PI2AES uses a Wolfson WM8804 to generate the I2S clocks in master mode. It can not be placed in slave mode. In addition ti requires I2C to initialize and control the Wolfson.

    Michael

    P.S. I notice in your photo that the PSW jumper (pins 13-14 of the I2S header) is not installed. This is required for the PI2AES to power up.
     
    Baten likes this.
  17. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Joined:
    Apr 22, 2016
    Likes Received:
    1,015
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Rhode Island, USA
    Home Page:
    This is an update on a problem that has recently cropped up. The PI2AES was designed to accept a wide input voltage range of +12V to +48V. However, a newer version of the Power Supply IC we use means the input voltage has to be increased by a few volts. Since the next convenient power supply value is 24V, we are changing the required voltage input to 24V. Note that this should only affect units made after 11/1/19.

    We apologize for any issues this may cause and welcome any customers to contact us on our support email:

    [email protected]

    We will work with any customer to come to a satisfactory resolution. Note that we already will require 24V to use the PI2AES with our upcoming AK4493 DAC module, and our Hybrid Tube Headphone Amp module.

    Regards,
    Michael
     
    FlySweep and Baten like this.
  18. dreambox

    dreambox Rando

    Joined:
    Mar 1, 2019
    Likes Received:
    11
    Dislikes Received:
    1
    Trophy Points:
    3
    Location:
    Italy

    I see ( so it can't install it in this configuration (slave). What about 502? The same problem?
    I get foto from the internet. In my PI2AES jumper is there. Thank you
     
  19. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Joined:
    Apr 22, 2016
    Likes Received:
    1,015
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Rhode Island, USA
    Home Page:
    The 502DAC uses a PCM5122 to generate the clocks, but ends up with the same issue. Sorry. :(

    Michael
     
  20. dreambox

    dreambox Rando

    Joined:
    Mar 1, 2019
    Likes Received:
    11
    Dislikes Received:
    1
    Trophy Points:
    3
    Location:
    Italy
    Thank you Michael,
    Looking for an alternative, I found some ppl get sucess by getting I2S for TDA1541 directly from RPi (GPIO).
    And found this topic, indicating that overall rpi has problem to properly generate I2S.
    Could you please comment on how this issue was addressed in HAT development for audio in RPi.


    "You see, in theory the RPi has a bit of a problem with its I2S output. Since the only clock onboard the RPi is a 19.2MHz crystal, it should have trouble generating proper clocks for its I2S output. For example, for 44.1KHz audio, the LR Clock must be running at precisely 44.1KHz. That is not possible, since the frequency is not a multiple of 19.2MHz. Thus, the frequency can be either 19.200.000 / 435 = 44.138KHz or 19.200.000 / 436 = 44.0366KHz. This is a limitation of the Broadcom BCM2835 in conjunction with the 19.2MHz crystal and there is nothing that can be done. In order to confirm the theory, I decided to run a few tests. I hooked up my logic analyzer to my RPi, set it up for I2S output, and fed it some 44.1KHz music......

    The duration of the pulses appears to alternate between 11.33μS and 11.38μS, giving respectively 44.12KHz and 44.04KHz, values very close to the ones I calculated previously.

    So, the theory is sound and the RPi’s clock is not up to snuff by strict standards. What this means is that the RPi’s I2S output is not capable of “Hi End” audio transmission. It is essentially not bit perfect (edit: this is not correct, strictly speaking. It is in fact bit perfect, it is just not “proper”.).

    In the real world, chances are that this problematic clocking will not be particularly audible under normal circumstances, say with a normal-specc’ed sound system. But an audiophile should definitely steer clear of the RPi’s I2S output, instead opting for a USB to I2S interface."

    http://www.dimdim.gr/2014/12/the-rasberry-pi-audio-out-through-i2s/
     
    Michael Kelly likes this.

Share This Page