Adding AirPlay to a shelf system

adding-airplay-to-a-shelf-system

AirPlay is a great system. It allows you to send whatever media is playing from one device to another. Sure, we wish it were a bit more open (Apple is certainly not known for that) but there are several option for creating your own AirPlay receivers. After coming across a project that does just that, [Matt Shirley] decided to turn his shelf system into an AirPlay receiver.

The path to his goal depends on the Raspberry Pi’s ability to receive AirPlay audio using the Shairport package (we just looked in on another player that does this last week). He uses an Edirol UA-5 USB audio interface as an amplifier for his record player. He wasn’t using the USB port for it and knew that it would be simple to connect the RPi USB as a host for the device.

Wanting to keep the look of the system as clean as possible he popped the lid off of the amp. There is just enough room to fit the small RPi board inside. He hacked (literally, look at the pictures) an opening for the USB ports into the side of the metal enclosure. A short patch cable connects from one port to the USB jack on the back of the amplifier. The white cable leaving the side of the case provides power to the Rasperry Pi. The surgery was a success and now he can listen to his tunes with a tap of his finger.

Comments

  1. DNMEBOY says:

    If you took the board from a stereo bluetooth speaker and soldered on some plugs and a permanent power source and connected it tot he aux of any stereo is that the same idea as this? Simply to stream audio wirelessly from your phone to your stereo system?

    The rasberry is obviously cheaper than tearing apart a nice bluetooth speaker but there are some cheap ones available.

  2. Rob says:

    Very cool, and nicely done! I’d suggest he add a grommet in the hole where the power cord ends just to tidy it up, and maybe knot the cord inside the case as a strain relief, but those are minor. Kudos!

    • Rob says:

      I meant exits, not ends. whoops.

    • Matt Shirley says:

      Hi Rob. The grommet is a great idea. I’ve actually provided some small strain relief by simply zip tying (using a small green tie barely visible in the photo) the power cord to another zip tie. I’d like to improve the finish of the entire project though, since the entire thing took 2 hours or so last night!

    • Matt Shirley says:

      Hey, that’s a great idea. I actually provided some strain relief by zip tying the power cable to another larger zip tie (it’s hard to see in the photo). Thanks for the suggestion. I definitely want to refine this system, since the results here are from a 2 hour session last night!

  3. neatbasis says:

    I’ve been using a mini-atx pulseaudio server attached to my amplifier to play the audio from all the computers in my house for almost two years now and I can’t imagine ever going back. Pulseadio streaming works with macs too. Too bad there’s no good pulseaudio support for windows yet. I do like to play some games and have to use windows for that.

    With pulseadio I can use multiple amplifiers connected to separate outputs to just add more audio channels or I can just connect the minipc with an spdif cable to a 5.1 amplifier and stream 5.1 audio to the pulseaudio server from the clients. A Raspberry PI would be perfect for this. You could output the audio via hdmi to a home theatre system.

    Ps. Bluetooth wireless audio is not very good quality and you can’t stream from multiple sources at the same time.

    • Matt Shirley says:

      Hey, that’s a great idea as well. The way I have this set up I’ve actually enabled PulseAudio network streaming as well, but since I switched to Apple products from Linux in 2012 I haven’t had a need for it. Airplay isn’t open to the user like PulseAudio, but the implementation within iOS and Mac OS is really well done.

  4. neatbasis says:
  5. George Hahn says:

    Excellent hack, but it leaves me wishing for two things. First, a nicely cut case. Plenty of options here – dremel, nibblers, or even drilling and filing. Second, airplay video. It doesn’t look like this is set up near a display, but I’d be tempted to expose the HDMI connector anyways.

    • Matt Shirley says:

      Yes, I really should have waited and picked up a file from the hardware store! The HDMI connector is not so important to me, as directly outside the frame of the photo I have a television with an Apple TV.

  6. martinmunk says:

    I’ve been trying to do this for a while. I have found the shairport package to be pretty unstable. For every 5-10 minutes i have to do a disconnect+connect for the audio to play again.

    I suspect that this is due to a clock difference on the Pi and my MacBook which causes a buffer overflow/underrun on the Pi but really cant seem to fix this and it is sort of a dealbreaker :(

    • Matt Shirley says:

      I can’t comment on any long-term instability issues, since this setup has only been working for two days now, but you shouldn’t have this issue with shairport. I’ve been listening to entire albums, walking away, leaving the house, coming back and listening to more music without ever having to restart the daemon or Pi. Both my MacBook and iPhone 4S work flawlessly, and I’m sorry you’re having this issue.

      • martinmunk says:

        Thanks for sharing!
        Since i dont like iTunes, i use the shairport client as speakers in OSX.
        My guess is that doing this will not allow the audio stream to re-sync for each song?

        • Matt Shirley says:

          Yeah, I’m not sure about that. I’m on OS 10.8, which has airplay baked in, so I don’t use iTunes either. You can select an airplay target just like a sound card, similar to how pulseaudio works, except in a more limited way. I’ve had no issues with it, so maybe the shairport client has some issues.

  7. jjrh says:

    I read somewhere a while back that the raspberry pi had some serious issues with audio quality – even when using the usb port….

    Is this no longer the case?

    • Matt Shirley says:

      The audio quality should be fine using the USB port. The line out on the Pi does sound poor when I do A/B testing with the Edirol UA-5, although it’s not as bad as I would expect for a low quality PWM D/A conversion. The USB signal path is digital, so the quality will ultimately depend on the USB audio interface you are using. In this case, the UA-5 works well and also has an excellent headphone amplifier built in.

  8. TheWChef says:

    Instead of using the USB connection, could this also work through the audio jack on the Pi? I have an older receiver without a USB port, and I’d like to give this a try.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,781 other followers