A Simple Audio Switch

I have a desk with two computers on it. My laptop is used for most things, including work, and the gaming PC is used for, well, gaming. The only hardware that these two share are the monitor, mouse, and speakers. For reasons, they use separate keyboards.

Switching the mouse from one to another is simple as the MX Master 2s can connect to 3 computers and switch with a little button on the bottom. The monitor auto switches and this works because I basically never use both computers at the same time.

But the speakers are annoying.

When connected to the laptop, they鈥檙e plugged into a USB audio interface connected to my little dock. When connected to the gaming PC, they鈥檙e plugged into the back of the tower. Both are inconvenient places to get a cable. Not impossible, but switching the cable between them is annoying.

But a simple audio switch is simple, right? That鈥檚 what I assumed and bought a cheap 2-in-1-out switch from Amazon. Success! With a pair of extra headphone-to-headphone cables, both computers can be plugged into the switch at the same time and a single button on the front can toggle between the inputs. What could go wrong?

Turns out a cheap switch is cheap. I鈥檓 not sure exactly what failed on it, but my guess is the actual button was failing to bridge the contacts and I kept losing the left channel. It got so bad that I gave up on the switch and went back to moving the cable.

Than I had the same thought again. A simple audio switch is simple, right? What鈥檚 even needed to make one? Three headphone jacks, a switch, and some wire. Seems like I could make that on a breadboard. So I went to Adafruit and ordered some things:

All together, it was about the same price as the pre-built switch. Wire it all up and this is what you get:

It looks like a mess, I know. The main issue is that I wanted it all to be on the breadboard so I needed a switch that could slot into a breadboard. For this project, I needed a DPDT (double pull, double throw) switch to simultaneously switch between the inputs and handle the left/right channels. Adafruit only had SPDT breadboard switches so I got two (each control one channel). Combine that with the headphone jacks which barely fit on this little breadboard and it got crowded fast.

Here鈥檚 a crude circuit diagram. I鈥檓 sure some audiophiles will hate this and it鈥檚 probably something to do with the grounds all being joined, but it works fine and my speakers are cheap anyway. I鈥檇 love to replace the two switches with a single DPDT switch because it鈥檚 a bit weird to control each channel separately, but it鈥檚 a minor issue and I don鈥檛 switch often enough to care.

I鈥檓 happy with it. Plus if something fails, the components are easy to swap out.