Skip to content

Click for PDF version

Well, it's been quite a while, so here are the changes since last update:

  • New main room stereo loudspeakers (free, but ultimately a sad story) -  Kralk Audio TDB-8
  • New USB DAC in the main room. It brings the last bits of features left on my would like list and measures so well in all meaningful domains that anything better will be pointless - TOPPING D50s, a birthday gift. Nothing wrong with Chi-Fi when it's well engineered like this one
  • New 55" FALD LCD 4K HDR Sony TV, an upgrade from 1080p LCD, using a voucher from Emma's work
  • Raspberry Pi 4s on the TVs. Does 4K HDR and x.265/HEVC video, as well as all HBR multichannel audio. It's not only cheap, but it's also the only device I know off that is able to send video on one HDMI port and audio on the other (my receiver is too old and its HDMI version does not handle 4K video or ARC, and by extension eARC). I'll upgrade to a Denon AVC-3700H when I grow up!
  • New server hardware. The Gen2 i5 laptop has been replaced by a 7th Gen i5, thus faster and needing less electricity. It's also much more practical with its very small footprint - Intel NUC7i5BNH, massively good lot deal off Facebook Marketplace, bought a few, sold a few, financed mine
  • Additional disk in the NAS. Two extra TB
  • New Wi-Fi access point, providing an upgrade from 300 Mbps N to 1750 MBps AC, another voucher
  • New ISP, now symmetric 150 Mbps fiber from 60/10 aDSL, and much cheaper
  • New 8 port GigE switch, using the change from the TV's voucher

TL;DR - The finished product

Introduction

Our bedroom music, part of a larger setup, is a Roon endpoint based on the following equipment:

    • a Raspberry Pi 3 B microcomputer, with on-board 2.4 GHz Wi-Fi, running DietPi Linux and Roon Bridge
  • a HifiBerry AMP2 IQaudIO (now Raspberry Pi) DigiAMP+ add-on board, a 24 bit, 192 kHz capable PCM DAC with a 35 W class D amplifier
  • a 65 W (18 V, 3.34 A) switch mode power supply brick that powers everything
  • a pair of Wharfedale Diamond 9.1 bookshelf speakers, turned white
  • 2.5 mm2 OFC speaker cables

Most of the equipment is hidden under the bed, with only the speakers visible. Volume control was solely through the Roon Remote application on the laptops or mobile devices.

 

It was quite "naked", though!

I wanted to get the following improvements:

  • Use Wi-Fi on the 5 GHz band, 2.4 GHz is too crowded in our building, interferences are killing network performance. It's difficult to play standard CD quality music during the evening, forget high-resolution music
  • Have an enclosure that is not too geeky-looking and able to have all sorts of sockets fitted
  • Proper speaker binding terminals, no geeky screw-in stuff, but practical 4mm banana plugs
  • Physical volume and mute button, something that controls volume the good old way, quickly
  • Infrared remote control for volume and mute as well as Roon's play/pause, next and previous track
  • All that while fitting within a budget as close to zero as possible!

Improvements

Kitlist

Here is a list of all the parts used:

  • 1x USB Wi-Fi adapater, N, 5 GHz Replaced by the built-in capabilities of a newly acquired Raspberry Pi 3 B+
  • 1x small wooden box, from Sainsbury's downstairs - Enclosure - £6
  • 1x 5.5 mm x 2.1mm DC power jack female, barrel, panel mount - Power input - £2.77 for a pack of 5
  • 4x binding posts, screw type, 4 mm, panel speaker connectors - Easy speakers connection - £6.95
  • 4x Sewell Strike 4mm banana plugs - for the speaker cables - £0 (I had spares)
  • 1x rotary encoder with switch - Will control the volume/mute - £2
  • 1x silver solid aluminium volume knob - £3
  • 1x infrared sensor (Vishay IR sensor - 38KHz - TSOP4838) - £2
  • 1x white Apple remote control - £0 (a gift from a friend!)
  • 20x 3" female/female Jumper wires - £2
  • 1x 3.5mm mini jack chassis panel Mount Stereo Headphone Input Socket Connector - For the infrared sensor connection - £1.89
  • 1x 3 m 3.5 mm male/male stereo jack cable - For the infrared sensor - £2.78
  • 1x kit of various diameters of black heat shrink tubing - Will insulate connections and make things look tidy - £1.79
  • 4x standoffs and screws - For mounting the Raspberry Pi - £0 (I had spares)

5 GHz USB Wifi

