Hardware part 1
The first device that I created was made using the casing of a defective internet radio,
which I equipped with a capacitive 5-inch touchscreen from Waveshare
and a Raspberry Pi 3 with Hifiberry Amp 2. At that time, I didn’t have a 3D printer, so I mounted everything using small sheet metal brackets,
making it nearly impossible to replicate it (you’d need the exact same casing), but maybe the pictures will inspire you to come up with
your own solutions. The most interesting part is that the device is on a shelf above a door, so you are looking at it from underneath.
And because it is not an IPS panel , the picture looks terrible from this angle. Therefore it was necessary to install the display
upside down.
Instructions for rotating the Raspberry screen content on a touchscreen can be found in the guide below.
Hardware part 2
For my second Raspberry Pi player, I opted for a slightly larger display, choosing a model with a 7-inch IPS panel and a casing
suitable for the Raspberry Pi 3 and 4.This product comes from the manufacturer Shenzen Dusun Technology Co. Ltd.
and is sold by various importers under different names.
I bought it from Amazon, but I'm not linking it here anymore, because as of Augist 2023, a completely different device is being
sold under the product number of my purchase from eight weeks prior (and the positive reviews do not correlate with this new
device). The display is now found under the brand name
UPERFECT.
Addendum: Three days after I wrote the previous update, only the 10-inch model is still available for purchase (where
the display could be ordered as a 7-inch and 10-inch version).
Reliability from these Chinese sellers is questionable, but I'll leave the link as is; just don't be surprised if a
completely different product appears there there —I can’t monitor this product page continuously. The10-inch size
is certainly not wrong, but it also costs significantly more.
I have
made three comparison pictures to assist you in your search.
Addendum 2025:The 10" monitor described has a resolution of 1280x800. I have since
seen versions with 1366x768 and 1920x1200 on Aliexpress (again under different fantasy names), and one device I purchased there,
contrary to the manual supplied, no longer has a power supply plug for the Raspberry (which is understandable with
the Raspberry Pi 5 because it has higher demands on the power supply), but this, along with the absurdly supplied
adapter plug for the non-existent connection, somewhat tarnishes the positive overall impression. But because the prices there are significantly more attractive than ordering here, it's worth taking a look at the Chinese range.
And as long as there is a choice, I recommend a monitor with a lower resolution, because the more pixels that have to be calculated, the slower it gets, and with the Raspberry Pi, that's quite noticeable.
I mention this in such detail because this device was easy to assemble and works well thanks to the many small
parts supplied. The rear panel includes M3 VESA screws at a spaced 75 mm apart. I use a
Digitus DA-90303-1 monitor wall
mount for wall mounting, where the casing is attached using V-shaped rails.
The only drawback of the monitor is the built-in fan, which causes audible noise, which is undesirable for an audio project. It has been replaced by a
Noiseblocker NB-BlackSilentFan XM-1 40x40x10, although this required small cable
connectors or some soldering due to different connectors.
I designed and printed a rear panel extension to fit the Hifiberry amplifier into the case
(my 3D printer is an FDM model from Anycubic); the
OpenSCAD and STL files are available for replication. This extension is suitable for both the 7-inch and 10-inch versions of the case.
If you want to use the housing extension for something else, you can adjust its depth by changing the variable za. If
necessary, translate the German comments in the OpenSCAD code.
Software
On the Raspberry, the program, music, and lyrics are stored on an external USB drive (which must be named MUSIC_LRC). The
Raspberry is write-protected and operated with an overlay file system so that it can be easily turned off and the program,
settings, and music collection can be easily replaced with newer versions. On system startup, the program is copied
to the home directory via an autostart entry in /etc/xdg/lxsession/LXDE-pi/autostart, where it is made executable and
started.
The script startLyricsJukebox.sh and the program fullscreenmessage belong in /home/pi and must also be made executable.
(In the current version of Raspberry Pi OS without the user Pi, I simply created this default user again, but there are
other ways to do this, of course.)
All required files are compiled on the download page in the archive for the Raspberry.
Steps to set up a Raspberry player with Hifiberry Amp 2 and either the 5-inch display from Waveshare or the 7-inch and
10-inch case monitor:
(This step-by-step guide were revised in mid-2025 for Raspberry Pi OS 12 (bookworm), expect changes of the operating system and adjust
the setup accordingly.
And these notes are just for my reference, so if they are too concise, feel free to complain :)
Note 2025: The Raspberry Pi OS desktop now uses Wayland instead of X11 by default, so the method described
below for autostart via LXDE no longer works. Until I have revised the instructions here, please use
the last method from this guide:
Traditional User Method (Specific User).
- Install Raspberry Pi OS on SD card using imager_1.7.3.exe
- Mount the Raspberry and display
- Set up the 5-inch display from Waveshare according to the instructions
(this is not necessary for the 7-inchdisplay with caseing)
- Start the Raspberry, configure the standard user and install updates (this will be done automatically if
there is an available Internet connection via ethernet or Wi-Fi). Assuming you have set up the standard
user for older Raspberry OS versions:
username: pi
password: raspberry
- Deactivate the screen saver:
Menu button / Settings / Raspberry Pi configuration / Display tab / Disable screen wipe
- The following steps assume that the user pi exists. With current RaspberryOS versions, this is
no longer necessarily the case, so either create the user pi during the initial setup (as specified
above) or adapt the name pi in the files autostart and
startLyricsJukebox.sh and in the paths mentioned below to the user name created.
- Start terminal
- sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
add the line at the end of the file:
@/home/pi/startLyricsJukebox.sh
- Save (Ctrl-O, Enter) and exit (Ctrl-X)
- Copy the files startLyricsJukebox.sh and fullscreenmessage
(which are located in the Rasperry directory of the downloaded archive) to /home/pi and
- make them executable
chmod +x startLyricsJukebox.sh
chmod +x fullscreenmessage
- Testing:
./startLyricsJukebox.sh
- Install Hifiberry Amp2. (The power supply runs via Hifiberry Amp2, 12V to 6A or 24V to 3A, power
supply with round plug 5.5x2.1mm, positive pole inside).
Edit /boot/config.txt:
sudo nano /boot/config.txt
Comment out or remove dtparam=audio=on.
If dtoverlay=vc4-fkms-v3d is present, switch off audio:
dtoverlay=vc4-fkms-v3d,audio=off
insert dtoverlay=hifiberry-dacplus.
- rotate the image only if necessary:
display_rotate = 2
- Save (Ctrl-O, Enter) and exit (Ctrl-X)
- and only rotate the touch screen if necessary
(according to these
instructions):
sudo nano /usr/share/X11/xorg.conf.d/
there in the
Section "InputClass"
"Identifier libinput touchscreen catchall"
add the line
Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 0 1"
- If everything works, write-protect the file system:
Menu button / Settings / Raspberry Pi configuration / Performance tab / Overlay file system / Configure:
Enable overlay and boot partition.
Problems and solutions
-
With the second player presented, the power supply I used was slightly underpowered for the three components Raspberry,
monitor and amplifier at high volume. This initially seemed like a non-issue as the device was operated at low volumes.
However, there was an incident where the volume was set very high, causing the voltage for the Raspberry to drop too
low and the system crashed. It rebooted immediately, which would not have been disastrous, but unfortunately there was
enough time before the crash to write the changed settings onto the USB flash drive, resulting in a very loud noise
and an immediate subsequent crash upon reboot.
This annoying reboot loop (during a birthday party) led to the addition of the VolumeMax and RadioVolumeFactor settings.
VolumeMax sets the volume as the upper limit at which the device will still run reliably, and RadioVolumeFactor can be
used to adjust the volume of the radio (since the most listened-to station was played much louder by VLC than its own
music tracks).
-
Initially, I equipped the Raspberry with small heat sinks attached with thermal pads. This was not a great idea, as the
adhesive properties of these pads apparently deteriorated and they eventually fell off when the Raspberry is installed
upright. This caused a short circuit that damaged my HifiBerry amp.
Since the case is cooled by a fan and a Raspberry Pi 3 or 4 can generally run without a heatsink, I just left it out,
which didn't cause any problems, as expected.
-
Some music files, especially on the Raspberry, caused noise while playing. This was caused by MP3 files that did not have
unsychronization enabled when the ID3 tags was written. (This means that there may be a byte sequence in the ID3 tag
area that marks the start of a frame in the music data). As a countermeasure in such a case, it is of course helpful to rewrite
the tags with a suitable program, but the PreLoadMusic configuration entry should also help.
-
Radio failures due to WiFi connection interruptions
The newer Raspberry Pi models (4 and 5) (at least in my case) have more frequent difficulties with WiFi via the built-in antenna than the previous model. Even if these are only occasional interruptions, it is still annoying when using the device as a radio that Raspberry Pi OSgives up trying to reestablish the Wi-Fi connection after only a short time. First, using a USB Wi-Fi adapter with an antenna instead of the built-in Wi-Fi controller can help, as this makes the connection much more stable.
Secondly, I run a small script every minute via Crontab that attempts to restart the Wi-Fi or network when the connection is interrupted. It works with the Raspberry-Pi-OS versions Bullseye and Trixie.
The script is called wifireconnect.sh and is located in the wifireconnect folder of the user folder.
To create the crontab entry for regular startup, enter crontab -e and add the following line:
*/1 * * * * /home/pi/wifireconnect/wifireconnect.sh
If your username is not pi, you must of course change the path accordingly, and you must change the IP address of the gateway to your default gateway (GW=...) in the fourth line of the script.