# HiFi Raspberry Pi Hat

Raspberry Pi Audio Hat powered by two PCM5100 DACs

- **Seller:** [Sonocotta store](https://lectronz.com/stores/sonocotta), Warsaw, Mazowieckie, Poland
- **Price:** $16.00 (USD, before shipping and taxes)
- **Availability:** In stock
- **Categories:** Audio, Raspberry Pi, Home automation
- **Product page:** https://lectronz.com/products/hifi-raspberry-hat

## Options

**Board version**

- 1X Hat (2.0, any Pi), rev D + 40-pin extender ○ (40 left)
- 2X Hat (2.2, Pi5), rev D + 40-pin extender ○ [Add $5.00] (6 left)

## Links

- [Documentation](https://hackaday.io/project/195272-raspberry-pi-media-center)
- [Code](https://github.com/sonocotta/raspberry-media-center)

## Images

![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNDIsInB1ciI6ImJsb2JfaWQifX0=--acaa984dafc3704a82f6644e57b2e97e211c9a45/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0113.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNDMsInB1ciI6ImJsb2JfaWQifX0=--28e3da263ee02b24b93dc8e9f1c8496aeffa8c8e/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0112.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNDQsInB1ciI6ImJsb2JfaWQifX0=--27834e515deb334d02ad5367912e9d89ea8a5d13/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0115.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNDUsInB1ciI6ImJsb2JfaWQifX0=--880f3276dc271b72ca7bcb80c69998c8561f572b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0104.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNDYsInB1ciI6ImJsb2JfaWQifX0=--082d0a2669bd2447885da3abfc9df382e93ebc42/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0120.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNDcsInB1ciI6ImJsb2JfaWQifX0=--81f1b0b081767dd83572e39771e80fa519349687/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0118.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNDgsInB1ciI6ImJsb2JfaWQifX0=--3446e69392241a80f1813e7b4bdf80e77249a3ec/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0121.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNDksInB1ciI6ImJsb2JfaWQifX0=--a9a99bdfc451187fbcb1ef5716422bd25df89c58/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0117.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNTAsInB1ciI6ImJsb2JfaWQifX0=--95514b2286beb650d98268cb1575ab9ae1ee9765/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0102.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNTEsInB1ciI6ImJsb2JfaWQifX0=--50b67895f5fbff15c29ae338ebb8f5456b481019/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0107.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNTIsInB1ciI6ImJsb2JfaWQifX0=--b2e54726137ccf12faf3652a55b50325a75b55a0/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0109.JPG)
![HiFi Raspberry Pi Hat](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NTIxNTMsInB1ciI6ImJsb2JfaWQifX0=--d28207b7c761feafd8d86c1b30273f6d4b410ee1/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJKUEciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--a1419a086f227676aca33a49760ac51e58b523e3/2025-02-06T17-23-38.101Z-DSC_0110.JPG)

## Description

## What is it?

Raspberry Pi HiFi Hat is the lightweight implementation of the PCM5100A DAC and ultra-low-noise power circuitry in a Hat shape. It combines the power of the Raspberry Pi SBC and the Hi-Fi audio capabilities of TI’s best-known Hi-Fi DAC. It has two flavors: 1X is a traditional DAC that works with any Raspberry Pi out there, while 2X is specifically designed for Raspberry Pi 5 and implements two stereo DACs, which Raspberry Pi 5 users can use independently. Using two of them, you can have up to 4 stereo outputs, totaling 8 channels of audio.

| 1X | 2X |
|----|----|
| ![DSC_0122](https://github.com/user-attachments/assets/0b297b27-d3c7-4b82-b072-3d3edb96539f) | ![DSC_0113](https://github.com/user-attachments/assets/e42a2fa6-db4e-4659-9651-801031f9721c) |

## Why did I build it

I did a few audio projects in the past, some using [ESP32](https://sonocotta.com/esparagus-hifi-medialink/), some using larger [Orange Pi](https://sonocotta.com/orange-pi-media-center/) and [Raspberry Pi](https://hackaday.io/project/162373-orangepi-zero-pulse-music-server-using-i2s-dac) devices. Each has its pros and cons, and with each iteration, I'm trying to focus on the details that were working best for me while actually using them. 

What is special about the Raspberry ecosystem is, of course, its community support. Being a not-so-strong software developer, I often have to rely on the work that other people did and baked into the base Raspbian image. Attaching a DAC, Ethernet, and IR reader is as simple as adding 3 lines into `config.txt` file. All the device tree definitions, kernel drivers, and dependency packages are already in place, believe it or not. 

Sure, compared to the ESP32 platform, it is not as lightweight. It requires more power, it takes some time to boot. But when it comes to rapid development, there is nothing like the Raspberry Pi.

Raspberry Pi HiFi is a first-in-line product that uses the legendary PCM5100 series DAC with supreme audio quality. It exposes line-level output that you can plug into a stereo amplifier. Spend as much as you need on the external amp to deliver the sound you like (personally, I prefer late '80s audio gear).

## Use cases

**HiFi Raspberry Hat** is a flexible, open-source audio platform designed to fit into both smart homes and custom audio projects.

*   **Smart Home Audio, TTS & Automation Node**
    Integrates with Home Assistant and Music Assistant for high-quality playback, text-to-speech, and event-driven announcements. Functions as both an audio endpoint and a networked automation node for sensors, triggers, and smart home workflows.
*   **Multi-Room Audio Infrastructure**
    Use **HiFi Raspberry Hat** as a Snapclient server and endpoint for perfectly synchronized distributed audio. Ideal for open, vendor-neutral whole-home or commercial audio systems.
*   **Standalone Network Player & Streaming Hub**
    Run LMS/Squeezelite for a self-contained streaming device supporting Spotify Connect, AirPlay, and Logitech Media Server — no external computer required.
*   **Embedded Audio Processing & DSP Platform**
    Execute real-time digital signal processing, filtering, effects, or audio analysis directly on-device. Suitable for smart speakers, alert systems, acoustic sensing, and custom audio interfaces.
*   **Networked Sensor & Interface Controller**
    Combine audio output with GPIO control, sensors, buttons, displays, or actuators. Ideal for interactive installations, smart appliances, voice feedback devices, or industrial status systems.
*   **Educational Platform for Systems & Networking**
    A practical teaching platform for embedded Linux-style workflows without full SBC overhead — covering networking, streaming protocols, real-time processing, IoT architectures, and open-source audio systems.
*   **Rapid Prototyping for Connected Products**
    Designed for fast iteration of networked hardware products — from smart audio devices and notification systems to interactive kiosks and connected consumer electronics.
*   **Open Platform for Custom Products & DIY Builds**
    With fully open firmware and tooling, **HiFi Raspberry Hat** provides a flexible foundation for personal projects, research platforms, or commercial device development.


## Features

|  | **HiFi Raspberry Hat** | **HiFi Raspberry Hat 2X** | [HiFi Raspberry Media Center](https://lectronz.com/products/hifi-raspberry-media-center) |
|---|---|---|---|
| Image  | ![DSC_0122](https://github.com/user-attachments/assets/0b297b27-d3c7-4b82-b072-3d3edb96539f) | ![DSC_0113](https://github.com/user-attachments/assets/e42a2fa6-db4e-4659-9651-801031f9721c) | ![DSC_0733 (copy 1)](https://github.com/sonocotta/raspberry-media-center/assets/5459747/990da9e7-b8fd-400c-b818-cb9352fd10a3)
| Compatible with | Every Pi | Raspberry Pi 5 | Raspberry Pi Zero (W), Raspberry Pi Zero2 W |
| DAC | PCM5100A 32-bit Stereo DAC | Dual PCM5100A 32-bit Stereo DAC | PCM5100A 32-bit Stereo DAC |
| Output | 2.1 VRMS Line level output -100 dB typical noise level | 2.1 VRMS Line level output -100 dB typical noise level | 2.1 VRMS Line level output -100 dB typical noise level |
| IR input | ✅ | ✅ | ✅ |
| RGB LED | ❌ | ❌ | ✅ |
| Onboard Serial Bridge | ❌ | ❌ | ✅ |
| Wizznet W5500 Ethernet | ❌ | ❌ | ✅ |
| Mechanical dimensions (WxHxD) | 65mm x 30mm x 15mm | 65mm x 30mm x 15mm | 88mm x 38mm x 100mm |
| Power requirement | 5V from the host Pi | 5V from the host Pi | 5V USB-C power adapter (up to 1A) |

⚠️ *HiFi boards require an external amplifier or active speakers; you can't connect passive speakers to it.*

💡 *Need to connect speakers as well? Check out [Amped Raspberry Hat](https://lectronz.com/products/amped-raspberry-hat) and  [Amped Raspberry Media Center](https://lectronz.com/products/amped-raspberry-media-center)* 

💡 *Need only speakers output? Check out [Loud Raspberry Hat](https://lectronz.com/products/loud-raspberry-hat) and [Loud Raspberry Media Center](https://lectronz.com/products/loud-raspberry-media-center)*

💡 *Need more powerful DSP? Check out [Louder Raspberry Hat](https://lectronz.com/products/louder-raspberry-hat), [Louder Raspberry Hat Plus](https://lectronz.com/products/louder-raspberry-hat-plus) and [Louder Raspberry Media Center](https://lectronz.com/products/louder-raspberry-media-center)*

## Board Pinout

|                    | I2S CLK | I2S DATA           | I2S WS | IR INPUT |
|--------------------|---------|--------------------|--------|----------|
| Raspberry Pi Zero  | 18      | 21                 | 19     |   17     |
| Raspberry Pi 2,3,4 | 18      | 21                 | 19     |   17     |
| Raspberry Pi 5     | 18      | 21, 23, 25, 27     | 19     |   17     |


## How to use

You need nothing more than an SD card with a Raspbian image and a USB-C power brick. You can use any distribution you like. The only change you need to make to enable hardware is to add 3 lines to the `/boot/config.txt`

```
dtoverlay=gpio-ir,gpio_pin=17
dtoverlay=hifiberry-dac
```

## Other software options

The project repository provides a few examples with build instructions, including [Volumio setup](https://github.com/sonocotta/raspberry-media-center#volumio) instructions, among others.

## Hardware

Please visit the [hardware](https://github.com/sonocotta/raspberry-media-center/tree/main/hardware) section of the project repo for board schematics and PCB designs. Note that PCBs are shared as multi-layer PDFs as well as Gerber archives.

### PCB diagram

| Image |
|-------|
| ![image](https://github.com/user-attachments/assets/2a406a90-1263-4541-b18f-be0753c5ec83) | 

### IR reader

Please follow [this guide](https://github.com/sonocotta/raspberry-media-center?tab=readme-ov-file#ir-reader) to configure an IR reader

### Raspberry Pi 5 note

Raspberry Pi 5 is the first one that allows the user to drive multiple I2S data lines using the same interface. What it means in practice is that while all older Pis have just 3 I2S lines (CLK, WS, DATA), Pi5 supports up to 4 Data lines (CLK, WS, D0, D1, D2, D3), capable of driving 4 independent audio interfaces. 

2X Raspberry Pi hats support alternative data lines. You need to short some solder bridge to use it, though. It allows configuring Hats to use different pins and stack them together to create 4 individual stereo interfaces (8 channels in total) using the same device.

By default, the 2X hat uses pins 21,23 for data, with the possibility to switch to pins 25 and 27 with solder bridges and stack 2 boards together.

| HiFi Hat (rev C) | HiFi Hat (rev D) | 
|----------|----------|
| ![image](https://github.com/user-attachments/assets/3c126719-d0ca-40b3-92d4-5b542fd0c335) | ![image](https://github.com/user-attachments/assets/0c429268-412e-41a2-90dc-f3e49f5cc586)

The configuration value that allows this is quite simply

```
dtoverlay=hifiberry-dac8x
```

# Restocking & Availability

New restock batches are regularly ordered from the factory, and I plan to keep all versions available at least until the next board revision is released. For current availability, you can also check the official reseller [Elecrow](https://www.elecrow.com/hifi-raspberry-pi-hat.html).

## USA shipping Update

Due to the new tariffs introduced by the Trump administration, standard shipments are temporarily on hold. However, shipping to the US has now resumed via UPS, though rates are currently quite high. I’ll fully resume regular shipping as soon as the restrictions are lifted. In the meantime, you may consider ordering through [Elecrow](https://www.elecrow.com/hifi-raspberry-pi-hat.html).

## Sponsorship & Community Support

If you’re working on an open-source project, an educational initiative, or any pro-bono/volunteer effort, feel free to reach out for sponsorship details. I’ll do my best to provide discounts or even free boards.

## Custom Design & Consultation

If you’re interested in a custom design based on, or inspired by, my boards, I also offer contract design work and consultation when needed.

## Shipping policy

Most orders are shipped the next business day morning. All shipments are tracked. Delivery time in the EU is 3-7 days, outside 2-3 weeks, depending on the distance. After 30 days, the package is considered lost - reach out for a refund or replacement.