Anything below is now for historical purposes, just in case someone else needs it. I've scrapped that USB dongle and now use a Raspberry Pi 3 B+ with built-in 5GHz capabilities that are supported out of the box.

I bought a TP-Link Archer T2U adapter. It's is a dual band (2.4 and 5 GHz) A/B/G/N/AC model. I just need 5 GHz N at home.

Linux support is not stellar. I had to manually compile a specific driver (make sure that you read this bug) and force the use of the access point's 5 GHz radio (BSSID) through wpa_supplicant.conf:

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="MyNetworkName"
    bssid=XX:XX:XX:XX:XX:XX
    scan_ssid=1
    key_mgmt=WPA-PSK
    psk="MyPassword"
    freq_list=5180 5200 5220 5240
}

32 bit, 384 kHz PCM audio is now flawlessly streaming at any time of the day!

Enclosure

Wood preparation

I've unscrewed all the lock and hinges and treated the wood with Restor-A-Finish and Feed-N-Wax. This gave the grain a bit of a better look and will hopefully keep the finish more durable. Needless to say, this is very crap wood!

Before:

After:

Ventilation

The Raspberry Pi and the very efficient class D amp do not generate much heat. This is not a reason to leave them in a completely closed box.

Holes on the top:

Volume knob

Hardware

The rotary encoder is mounted on the top plate, dead center. The box is deep enough, there will be no pin in close proximity with the Raspberry Pi below.

Three pins are used for the rotary encoder (volume), two pins for the push button (mute/un-mute).

Software

I used this python script. I had to adapt it with the GPIO pins I've used and change the mixer from PCM to Digital.

It works like a charm!

Raspberry Pi

Standoffs and screws ready for mounting on the thin bottom board of the box, followed by four 2.5 mm holes:

Speaker terminals

Four 10 mm holes later...

Power connector

This is a simple female 2.1 mm barrel socket, screwed into the wood. Not much to say here. It uses the screwed binding posts of the amplifier.

Infrared sensor and connector

Hardware

As the box is mostly hidden under the bed, I have attached the IR sensor at the end of a 3m cable, terminated with a 3.5 mm jack. Then sensor will end up living discreetly on a shelf above the bed.
The box is equipped with a jack socket.

Software

LIRC is used for understanding the remote input, IREXEC is used to take action on button presses, using amixer.

The LIRC configuration has dramatically changed in recent versions of Raspbian, making the guides commonly found on the Internet rather misleading.

Here is what needs to be done:

First, add the dtoverlay info in /boot/config.txt (/Dietpi/config.txt in DietPi), there will be no manual loading of any module:

dtoverlay=gpio-ir,gpio_pin=25

If you see online documentation using lirc-rpi and gpio_in_pin, it's from an old configuration method that got deprecated sometime in 2019.

Edit file /etc/lirc/lirc_options.conf and change from:

driver = devinput
device = auto

to:
driver = default
device = /dev/lirc0

You can test that data in coming in with:
systemctl stop lircd.socket
systemctl stop lircd.service
mode2 --driver default --device /dev/lirc0

Delete or suffix (.dist) the existing remote configuration file(s) in /etc/lirc/lircd.conf.d/

Get the know nomenclature for button names:

irrecord --list-namespace

Create a remote configuration file using:
irrecord -d /dev/lirc0

The output file in /etc/lirc/lircd.conf.d/ will be buggy, removing the last column of number for each key normally works. It did for me.

Test that it's working with

irw

Then my buddy Pal gave me a white Apple remote, a very well known entity, to replace the no brand credit card thing I had salvaged from a TV tuner. You can find its configuration file easily. Pal is a very cool guy. Thanks again!

I'm using the following /etc/lirc/irexec.lircrc global configuration to control amixer on button presses:

begin
 prog = irexec
 remote = Apple_A1156
 button = KEY_MENU
 repeat = 0
 config = amixer sset Digital toggle > /dev/null
end

begin
 prog = irexec
 remote = Apple_A1156
 button = KEY_KPPLUS
 repeat = 1
 config = amixer sset Digital 1%+ > /devnull
end

begin
 prog = irexec
 remote = Apple_A1156
 button = KEY_KPMINUS
 repeat = 1
 config = amixer sset Digital 1%- > /dev/null
end

begin
 prog = irexec
 remote = Apple_A1156
 button = KEY_PLAY
 repeat = 0
 config = /usr/local/bin/roon_ir.sh playpause
end

begin
 prog = irexec
 remote = Apple_A1156
 button = KEY_FASTFORWARD
 repeat = 0
 config = /usr/local/bin/roon_ir.sh next
end

