Digitalize Your Hi-fi System

26,352

203

18

Introduction: Digitalize Your Hi-fi System

About: I have a background in mechatronics and that's what I like - the combination of electronics, mechanics and software to a well functioning overall system. Since I own a 3D printer (ok, there are 2 now ;-)) and…

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

Step 1: Designing the Housing in Fusion 360

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.

Step 2: 3D Printing

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.

Step 3: Post-treatment of the 3D Printed Housing

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.

Step 4: Assembly of the Electronics

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).

Step 5: Software

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/).

Step 6: Final Result

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.

3D Printed Contest

Participated in the
3D Printed Contest

Be the First to Share

    Recommendations

    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Arduino Contest

      Arduino Contest
    • Barbecue Speed Challenge

      Barbecue Speed Challenge

    18 Comments

    0
    psargaco
    psargaco

    1 year ago

    I have nothing to add except to say that I find this project awesome. I've been thinking of ways to revive my old Sony Hi-Fi. It doesn't have digital input but I'm pretty sure there is a lot from your 'ible I can piggyback on. Kudos.

    1
    Legufix
    Legufix

    Reply 1 year ago

    Thanks for your comment! Hifiberry also offers an analog HAT soundcard, maybe this would be an option for you.

    0
    adrianus
    adrianus

    Question 1 year ago on Introduction

    Hi legufix,

    me again....
    you say need a 7"" lcd, but in the link to amazon they will send you a 10,1"" lcd?
    and can you make a scetch of how to connect everything, that is a little blurry for me?

    again with great regards jt

    0
    Legufix
    Legufix

    Answer 1 year ago

    Hi jt,

    when I click the link I get to a 7inch display (see attached screen shot). I will try to provide a sketch, but this will take a little bit of time.

    AZN.JPG
    0
    adrianus
    adrianus

    Question 1 year ago on Introduction

    Hi,
    very good project you have made, only problem ihave is no 3d printer.
    Q. Is it possible to connect an ssd haddisk drive to the system?
    I have a lot of music on my desktop, and want to add it onto your system?

    with regards jt from the netherlands

    0
    Legufix
    Legufix

    Answer 1 year ago

    I have not tried it yet, but it should work (USB stick works well). For the connection of an ssd you will need an usb adapter (or a case for external disk with usb connection) or a special electronic board to get a connection between Raspberry Pi and SSD.

    0
    adrianus
    adrianus

    Question 1 year ago on Step 5

    Hi,
    why is the usb cable 5meter long.
    with regards

    0
    Legufix
    Legufix

    Answer 1 year ago

    Hi, there seems to be a problem with the link (I took the link from my orders and they changed the related product). Actually its a 0,5m long cable.

    1
    langrock
    langrock

    1 year ago

    Cool! A general comment about the use of heat sinks. Never a bad idea, of course, but in a closed housing it doesn’t make a difference since the airflow over the fins is very limited. In this particular build, the back and bottom of the enclosure could have plenty openings, with stand-offs underneath, to alleviate heat build up if that’s ever a problem.

    0
    Legufix
    Legufix

    Reply 1 year ago

    Hi langrock, thank you for your comment! I do not fully agree that it doesn't make a difference if you use a heat sink or not. With a heatsink you get a much bigger surface (especially for the large one I used) to distribute the heat to the surrounding air (the thermal resistance of the heat sink is better than the housing of the chip). With the large heatsink I get a temperature below 60°C inside the housing, which is quite good for a for Raspberry 4B. With the smaller heatsinks I noticed temperature related throttling even for Raspi 3B (which does not produce so much heat).

    4
    san_t
    san_t

    1 year ago

    Wow! Congratulations! That's really serious project. Rock-solid!
    Could the author be so kind to provide an short demo-video please?

    1
    Legufix
    Legufix

    Reply 1 year ago

    Thank you for your comment. Maybe I will add a demo-video in the future - at the moment my time is a little bit limited.

    0
    Alex491
    Alex491

    1 year ago

    This is the most interesting Instructable I’ve ever seen! I’m sorted for a streamer; but tell me something:
    can you run Roon on it? A lot of the guys on the various Hi-Fi forums that I frequent use a Pi as a Roon endpoint.
    Kudos to you, my man!

    0
    Legufix
    Legufix

    Reply 1 year ago

    Hi Alex, thank you for your comment. Concerning you question about Roon. I have not tried to run it on the hardware but I assume it should be possible (its a standard Raspberry and a quite common display). Maybe this site could be of interest for you: https://ropieee.org/

    0
    Wild-Bill
    Wild-Bill

    1 year ago

    I think, it is easier than you make it look but then I have been playing around with Linux for years. I commend you on your choice of the HiFi berry is works well and there are a lot of versions. Mine just has RCA plugs. Putting of a screen for a media centre for me as I had a TV close by, though the first one I hack together was a Pi3 with the new case and screen combo which I used as a music player in my car before I gave it to my grandson. I rebuilt my media player around a Pi2 with a wireless dongle and the original HiFi berry. I don't use a music streaming but I play music off of my Computer using NFS (if one runs Windows Samba would work as well). I have contemplated writing my own interface software for dealing with play list but as the radio I like to listen only streams from a browser I started using VNC which gives me full control Pi2 from my phone. Your project got me excited about hacking around with my Pi2 with its HiFi berry again. Thanks for your Intructable.

    0
    Wild-Bill
    Wild-Bill

    Reply 1 year ago

    Oh, it is XBMC, which is cool project but a bit too all encompassing for me as I already do battle with other software that I haven't written as I bend it to my will. It was the main reason I ran away from Windows, streaming, those so many years ago and the hair still stands up on my neck when some one asks me for help with their windows PC.

    0
    Anton_R
    Anton_R

    1 year ago

    Nice! This is really cool! I always wanted to make something similar.

    0
    GTO3x2
    GTO3x2

    1 year ago

    Great implementation. About as close as possible to fitting the gap, but I still would be hesitant.