HiFi audio player


24 posts
by Chii » Mon Jul 02, 2012 2:54 pm
Hi All

I have been looking at a HiFi audio streaming project for a while now originally using old laptop hardware with USB dac’s. When I first heard about the Pi some 9 months ago it seemed like the perfect platform to build one on. Using the I2S bus and Wolfson WM8741 DACs with a dedicated clock the audio output should be second to none. Assuming of cause the use of well regulated and specially designed PSU’s, and shielding is used ware needed. In my case all the music will be stored on a NAS/windows server.

So the objective is:
Hardware.
- Raspberry Pi in a standard HiFi type case
- DAC using 2x Wolfson WM8741’s in mono diff mode.
- Dedicated master clock (in my case I am going to use a pink fish media Flea).
- LCD or VFD as a display unit (i2c or USB)
- Separate PSU’s for the audio system, so one for the Pi, one for the clock, one for the USB bus and peripherals and 2 for the DAC’s.
- Control buttons (in my case I am going to use parts from a Dell keyboard (USB))


Software.
- A stream player - web radio, last fm etc,
- A File player - mp3, flac etc
- A remote control method that will work with an android phone and or HTML page
- An MP3 database
- A method to synchronise playback on more than one system at once (multi room)


As you can see I will have to use the USB, I2C and I2S busses to make all of this work, I am going to use a pic18 to manage the DAC’s modes and PSU’s if needed, and allow that to be on the I2C or USB bus to the Pi too.

From what I have found radio tuners are a good bet for the case, I am intending to build 4 in total and I have bought the following for their cases, Arcam Delta 280 Tuner (2 of), Arcam Diva T 61 Tuner and an Arcam Alpha 8 tuner. The reason for the make is this is the same as all my HiFi systems around the house so they match up well.

I have found an app that looks like it will fit the bill for the playback software, that being CMUS (http://cmus.sourceforge.net/#development) it looks to be able to do some of what I want “out of the box”, with some work I think this is my best bet for the player.

A little bit about me, I have 15 years’ experience in IT support and management originally starting to build PC’s at the age of 10 as a hobby mostly because I wanted to get the best performance out of them to do animation. I’ve been building circuits since I was about 4 (dads an electrician) and soldering since about 8 years old. I’ve got almost no programing skills (batch files and login scripts don’t count) and very limited Linux skills. However I have a few programmer friends and hope others on her may be interested in this project. I also warn you I am Dyslexic so if any one sees anything that doesn’t make sense in my posts tell me and I will correct it.
Posts: 10
Joined: Wed Mar 07, 2012 8:42 pm
by fifthQ » Mon Jul 02, 2012 3:47 pm
I'm really looking forward to seeing how you get on with this. Please post as many details as possible throughout your build.
Posts: 12
Joined: Mon Jun 18, 2012 11:09 am
by Chii » Mon Jul 02, 2012 4:38 pm
Thanks FifthQ

So parts whise I think I have most of the parts I need to start. My intention is to split the tuners case into shielded sections to try and minimise noise. This may seem ott but I want areas for the following
- rpi
- USB modules
- clock
- dac
- dac analogue psu
- Dac psu
- Rpi psu
- USB psu
- Transformers / mains

I am giving the USB a dedicated psu as I noticed when you plug in the network card on the rpi it can pull the power levels down and crash it or makes it so it doesn't boot. So the more stable I can make it the better. I have drawn all of this out on the case of a tuner already so I will try and take pictures of it when I am home. The shielding will be 2 layer 1mm thick aluminium with a 5mm air gap between.
Posts: 10
Joined: Wed Mar 07, 2012 8:42 pm
by Chii » Mon Jul 02, 2012 4:48 pm
The shielding will be achieved by using strips of u shaped aluminum channeling attached to the bottom of the case with plates attached either side. At the top it will meet up with the case top, and any holes that go between sections will be ran through tubes. To begin with I may pop rivet these together but long term I am more likely to braise them together. All mounting will be done with standoffs and screws.

Anyway as above photos to follow.
Posts: 10
Joined: Wed Mar 07, 2012 8:42 pm
by Chii » Mon Jul 02, 2012 6:33 pm
More about the components that are going into this. I have a few PIC18F4550 and PIC18F4455 that were bought for these projects I am going to use one to run LED's (20+) and the other to run the dacs and monitor voltages, temperature's of components etc and the light level sensor for the LCD . I may also end up running the display off one of these if I don't connect it directly to the pi.

The leds I intend to use for the track select buttons on the delta 280 fronts there are 10 buttons for presets drilled out and fitted with bi colour leds (red blue) it gives the ability to display 3 colours per button. So for the firs 10 tracks the buttons would be blue for each track and off for no track. Each track over 10 will show as purple and by pressing the shift button it will switch so you can select that track directly, the shift key will also change to blue or purple depending what mode it is in. The track that is currently playing will be red.

I intend to keep the pi and the pics powered up all the time and via relay the dac leds and scree will power up when coming out of standby.
Posts: 10
Joined: Wed Mar 07, 2012 8:42 pm
by El_Bingo_Bongo » Tue Jul 03, 2012 3:32 pm
This sounds like an awesome project!
I had a similar idea, but no real aptitude or parts - so you win :)
Cant wait to see the pics of the progress (hint hint)
Posts: 3
Joined: Tue Jul 03, 2012 3:31 pm
by okyup » Thu Jul 05, 2012 7:16 am
Sounds like an interesting project.

