- Raspberry Pi Zero 2 W - Amazon | Adafruit
- I2S PCM5102A DAC Decoder - Amazon | Ebay
- MicroSD Card (8GB ) - Amazon | Western Digital
- USB or SD card adapter for the MicroSD card if your computer does not have a MicroSD slot (your MicroSD card may come with one, read its description) - Easily found on Amazon
- 3D printed case (use the case and cover STL files in the repository [coming soon])
- 3D Printer
- Soldering Iron
- Solder (preferably rosin core, lead-free)
- Jumper wires (if your DAC decoder does not come with them, mine did)
- Third hand tool/PCB holder (optional but recommended)
- Hot glue & glue gun
- Metal file (or something else to shave down the HDMI port's overhang)
When 3D printing the case, I recommend a small layer height as opposed to a larger one for finer detail on port cutouts. I also recommend enabling supports.
Discard the black piece of plastic covering the flex cable connector on the short edge of the Pi.
File away the metal on the HDMI port that overhangs the edge of the PCB board (notice in the second image how the HDMI port cannot be seen from underneath).
On the short side of the board, the pads BCK
, DIN
, LCK/LRCK
, GND
, and VIN
need to have jumper wires soldered to them. Do NOT solder a wire to SCK
.
Apply a small bead of solder to jump the two little pads on the front side of the board, between SCK
and BCK
. NOT THE SCK
AND BCK
PADS THEMSELVES, but the tiny pads next to them.
Make sure the wires go into the front component side of the Pi, otherwise the Pi will not fit into the case properly. Please use the following guide:
On your computer, plug the MicroSD card into your MicroSD reader slot or adapter.
Download the Raspberry Pi imager from the Raspberry Pi software page.
Launch the application and grant the necessary permissions. You should see a screen for selecting a device, an operating system, and storage.
For the device, choose RASPBERRY PI ZERO 2 W
. The operating system should be RASPBERRY PI OS (LEGACY, 64-BIT) LITE
(this may be located in the Raspberry Pi OS (other)
category).
Select your MicroSD card or slot name from the Storage options, mine was called "APPLE SDXC READER MEDIA".
Click NEXT
. If it asks you if you would like to apply OS customization settings before it flashes the MicroSD card, I recommend setting a custom hostname, username, and password. You can do this by clicking EDIT SETTINGS
.
Go to the GENERAL
tab. The hostname is what will show up on your Apple device when connecting to the AirPlay server, I named mine "AirPlayRBP", but if you leave it as default, it will be called "raspberrypi".
Go to the SERVICES
tab and tick the Enable SSH
checkbox.
Click SAVE
. Now when it asks if you would like to apply OS customization settings, click YES
.
If it asks if you would like to prefill the WiFi password from the system keychain, click No
. We will set this up manually.
When it asks if you still want to continue, click YES
. It may take a few minutes to flash the MicroSD, and you may be prompted to authenticate your computer accessing the MicroSD card.
When the program is finished flashing the card, you can close it.
Unplug the MicroSD card from your computer and plug it back in.
The SD card should be called bootfs
, and navigating to it with a file explorer will reveal your Pi's boot directory.
Create a new file there called wpa_supplicant.conf
using your preferred text editor. Open the file and paste in the template below:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<YOUR COUNTRY CODE>
network={
ssid="<YOUR 1ST NETWORK NAME>"
psk="<YOUR 1ST NETWORK PASSWORD>"
key_mgmt=WPA-PSK
id_str="<YOUR 1ST NETWORK ID>"
priority=<YOUR 1ST NETWORK PRIORITY>
}
network={
ssid="<YOUR 2ND NETWORK NAME>"
psk="<YOUR 2ND NETWORK PASSWORD>"
key_mgmt=WPA-PSK
id_str="<YOUR 2ND NETWORK ID>"
priority=<YOUR 2ND NETWORK PRIORITY>
}
Fill in your personalized preferences for each WiFi network you wish to add (anything with angular brackets <...>
).
country
: the two-letter country code (i.e.country=US
,country=AU
, etc.)ssid
: the case-sensitive name of the WiFi network (surrounded by double quotes)psk
: the password (surrounded by double quotesid_str
: a unique label to distinguish from other networks, could be anything (surrounded by double quotes)priority
: a unique number to determine what order WiFi networks should connect in (integer, no quotes)
This configuration is for two WiFi networks, but a different number of networks can be configured by adding or removing network={...}
listings.
Save and close wpa_supplicant.conf
.
Once the Pi boots for the first time, the wpa_supplicant.conf
file will be digested by the operating system, and it will be deleted
Don't worry! These network settings are not permanent! Here are a few ways to change them later down the line...
- Running the
wpa_cli
command with root privileges in the Pi's terminal (interactive way to adjust existing settings, i.e. add a new network, or change a password). Here are a few useful commands to run after opening interactive mode withsudo wpa_cli
:list_networks
gives you networks with their ID numbers (useful in other commands)get_network <network_number> <variable_name>
gets the value of a variable from a specific network (i.e.get_network 0 ssid
)set_network <network_id> <variable_name> <value>
sets the value of a variable of a specific network (i.e.set_network 0 psk "S1lly_p455c0d3"
)
- Creating a new
wpa_supplicant.conf
file in the boot directory (overwrites the existing network settings). This is useful if you cannot SSH into the Pi for various reasons.
Plug the MicroUSB power cable into the outermost MicroUSB port. Two lights should turn on, a green LED on the Pi, and a red LED on the DAC. It will take several minutes for the Pi to configure itself on the first boot, so be patient.
Verify that the Pi is connected to your network with the following command, assuming you are using the default hostname:
ping raspberrypi.local
To open the Pi's terminal, you can SSH into it. The following command assumes you are using the default credentials:
The first time you SSH into the Pi, it will ask you if you want to continue to connect. Type yes
. It will then prompt you for a password. The default password is raspberry
.
Next, run these commands one at a time:
sudo apt-get update
sudo apt-get upgrade
curl -sSL get.pimoroni.com/phatdac | bash
sudo apt-get install git
sudo apt-get install autoconf
Follow the instructions to install the following:
Note: Whenever a command starts with a #
symbol instead of a $
, it means to run the command with root privileges, i.e. starting with sudo ...
.
[to be continued]
- Code to run AirPlay server: [Shairport Sync](https://github.com/mikebrady/shairport-sync) - DAC jumper wire connections: [Kamran Sethi](https://raspberrypi.stackexchange.com/a/76264)