Julien Melissas

Code

AirPi: Raspberry Pi AirPlay Station

Posted on .

AirPi: Raspberry Pi AirPlay Station

Introduction

Since moving into a new place, my bedroom is big enough for my stereo, which love very dearly. Thing is, I can’t be in bed working and also listen to music at the same time! Now normally I’d just buy an AirPort Express, but I get a decent WiFi signal up in my room, don’t need the other functionality, and had an extra (older) Raspberry Pi Model B laying around. After a little bit of research, and a few hours today, I can now easily stream to my stereo from across the room!

 

Prepping the Raspberry Pi

I’m going to assume you have a Class 6+ SD card (at least 8gb) and a MacBook Pro with an SD card slot.

Insert the SD card. Make sure there is nothing you want on it. Download NOOBS (I was being lazy) and unpack it. Copy those files to the SD card that has been formatted by SD Card Formatter (in overwrite format – that took a while). Plop it into the RPi (with a keyboard, display, and approved WiFi dongle), and power it up!

It should now ask you if you want to install an OS. I selected Raspian. This took a while, so crack open a beer or whatever and let it do it’s thing. Once it’s done, I had to make sure the computer knew it was a US keyboard, so I read a few articles but eventually just ended up running sudo raspi-config and picking through the US Keyboard types in the Internationalisation menu item until one worked.

WiFi

Ok, so the first thing I did was setup WiFi according to this article: http://raspberrypihq.com/how-to-add-wifi-to-the-raspberry-pi/. It worked great and I was up and running. I wasn’t allowed to ping www.google.com until I ran sudo su, which puts you in sudo mode until you type exit.

apt-*

Now that you have internet, and before doing anything else to your Pi. You should always see if you have the latest and greatest with:

apt-get update
apt-get upgrade

That also might take a while. You might need to get up again and grab a second beer.

 

AirPi

Now that you have this awesome, blank, Raspberry Pi we have to actually hook something up. I followed this awesome guide from Lifehacker. Right now I don’t have a dedicated DAC, so I skipped those steps and instead followed these to help me get up and running by forcing my Pi to use the audio jack. It’s really awesome you can just type speaker-test -t sine -f 440 -c 2 -s 1 into your terminal and get a 440 sine wave! Love it. You also might want to check out this post.

I also had to increase my default volume to 100% with amixer  sset PCM,0 90%, thanks to this post.

 

Thoughts/Next Steps

When I first got this working I was REALLY excited! It’s always more fun when you build things for yourself. It went out on me once while I was listening to some music, and I had to restart the Pi, but since then it’s been pretty good! Maybe I’ll post back here in a few weeks and let you all know how it’s going.

Keep in mind the sound card/jack in the Pi isn’t exactly considered top notch, and you can hear it. At lower volumes (what I play in my room more), the sound from the Pi is acceptable for sure, but if you start cranking it or do some critical listening, you’ll hear the quality of the sound is pretty limited. If this thing proves to be reliable and works well for a little while, I’m probably going to build a DAC for the Pi. Maybe the HiFiBerry DAC?

I’d also like to put one of my external hard drives that holds some movies/media on it up on the network, so I’m thinking about using the Pi’s extra USB port to plug into the External HD and use it as a SAMBA server. This thing could end up being useful!

 

Never mind.

This thing kinda sucks. It’s a really fun project and it feels good once you get it working but honestly it’s been dropping in/out so much over the last day (with me having to restart it) that I think I’m going to go and try to find some other AirPlay thingy.

Sry.  😞

 

PS. My Stereo

Just in case you were wondering, I thought I’d provide some info on my stereo. It’s not anything too crazy, but I think it’s a good balance of old and new. The amp is a Stereotech 1200. Basically, it’s a Solid State McIntosh. Stereotech was a failed brand that McIntosh sent over to Japan to see if the cost could be reduced and still make a good receiver. It’s a bit rare to find, but I just love the way it looks and didn’t have the money to buy a real McIntosh. The speakers are newer Klipsch RF-62 II Reference Series Floorstanding speakers. I got them on sale at Best Buy and really love how they take up so little footprint and have such a tight, but big sound. While I can’t play my records right now (because something happened to my previous record player), I’m hoping to get a Pro-Ject Debut Carbon DC sometime here in the near future.

Julien Melissas

Julien Melissas

https://www.julienmelissas.com

I'm a Web Developer, Foodie, and Music Lover/Maker living in Asheville, NC. I make things on the web at Craftpeak & JM Labs.

Navigation