I plan to use my Pi as an audio player (hard drive -> USB dac -> stereo), but nowhere near as ambitious as you.
Posts: 6
Joined: Wed Jul 04, 2012 4:11 am
by Chii » Thu Jul 05, 2012 2:48 pm
Well this one is on hold from my end for about 2 weeks finally after a year I am going on honeymoon.
Posts: 10
Joined: Wed Mar 07, 2012 8:42 pm
by Burngate » Thu Jul 05, 2012 3:45 pm
Your scheme sounds good (I'm not sure I meant the pun)
My wish is for something slightly different, but could use what you're doing.
So I'm sitting at my laptop, with #1 Pi and paraphenalia beside me, and I come across something I would like to hear over the HiFi.
Now, I could download it to the NAS, then go to the HiFi and find it and play it.
But it would be nice to play it on the laptop, streaming the audio to #2 Pi which puts it out on the HiFi.
All I need is the windows software to send it over IP instead of its normal destination, and the Pi software to accept the stream from whichever machine I happen to be sitting at.
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 2773
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by freron » Fri Jul 06, 2012 9:35 am
I am currently building something like this for a project course in programming at Karlstads University Sweden. Here is a screenshot of current progress. Can telnet to server and tell it what to do , gonna build an android app to talk to the server, but its build so I can connect with mostly anything to the server, even telnet.
Attachments
Screenshot-at-2012-07-05-19-55-37.jpg
Screenshot of current progress of project.
Screenshot-at-2012-07-05-19-55-37.jpg (57.49 KiB) Viewed 11738 times
Posts: 7
Joined: Fri Jul 06, 2012 9:26 am
by McDaisy » Fri Jul 13, 2012 9:05 am
Hi there!

Awesome project. In fact is I have almost the same project going.

I have a diy usb dac (wm8741) that plays perfect together with diy class a/b mono amplifiers.

My plan is resolder the Pi to to get I2S via the GPIO's and have it built in my dac case which has room for it. Everything will be run by iphone/ipad remote control. I just havent decided for which software Ill use. Ill hopefully recieve my Pi next week so I can start experimenting with it...

The soldering and hardware isnt any issue for me. The tricky part will probably be "programming" and linux. Im not a beginner but far from good skills in linux.

So as you see our projects are a bit the same :D Hope we can help eachother out on this one...

:D
Posts: 6
Joined: Fri Jul 13, 2012 8:49 am
by Chii » Sat Jul 14, 2012 2:07 pm
Hi all am back.
I've been writing my thoughts for this down while I was away. I am going to start building my dac over the next week or so.

I did forget to mention I think that I have a few tenor USB to i2s converters so if I get stuck with no i2s for any length of time I can use this to get around it for testing.

I am also going to mount an RPI in to a case and start playing with cmus.


Thanks for all the interest everyone. Anyone who wants to join in on this feel free to start throwing in your 2p.

Chii
Posts: 10
Joined: Wed Mar 07, 2012 8:42 pm
by trackstand » Fri Jul 20, 2012 10:53 am
Hello,

I'd very much like to do something similar so will watch your progress with interest. Unlike you I have a tiny amount of hardware experience but a lot with software (albeit mostly at a higher level than you're likely to need). Anyway, if I can be of assistance with the latter then let me know as ideally I'd like to build a clone of your device.

