Introduction: RaspbAIRy - the RaspberryPi-based Airplay Speaker

Picture of RaspbAIRy - the RaspberryPi-based Airplay Speaker

With the delivery of my second RaspberryPi I finally got the chance to start this long-planned project:

I wanted to replace my old bathroom radio with a  more contemporary device by building a network-enabled speaker. Because I'm a user of several iDevices, the idea of making the speaker AirPlay-compatible became the basis of my further work.
After some googling I discovered James Laird's amazing shairport client for Linux. The initial installation on the RasPi worked like a charm, so I decided to take the project one step further by making it wireless. With a little help from Google again and some twiddling I finally got it to work and started writing this Instructable.

Have fun reading how it all went down and maybe build your own version of the raspbAIRy.

Step 1: Parts & Tools

Picture of Parts & Tools
This Instructable is based on the metric system and originates from Germany, thus dimensions are in millimeters and line voltage is 220V. I got most of the parts at my local electronics retailer or already had them laying around. The RasPi was ordered online at Farnell, the speaker cloth was found on eBay and the MDF was bought and already cut in width at a local hardware store.
  • RaspberryPi
RaspberryPi Model B with SD Card
Supported USB WiFi Adapter, like my LogiLink Nano Adapter
220V AC to 5V DC power supply
  • Sound
3,5W Mono Amplifier, in my case a Kemo M031N
Broadband speaker
White LED, 5mm
5x 475Ω resistors
2x 20kΩ resistors
10kΩ rotary potentiometer with knob
Power switch
Dip switch
3,5 mm audio socket and cable
220V AC to 12V DC power supply
Cable with power plug
  • Case
250 x 250 mm speaker cloth
1500 x 200 x 5 mm Medium Density Fibreboard (MDF)
600 x 200 mm artificial leather
Wood glue
  • Tools
Screwdriver and screws
Soldering iron and solder
Other typical workshop equipment

Step 2: Electronics

Picture of Electronics
  • Stereo to Mono
Following the great guide of Dennis Bohn "Why not Wye", I chose to integrate an easy summing circuit or actually two, one for each audio input.
  • Input Switch
A simple dip switch (ON-ON) for selecting the audio input for the amp. I added this to be able to connect other audio sources and to use the device as a 'normal' speaker, independent from the RasPi.
  • Mono Amp and speaker
The selected amplifier was wired according to the datasheet. Basically it accepts input voltages from 5 to 12V DC and a mono input signal through an optional potentiometer for volume control. I connected a 8Ω broadband speaker, which sounds surprisingly good for only 10€.
  • Power Supply
I chose to integrate two separate power units to be able to independently turn off the amp/speaker while keeping the RasPi running. This is mainly due to the boot time of Raspbian of about 30-40 seconds. Because I had them laying around I used two plug-in adapters, one providing 5V DC (max. 2500mA) for the RasPi and the other providing 12V DC (max. 1500mA) for the whole audio setup.

Step 3: Installation

Picture of Installation
  • Raspbian 'wheezy'
After downloading the official image and following these easy steps, the RasPi was set up in a few minutes.
The following steps require some basic command line skills but if you stick to the linked tutorials you should be good.
  • Shairport
I found two different documentations to be of great help, one in English and one in German. These include nearly the same steps:
  1. Install some packages and their dependencies, that shairport uses, via apt-get
  2. Get shairport and the perl module Net::sdp via git
  3. Install shairport as a service and make it run at startup
  • Wifi
