A Web-Enabled, High Quality, DIY Audio Amp

Build a modern integrated amp that also looks great

6 min read
An illustration of an amplifier, speakers and a pair of headphones
James Provost

For a long time I owned a beloved Sansui Electric integrated amplifier. These audio amplifiers combine a preamplifier for boosting the sound signal and a power amplifier for driving the loudspeakers. Sansui went out of business several years ago, and, although old units can still be found, when my amplifier finally died a crackly death, I decided it was time to consider something modern and more flexible. And I’d already built my own speakers, so why not build it myself?

Researching home-brew audio sites, I came across Glenn Zorpette’s November 2018 Hands On article, “DIY Pro Audio” in IEEE Spectrum, and it convinced me it was possible, although I wanted to go beyond just a power amplifier to something more like my lamented Sansui. I also wanted to add volume and input/output controls. And a headphone amp. And use tubes, oh my!

So consider this a spiritual successor to Zorpette’s 2018 amplifier. The first thing I tackled was the volume control. I wanted to use a relay-based volume control that controls the volume in discrete steps to eliminate the noise that can accompany traditional analog volume controls. I scoured eBay for relay-based controls but realized that they still have potentiometers: An analog-to-digital converter reads the voltage coming out of the pot and energizes the corresponding relays—even a new pot could be noisy.

So I decided to drive my own relays digitally and control them via a Web interface. No knobs or switches to wear out! I located a similar project by Jos van Eijndhoven online and decided to use his approach of employing a ladder of attenuating resistors, which would give me 64 distinct volume steps without introducing audible distortion. To this board I also connected a tap along with a low-pass filter and output—just in case I decide to build my own subwoofer speaker!

An illustration showing the major components and their locations within a cabinet, with the Raspberry Pi being centrally located, and the others on the left hand side of the cabinet in the order of tube amplifier, headphone amplifier, and attenuator front to backMy preamplifier uses a combination of custom and off-the-shelf components, including a headphone amplifier and a digital attenuator I made myself [top left, top middle] and a wireless-enabled Raspberry Pi [top right] and a Zerozone 3-tube amplifier [bottom right and right]. The remaining components are a collection of power supplies.

I decided on a Raspberry Pi 4 with 4 gigabytes of memory as my controller. In commercial product development, an optimized microcontroller would be the way to go, but for my DIY project, a Pi was perfect. It has lots of input/output pins for hardware interfacing, and it’s easy to develop on. My final design needed only 300 lines of Python code (including the Web server), and 500 lines of HTML/JavaScript. I was able to make a professional-looking Web interface by using g200kg’s webaudio-control library of graphical user-interface widgets.

The power supply was my biggest headache because of the number and range of voltages needed

For preamplification, I’ve always loved the sound of tubes. After some reading, I settled on buying a Zerozone design based on three 12AU7 tubes (which are still being manufactured today). I chose a 12AU7-based design because of the tube’s smooth sound. I also added a “defeat” or bypass option for A/B comparisons that let me disable the preamp stage—with this activated the design is 100 percent passive. I also skipped tone control in the name of providing as pure a path for the audio as possible.

For my headphone amplifier, I initially tried a so-called John Linsley Hood class-A design from the 1970s (usually referred to as a JLH class-A). But it was hissy and ran hot. I had no interest in fiddling with low-noise transistors or modifying the circuit to use MOSFET transistors to solve this problem, so I looked around again. I found the Pimeta v2 schematics for a portable amplifier, which met most of my needs, although I had to tweak the design to fit my power supply.

In fact, the power supply was my biggest headache because of the number and range of voltages needed in a digitally controlled audio amplifier that’s using tubes. I needed ± 200 volts, 24 V, ± 12 V and 5 V. Trust me: there is no single power supply on eBay that will do this. I could have designed my own, but I had little experience with high-voltage tube supplies. In the end I used multiple commercial supplies.

A block diagram showing 4 input lines feeding into an input selector. From there, the signal can pass into a tube preamp or bypass it via a \u201ctube defeat\u201d line. The chosen signal then passes through an attenuator into an output selector with four outputs. The attenuator is also connected to a headphone amplifier with a headphone out connector and a left-right summer and low-pass filter connected to a subwoofer. A block marked Raspberry Pi controller connects to the input and output selectors, the defeat line, and the attenuator. Using a Web interface running on the Raspberry Pi controller, inputs and output can be selected, the tube amplifier bypassed using a “defeat” option, and one of 64 volume levels selected by the attenuator. The output from the attenuator passes into a headphone amplifier, output selector, and a low-frequency subwoofer output.James Provost

