[IDC]Dragon
Posts: 41
Joined: Mon Dec 16, 2013 9:47 pm

Introducing my tiny (case-friendly) digital audio out addon

Mon Apr 21, 2014 1:57 pm

Hi,

I'm late to the RasPi party, got myself a board beginning of this year to finally follow the crowd. It makes a nice little media box, but with bias on video, it is missing a digital audio output for the music lovers. People have to add clumsy USB sound hardware or get the sound from HDMI, but the RasPi has preparation for native I²S, at least with rev. B. So I've developed an as-small-as-possible addon board for TOSLINK digital (optical) audio output. I did this just for the fun of adding something I felt missing, for friends and the like, no commercial plans. It is ready since a while, but now I found the time to make some pictures and write about it.

While waiting for the PCBs and parts, I learned about the great work of other people. Namely Florian Meier's work on a kernel Alsa driver to support this path. Later I found the announcement of the Hifiberry Digi, for which its creator Daniel has selected the same Wolfson chip than I did (well, not too many choices in that field). So, my hardware is compatible to his, can use the same driver, which is by now already included in the standard kernel. The software part of this project collapsed to almost zero effort, I was prepared for more.

After this history, let's get to the hardware. The neat thing is that it doesn't add extra height and fits in the cases I've tried, makes e.g. a nice compact audio client from the RasPi. To some extent it is still possible to use the expansion port. The tallest component is the transmitter, it reaches the same height as the USB jack of the RasPi.

See for yourself, this is the bare board:
Image

This is how it attaches to the RasPi, firmly soldered into the normally empty P5 header:
Image

This is the "sandwich", the board is soldered with an 8-pin header into P5, the I²S interface of the rev. B boards. It also grabs 2 pins (I²C) from the normal extension port P1:
Image
(My PCB could be more thin, but this wasn't available for a standard prototype run.)

There's another style of mounting, for "developers", plugged and removable. The optical jack instead goes on the underside, giving it even lower profile. (However, I think this is not rigid enough to put in a case.)
Image

Inside the popular Teko case:
Image

Inside the Multicomp case:
Image

The white cable is the optical connection, I guess you get the idea.

The board is minimalistic, but still has something to offer for the audiophiles. It has a 10 ppm precision crystal, which is governing the audio timing. The RasPi audio is slave to this clock. There is extra filtering for the PLL clock supply. Less related, attaching audio to the I²S is as tight as you can get to the CPU core (compared to an extra trip over USB to some external hardware with out-of-control clocking implementation). The Wolfson chip can do 24 bits resolution and higher sampling rates, like the I²S of the Broadcom chip. But I haven't done much testing yet.

How to proceed besides showing off? I hope it's too nice to hand-build only a few, I have some parts left for selected people, if there's really a demand we'll have to think about something.

So long,
Jörg

wolfey
Posts: 1
Joined: Wed Apr 30, 2014 10:39 am

Re: Introducing my tiny (case-friendly) digital audio out ad

Wed Apr 30, 2014 10:41 am

Wow, that is exactly what I have been looking for.. a USB sound card is ugly, HDMI splitters are cumbersome and expensive..

Any chance you have a spare board ? ;)

[IDC]Dragon
Posts: 41
Joined: Mon Dec 16, 2013 9:47 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Thu May 01, 2014 6:27 am

wolfey wrote:Any chance you have a spare board ? ;)
Bare PCB is no problem, for an assembled one you'd have to wait a while. I ran out of parts, have to order more. Please send me a PM.

Florian gave a name to the project, we now call it "tinyTOSLINK".

Meanwhile I played a bit more with hires audio. The board can do up to 24bit @ 192 kHz, but the TOSLINK transmitter is limited to "only" up to 96 kHz sampling frequency. Above that, the S/PDIF carrier frequency gets too high for it (about 25 MHz, while the transmitter is specified for up to 16 MHz).
However, I chose TOSLINK because it has perfect galvanic separation and easy handling. An RCA jack is bigger, won't fit the form factor, may need thick+expensive RF grade cables.
In case people really aim for 192kHz, I have the idea to abuse the RCA video jack of the Raspberry Pi mainboard for S/PDIF. The video signal is fed over a resistor (R44) which could be removed and tapped. Needs to be tested...

Jörg

dieterhatn
Posts: 5
Joined: Sun May 04, 2014 7:59 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Sun May 04, 2014 8:03 pm

Hi there,
I just registered just to kindly ask you if you still have a tinytoslink board left? That's just what I've been looked for for months! :)
thanks a lot in advance
cheers