Support for some Wifi chipsets is already included in Raspbian. I found a USB Adapter with the RT5370 chipset for a few bugs at a local electronics store. In addition to its Linux ability it is also very economical on power. It therefore can be driven on one of the onboard USB ports of the RasPi. A video tutorial from Adafruit then did the trick for me.
  • Here is what I did (commands in italic):
  1. Updated apt-get
    • sudo apt-get update
  2. Installed vim (personal preference)
    • sudo apt-get install vim
  3. List USB devices to get infos on wifi dongle
    • $ lsusb
  4. Installed Ralink-Firmware
    • $ sudo apt-get install firmware-ralink
  5. Modified the interfaces config
    • $ sudo vim /etc/network/interfaces
    • auto lo
      iface lo inet loopback
      iface eth0 inet dhcp
      auto wlan0
      iface wlan0 inet dhcp
      wpa-ssid "my_ssid"
      wpa-psk "my_password"
  6. Reboot
    • $ sudo reboot
  7. Checked that wifi is running
    • $ ifconfig -a
  8. Installed all dependencies for shairport
    • $ sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils
  9. Installed Net::SDP for iOS6 support
    • $ git clone perl-net-sdp
    • $ cd perl-net-sdp
    • $ perl Build.PL
    • $ sudo ./Build
    • $ sudo ./Build test
    • $ sudo ./Build install
    • $ cd ..
  10. Got shairport from git
    • $ sudo git clone shairport
  11. Changed to shairport directory and compiled
    • $ cd shairport/
    • $ sudo make
    • $ sudo make install
  12. Copied the init sample to startup folder and set rights
    • $ sudo cp shairport.init.sample /etc/init.d/shairport
    • $ cd /etc/init.d
    • $ sudo chmod a+x shairport
    • $ sudo update-rc.d shairport defaults
  13. Changed name of shairport client
    • $ sudo vim shairport
    • changed the following lines:
    • NAME=ShairPort
      DAEMON_ARGS="-w $PIDFILE -a raspbAIRy"
  14. Set audio output to line
    • $ amixer cset numid=3 1
  15. Started shairport
    • $ sudo /etc/init.d/shairport start

Step 4: Case

Picture of Case
  • The case is a simple 200 x 200 x 210mm cube-shaped box made of 5mm MDF, with the side parts being mitered with a 45° angle.
  • On the front I made cutouts for the speaker, the volume knob and the power LED. It was covered with light-grey speaker cloth  and clipped on with wooden dowels.
  • The back shows holes for the power chord, power switch, audio jack and input switch and is held in place by wood screws.

Step 5: Wiring

Picture of Wiring
  • All of the audio wiring was done according to Step 2. The RaspberryPi got its own 5V DC power supply with a soldered-on MicroUSB connector.

Step 6: Final Closeups

Picture of Final Closeups

Step 7: Modifications and Future Plans

Picture of Modifications and Future Plans
  • Switching from Raspbian to ArchLinux to decrease boot time from ~35 to 6 seconds
  • Adding an audio output socket and switch
  • Adding bluetooth support for non-Airplay devices


ArifSae (author)2017-01-14

that box !!!!! lovely

g0l3m (author)2015-10-23

Hi, can I ask you why a mono amp? Doesn't this kill the stero signal?

zwuckl (author)g0l3m2015-10-25

In principle, you're right. But I wanted to keep the build relatively small and at the same time have enough room for a 10cm speaker. This is why I chose the summing circuit, which sums both audio channels and inputs it to the amp.

thomasweenk (author)2015-04-01

Can this be combined with a bluetooth capability? For when you are outside

rommell.arma (author)2015-02-09


Is there a possibility that this can stream HD Videos from any android or IOS device??? I would love to do this.

Martv (author)2014-12-25


Do you need two power suplies? Or can you use a converter like this:

Martv (author)Martv2014-12-26

I mean, can you use one wallwart?

shubi_bayasaa (author)2014-10-30

thank you for this tutorial, what is R and L ?

zwuckl (author)shubi_bayasaa2014-12-23

Sorry for the late reply, R (right) and L (left) are the + voltage lines of the stereo audio signal.

shubi_bayasaa (author)zwuckl2014-12-23

Thank you for replying

ramanar (author)2014-12-22

I am sorry to say this inspite of detailed steps for building the project there is no information given regarding how to use the project /operate the project or what this airplay speaker is capable of like whether it produce any sound/ music? nothing clearly explained???

zwuckl (author)ramanar2014-12-23