Cheers,

Andy.
Posts: 6
Joined: Fri Jul 20, 2012 10:43 am
by basergorkobal » Sun Jul 29, 2012 8:47 am
Hi Chii,
Congrats on an interesting and ambitious project and on finally getting your honeymoon! Hope it was worth the wait.
I was also thinking of building an integrated audio streamer/player based on RasPi. This type of embedded application seems ideal use of the RasPi board.

I have very little skill in software and none in electronics, but I have some friends who do have a fair share in both and managed to get them very enthusiastic about this idea.

In the end I want to achieve something similar as you - a multi-room system of Hi-Fi class audio streamers/players. But I'm taking it step-by-step. My initial plan is far less ambitious than yours. I want to integrate RasPi and a DAC into my Pioneer A400 integrated amp to have as standalone appliance for my study. My amp already has a battery-powered DAC based around the CS8416+PCM1798 board sourced from ebay (with a few minor mods) built into it.
The biggest challenge as you appreciate is to output I2S straight into the DAC bypassing the receiver. If I failed on that front my plan was to use a decent quality small USB DAC (ODAC by NWAVguy was my first thought).
I will start off by testing the whole software side of things to get a working prototype. I'll be using my Fiio DAC as output for now. Thanks for the suggestion with cmus. I'll give this a go.

If my first device works and sounds ok I want to build something along the lines of your project - a standalone player+DAC and a digital pre-amp in one box. So I will be following your project closely.

Do you have a particular design for the DAC in mind already? I'm not very familiar with the best offerings, but was thinking of using the Twisted Pear Opus board.
Posts: 1
Joined: Sun Jul 29, 2012 8:28 am
by Hysteria » Mon Jul 30, 2012 3:42 pm
Hi, sorry its actually Chii here, for some reason my account is totally unavailable and I cannot reset it, Hysteria is the name I gave to the dac project so I figured I may as well use that name for now.

Anyway thanks for everyone’s messages, the DAC side of this project i am going to aim for my final goal from the beginning so i am looking at:

4x 8741 dacs in diff mode in the same basic idea as Arcam’s top CD players. I am working in KiCad to produce the board layouts for this and aim to make it so you can use 2 or 4 dacs depending on your budget and need. this is taking some time but is moving along. Once done the designs will be attached to this thread so i can get input on any one who is interested and of cause the final plans will be here to share but I will try and publish these so that there protected against someone selling them commercially.

The DAC's PSU's are designed to be modular too with 2 designs one being a simple DC/DC converter using LM337 or similar and a second design using Pics to actively control each PSU to try and get the cleanest signal possible. again if people want to build the PSU with PIC's i will upload the entire program so you can build your own and setup the pic's you need, once again this is a work in progress and i am hoping to have the PSU tested in the next 2 weeks. and once this is done tested and working i will be using KiCad to build a PCB.

Once I have an LED controller board designed to do what I want I will be sending these off to get PCB prototypes made and then build one of the dacs up complete.

I have most of the parts for the shielding of the case and have managed to fit components I am going to use to check for space. Once I have the shielding fitted I will post with pictures and once the dac design is more complete I will also post that.

