Misc. sharing for building Raspberry Pi 5 as music server
#1
Recently I'm building a Pi 5 music server for fun and testing.  I've built a Pi 4B Roon bridge for USB DAC before, that's much more straightforward.  This time is Pi 5 + Analogue audio hat (also digital audio hat, but not both are used at the same time), and NVMe SSD hat.  Above all,  Pi 5 itself is a power hunger.

Hardware:

From the Pi 4B, I found that adding EMI absorber inside the metal chassis can yield significant improvement for clarity, dynamic and contrast and the background is darker.  The EMI absorber I've used is https://www.digikey.hk/en/products/detai...97/5823559.  I've used it in most of my gears since 10+ years ago.  It's not only isolating the EMI from outside, also absorbing stray reflection of EMI inside the chassis.  It's been once briefly discussed here before https://forums.snakeoil-os.net/Thread-EM...ide-the-PC.

Also mechanical vibration isolation can't be skipped, particularly as Pi itself is very very light.  As shown in below pics, I used cloned spring foot.  It's helpful to prevent sound deterioration esp when the playback is loud.  In my experience, spring foot works the best in my setting, in comparing with spike and disc.  (If the gear is very heavy, e.g. big transformer, hifi rack, I use bearing foot) Besides, I also putting something heavy (laminated carbon fibre bricks in my case) on the top of the chassis to minimise its vibration caused by various reasons.  

In past I used to use some OCC (Ohno Continuous Casting Process) wires as DC cables and running them in pairs to greatly, further reduces the resistance.  It improves dynamic significantly.  In my case, I get these wires from an OCC XLR cables.

The above is not bleeding the users but very effective.  I've tested and kept using them over many years.  


[Image: 003547sfyvyjajesejlres.jpg]

[Image: image.png]


[Image: image.png]

[Image: 001534vzoqgqdzdqdgqp9v.jpg.thumb.jpg]

[Image: 001536kt90s9290y9tstgn.jpg.thumb.jpg]

[Image: 001539elyib37lo9lrd88p.jpg.thumb.jpg]

[Image: 001541boazn32iehvi7uv2.jpg.thumb.jpg]

[Image: 001543n8v51my14tlrum2j.jpg.thumb.jpg]

[Image: 001545d7rnzasws7nv1nf1.jpg.thumb.jpg]

If one is keen to use Pi for audio purpose, I hope one doesn't mind to bleed.  Then, I'd suggest to replace the clock generator (or known as oscillator) on the Pi.  It's not easy as one needs to remove 3 original clocks from Pi, and the contacts are very tiny.  I get it done from some online shops.  I think I don't need to repeat the significance of a good clock in the setup, so to the audio improvement.

Back to the DC power supply, if one can cut the DC plug and solder the DC cable directly to the GPIO pin, that will be rewarding satisfactorily in sound, at the expense of 2nd hand price.
1
Reply

#2
The rest is particularly for/from my Pi 5 music server project.

I'd suggest to get the firmware of pi 5 updated from time to time.  This is only available in Raspberry Pi OS, not in Ubuntu.  (Maybe it's available in other OS for Raspberry Pi, I'm not sure.)
 
Code:
sudo apt update && apt full-upgrade
sudo rpi-update

This time, besides adding a power filter hat (it got a dc socket to accept DC 5V input and different types of capacitors and then supply the power to the whole system thru GPIO), I used battery to power Pi 5.  In internet there are few battery hats for pi (for stacking purpose), and most of them cannot provide 5VDC 5A/6A as almost all of them are made for Pi4 and before. Finally I chosen one can provide 5VDC 5A and get it connected to my Pi 5.  Yet Raspberry Pi OS and Ubuntu Desktop keep saying it's not supplying 5V 5A.  The speed of Pi, and wireless connection become very very slow.  


[Image: IMG-20250327-221225761-HDR.jpg]

[Image: IMG-20250327-221057133.jpg]


[Image: IMG-20250327-221111580.jpg]