Hey ramanar, I wasn't aware that this needed to be explicitly stated. This speaker provides Airplay ( audio playback functionality. After booting you simply pair it with any given state-of-the-art Apple device for audio stream. Thus, the speaker is indeed capable of (re)producing the sound from your, let's say, iPhone or iPad.

erwan (author)2014-07-19

Something you may want to add: setting up your OS as read-only would allow you to safely turn it off quickly, without having to ssh and shutdown properly. Since you ensure there is never any write, there is no risk to shut it down during a write that leaves your SD card corrupted and your system unable to boot.

I followed this for Arch Linux, there are tutorials for Raspbian also if you search:

I'm sure some people actually turn it off brutally without configuring it as read-only, but doing that you never know when you'll corrupt your SD card!

zwuckl (author)erwan2014-12-23

Good thought. Thanks for the input :)

erwan (author)2014-07-17

I'm building that in an old radio I have laying around :)

How did you connect the 2 power blocs by cable, did you cut the pins that usually go to the wall outlet or something?

zwuckl (author)erwan2014-07-17

Exactly. I simply sawed off the basis of the case including the pins, cut the wires behind and soldered extension wires on.

Thomas H. (author)2014-04-29

Really cool project!

I have two Raspberry Pi's lying around (one is model A and the other B).

I bought the A by mistake and I think I can do something similar to your project with it, since it doesn't need the Ethernet port and only one USB port.

The main difference is that I want to make it compatible with android.

erwan (author)Thomas H.2014-07-17

"Compatible with Android" doesn't mean much, the real question is the application you want to use. Some Android application actually support output to Airplay, like DS Audio that I'm using to stream from my Synology NAS.

Or, maybe you want to make a generic blutooth speaker:

Banana Joe (author)Thomas H.2014-06-19

i realized two similar project with both raspberrys Model A and Model B, both are working and the updated firmware makes the audio connector working good. usb is for the ethermax adapter. it is working fine.

tjames23 (author)2014-05-23

Hi, I really like this and plan on doing something similar but inside a vintage radio. Are you happy with the way it sounds? Is it loud enough? Thanks,

Banana Joe (author)2014-03-30

hi Zwuckl,

i have one question to the quality of the sound. i builded a similar Box like yours. and just was wondering if your speaker makes backgrund nioses or interferenes after power on the box.

Dinobe (author)2014-01-29

I absolutely love the idea and have been thinking about this as well for a while. Was thinking of switching from Squeezebox to Sonos, but I love this solution.

Quick question: how is the (audio) output from the RPI connected to the Kemo amp? Did you use the 3,5mm² socket from the RPI with a cable or did you connect some of the pin on the RPI? (if so, which ones?)

zwuckl (author)Dinobe2014-02-05

Hi Dinobe, sorry for the late reply. The amp is connected via a soldered on 3.5mm plug that fits the standard analog audio output of the Pi.

So no magical GPIO wiring involved here...

waters99 (author)2014-01-07

What was the diameter of the speaker used?

mbertei (author)2013-12-06

is compatible with ios7?


zwuckl (author)mbertei2013-12-16

Hi mbertei, sorry for the late reply.
I've not tested this setup under iOS 7, but I'm quite sure that if you keep the software update it should be supported by now. Alternatively, have a look at:
There are some comments on iOS 7.

TexyUK (author)2013-11-20

Any way of getting the iD3 tag information on the Pi, ie from the streaming audio?


zwuckl (author)TexyUK2013-11-21

Good thought. I'm not quite sure if there's shairport support for that. Since my built is headless I haven't really checked.

l19bal (author)2013-09-10

this looks so neat and professionally made!

amalething (author)2013-08-08

I too am really interested in a script to power on and off the amplifier. I've built a circuit with a relay by copying a tutorial over at OpenHomeAutomation (, but I've found no instructions on the internet on how the Pi can activate (and deactivate) the switch.

Obscuredude (author)2013-08-08

Hi - that is just what I have been looking to do for some time now. Have you managed to get it working?

