Airplay Speaker using the Raspberry Pi and HifiBerry Amp+

This guide by SameerG7 was first published here.

Objective of the project is to make simple Airplay enabled stereo speakers. The Speaker project is inspired by this thread from the  DIY audio forums.

I did not want to have a bulky amplifier for this build, so decided to use a Raspberry Pi 3 (although it is overkill 😉 ) which I had laying around for some time unused. For this build I have used an HiFiBerry Amp+ which is a decent sounding amp which fits directly on to the RPI3.

Step 1: Parts Required

  • Raspberry Pi3
  • HiFiBerry Amp+
  • 2 Tang Band – W3-1053SC – 3″ Full Range Driver
  • 1 Dayton Audio soft dome tweeter
  • Speaker cables
  • HDMI cable female to male for external display connection
  • USB cable extension cord to connect to RPi in case of a changed IP address etc.
  • you may also use a female to male audio cable to connect to other speakers if required.
  • Power Adapter

Speaker Driver Parameters/Details (from http://diyaudiocart.com)

Nominal Diameter 3″
Power Handling (RMS) 15 watts Power Handling (max) 30 watts Impedance 8 ohms Sensitivity 85 dB 1W/1m Frequency Response 100 to 18,000 Hz Voice Coil Diameter 0.875″

THIELE-SMALL PARAMETERS DC Resistance (Re) 5.98 ohms Voice Coil Inductance (Le) 0.44 mH Resonant Frequency (Fs) 100 Hz Mechanical Q (Qms) 4.77 Electromagnetic Q (Qes) 0.72 Total Q (Qts) 0.62 Compliance Equivalent Volume (Vas) 0.04 ft.³ Maximum Linear Excursion (Xmax) 1.5 mm

MATERIALS OF CONSTRUCTION Cone Material Poly Surround Material Rubber Magnet Material Neodymium

MOUNTING INFORMATION Overall Outside Diameter 3.19″ Depth 2″ Baffle Cutout Diameter 3″ # Mounting Holes 4 OPTIMUM CABINET SIZE (DETERMINED USING BASSBOX 6 PRO HIGH FIDELITY SUGGESTION) Sealed Volume 0.06 ft.³ Sealed F3 128 Hz Vented Volume 0.1 ft.³ Vented F3 65 Hz

Tweeter Parameters/Details

Dayton Audio – 1″ Soft Dome Neodymium Tweeter 4 Ohm

PRODUCT SPECIFICATIONS
Speaker Type Tweeter Power Handling (RMS) 20 watts Power Handling (max) 40 watts Impedance 4 ohms Sensitivity 90 dB @ 2.83V/1m Frequency Response 2,500 – 20,000 Hz Voice Coil Diameter 25 mm

THIELE-SMALL PARAMETERS DC Resistance (Re) 3.2 ohms Voice Coil Inductance (Le) 0.48 mH Resonant Frequency (Fs) 1,350 Hz Mechanical Q (Qms) 3.87 Electromagnetic Q (Qes) 2.61 Total Q (Qts) 1.56 Surface Area Of Cone (Sd) 7.5 cm²

MATERIALS OF CONSTRUCTION Cone / Diaphragm Material Soft Dome Cone / Dome Diameter 1″ Voice Coil Wire Material Copper Voice Coil Former Kapton® Dual Voice Coil No Magnet Material Neodymium Shielded No

MOUNTING INFORMATION Overall Outside Diameter 66 mm Overall Depth 35.9 mm Baffle Cutout Diameter 45 mm # Mounting Holes 4

You may also use any crossover circuit if needed. In the current build as of now I use a 3 way crossover for this build, earlier in the first build I had not included a crossover.

Step 2: Box Build

I used normal MDF ply for this build . The box dimensions are as below :

Height: 8 in
Length: 20 in
Width: 9.5 in

The speaker drivers are mounted in center, the box is made deeper and wider so that the inside wiring is easy to handle. The box lid is kept removable.

There are three separate cabins made for the speaker as enclosures, the middle one can be used for placing the Raspberry Pi along with a 12V battery if you wish to make it battery operated. I have opted not to use a battery on this build.

Step 3: Putting It All Together

The build is not yet fully completed, I will be mounting the connectors for HDMI, USB and power on top of the lid.

The assembly is pretty straight forward:

Install Kodi / OpenELEC / OSMC on the Raspberry Pi

I have used OpenELEC for this build, but you can use any other distribution of KODI as well, e.g. OSMC or LibreELEC. I have chosen OpenELEC as it is very fast and has very good response. You can use any KODI add-ons you like on OpenELEC.

Plug the Amp+ onto the Raspberry Pi.

If you are using OpenELEC, you will need to create advancedsetting.xml with the following content, if the file is not existing you will need to create it in the following path:

/storage/.kodi/userdata/

In advancedsettings.xml under network node, you need to set the following parameters (see image)

----------------
buffermode 1
cachemembuffersize 139460608
readbufferfactor 20
-----------------

The above settings are required to stream any video from online sources seamlessly. In the audio settings, change the audio output to HiFiBerry Amp+ (see screenshot).

Reboot the system.

Then plug the speaker wires into the Amp+.

You will have a decent Airplay speaker using this build, I was personally amazed to hear the output from such a small enclosure and the speaker drivers. I haven’t measured the output yet, but it sounded very good.

To limit the maximal volume, you can use the commands below in a terminal:

amixer sset Master 70%
amixer sset Channels 70%,70%

Any comments are welcome to make the build more interesting.

Step 4: Using the Airplay Speakers

You can use any DLNA enabled app to operate from your mobile or you can use software like Apple iTunes from your desktop to stream music or video to the speaker. I have used BubbleUPnP on Android to stream music. You can also use KORE (the kodi app) as a remote control to operate and control the streaming, volume etc.

There are no hardware volume controls attached to the speaker as such. Intention is to use it hands free, all controls via a mobile app.