With the help from the seller, I learnt that if I don't power the Pi 5 with 5V 5A/6A PD power supply thru the onboard USB C socket, then I need to add a line in eeprom by Raspberry Pi OS to make Pi 5 to accept more current from other DC inputs.

[Image: O1CN01yy058l1DestT6oYRu_!!1041210242-2-ampmedia.png]
 
Code:
sudo rpi-eeprom-config -e

after adding following line at the end of the file, then Ctrl-O to overwrite, Ctrl-X to exit.  The screen will show few lines saying something like the flashings are successful.  And then reboot to take effect.
 
Code:
PSU_MAX_CUTTENT=5000 

Here, one have to use Raspberry Pi OS to update the eeprom prior flashing and use other OS, e.g. ubuntu, on that Pi 5.  Or, Pi 5 doesn't accept 5A current.  I guess the installer of other OS read the eeprom and set something can't be changed afterward.  I used Raspberry Pi OS, and Ubuntu Desktop to test few times to confirm.  In short, if one is powering Pi 5 with LPS or anything other than a PD USB C power supply, and DIDN'T add this line in eeprom before, you HAVE to use Raspberry Pi OS to update it (ubuntu can't do the job in my setup), and reboot Pi to take effect.  And then re-flashing and re-installing Ubuntu server and other OS used on this Pi 5, so to the SnakeOil again.  Or your Pi 5 is still running in low power supply mode, even you've updated eeprom.

https://www.raspberrypi.com/documentatio...AX_CURRENT
 

Besides this, I'd like to remove the snap service, too.  This is useless to me but occupying CPU cycle.
 
Code:
sudo systemctl disable snapd.socket
sudo systemctl disable snapd.service
sudo systemctl disable snapd.seeded.service
sudo snap remove snap-store
sudo apt autoremove --purge snapd

Please be noticed that, some of the above items may not present in your system.
 

For the analogue and digital audio hats, initially I thought ubuntu, Raspberry OS, and some other big name audio OS will auto detect the hat and configure accordingly and automatically.  But NONE.  All shows no audio device found.  Some audio OS got a nice webui to let me to choose from a long list.  Some got to input manually in the cli, including ubuntu and raspberry OS.  For the cli case, one got to know the exact name of the overlay (driver) in that OS.  

config file path = /boot/firmware/config.txt
overlay path = /boot/firmware/overlays
 
Code:
sudo nano /boot/firmware/config.txt

In the config.txt, just add this line at the end, under [All] or "Enable Audio hat" in Raspberry OS.  Such as,
 
Code:
dtoverlay=i2s-dac

Please pay attention that the name after "dtoverlay=" must be exactly the same in that folder (no filename extension is needed).

If still doesn't work, I hope adding this line in the same file, above that "dtoverlay=" line will help.
 
Code:
force_eeprom_read=0

Of course, reboot is needed to take effect.  If you've input correctly, in the Player tab of SO webui, the name of corresponding audio hat will appear in the output device field.  And you can assign it to your player as well.

For the Lan connection, I used to use optical fibre for the galvanic isolation.  ie. switch/router > Lan cable > media converter > optical fibre > media converter > Lan cable > Pi/PC.

These really bled me and took me a lot of space.  From the LPS to the optical fibre and lan cable, they are all good stuff.  Some are generally not available to a layman like me.  In 1.5 yrs ago, I tried a small LAN isolator from iFi.  Wooh.... then I used that simple LAN isolator to replace my optical fibre isolation.

I compared these 2 methods in this way:  I started to play a music file in internal SSD to my USB DAC, and then unplug the LAN cable from this music server (NUC).  I use the sound without lan cable as reference to compare the optical fibre method and iFi isolator.  The result is:
1) optical fibre method gives cleaner and clearer sound, but that's not close to the sound without LAN cable plugged;
2) iFi isolator gives the sound very close to the sound without LAN cable plugged.

That iFi lan isolator just costs a fraction of my optical fibre method. LOL
Reply

#3
Sampling rate of music files and CPU Temperature:

