Introduction: Curiously Small Audio Switch
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.]
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
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
- Soldering Equipment
- 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.