Digitalize Your Hi-fi System

by Legufix in Circuits > Raspberry Pi

31662 Views, 218 Favorites, 0 Comments

Digitalize Your Hi-fi System

20200419_215541.jpg

In this Instructable I would like to show you how I digitized my analog hi-fi system and thus realized web radio, access to the music collection stored on my NAS, etc. The implementation is mainly based on a Raspberry Pi, a Hifiberry HAT and a touchscreen. These components are built into a specially developed 3D printed housing, which is designed to match the appearance of the hifi system.

Since my audio device also has a digital input and the prices for a digital sound card are about the same as for an analog version, I decided to use a digital connection via an optical cable. To be able to use the interfaces of the Raspberry PI (RJ45, USB A, Micro USB power connector, ...) and still get a professional looking device, I wanted to connect the ports to the housing walls with appropriate cables and jacks.

Supplies

Designing the Housing in Fusion 360

Fusion04.PNG
Fusion01.PNG
Fusion02.PNG
Fusion03.PNG
Fusion05.PNG

I designed the case with Fusion 360, where I tried to implement the following requirements:

  • The case should have the same height as my stereo
  • The design should be such that no support structures are necessary for 3D printing
  • Visually appealing appearance and functionality should be combined

Under these self-imposed conditions I designed a case that is divided in the middle. To make it easier to glue it together, I have provided appropriate guides (overlaps). To get along completely without support structures, I used a few tricks. I let the mounting brackets for the display protrude under 45° (in relation to the surface which is then positioned on the printing bed). The recesses of e.g. the switch are supported by thin walls which are easy to break out. The holes in the base plate are interrupted by a thin plane which can be easily pierced when screwed in for the first time.

After I assembled the case for the first time, I noticed that the bending radius for the optical cable would be quite narrow. Since I didn't want to rework the whole case and also had my specifications regarding height, I decided to put the brackets for the Raspberry a bit tilted and thus gain additional space.

3D Printing

20200410_100245.jpg
Kodi_mediacenter_slicer_01.PNG
Kodi_mediacenter_slicer_02.PNG
Kodi_mediacenter_slicer_03.PNG

As already mentioned, the housing was designed in such a way that no support structures are necessary if the orientation is correct (see screenshots of the slicer software). To make sure that the quite large parts stick well to the printing bed, I added an additional Brim. The resolution was 0.2mm, which was quite sufficient, also because I had planned a post-treatment anyway.

All the STL files can be found below. You have to print each part once.

Post-treatment of the 3D Printed Housing

20200410_205909.jpg
20200411_161358.jpg
20200417_185118.jpg
20200417_185109.jpg
20200418_103822.jpg
20200418_110030.jpg

First I removed the Brim and bonded the two halves of the case together with 2 component glue. For the after-treatment I printed an additional bottom without holder for the Raspberry. I screwed this bottom plate to the case to give the whole thing the necessary stability for sanding.

In the first step I did some rough grinding with an electric orbital sander. Afterwards I applied filler in several passes and levelled the surfaces with wet sandpaper. After I was satisfied with the flatness and the quality of the surfaces, I painted the case with black, matt-gloss acrylic spray paint.

Assembly of the Electronics

20200419_170624.jpg
20200419_171447.jpg
20200412_144658.jpg
20200412_180814.jpg
20200419_191133.jpg
20200419_180546.jpg
20200419_185433.jpg

For the Raspberry Pi I used a case - heat sink combination made of aluminium. With this large heatsink it is possible to keep the temperature of the Pi low even in a mostly closed case without using a fan. I assembled this case according to the manufacturer's instructions (attaching the heat conducting pads and screwing the two aluminium parts together). To plug in the soundcard HATs an additional socket connector is necessary as an extension of the pins due to the aluminium case.

Afterwards I mounted the Raspberry Pi with the attached HAT board in the 3D printed holder (see pictures). Then, I connected the different cables to the Raspberry Pi and the Touch Screen and performed a first functional test. After this test was successfully completed I installed the display in the case (due to the limited space I used an angled HDMI connector). I then screwed the front panel connectors to the respective positions in the case. All cables are plugged in, only the power button needs to be soldered. I cut the Micro USB connector cable and put the plus pole of the cable over the switch. This way the media center can be switched off completely without disconnecting the power supply. In the case of the optical audio cable, I did not use a front panel feed-through and led the cable directly out of the housing (using a strain relief).

Software

libreelec-linux-os-will-get-meltdown-and-spectre-patches-with-next-major-release-519491-2.jpg
kodi_cut.png

As software I chose LibreElec (https://libreelec.tv) with Kodi, which is almost a bit too much of a good thing, because I "only play music" and therefore only use a fraction of the functionality. Anyway, I just liked the touch screen implementation and the technological possibilities and comfort.

To install LibreElec I downloaded the image copied it to the SD with Win32 Disc Imager and made the amendments as listed below.

To use the Waveshare Touchscreen I appended the following lines to the config.txt file which is located in the root of your Micro SD card (see also https://www.waveshare.com/wiki/7inch_HDMI_LCD):

max_usb_current=1<br>hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
hdmi_drive=1

For the Hifiberry Digi+ activation I added the following line to the conifg.txt (see also https://www.hifiberry.com/docs/software/libreelec-installation-and-configuration/):

dtoverlay=hifiberry-digi

I will not explain the setup process of Kodi because this depends heavily on personal preferences and there are plenty of instructions on the net. In my opinion the Radio Add-on (https://kodi.wiki/view/Add-on:Radio) is a nice for solution for a Webradio.

You can find many Apps for your mobile phone to remotley control your media center - I prefer YATSE (https://yatse.tv/).

Final Result

20200419_215133.jpg

For commissioning, the optical audio cable is connected to the stereo system and the media center is connected to the power supply. For maximum stability of the network connection I decided to use a LAN connection, but of course it is also possible to connect via WLAN.

To be honest, I am very satisfied with the result. Apparently not only me, which is why I also built a second system for my brother (the pictures have been taken during the building of the second device).

The implementation is not really cheap because of the components used, but you also get a media center that looks very good next to the hi-fi system, delivers good sound quality and especially in combination with a mobile phone app also offers some comfort.