[IDC]Dragon
Posts: 41
Joined: Mon Dec 16, 2013 9:47 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Mon May 05, 2014 8:15 pm

In two weeks I'll have some more. Send me a PM meanwhile.

Jörg

dieterhatn
Posts: 5
Joined: Sun May 04, 2014 7:59 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Tue May 13, 2014 4:36 pm

PM is out.
Still no answer from you :P
BTW does this thing need any kernel patch or drivers?
Or will it work out of the box?
and what price can i expect?
cheers ;)

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Introducing my tiny (case-friendly) digital audio out ad

Tue May 13, 2014 4:38 pm

If you need one road testing, I have a very nice JVC amplifier sitting here with a spare optical input to test it with. ;)
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

[IDC]Dragon
Posts: 41
Joined: Mon Dec 16, 2013 9:47 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Mon May 19, 2014 4:48 pm

Hi guys,

sorry for being offline for a while, I was on vacation.
Meanwhile, parts for some more boards have arrived, so I'm able to send some to selected people who have good use for it and appreciate it.
This is no business, rather a favour, it takes me way too long to hand-assemble a board to be profitable. To cover material costs, I charge €10 for an assembled board, €2.50 for a bare PCB, plus shipment, paypal fees, whatever.

About the compatibility questions:
Like I initially wrote, a current kernel supports this out of the box. The only thing left to do is to enable the driver, which means adding a few entries in /etc/modules:
snd_soc_bcm2708
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_hifiberry_dac

Some hifi-centric distros even already can do this for you, with "volumio" you can select Hifiberry-Digi by its web interface.

For the german folks, also see my postings in these forums:
http://www.mikrocontroller.net/topic/331467
http://hifi-und-lebensart.de/threads/ha ... y-pi.4812/

Greetings,
Jörg

[IDC]Dragon
Posts: 41
Joined: Mon Dec 16, 2013 9:47 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Thu May 22, 2014 11:34 am

[IDC]Dragon wrote: In case people really aim for 192kHz, I have the idea to abuse the RCA video jack of the Raspberry Pi mainboard for S/PDIF. The video signal is fed over a resistor (R44) which could be removed and tapped. Needs to be tested...
Meanwhile I've tested this, it indeed works. My RCA jack outputs S/PDIF with up to 24 bit and 192 kHz sampling frequency. It takes 2 resistors (to scale the signal and give it 75 Ohms impedance) and a decoupling capacitor. Can be wired in free air. My distro doesn't seem to enable RCA video, so it was OK to just attach a wire to the center pin. To be safe, remove R44 on the bottom side of the RasPi.

Now we have even more options: the S/PDIF patch can work in parallel, or if you don't need/want TOSLINK, you can skip the transmitter. This has the benefit that you don't need to make a rectangular hole in the cabinet for it, the board fits as-is, you have just transformed the video RCA to be S/PDIF.

Jörg

sloov187
Posts: 3
Joined: Fri Jul 04, 2014 10:07 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Fri Jul 04, 2014 10:12 pm

This is exactly what I have been looking for. Any chance that you have just the bare boards available still? Or possibly the board files so that I can get my own boards fabbed (I have connections that allows me to get limited quantities for free) ? This is strictly for home use and won't be used for commercial purposes.

Thanks in advance!

bashome
Posts: 1
Joined: Sun Jul 06, 2014 3:55 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Sun Jul 06, 2014 5:24 pm

Hello,
This is a great addon and something I have been looking for as well. Any chance you would be willing to share the schematic and board layout with us ?

Thank you,
BAS

[IDC]Dragon
Posts: 41
Joined: Mon Dec 16, 2013 9:47 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Mon Jul 14, 2014 9:02 pm

Hi,

sorry for not monitoring my thread for a while.
Today more parts arrived and I assembled the remaining boards, so there's a few available now.
In the past I did send some blank PCBs to people, but frankly I don't like to do so. You'd need to get the components in single quantities, and it takes me more time to answer questions than to assemble just one more board.
For the other question, currently I don't plan to publish the design data since I don't know where this leads to. Though there's not much to hide. The circuit is very simple, just a WM8804 in its basic configuration. The tedious part was to arrange the parts, but most of that can be seen in my photos already.

Anyway, if you have good use for a (readily assembled) TinyTOSLINK board, just ask.

Jörg

sloov187
Posts: 3
Joined: Fri Jul 04, 2014 10:07 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Mon Jul 14, 2014 9:08 pm

