Muffsy Stereo Relay Input Selector

Open Source, versatile audio relay input selector controlled by an ESP32 or a rotary switch.

Similar projects worth following
A stereo relay input selector controlled by an ESP32 or a rotary switch, with full ESP32 pin break-out for maximum flexibility.

This project uses Panasonic TQ-2 relays and separates power and signal grounds to prevent any switching noise, clicks or pops in the audio channels.

This project is fully open source. Use it for any purpose and change it into whatever you like. I would appreciate some credit if you decide to fork the project, but it's not required.

This project is fully built and tested. There's no programming of the ESP32 offered as of yet.

Eagle project files and gerbers are available in the files section.


  • Five stereo inputs, switched with Panasonic TQ-2 relays
  • One stereo output
  • Controlled with ESP32 or rotary switch
  • Space for the ESP32-DevkitC/NodeMCU, with break-out for all pins
  • IO pins go high when activating a relay, can be used for indicator LEDs
  • Power/GND for ESP32 and relays separate from signal power/GND
  • Pin distance for power and signal input/outputs: 5.08 mm / 0.2"
  • Pin distance for optional rotary switch: 2.54 mm / 0.1"
  • Fully open source, no strings attached

Schematics and Downloads

ESP32 Module

The ESP32 module used for this project is the one called ESP32s NodeMCU. It's got 2x19 pins, no pin labels on the top, and a white bottom side with the text "NodeMCU ESP-32S v1.1"

The ESP32 development kit has a CP2102 USB to UART bridge, drivers are available from Silicon Labs:

Information on how to program the ESP32 using the Arduino IDE is available from Espressif:

Espressif's "IoT Development Framework" IDF/SDK is available here, along with a lot more information:

Muffsy Relay Input Selector - Gerbers for PCB manufacturing

x-zip-compressed - 296.32 kB - 02/26/2018 at 07:22


Muffsy Relay Input Selector - Eagle project files

x-zip-compressed - 39.45 kB - 02/26/2018 at 07:19



The ESP32S Devkit - Eagle Library

lbr - 16.82 kB - 02/04/2018 at 22:35


View all 9 components

  • Eagle Project Files and Gerbers

    skrodahl02/26/2018 at 15:13 0 comments

    Eagle project files and Gerbers are now available in the files section.

  • First Test of Audio Switching - Success

    skrodahl02/25/2018 at 21:30 0 comments

    The ESP32S is now mounted on pin headers:

    Testing with an oscilloscope and the QA401 audio analyzer reveals that there's no switching noise, nor any clicks or pops injected in the audio channels. And, it does of course switch the left and right stereo channels. :) 

  • Boards Received and Assembled

    skrodahl02/19/2018 at 21:11 0 comments

    The slow boat parked outside my house today and brought with it some shiny white PCBs.

    As you can see from the pictures, it's already built. The board was tested successfully using a short loop turning the relays on sequentially. I was able to verify that each relay turned on and off using the continuity tester on my multimeter.

    This first picture shows a test mounting of the ESP32S and the terminal blocks for signal input/output.

    A first for me, silk screen on the back:

    Stuffing the board was a quick job. Since my pin headers haven't arrived yet (and I am quite excited to see if it works), I soldered the ESP32S to the board.

    I need to either skip the terminal block for input power, or be really convinced that my programming is correct before I mount it. The screw terminals will block the USB connector of the ESP when in place. Of course, I am going to build a few more, so I might just consider this the prototype.

    Here's the completed board, without any kind of sensors or mechanics for actually switching channels:

  • Project Coder: Zeev Glozman

    skrodahl02/09/2018 at 11:12 0 comments

    I am not the best programmer there is, so I'm happy to say that @Zeev Glozman kindly volunteered to do the ESP32 coding for this project.

    Thanks Zeev!

  • Test - Controlling a relay with ESP32

    skrodahl02/05/2018 at 09:21 0 comments

    The ESP32 switches the relay on and off, just as a proof of concept:

  • ESP32S Devkit - Eagle Library

    skrodahl02/04/2018 at 22:38 0 comments

    I couldn't find the footprint for the ESP32S Devkit anywhere, so I made my own.

    You'll find it in the files section.

  • Schematic

    skrodahl02/04/2018 at 22:27 0 comments

    Here are the five relays, all controlled by the ESP32 (or a rotational switch, using S0 to S5, S0 being the center pin).

    Five stereo inputs, one stereo output.

    The ESP32 switches the relay power to GND using transistors connected to IO23, IO22, IO21, IO19 and IO18.

    Power ground and signal ground are separate.

    Here's the routed board with dimensions in mm:

    Power inputs and signal inputs/output have 5.08 mm pitch (0.2") to accomodate screw terminals. 

    The solder pads for the rotational switch (S0-25) and ESP32 break-outs have 2.54 mm pitch (0.1").

View all 7 project logs

Enjoy this project?


Discussions wrote 03/12/2018 at 10:24 point

Hey, do you plan to offer this as a kit like with the MC Phono Amp? I would be very interested.

  Are you sure? yes | no

skrodahl wrote 4 days ago point


Due to the cost of both the ESP32 module and the relays, it would be a very expensive kit indeed. Also, it lacks a power supply.

The answer is no on this one. But you do have all the design files to have your own boards produced, and a Mouser shopping cart for easy ordering of the components.

  Are you sure? yes | no

Zoltan Sisko wrote 02/25/2018 at 22:57 point

The emitter and collector of the transistors are reversed on the schematic diagram.

  Are you sure? yes | no

skrodahl wrote 02/26/2018 at 07:14 point

In what way? I am connecting two grounds. The circuit is shorted when the base goes high, regardless which sides are connected to the base and the collector.

I have changed it though, so it looks the way it "should". New schematics, Eagle project files and gerbers are in place.

  Are you sure? yes | no

Zeev Glozman wrote 02/06/2018 at 16:28 point

Hey i just wanted, to share this while its a completely differnet application, its an interesting read.

  Are you sure? yes | no

skrodahl wrote 02/02/2018 at 15:25 point

The following steps have been taken to avoid pops and noise:

 * Using "make before break" relays
 * There are diodes between the relay rails
 * The relay power/GND is separated from signal/GND (which means this things needs its own separate PSU to work as intended)

I hope that will make this thing silent. I won't know before I build it though. PCBs are on their way on the slow boat, so it'll be a week or four...

  Are you sure? yes | no

skrodahl wrote 03/02/2018 at 10:18 point

UPDATE: The relay board has now been fully tested using an oscilloscope and the QA401 audio analyzer.

There are no clicks, pops or noise of any kind entering the audio channels.

  Are you sure? yes | no

K.C. Lee wrote 02/02/2018 at 12:47 point

I had to use relay for muxing audio because I didn't want to wait for my PCB.  It worked but there are pops when they switches.  Video shows it.

Relay contacts bounce during switching and inject noise into the audio. That's why I didn't use them for my design.    Analog MUX on the other hand are quiet.

If you still want relays, you could mute the output during switching.  Also looks for something with less bounce.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates