My friend wanted to control the level of his home stereo system built into his house. No problem. Sorta.
I bought an off the shelf Bluetooth audio receiver so phones could send audio to this thing. Ran it through my PCB and split the audio out to a couple of those Class D amplifiers based on the TI TPA chips on Amazon for $80. A second PCB is mounted to the wall next the light switch and runs via ethernet cable to my brain board to control levels via serial.

Analog, line-level audio comes in from the top right RCA jacks. They pass through some monster coupling caps before they are ran through the digital pots and go right back out the 2 RCA pairs as outputs.
On the top left, we have digital signals (slow serial) coming from the board that is mounted in the wall. In the bottom left, we have the 110VAC coming in to the 2 relays. I found some relays that allowed for 3V control. I hate chewing up current on relays. I should have found a latching solution.
On the bottom right, we can see 5V comes in through USB-C. Above that, we have the microcontroller.
Ideally, I’d have more separation between the power, digital, and analog sections, but it all turned out fine in this case.
No WIFI!
My friend is….eccentric. He wanted zero WIFI on this. Never mind the other Super Bowl of digital signals bouncing through the air waves of his house. I took it as a design constraint. Challenge accepted.
Microcontroller
I used a Atmega4808 microcontroller. I stocked up on these back when STM32s caught COVID and couldn’t be found ANYWHERE. It’s a great utility microcontroller…similar in use to when a CortexM0 or M0+ would be necessary. It won’t do any heavy lifting, but it’s cheap, has plenty of peripherals, and has external interrupts on pretty much every pin (please confirm that before buying). Programming is done with a single wire UPDI interface which sure beats the hell out of that pathetic 2-wire approach most STM32s use. (That’s a joke. If you’ve played with a 20-pin JTAG, you’ll understand why that’s funny….but the UPDI did work very well.)
Best of all, there’s an outstanding Arduino library for this micro when the deadline doesn’t allow for the fun of C code. https://github.com/MCUdude/MegaCoreX
Code
See the code at https://github.com/brandondrury/RemoteAudioCode
Digital Potentiometer
I had never used a digital pot before. I always wanted to. I used DS1881Z-050+, which is an I2C digital potentiometers to control audio levels. It costs a fortune. It might be cheaper to hire someone to swap out resistors in a voltage divider every time we need to change the audio level. So why choose it? Actually, I wanted reliability. I’m thinking 15 years ahead. I wanted to avoid scratchy pots. Technically, I’m still using scratchy pots, but they aren’t in the audio path. Maybe it’s overkill to run analog DC voltages through conventional potentiometers and into an ADC just to control a digital pot in another room. Too late!
Panel PCB

The pots in the bottom stick out through the panel on the wall. Actually, here’s what it looks like in Fusion 360.

It turned out I needed a second board to be mounted in the 2-gang panel outlet. It measured the level of the standard potentiometers on the wall and checked the state of 2 switches. My friend is also crazy and wanted to be able to cut power to the amplifiers when not in use. So the 2 switches control relays to the audio power amplifiers.
I really wanted this thing to last 15+ years and I was concerned about scratchy pots. I wasn’t exactly sure how long the cable from from the panel on the wall was going to be to the amplifiers. So, I decided to also use an AtMega4808 microcontroller in the wall and send a UART signal to the controller on the audio level board. This worked out pretty well.
Problem: MASSIVE AUDIO POP
I used Fosi amplifiers from Amazon. These use a TI TPXXXXXXXX chip for impressive efficiency in audio power land. I’ve built one very similar ( https://www.electroninjection.com/2025/12/22/big-girl-audio-audio-power-amplifier/ ) . When power is cut to the amplifier, these amplifiers pop HARD. When power is first given to these amplified, they pop HARD. It’ll blow the speakers eventually. It turns out the soft turn-on circuit only works from the switch on the amplifier.
Solution
It’s a simple MOSFET with a RC filter on the gate. So my relay approach would not be possible without destroying the speakers every time we turned it on. So, I removed the relays. The on/off circuit for the relays used a simple MOSFET. So I used this RelayPorchOn signal through 1/8″ audio cables to the amplifier, which I drilled a hole and added a 1/8″ jack to turn on the relay in the Fosi amplifier. Problem solved!

Conclusion
The circuit works great. No crazy noise. No pops. It seems to be reliable….so far. Mission accomplished.