Announcement

Collapse
No announcement yet.

My DIY RPi4 based headphone streamer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    My DIY RPi4 based headphone streamer

    4 years ago, I built a LMS/Squeezelite streamer for my main listening spot in the living room. It used a RaspberryPi 3B and the original Audiophonics ES9038Q2M DAC hat.

    Click image for larger version

Name:	F4287449-B66C-4CB4-A64A-95D372D453A4.jpeg
Views:	1
Size:	213.3 KB
ID:	1579151

    The 9038Q2M DAC allows for 2 OLED displays to be connected. One to the DAC to display its data, like audio input, stream and volume and one connected to RPi GPIO, used to display LMS streaming and song information. I designed and 3D printed a little case for it. I used the DietPi distro since (at the time) I couldn’t get the OLED to work with LMS/Squeezelite on piCorePlayer.

    After I saw a few nice current commercial streamers, like Hifi Rose RS series (way out of my price range), I took up the idea to make something like that myself. I briefly signed up for a Roon trial, but deleted that within a day. Not for us. We’re long time Squeezebox/LMS users and have it all through the house and its WAF is unbeatable. With Roon you can’t control anything (without a smartphone) on a SqueezePlay-O2Joggler on the bathroom wall, playing through ceiling speakers. It will work as an endpoint, but you won’t be able to use the touchscreen to change radio channels or music. “Long live LMS”.
    The little OLED’s on my streamer weren’t of much use when you’re sitting a few meters away from them. So I upgraded the living room system, connected to an integrated amp and speakers, to a new RPi4 with a SMSL 9038Pro USB-DAC and connected to the TV to view (and control) the Material skin from a comfortable distance.

    That left me with the 9038Q2M DAC hat and the RPi. Since the living room is a shared space, in which not everybody shares my taste in music, I decided to build myself a nice dedicated LMS headphone streamer.

    Click image for larger version

Name:	113D711B-658B-4486-9B48-BFC5FBD1FCDD.jpeg
Views:	1
Size:	158.1 KB
ID:	1579152

    THE BUILD

    It’s built mostly with parts that I had laying around. I did decide to upgrade the RPi and replace it with a RPi4 that I had in use for a less power hungry task. That runs fine on the RPi3b now. During the building process the 9038Q2M suddenly decided to stop transferring any sound and because everything was already designed around that board, I needed a new one. Audiophonics now sells a new version with USB-C. After it arrived I noticed more differences between the original and new version. The second, GPIO controlled, OLED connection is gone and the firmware is changed so that the DAC OLED turns black after about 20 seconds and only returns with information when the resolution of the music stream changes.
    With some extra work and making some wire connections that would better attach to the short GPIO pins on the DAC hat, I’ve most things working as before. Only waiting for a new firmware that keeps the DAC OLED on all the time when music plays, just like before with the original one.

    HARDWARE

    The case is made from 3mm black acrylic. Designed in FreeCAD and laser cut on my diode laser engraver/cutter. The 2 OLED’s are mounted on a custom, 3D printed bracket which is glued to the acrylic.
    The headphone amp, a Micromega MyZic, that I hadn’t used in years, ever since my (then) new integrated amp came with a built-in headphone output, proved to be perfect for the job.

    Click image for larger version

Name:	2ECF8D15-2E18-48C8-BE86-D3CF41ABEC60.jpeg
Views:	1
Size:	133.9 KB
ID:	1579153

    It’s a great single pcb design with on-board (completely silent) switching power supply. The volume potentiometer is put straight on the board and the original aluminium knob fits the indentation of the original plastic case. Since an indentation wasn’t a viable option, I had to re-engineer the knob, make it as large as possible and 3D print it.

    Click image for larger version

Name:	2A3ACEDC-8492-4AD9-BC73-4D8623F4963A.jpg
Views:	1
Size:	208.2 KB
ID:	1579154
    (Photo text says RPi4, the trained eye will see a RPi3…. Photo was taken before I decided to use the RPi4)

    I did have to buy the LCD (wide) touchscreen. A Waveshare 7.9” HDMI 1280x400 px, which is designed to fit the RPi on its back. On top of the RPI4 sits the Audiophonics ES9038Q2M USB-C DAC.
    5V Power for the touchscreen, RPi and the DAC comes from an iFi iPower X wall PSU that I used before. I’ve taken it out of its original enclosure and created a 3D printed case to keep it safe from touching it accidentally when working inside the case.
    The 5V/3A output from the iFi PSU connects to an Audiophonics Pi-SPC V2 power management board (no longer available, there’s a newer REG version now). This allows the use of a push button switch, with LED, to safely start and shutdown the RPi, preventing damage to the SD card. The Audiophonics DAC pcb has a header to connect the control signals for boot and shutdown which connects through to the RPi GPIO.
    A SD card extension to the front panel allows for easy access to the SD card.

    Click image for larger version

Name:	420ADAD8-42D3-4FFE-9EC9-8B32AECCD49A.jpeg
Views:	1
Size:	188.5 KB
ID:	1579155

    On the back are the mains C8-8 cable connector and switch as well as extension cords for USB and ethernet to the RPi.

    SOFTWARE

    My setup runs on DietPi which is a great, lean distro for this purpose. I’ve installed (among others):
    • Squeezelite; obviously…
    • Plymouth / Plymouth Themes; to replace the boot splash screen with a (in my case customised) graphical boot screen (see at https://youtu.be/t-FuKOdQan8)
    • Audiophonics Pi-SPC; plugin for power management through the Pi-SPC V2 board
    • Chromium; webbrowser for viewing LMS Material skin on touchscreen
    • DietPi-dashboard; great web utility to manage and view your DietPi setup remotely in a webbrowser, everything from CPU load, temp, RAM, network, processes and services and a terminal screen as well as remote shutdown and reboot.
    • I2C; for OLED control
    • Luma.examples; OLED driver and software utility to customise contents of the info on the OLED. In my case info about time, network, RAM and CPU temp.


    ISSUES

    Apart from the differences between the original and new version of the 9038Q2M boards, I ran into other issues.
    One is that the boot process still shows parts of the boot/splash even though Plymouth Themes takes away a lot of that. Just not everything. That would’ve been ideal….

    Another was the power sensitivity of the RPi4. The DAC board is designed to take power through the USB-C connector and pass that through to the RPi via the GPIO connector. The touchscreen gets its power from the USB port of the RPi which also handles the touch ‘mouse’. That worked well with the RPi3b, but with the RPi4 I would get the flashing Thunderbolt icon, indicating under voltage, all the time. When I soldered a 2 pin JST-XH connector to the DAC board’s 5V input (an already provided alternative for the USB-C connector) and used thicker wires than the standard header wires, the number of under voltage messages reduced significantly. I measured a total current draw of 1.5A when in use. Well within the limits of the iFi iPower X PSU at max. 3A. Only after I connected an extra set of thicker wires in parallel, directly from the power management board to the 5V and ground pins on the GPIO header all under voltage errors were gone.
    - Raspberry Pi 3B (DietPi-LMS “server”)
    - SB Boom
    - 2x O2Joggler/SqueezePlay
    - DietPi-RPi4/SqueezeLite/SMSL SU-9n(DAC)/HDMI 4k TV
    - DietPi-RPi4/SqueezeLite/Audiophonics 9038Q2M Sabre DAC/2xOLED+Waveshare 7.9”LCD
    - piCorePlayer/Rpi2/Hifiberry Digi+

    #2
    Close up

    Click image for larger version

Name:	5EFABA74-33C3-490D-A3B3-D6990C71DD0F.jpeg
Views:	1
Size:	185.2 KB
ID:	1576338

    Click image for larger version

Name:	F372DFFC-7070-4A9C-8D04-8777CD83D67E.jpg
Views:	1
Size:	103.6 KB
ID:	1576339
    Last edited by willefg; 2022-12-21, 00:12.
    - Raspberry Pi 3B (DietPi-LMS “server”)
    - SB Boom
    - 2x O2Joggler/SqueezePlay
    - DietPi-RPi4/SqueezeLite/SMSL SU-9n(DAC)/HDMI 4k TV
    - DietPi-RPi4/SqueezeLite/Audiophonics 9038Q2M Sabre DAC/2xOLED+Waveshare 7.9”LCD
    - piCorePlayer/Rpi2/Hifiberry Digi+

    Comment


      #3
      Great job, thanks for sharing.

      Comment


        #4
        Really nice!!

        One is that the boot process still shows parts of the boot/splash
        I wonder if you change the console= kernel parameter to something other than the screen? A serial port maybe, eg. /dev/ttyS0? That would probably screw up the splash screen too...

        Comment


          #5
          Originally posted by sodface View Post
          I wonder if you change the console= kernel parameter to something other than the screen? A serial port maybe, eg. /dev/ttyS0? That would probably screw up the splash screen too...
          I already set console to tty3, as per instructions that came with the Plymouth Themes that I found. I’m in no way a Linux expert and will have a look at possible parameters and try some. Thanks for pointing me in that direction.
          - Raspberry Pi 3B (DietPi-LMS “server”)
          - SB Boom
          - 2x O2Joggler/SqueezePlay
          - DietPi-RPi4/SqueezeLite/SMSL SU-9n(DAC)/HDMI 4k TV
          - DietPi-RPi4/SqueezeLite/Audiophonics 9038Q2M Sabre DAC/2xOLED+Waveshare 7.9”LCD
          - piCorePlayer/Rpi2/Hifiberry Digi+

          Comment


            #6
            Nice job

            I like the case work and your choice of screen, thank you for sharing, I will certainly consider that screen for my next build.

            Comment


              #7
              Very nice display :-). I know you're past this with your new setup, but you mentioned that the old one was running the audiophonics dietpi distri because pcp wasn't supported. I had the same problem, so ended up rewriting the audiophonics stuff so the dual screen stuff works on pcp now. Thread is here if it's any use.

              Comment

              Working...
              X