Has anyone out there reading this got the I2S to play audio yet via a Dac if so can you please post what you did and what you have working so far?

With thanks

Andy (Chii)
User avatar
Posts: 4
Joined: Mon Jul 30, 2012 2:38 pm
Location: Redditch/Chicago (depends on time of year
by Sonicbyte » Tue Aug 07, 2012 9:36 pm
Hi Chii,

Your project sounds very interesting and its the type of project I'm planning to undertake with my Pi. My Pi only arrived yesterday, so I expect it will take me a few weeks to get my rusty programming head back on. In my pre-research I had found these interesting links that may be of some use

http://chrisbaume.wordpress.com/2012/06 ... ia-player/ for details of a upnp media server.

http://hifiduino.blogspot.co.uk/2009/11 ... tting.html, interesting project using the Arduino controller, but has details on the wm8741 filters and i2c controls.

Good Luck
Posts: 1
Joined: Tue Aug 07, 2012 9:16 pm
by Hysteria » Tue Aug 21, 2012 2:32 pm
Hi All,

if you didn’t read the earlier post I was the one who started this thread with my Chii account which i cant log in under any more.

Anyway funds are tight at the moment, so i can’t even afford the ALU for the internal shielding. however i have found this:

http://www.ebay.co.uk/itm/Hi-end-USB-CM ... 2c6772c1c6

which looks perfect for what I wanted and talking to the seller it can be made to work with I2S directly. for my test unit i intend to buy one of these and then later switch to my own dac design which other than separating out the PSU's and getting rid of all the other inputs will be pretty much the same. I have already asked for the build manual to no avail but this may be ware I put my money as soon as i have some again.
User avatar
Posts: 4
Joined: Mon Jul 30, 2012 2:38 pm
Location: Redditch/Chicago (depends on time of year
by McDaisy » Tue Aug 21, 2012 3:28 pm
I want to recomend you something (which is far far away from what you probably are looking for and call "high end").

As I understand from you post the ebay dac is temporary until you do your own design. Why not buy something really cheap until you get everything working?

For example (the perfect dac to play around with until everything works)
http://www.ebay.com/itm/MINI-PCM2704-HI ... 6rk%3D1%26

;)


Hysteria wrote:Hi All,

if you didn’t read the earlier post I was the one who started this thread with my Chii account which i cant log in under any more.

Anyway funds are tight at the moment, so i can’t even afford the ALU for the internal shielding. however i have found this:

http://www.ebay.co.uk/itm/Hi-end-USB-CM ... 2c6772c1c6

which looks perfect for what I wanted and talking to the seller it can be made to work with I2S directly. for my test unit i intend to buy one of these and then later switch to my own dac design which other than separating out the PSU's and getting rid of all the other inputs will be pretty much the same. I have already asked for the build manual to no avail but this may be ware I put my money as soon as i have some again.
Posts: 6
Joined: Fri Jul 13, 2012 8:49 am
by Hysteria » Thu Sep 06, 2012 1:32 pm
Hi all with V2 hardware coming out soon I am not working on the hardware end of this at the moment. This is because the new hardware version specifically assists those of us wanting to use i2s.

I have however been working on the software but wont post on this until I have the new hardware and a dac working together.

for those of you interested in the DAC solution I am looking to use an AD1896 IC to change the sample rate to 192/24bit using a pink fish media flea for the system clock and then running the i2s from the ad1896 into a pair of wm8741's or for an even better option 4x wm8741's I have now made 6 revisions of the dac board and power supply’s but continue to play to try and get the boards as efficient as I can. I am trying to make these modular so that you can change out the Dac's psu's etc as you need to as things evolve and so that if you want to use something other than a wm8741 say AD1795’s, wm8741 (will fit the same PCB as a wm8741 so don’t see the point though) or even one dac on its own you can. For those on a budget it may mean they can start with one dac then upgrade to diff at a later date.

Looking forward to the V2 pi it will make this field of development so much easier and I hope common place.
User avatar
Posts: 4
Joined: Mon Jul 30, 2012 2:38 pm
Location: Redditch/Chicago (depends on time of year
by N2TOH » Fri Sep 07, 2012 1:11 am
Is there a suitable 192/24bit ADC chip to complement the AD1896 part?

Hysteria wrote:Hi all with V2 hardware coming out soon I am not working on the hardware end of this at the moment. This is because the new hardware version specifically assists those of us wanting to use i2s.

I have however been working on the software but wont post on this until I have the new hardware and a dac working together.

for those of you interested in the DAC solution I am looking to use an AD1896 IC to change the sample rate to 192/24bit using a pink fish media flea for the system clock and then running the i2s from the ad1896 into a pair of wm8741's or for an even better option 4x wm8741's I have now made 6 revisions of the dac board and power supply’s but continue to play to try and get the boards as efficient as I can. I am trying to make these modular so that you can change out the Dac's psu's etc as you need to as things evolve and so that if you want to use something other than a wm8741 say AD1795’s, wm8741 (will fit the same PCB as a wm8741 so don’t see the point though) or even one dac on its own you can. For those on a budget it may mean they can start with one dac then upgrade to diff at a later date.

Looking forward to the V2 pi it will make this field of development so much easier and I hope common place.
Posts: 9
Joined: Wed Sep 05, 2012 8:01 pm
by Hysteria » Wed Oct 03, 2012 9:49 am
Hi all

well after a few sample boards and testing my recommended solution for a well priced I2S dac is from Twisted Pear audio. Their Dac's are capable of all I was looking to do and are very well priced, for the WM8741 requirement there is the opus dac : http://www.twistedpearaudio.com/digital/opus.aspx this can be paired up to give you dual diff mono dacs, as per my original requirements. also they have 2 other dac's the COD dac which uses the pcm1794a dac from burr-brown/Ti which can be used similarly to the opus and the very impressive and well known buffalo 3 dac.

The dacs were all designed by DIY hifi enthusiasts and have a good track record. I have contacted Russ White one of the designers about things in the past and he is very helpful and quick to respond which is always a good sign.

I am still awaiting my v2 Pi when i do i will first hook it up to a single opus with an IVY3, I/V module later switching to dual diff opus's and then to test a buffalo3. I'll take photos and explain the setup and sound quality of each as I go.

It has to be said that i expect to run dual diff opus's in the end as they match what I was looking for however if sonically there is no point in having dual I will run just a single opus per RPI.

for now for those of you who are interested please take a look at their site which is at :
http://www.twistedpearaudio.com/landing.aspx

best wishes all

Andy
User avatar
Posts: 4
Joined: Mon Jul 30, 2012 2:38 pm
Location: Redditch/Chicago (depends on time of year
by guussie » Sun Nov 10, 2013 1:27 pm
Has there been any further development with your player? I am interested to hear what has become of it.

I am working on a very similar project. I have successfully used a USB to I2S board and this plays nicely into a cheap Sabre 9023 DAC. Next step would be the Opus but if you can post any experience with that, that would be helpful.
Posts: 5
Joined: Tue Oct 02, 2012 7:10 pm
by mahjongg » Sun Nov 10, 2013 1:53 pm
guussie wrote:Has there been any further development with your player? I am interested to hear what has become of it.

I am working on a very similar project. I have successfully used a USB to I2S board and this plays nicely into a cheap Sabre 9023 DAC. Next step would be the Opus but if you can post any experience with that, that would be helpful.

Any particular reason why you chose to make the detour through USB when the PI has a perfectly capable I2S port itself?
I'm interested to know.
User avatar
Forum Moderator
Forum Moderator
Posts: 5347
Joined: Sun Mar 11, 2012 12:19 am
by guussie » Thu Nov 14, 2013 6:40 am
The USB to I2S board was recommended to provide plug and play capability for audio and adds a good clock.

Next I will try to use the I2S port of the Pi directly.
Posts: 5
Joined: Tue Oct 02, 2012 7:10 pm