begin
 prog = irexec
 remote = Apple_A1156
 button = KEY_REWIND
 repeat = 0
 config = /usr/local/bin/roon_ir.sh previous
end

You will need this roon_ir.sh script to apply play/pause/next/previous to the proper zone, regardless of grouping (many thanks going to Guillaume for the jq stuff!):
#!/bin/sh

## Finds the zone of a Roon output_id and issues various commands
## Needs curl and jq on the machine running the script
## Need the following Roon extension: HTTP Calls for Roon API
## https://github.com/st0g1e/roon-extension-http-api

# Setup variables
#OUTPUTID=17018a614928ad155ce1fbec357bcd656208
OUTPUTID=170103af261386beb0995cc4d0c5f0acfc75
SERVER=192.168.1.106
SERVERPORT=3001

# Checking for needed tools
command -v curl >/dev/null 2>&1 || { echo "I require curl but it's not installed.  Aborting." >&2; exit 1; }
command -v jq >/dev/null 2>&1 || { echo "I require jq but it's not installed.  Aborting." >&2; exit 1; }

# Finding the zone_id based on output-id
BEDROOMZONE=$(curl -s -H "X-Requested-With: XMLHttpRequest" http://$SERVER:$SERVERPORT/roonAPI/listZones | jq --raw-output '.zones | .[] | select(.outputs[].output_id=="'$OUTPUTID'") | .zone_id')

echo roon_ir: Bedroom zone is: $BEDROOMZONE

# Sending the command via the HTTP API
case "$1" in
  playpause)
    curl -s -o /dev/null http://$SERVER:$SERVERPORT/roonAPI/play_pause?zoneId=$BEDROOMZONE
    echo roon_ir: Play-Pause using http://$SERVER:$SERVERPORT/roonAPI/play_pause?zoneId=$BEDROOMZONE
    ;;
  next)
    curl -s -o /dev/null http://$SERVER:$SERVERPORT/roonAPI/next?zoneId=$BEDROOMZONE
    echo roon_ir: Next using http://$SERVER:$SERVERPORT/roonAPI/next?zoneId=$BEDROOMZONE
    ;;
  previous)
    curl -s -o /dev/null http://$SERVER:$SERVERPORT/roonAPI/previous?zoneId=$BEDROOMZONE
    echo roon_ir: Previous using http://$SERVER:$SERVERPORT/roonAPI/previous?zoneId=$BEDROOMZONE
    ;;
  *)
    echo "Usage: $0 {playpause|next|previous}"
    exit 1
esac

I am using amixer commands to control the volume level, including a mute toggle, and HTTP Calls for Roon APIs to control Play/Pause, Next and Previous track though cURL.

Technical test with alsamixer:

Practical test with Roon:

Update of the amplifier board - September 2023

The Hifiberry amplifier board that I've used finally developed loud popping sounds, first during music start and stops, then during playback, continuously. This is a problem that I've experiences with ALL such boards when used in other projects. Mine only survived longer than usual. I suspect an engineering issue with input power regulation.

I have used an IQaudIO (acquired by Raspberry Pi) DigiAMP+ as a replacement. I've used it in many other projects, quite a few times replacing a defective Hifiberry product, with great success and reliability. It's almost a drop-in replacement, as I had to solder the power wires on the available pads (no screw-in terminals). The GPIO pins are also standard and thicker, making the connections far more secure. The pins used and software side are identical, outside of the audio HAT config.

IQaudIO DigiAMP+ on-board

Click for PDF

Because things are never static for too long!

In the living room: gone are the old Intel Atom-based server, the Raspberry Pi for Kodi and the old Intel Core 2 Duo laptop for Roon server. All the services those machines provided are now aggregated into a "less old" Intel Core i5 laptop. Power usage and administration costs will be lowered, with improved all-around performance.

In the bedroom: gone are the Rotel RA-820BX integrated amplifier and the Musical Fidelity V-DAC V1. They are replaced by the Raspberry Pi liberated from the living room, equipped with a HifiBerry AMP2 DAC and class D amp combo (negotiated from another project). Less space and electricity used, and such an improvement in audio quality!

Click for PDF

Mountain house - Washington, USA

This is a project that I have integrated and installed as part as a birthday present. Three zones Roon system, 1 with a DAC and reusing an existing amplifier and set of speakers, 2 using a TI DAC + Class D amplifier (I am extremely positively surprised by how well and cleanly it works, those things got some oomph!). I had to completely rewire the house with Ethernet and add Wi-Fi access points

Click for PDF

Desert house - Dubai, UAE