I certainly have a good use for one or two! What is the cost in USD?

Thanks!

benitoch
Posts: 1
Joined: Sun Sep 21, 2014 9:39 am
Location: France

Re: Introducing my tiny (case-friendly) digital audio out ad

Thu Sep 25, 2014 5:49 pm

hello,
I want to know if it is possible to buy the pcb or seulemnt typons the pcb with the scheme. I would like to realize and change with the addition of an IR receiver.

I apologize if English is not very good I'm french :oops: .
This is a google translation

[IDC]Dragon
Posts: 41
Joined: Mon Dec 16, 2013 9:47 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Sun Nov 09, 2014 3:10 pm

Hi, I've made a new version of the PCB.
It has a few extra components for S/PDIF output (and input!), since the abuse of the video jack kindof went popular.
(The input is untested so far, this needs a small kernel change, to tell the driver that this sound hardware also features input capability.)

Click on images to enlarge.

New board, with a grown edge, but bounding rectangle is still the same:
Image

This is what it looks like with the video jack abused as S/PDIF out, by yellow wire:
Image
(not firmly soldered in here, just for demonstration)

Side view:
Image

Mounting alternative, plugged ontop:
Image

Finally, a proof of concept for an upcoming B+ variant. I connected my board to a revision B+ RPi using jumper wires. With a recent kernel, this works, thanks to Daniel's revision check addition to the driver. The new pins on the grown addon connector are are different than what's been on P5. I2S is still possible, but with different pin muxing, this needs runtime adaption by the driver.
Image

I have made a new layout for the B+, the PCBs are being manufactured soon. It is not tiny any more, since the board has to span the whole connector (like you can guess from above wiring).

Joerg

sloov187
Posts: 3
Joined: Fri Jul 04, 2014 10:07 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Mon Nov 10, 2014 3:57 pm

Looks awesome! Thanks for the continued work to include the B+ model. Please let us know when it is available for purchase. I have been using your first model and love it.

Pander
Posts: 18
Joined: Sun Nov 09, 2014 11:35 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Tue Nov 25, 2014 11:47 am

Really nice work. How can I order one for a B+? PM isn't working anymore. My email address is pander (at] users [dot} sourceforge {dot) org.

itsmedoofer
Posts: 336
Joined: Wed Sep 25, 2013 8:43 am

Re: Introducing my tiny (case-friendly) digital audio out ad

Tue Nov 25, 2014 12:49 pm

Hi,

Have you posted the schmetic / BOM anywhere ? Couldn't see on the links...

Now the nights are drawing in this would be a nice little project...

Many Thanks,
Martin.

marcson
Posts: 1
Joined: Thu Nov 27, 2014 9:55 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Thu Nov 27, 2014 10:01 pm

Hi Jörg,

i registered this account because i just got to know about your project. I'm very interested in buying two units of it. Would this be possible?


pleasure
Posts: 4
Joined: Tue Jan 06, 2015 8:04 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Tue Jan 06, 2015 8:53 pm

Hi Jörg,

I would be very interested with either one of these or one of the new B+ ones.

Are they available as a kit or ready made etc.

Brilliant work & elegantly adds the only thing missing from a raspberry imho.

Regards,

Richard

magicenergy
Posts: 1
Joined: Sun Jan 18, 2015 12:47 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Sun Jan 18, 2015 1:01 pm

Great Work! This is what Ive been kooking for ever since my first Pi arrived 2,5 years ago!
Sending You a pm already...

linvincible
Posts: 2
Joined: Thu Feb 12, 2015 5:07 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Thu Feb 12, 2015 5:09 pm

this looks really great,
would you be interested into making something similar but with hdmi connector?
some dacs accept I2S over hdmi cables and connectors (PS Audio) and this is just what I need...

pedorie
Posts: 1
Joined: Wed Feb 25, 2015 7:27 am

Re: Introducing my tiny (case-friendly) digital audio out ad

Wed Feb 25, 2015 7:35 am

Hi Jörg,
I would like to have a PCB, without components,
Can you send me one or two? I live in the netherlands.
Or where can i order it?

Thank you,

[IDC]Dragon
Posts: 41
Joined: Mon Dec 16, 2013 9:47 pm

Re: Introducing my tiny (case-friendly) digital audio out ad

Wed Feb 25, 2015 5:48 pm

All the boards which are left have the SMD components assembled.
Please send me a pm with your email.

Jörg

Return to “HATs and other add-ons”