For the final power-amplifier stage, I settled on a $250 SDS-250 Power Amplifier Kit from Class D Audio and put it into a second cabinet identical to the case holding my pre-amp. This was an easy build and sounds quite nice to my ears, and although the cabinet is really too large for the power amp, I like the way it looks stacked below the pre-amp.

Integrating all the commercial assemblies with my own relay and headphone amp boards required a few revisions, and I developed the control software in parallel. I used a function generator to inject a signal at various points to trace out problems (I also had to do some reading about grounding strategies to reduce 60-hertz hum from my AC mains supply).

Packaging was straightforward if not tedious. I used a plexiglass substrate to mount the components on the inside of the cabinet. It’s easy to machine with woodworking tools, and a great choice if you don’t have access to fabrication tools. The tubes run quite cool in a large cabinet such as the one I selected, so there’s actually no need to have them poke through the top. But the rule of cool dictated that I make them do just that!

I do have a few minor issues, such as an occasional click when passing the volume through the 50 percent mark, depending on the music. I might be able to mitigate this with a software change, but additional resistor ladder stages are a better idea. Other future goals include adding a tone control and designing a smaller, simpler power supply. But one thing is clear—you can still build a great-sounding amplifier relatively inexpensively, and now with even more cool features, and dare I say, style!

Integrated Amplifier Bill of Materials

Part Supplier Quantity Comment
Case Allied 1 You can definitely use
a smaller or less
expensive case
Power switch Ebay 1
Power receptacle/fuse Ebay 1
RCA jacks Ebay 2
Headphone jack Amazon 1
Misc. hardware Ebay, Home Depot,
Lowes or Amazon
As needed
Plexiglass Ebay, Home Depot,
Lowes or Amazon
As needed

Relay Board:
47uf 2
0.1 1
1uf 3
33k 1
100k 4
AD8620 2
470nf 6
4.7k 6
7805 1
10uf 2
1N4148 2
G6K-2P-Y-DC5 16
2.7k 2
0 2 Jumper
220k 2
5.6k 4
10k 3
47k 2
18k 2
15k 2
22k 2
820R 2
27k 4
DRV777DR 2
2N3904 1
RPi 40 Pin GPIO 1
Low noise resistor source Ebay 1
Relays Ebay 1
High end opamp Ebay 1
Terminal block assortment Ebay 1
40 conductor ribbon cable Ebay 1
Relay driver Mouser 2
Shielded hookup wire Ebay
Headphone Amp:
2N3906 1
2N3904 3
TLE2426CLP 1
LMH6321TS 3
499k 4
1k 3
10k 1
100 4
3.32k 2
4.32k 4
0.1u 4
6.8u 2
220uf 35v 2
4.7p 3
0.1 2
5k 1
LED-TH-3mm_R 2
1820 1
LM317 1
Low noise resistor source Ebay 1
High end opamp Ebay 2
Ground splitter Ebay 1
High speed buffer Ebay 3
Tube Amp:
Board and power supply AliExpress 1
Transformer AliExpress 1
12AU7 tubes Ebay 3
+/1 15 V Supply:
Power supply AliExpress 1
Transformer AliExpress 1
Raspberry Pi:
Pi Cana Kit 1
Pi power supply Amazon 1
SD memory card Any 1
The Conversation (5)
Miguel Dajer
Miguel Dajer15 Mar, 2022

Great project, I myself love to tinker with audio specially tube based gear. Can you share the base code you came up with to control the amp? One way to reduce the power supply complexity is to use a low voltage tube pre-amp, i have had success with 6GM8/ECC86 and even 12U7s. running on 24V should be easily achieved and eliminates dealing with high voltages.

Rui Runa
Rui Runa13 Jan, 2024


Where can i find all the information related with this project?

Thank you for your extraordinary work.


Johan Ekstrom
Johan Ekstrom04 Aug, 2022


Love this project. I am working on a multi room streaming system and I am missing the volume control part. Any chance you could share the code and the board layout?

Cheers, and Thanks,


1 Reply
Matthew Paulson
Matthew Paulson16 Mar, 2022

Hi Miguel:

Thanks for your response and helpful hints.

The project is currently on github, but it's private -- I plan to make it public, but I need to do some reading about security first. If you share your email address, I would be happy to email you an archive.

Tubes: Yes! When I purchased the zero-zone setup (preamp board + power supply), I didn't know that much about tube typologies. However, since then I've been learning more about them. In fact, my current project is a low voltage tube/op amp hybrid headphone amplifier. It uses a 12au7 @+-12v (24v differential) for the front end voltage amplification (and tubey-ness) and parts of the PIMeta2 project for current gain.