This was a demo system for a friend's business in Dubai. It has since moved to Dar es Salaam, Tanzania! I've installed it from scratch, including a network remodel (the house was already pre-wired with Ethernet), entirely remotely. Five zones Roon system, using a nice existing Forté + Tannoy kit, or a collection of Focal powered speakers (my friend was a distributor).

I even engineered a mobile system, using a car PC, tablet in dashboard, on-board WiFi and fully integrated DSP system, ready for public demonstration to the local market.

Home system - Redhill, UK

And then there is my 2 zones Roon home system, with multiroom TV+Kodi deployment, quite documented on this web site...

2

Click to open PDF version

  • New Raspberry Pi 2 and IQaudIO Pi-DACZero (24/192) replacing my old Musical Fidelity V-DAC (only synchronous USB and max 16/48 on USB) and acting as a network streamer using Roon Bridge
  • Roon server installed on the laptop. This software+service+technology is absolute magic. Great interface on any platform (Linux interface missing, though, but core and Bridge rock the penguin's way!), fantastic metadata, and even better contextualisation, and very nice bit-perfect music transport. The radio feature is such a good way of (re)discovering our extensive music library.
  • This IQaudIO Pi-DACZero is quite nice, and it was free on a black Friday event! But I still want to replace it with a Hifiberry DAC+ Pro, with dual oscillators to eliminate any potential jitter from I²S. Missing those parts.
  • I want another Raspberry Pi 2 int the bedroom, this time with an IQaudIO Pi-DigiAMP, a combination of a 24/192 DAC and a 2x35W Class D amplifier. Add that extra pair of Castle Pembroke Loudspeaker that we have... That would be another all-in-one network streamer using Roon Bridge, allowing for independant music, or in perfect synchronisation with the main system! Missing those parts.
  • Eventually, I'd like to upgrade the server from that 32 bit Atom machine to a 64 bit i5 machine. It would incorporate the roles of the current server (good bye!), of the laptop running the Roon server (good bye!) and the main TV's Raspberry Pi (good bye!) and add HD movie audio capabilities and 4K resolution future-proofing. Much simpler, while keeping the power consumption at bay. Missing those parts.

Here is a project going around in my mind... It will most probably never go anywhere beyond that, but here are notes and thoughts.

The goal would be to build an integrated all-in-one music player/streamer with plenty of features, but still relatively simple and with a low cost.

WORK IN PROGRESS (MAYBE)

Features

  • Plug-in speakers, plug-in media storage, plug-in power, play music
  • Small footprint
  • Hi-Fi component look with volume control and IR remote capability
  • Plays all music formats (non-DRM)
  • Built-in 24/192 DAC
  • Built-in 35W Class D amp - Speakers terminals
  • Line level output - RCA terminal - For use with discrete amplification
  • 10/100 Ethernet wired network connectivity
  • Wi-Fi network connectivity
  • Possible Bluetooth (but no Apt-X...)
  • Local or network (Windows, NFS shares) music files
  • Built-in Raspberry Pi 3 computer
  • Possible 7" touchscreen integration
  • Lollypop music management app on touchscreen or remote
  • MPD server - Pretty well regarded, provides mobile device remote
  • Squeezebox server and player for easy mutli-room
  • UPNP - Play from anything not Apple
  • Apple AirPlay - Play from your iPhone/iPad/Mac

Components

Hardware

Case

Something not looking like a computer component, but like a Hi-Fi component.

External connectivity

All serious looking stuff for audio, plus network and storage connectivity

Touchscreen

7" touchscreen - 800 x 480
7" touchscreen - 800 x 480

Internals

Processing power, DAC, amplifier and electrical power

Software

Options

  • CD drive for playing and ripping

Cost

Item Qty Unit Total
Case 1  £58.00  £58.00
Rotary encoder 1  £2.00  £2.00
IR receiver 1  £2.00  £2.00
Banana sockets x4 1  £7.50  £7.50
RCA sockets x2 1  £3.90  £3.90
USB socket 2  £4.64  £9.28
Ethernet socket 1  £4.40  £4.40
WiFi dongle and antenna 1  £4.50  £4.50
WiFi connector and pigtail 1  £1.24  £1.24
7" Touchscreen 1  £57.59  £57.59
Raspberry Pi 3 1  £35.99  £35.99
Pi-DAC+ 1  £30.00  £30.00
Pi-AMP+ FOR Pi-DAC+ 1  £40.00  £40.00
19v POWER BRICK (65w / 3.4amp) 1  £20.00  £20.00
Software 1  £-  £-
 Total   £276.40

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close