ModulAmp - Hardware
(something about modularity)
Streamer
The streaming module is implemented using a Raspberry Pi 3B+, an HifiBerry DAC+ DSP, and a 5" screen to show the UI. The operating system is HifiBerryOS, a Linux distribution developed by Modul 9 specifically for audio applications. Another option would be piCorePlayer, but I have not verified this on my test system yet. Besides, HifiBerryOS natively supports the HifiBerry DAC+ DSP functionalities like Room Compensation, etc, and it looks swell.
This solution can stream from a number of streaming services and also act as a player in the Logitech Music Server ecosystem (previously known as Squeezebox Server and SlimServer, now just LMS). While the actual Logitech products have long been discontinued, the server still lives, supported, as an open source effort that can connect to even more streaming services and your local music library.
Right now, I am going to use my Windows server as the LMS, but considering that LMS can also run on a Raspberry Pi, it could be implemented on the streaming module itself or as a separate board inside ModulAmp. A small 2.5" portable HD should be enough to hold your FLAC and MP3 files, but at this point we are maybe hitting the space limits of the planned chassis (on the other hand a Rasperry Pi Zero W and a small USB drive could fit in quite comfortably).
Controller
The controller module is build around a NodeMCU dev kit, using a KY-040 rotary encoder as its only input mechanism and driving a 0.98" OLED display to show the UI. The separate screen, in addition to the streaming module one, is necessary in those scenarios where music is played from one of the two line in sources.
The firmware running on the controller is written in C++ and described in the software section.
TBW description of the module connections
Input switching
The input switching module is based on a series of three dual-throw 5V relays driven by a simple protection circuit wired to three GPIO pins from the controller. This module is pretty straightforward, but there is an effort to keep the analog and digital sides separated to minimize crosstalk and noise.
Volume control
With the plan to use a single rotary encoder for input selection and volume control, I had to figure out a way to actually control the volume of the signal going into the amplifier module. I wanted this to be fully digital on the control side and fully analog on the audio path side, and the Texas Instruments PGA2311 seems to be the ticket.
(insert volume control schematics here)
This can be controlled via the SPI bus exposed by the controller module, see the software section for how it was done.
Power supply
This module needs to provide at least three voltages: +5V for the streamer and controller modules, -5V for the volume control module, and some power for the amplifier. In this first iteration, using a Class T amplifier, we'll need just +12V.
The circuit is quite straightforward, using a LM7805 for the +5V rail, a LM7905 for the -5V rail, and a LM7812 for the +12 V. There's really not much to it, but in future revisions I might try to separate the rails that go to digital and analog modules, to separate the ground planes and minimize interference.
Amplifier
For the first iteration of ModulAmp, I am going to use something that I have in my spare box as the final amplification stage: a Sonic Impact T-Amp. This will be powered by the 12V rail (even if it can take 13.8V max) and let's see if it is sufficient for my studio. ModulAmp being modular, there's no reason why this stage cannot be replaced by a Gainclone or something like the Aiyima A07.