If one would like to know the current CPU temp, CPU speed, and CPU volt, the following commands will show ("sudo" or not doesn't matter). 
 
Code:
vcgencmd measure_temp && vcgencmd measure_clock arm && vcgencmd measure_volts

[Image: image.png]

In my testing setup as shown in below pic, the rig is powered by 4 18650 batteries, thru a capacitor hat for filtering and buffering.  With the help of Raspberry Pi OS and Ubuntu for Raspberry, I'm pretty sure this setup provides at least 5V 5A input at the Pi 5 board point.  The pi 5 played local files stored in the NVMe hat, and output thru the coaxial in a ESS9038Q2M hat.  That's the most demanding hat among my other analogue and digital audio hat.  It's placed in a ventilating position and supported by soft gel pad, gypsum sheet, and a cross-laminated bamboo board for mechanical isolation.

[Image: IMG-20250413-122155752-2.jpg][Image: IMG-20250413-122132933-2.jpg][Image: image.png][Image: IMG-20250413-122030146-2.jpg]


During the test, I found while playing 32bit/382.8kHz and 16bit/44.1kHz wav files in mpd, the cpu temp is 70'C & 60'C in my place, respectively.  Currently it's 24'C in my place.
For the CPU speed and volts, they just keep fluctuating during the period of measurement.  CPU speed range was 1.5-1.8GHz.  Of course, the CPU speed stay at higher speed more during 32bit/382.8kHz playback, and vice versa.  In my 'layman" understanding, I'm afraid that's not good enough for "accurate" music playback.

Sound quality

As this rig, including the batteries and DC cables ran far below 1st 100 hrs, not to mention the 1st 200 hrs.  It's not fair to comment it at the moment.  In fact, it's not satisfactory to my ears, in comparing to my fanless NUC which is powered by a LPS.

So, I'm considering seriously to replace the onboard clock/oscillator with a SC cut OCXO clock, as my next move. Shy
1
[-] The following 1 user Likes hkphantomgtr's post:
  • agent_kith
Reply



Bookmarks

Possibly Related Threads…
Thread Author Replies Views Last Post
  SQ difference - Raspberry Pi vs x86_64? justme 15 1,010 09-Apr-2025, 03:41 PM
Last Post: agent_kith
  Raspberry Pi 5 uglymusic 2 558 23-Nov-2023, 12:41 AM
Last Post: uglymusic
  SnakeOil Server Hardware - What are you using? NoDisc 17 9,675 11-Oct-2019, 09:05 AM
Last Post: mkysimes



Users browsing this thread:
1 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
Wiki update - need your help!
Last Post: Snoopy8
Today 09:22 PM
» Replies: 4
» Views: 83
new install issues
Last Post: hkphantomgtr
Yesterday 10:08 AM
» Replies: 3
» Views: 57
No audio devices on RPi5 with latests bu...
Last Post: hkphantomgtr
13-Apr-2025 05:29 PM
» Replies: 13
» Views: 262
Misc. sharing for building Raspberry Pi ...
Last Post: hkphantomgtr
13-Apr-2025 12:47 PM
» Replies: 2
» Views: 75
Snakeoil 1.4.3 (High End U3)
Last Post: hkphantomgtr
10-Apr-2025 10:57 PM
» Replies: 11
» Views: 604
[split] Snakeoil 1.4.3 (High End U3)
Last Post: agent_kith
09-Apr-2025 03:45 PM
» Replies: 1
» Views: 42
SQ difference - Raspberry Pi vs x86_64?
Last Post: agent_kith
09-Apr-2025 03:41 PM
» Replies: 15
» Views: 1010
Bind Mount in REST
Last Post: agent_kith
09-Apr-2025 03:13 PM
» Replies: 3
» Views: 59
[split] MediaCenter33 not starting ing S...
Last Post: kmwgr
06-Apr-2025 08:16 PM
» Replies: 4
» Views: 117
Question about RAM Disk
Last Post: hkphantomgtr
04-Apr-2025 03:33 PM
» Replies: 4
» Views: 91

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.


Powered By MyBB, © 2002-2025. Theme © Melroy van den Berg.