PS - I currently use a separate device to detect the audio signal and switch a power relay - this works well but it would be great to be able to get rid of a box.

PPS - using Raspbian with Shairport

nickb800 (author)2013-06-26

Beautiful build! I'm thinking about doing something similar, using the GPIO pins on the Raspberry Pi to control a relay which turns on (and off) the amplifier circuit, so that the amp turns on when you start streaming audio to the Pi, and off when you stop streaming

zwuckl (author)nickb8002013-06-26

Thanks! I like your idea a lot, as it would simplify the operating a lot. How would you check if there's something streaming? Do you periodically check mpc's status or is shairport itself capable of that?

louieaw (author)2013-06-02

Quick question. Trying to do a similar project. Is it necessary to have the two inputs (The RPi and Aux) on separate grounds? Why not just connect the two and have one SPDT switch?

zwuckl (author)louieaw2013-06-03

I guess you could use common ground for both inputs and then just integrate one summing circuit after the SPDT. I did it the "complicated" way because I had all those parts laying around and needed to fresh up my soldering skills ;)

Rick Pinman (author)2013-05-23

Hi !
Thanks for your job i'm very interested into make my own one !!
But i'm pretty interested about your future plans in particular for the bluetooth support.
When will you adapt your article about that change ?

zwuckl (author)Rick Pinman2013-05-23

Hey Rick. Thanks for your interest.
Unfortunately I haven't realized the bluetooth concept to date.
I just looked around this website after reading your comment and found two promising Instructables describing this idea:

If I get the time I will definitely add the bluetooth section soon...

fwonkas (author)2013-04-21

I'm basing a project on your work here and I noticed an error. In step three, where you're installing the shairport dependencies, you're missing a dash. Instead of "libio-socket inet6-perl", it should be "libio-socket-inet6-perl".

Thanks for the instructable; it's been very helpful!

zwuckl (author)fwonkas2013-04-21

I just corrected this :) Thanks for the input and good luck with your project!

R167 (author)2013-04-08

Quite possibly cheaper than any other airplay speaker

thelostspore (author)2013-02-21

legit, awesome project. I will definitely be making this when I have the time

faab (author)2013-01-23

A quick tip:
It's very easy to install a remote-desktop server.
By doing this you no longer need to plug in a screen and keyboard but you can configure your speaker remotely from your lap- or desktop.

code #sudo apt-get install tightvncserver

just install a remote desktop client on your desktop to log in on your RaspbAIRy
Windows comes standard with a client.
I use remmina on Ubuntu. works like a charm

zwuckl (author)faab2013-01-24

Great idea, thank you :)
Since the speaker is only configured via command line I chose SSH from my remote Mac. SSH-support comes naturally with Raspbian and even works when you don't know your RaspPi's IP address, simply by connecting to "raspberrypi.local".

danny114 (author)2013-01-17

also on the wiring diagram the L R should not be connected to gnd

zwuckl (author)danny1142013-01-17

Thanks for your input. I corrected the diagram according to Dennis Bohn's original circuit.

danny114 (author)2013-01-17

i do not have a angled jigsaw and my dad wont buy one do you think this would still work with out it

zwuckl (author)danny1142013-01-17

Hey Danny. This should definitely work aswell... The parts are tightly connected by the staples and covered by the artificial leather.

Retro Correct (author)2013-01-13

Great work, the cabinet is looks better than most manufactured ones!

PaxDesigns (author)2013-01-12

Love it! Looks great! I think I am going to use allot of this info to make an outdoor speaker!

oldmicah (author)2013-01-12

Beautiful work.. I had wondered if such a thing was possible but didn't know about the Linux client.

About This Instructable




Bio: I am a PhD student in bioinformatics interested in technology, electronics and computers with a fondness for crafts and good food.
More by zwuckl:raspbAIRy - the RaspberryPi-based Airplay speakerHow to make Spaetzle - a traditional Swabian/Southern German kind of noodle
Add instructable to: