Curiously Small Audio Switch





Introduction: Curiously Small Audio Switch

About: Why buy when you can DIY? Educated a Mechanical Engineer and trained as a classical cellist I consider myself a bit of a jack-of-all-trades, dabbling in projects from machine design to cooking, ice hockey to...

A few years ago I bought an audio switch for my desktop, allowing me to change output between my headset and speakers among other less used features, and it simplified my experience enormously. Now at work I'm often swapping my headphones between two sources, my computer and phone, which has me longing for my switch back home. This is a very simple solution replicating only the switching function using only three different components, six total components plus wire, that allows for switching between either two sources or two outputs, all in a small package.
In case you were wondering, yes, I intended to use an Altoids Smalls container, hence the "Curiously" in the title.

[There is a mistake in the original circuit depicted that can cause quality issues. It works but you might have static in some situations. I plan on doing an updated guide but in the meantime look for my notes on the switch change throughout.]

Step 1: Materials and Tools


  • Small Container; Free - $2; A small mint tin works perfectly but enclosures of other types, shapes, and sizes will also work.
  • Stereo Audio Female Jack, 3x; $6.61/10, eBay; Possibly a salvage item.
  • TPDT DPDT Switch; <$1, eBay; Another possible salvage item. I found mine in my box of switches so I'm not sure where it came from. The proper switch is a TPDT, not the pictured DPDT. A DPDT will work but you may get ground interference (static) with two lines plugged in.
  • Prototype Board; <$0.50, eBay; Not necessary but attaching everything to a proto board (isolated pad style) makes lining up your holes in the case easier and everything just a little bit neater and more robust.
  • Electrical Tape
  • Wire


  • Soldering Equipment
  • Drill
  • Drill Bits; A step drill is preferable for this application because it will make much rounder holes in sheet materials.
  • Rotary Tool; (a.k.a. Dremel)

You will also need a female-female audio cord for each source you plan on using with the switch.

Step 2: The Circuit Explained

[Note: While the below is a valid explanation of the shown circuits, those circuits are not the best for this project. I'm planning to redo this guide but in the meantime replace the DPDT switch with a TPDT (triple pole). Tie the grounds to the additional pole in the same way the other lines are attached.]

The circuit is quite simple, really. A true DPDT (Dual Pole, Dual Throw) switch, not dual pole center off/on, isn't really an on/off switch. As the word switch implies it switches between two different circuits with two leads. This means one of the two circuits is always on, while the other is off.
Think of it as a railroad junction: Two rails are running along and come to a branch, with two rails going in two directions. The junction is the switch, it connects the original two rails to the corresponding set on one of the branches. Just like our audio switch will be able to switch between outputs or inputs, so can the rail junction. It can direct trains coming up the single track to one side or the other or if there is a train on each branch it can select which one gets to continue on the single line.
If you're more confused now just take a look at the diagrams of the switch and circuit. The left and right audio channels are the two rails and the grounds are all tied together.

Step 3: Building the Circuit

Measure the inside of your container and cut the proto board so it will fit inside. Now decide on the layout you want. I chose to place the single input/output alone to the left and the switched plugs in a vertical line to the right with the switch sliding parallel to the two ports. With the position determined, solder the components in place leaving the upper posts on the jacks alone, for now.
Double checking that you are connecting the right pads, wire everything following the circuit diagram. To prevent mistakes make the connections in order, either all of one channel to switch (left I/O, left S1, left S2, then right, then ground) or jack by jack (I/O left and right, S1 left and right, S2 left and right, then ground).

When everything is in place test it out. You only need one input and one output, just test it in S1 by flipping the switch (it should be playing when the switch is close to it and off when it is away) and then repeat in S2.

Step 4: Prepping the Enclosure

The enclosure needs 3 holes and 1 slot (or no slot if you want it inside like I've done). Use the completed circuit to mark the locations of the jacks on a sheet of paper. Then mark and center punch the spots on the case. This is where I messed up my Altoids tin. I placed the completed circuit on the top of the tin, upside down so when I turned it over after drilling the holes and tried to put the jacks through from inside the alignment was off. Don't be an idiot like me, think more than one step ahead.
The holes should be drilled with a step drill if possible because they give a very clean, round hole through sheet materials. The hole size needed for my jacks was a 1/4". The slot for the switch, if needed, is then cut out using a rotary tool. Clean up the edges of the cuts using a grinding bit on the rotary tool.
Before securing the circuit in place it is a good idea to cover the inside of the enclosure, if it is metal, with electrical tape to prevent short circuiting. If you are planning to customize the outside of the case, now is the time to do that.
To secure the circuit simply drop the jacks and switch through their respective holes and tighten down the panel nuts on the three jacks.

Step 5: Get Your Switch On

A few notes and thoughts:

  • If you want to use a switch like this with a headset that has an inline mic the basics are the same but you will need jacks with 4 posts and a TPDT switch. [Turns out you should really be using a TPDT switch regardless. To switch a mic you will need a 4PDT switch.]
  • If you want to be able to shut off both sides from the I/O then you need a DPCO (dual pole, center off) switch. These switches wire the same but have a stable off position in between the two throws.
  • This switching method can be used for most any wires (think USB, etc) as long as you can find a switch with enough poles. For a large number of poles look for a rotary switch or modify a data switch.



  • Oil Contest

    Oil Contest
  • Water Contest

    Water Contest
  • Clocks Contest

    Clocks Contest

14 Discussions

I use a DPDT switch and have the three grounds connected together. I realize that there seems to be some sort of static noise when I have both of my outputs plugged in to the switch. The static noise is gone if I unplug one of the inputs. Does it mean the grounds are cross talking? I am using 5pin 3.5mm audio jack (the one with return which is short circuited if nothing is plugged) I do not think it matters but sharing just in case.

1 reply

I actually think you're right. Instead of a DPDT switch and just tying the grounds together the proper way to do this is probably to use a TPDT switch and put the grounds on to the third pole. This should prevent any potential noise coming through the common ground. I really should make a new, improved version of this but in the meantime I'll update the parts list. Thanks for bring this up!

One other thing to verify is the pin-outs match on your plugs and jacks. If everything else is working then then I think you're fine but I know there are at least two standards for the order of the segments so it might be possible that there's a short pushing noise into the circuit from the output/inputs, beyond any ground issues.

Any body have any idea about switch automatically?

Like this product:

1 reply

Hmm, I think you could certainly do it with a microcontoller, something like Arduino, but I think you could probably pull it off a little cheaper using just components. It will take some one more experanced than me to figure it out though.

Thank you very much for responding!!. I'm new to this electronics and in my city I can not get u switch as I need. Therefore vvoy to assemble. The diagram you made this perfect, I completely understand. But need to know as interconnects Switch DPDT detail.

Another query: not need some kind of resistance or something so as not to lose sound quality?

Thank you very much and sorry for the trouble.

7 replies

Your welcome, it's not any trouble.
You do not want resistors, that will lower the volume or change the sound. If the wires are relatively short and are insulated then there shouldn't be any interference. If you are getting interference you need a choke (inductor coil) not a resistor.

Here's a picture of the two switches wired together. The pin locations represent the actual locations of the pins on a DPDT switch. The left switch controls the inputs and the right switch controls the outputs.

Dual DPDT Switch.png

We buy all the items and I will start assembly. This is what you buy

In the chart that you did are 6 connectors for each DPDT switch? The ones I buy have 6 points of contact as apuede see in the image. Should I leave 3 unused? or no use and should I buy another?

Discupa English. I'm using Google translator

DPDT switches have 6 points of contact. The second image I posted just shows how to wire the switches together. The other four contact points are used by the inputs and the outputs. See the first diagram to see how all 6 contacts are used. You should use all 6 posts on both switches.

It looks like you have everything you need but you should only need 4 of the audio jacks.

I think the difference is that I'm using 3PDT switch, and you SDPT switch. That's the difference. Now need to know how to connect them because each switch has 9 points of contact (I was wrong before saying they were 6)

Therein lies my problem when you start connecting all ...

Ok so I am using DPDT (6 points) and that other guide uses a 3PDT. The differance in using the 3P and the DP is that with the 3P the GND is switched as well. This is not necessary, the GNDs can just be tied together outside of the switch (like in my first diagram). If you are going to use 3PDT switches it works the same as with the DP switches.

Basically you are building the double plug side of my circuit twice and connecting the inputs to the switches together. Here is a complete circuit with 3PDT switches instead. The The two blue boxes with the little circles are the two switches, the four boxes with three pins are the audio jacks.

3PDT Complete Circuit.png

Thank you! Already arm achieved. There was one problem solved but based on trial and error, and was invested the remaining left and right speaker.

Your help was very useful!

How would the circuit if I have two inputs and two outputs. I guess I would need 2 switch? Tell me how is the circuit please?

1 reply

That depends on how you want it to switch. I assume you want to choose between both separately. For example you could switch between headphones and speakers (outputs) and a stereo and game console (inputs).

To do this you will need two switches in series with the single side of each switch circuit tied together. Enlarge the attached image to see a basic diagram.

Dual Switch Circuit.png