I think I mentioned at some point about this project being in the works, though I don't think I really stated any details (perhaps vaguely about the PCB design?).
Originally, I had found some switching, low-signal relays on Mouser (EC2-5TNU) that I designed the original board around. The relay has two coils, one to change the contacts from the "reset" position to the "set" position, and another to bring it back to the "reset" position. I briefly considered the single-coil version, where the polarity across the coil determined if the contacts moved to the set or reset positions, but I decided it would be a bit more of a hassle to route the traces.
Screenshot of the PCB design from EAGLE. Red lines are traces on top of the board, blue lines are traces on the bottom of the board, and white lines are silk-screened lines.
It's fairly organised and only has one audio trace that had to be transferred to the opposite side of the board (I try to keep the use of vias minimal). The spot in the bottom right corner of the board would be a header on the bottom side that would be for the SPDT (On) - Off - (On) toggle switch, and the positive and negative input.
When I was actually able to allocate money to work on this project, I purchased the relays, but stopped when I looked at the board again. The board size is 99.1 by 25.4 millimetres (3.9 by 1.0 inches), which would fit just fine inside the project box, but would cost me about 20 USD for a set of three. It was a bit annoying that I had just purchased the relays, but I decided to redesign the board smaller.
I happened upon a newer version of the relays that I purchased, which was slightly shorter in length, slightly wider, about two-thirds of the height, and also a bit cheaper. For a bit, I tried to mentally figure out how to reduce the size of the PCB by rotating the relays 90 degrees, but figured that the traces would be a horrible mess, so I decided a single-coil version would be better.
I decided that the newer version of the relays (EA2-5SNJ) would be a bit easier to work with because of the wider footprint. The only drawback was that the legs for the dual-coil version would still be present, even though it is a single-coil. While the legs aren't connected to anything at all, it would still be extra holes to add to the board that I would have to avoid, but it wasn't bad, considering there wouldn't be any traces that I'd have to dodge along with it.
Screenshot of the design from EAGLE.
It turned out to be much better than I had expected, though it was frustrating to try to figure out how I wanted to arrange the audio I/O vias. I ended up having to change the grouping from one input to one section of the inputs. In other words, with the first version, I had the input sections from Linux grouped together (i.e. tip, ring, and sleeve of the "peach" cable would be close to each other), but with the second version, I had put the input sections together (i.e. the tip from Linux and Windows, as well as the tip output are grouped together). It was really the only way to keep the routing simple while keeping the board size small.
Marking the audio I/O vias took a bit of time to figure out as well, since I wanted to try to ensure that it was fairly easy to understand, while keeping it minimal because of the very limited space. "W" is for "Windows (input)", "T" is for "Tip (output)", "L" is for "Linux (input)", "R" is for "Ring (output)", "S" is for "Sleeve (output)", "P" is for "Peach", "B" is for "Black", and "G" is for "Green". The "S+" and "R+" signify what wire needs to be positive to change the relay... In other words with "S+" being positive and "R+" being negative, the relay would shift to the set position. (There's a bit to this that I'll talk about later... Unless you've looked at the datasheet for EA2-5SNJ closely enough.)
Now that I was pleased with a smaller board (50.9 by 23.0 millimetres [2.0 by 0.9 inches]) that's about half of the cost of the first version, I sent the design off to OSH Park to get made while I ordered the EA2-5SNJ from Mouser.
The usual views of the PCBs.
A bit of a shame that the silk-screen outline of the relay got broken up by the vias, but it wasn't a major deal, it was mainly just to make it easy to tell which side of the board the relays were to sit on, though in technicality, it doesn't matter. (Again, more on this in a bit.)
Once I had the boards, I soldered the relays to the board, which wasn't really too hard to do, though I took a bit of time, because I wanted it to look nice for the photos.
Relays soldered nicely to the board.
Next, I began working on the box, forgetting about the grooves on the inside that need to be shaved off for the jacks to properly fit. I first did the side where the power input would be, and it didn't turn out very easily, but I had shaven more than enough, since the jack would sit relatively close to the lid.
Picture was actually taken after the entire shaving was complete.
Next, I shaved the backside, starting from the opposite side from where the power would be, and it took quite a bit of time; I started making mistakes not long after I was halfway done.
I started from the left side of the picture and worked my way right. As you can see, there was problems with controlling the depth of the blade.
I did what I could to keep the problem minimal, and thought it would be fine as I drilled the holes for the power jack and the toggle switch.
Top 3/4 view and bottom 3/4 view without lid.
I actually drilled a bit too close to the screw post, but I played with a jack and it would be fine, just a bit awkward to mount the jack. I then drilled the holes for the I/O jacks. and those mistakes came back to become a problem.
Rear view, rear 3/4 view, and inside 3/4 view. I scored some lines to try to keep the holes relatively aligned and decently spaced. Pictures were actually taken after the next set of pictures.
My heart dropped when I heard the snap and found that the crack, and I was ready to throw the box to the (carpeted) floor and spend my time with something else for the day, but I decided to play with the jacks a bit to see how bad the crack would be once the box would be complete.
Rear and rear 3/4 view.
It didn't actually look too horrible, even though it was obvious it's not supposed to be there, so I continued working with the box, since I wasn't in the mood to shave all the grooves again. I then figured out a colour scheme for the wires before removing the nuts and soldering the wires to the jacks.
Wires soldered to the jacks, in the order specified on the sheet that they lay on.
Next was to mount the jacks to the box.
Inside and rear views of the box with the jacks mounted.
It's probably quite easy to tell now that the top row of jacks (outputs) look slightly off compared with the bottom row, and it's because I divided the length of the box (probably the interior between the screw posts) before I had figured out the spacing of jacks for the bottom row. Moving on, the wires were slowly soldered to the PCB as I double-checked the order to ensure I didn't end up soldering any wires wrong.
Wires soldered to the PCB.
I then soldered the wires to the power jack, mounted the jack, soldered the wires to the DPDT (On) - Off - (On) toggle switch, soldered the remaining wires to the PCB.
Inside view of the mounted power jack. Inside view of the wires, with the switch unmounted. View of the bottom of the switch, showing the logic. Wires from the switch soldered to the PCB.
The switch is then mounted to the box and the wires tucked to be somewhat out of the way.
A bit hard to see the toggle bottom, since it's black.
Then it came time to figure out how to put the rest of the wires and the PCB into the box. It didn't quite turn out like I had envisioned, but I did make it work after playing with it a bit.
Wasn't how I intended it to be, but worked just fine.
Next, I attached the lid and the labels.
Front 3/4 view, rear 3/4 view, and bottom view. Bottom label is so the lid doesn't fly away if the box needed to be opened for any reason.
With the box finished, I checked with a multimeter that everything was correct, and found that the Linux and Windows inputs were swapped. (I think after soldering the jacks to the PCB, I had did the same to ensure they were right). I opened the box up and found nothing wrong, but eventually realised that I actually flopped the "S+" and "R+" silk-screens. Why? Because the datasheet for the relay shows the bottom view of the relay, and I had soldered the relays to the top of the PCB.
Because of how the board is designed, the relays could also be soldered to the bottom of the board as well, taking care to not confuse the set/reset polarity.
There was a couple things I could do: (1) leave the wires from the switch alone and flop all the labels or (2) leave the labels alone and flop the wires from the switch. I opted for the latter, seeing that it would be more efficient. I also took a couple minutes to fix the drawing in EAGLE.
Screenshot of the fixed design from EAGLE.
I then made the power connector with a right-angle mono cable, an old motherboard header plug, and some wires with the corresponding socket connectors. I spliced the wires to the ends of the mono cable (which only has the mono plug on one side) and applied heat shrink tubing accordingly, following with inserting the ends into the plug in the proper position and orientation.
Wire ends soldered to the cable with heat shrink tubing applied, other cable for reference to which wires are which. Heat shrink tubing applied to enhance appearance. Ends plugged into plug correctly.
After that, I routed the cable inside Melty and plugged it into the remaining USB header.
Views of the cable routing.
I realised a couple days ago or so that I could have also pulled the 5 volts I needed off of one of the 4-pin Molex connectors instead of the USB header. While I would be able to hide the end of the cable under the cover next to the power supply (where the cable comes up from in the last image), I don't have a need for that USB header at the moment, so it will stay as it is now.
The next day I made custom-length cables to connect between the sound outputs of the motherboard/sound card and the switch box, and I used a bit of blue Loctite to try to keep the covers from coming undone, but it ended up destroying the plastic of the plug, which I found out when I moved the cables after taking the image of them.
I was really upset again that it happened and tossed them aside as I looked for something cheap online that would take care of the length I needed without being too excessive in length. Though what I found was 6 feet in length, it was much cheaper than the length that was closer to what I was looking for, so it became what I ordered (one end is a right-angle plug while the other end is straight). I got the cables in the middle of the week and used zip ties to code them accordingly.
Cables fresh out of the bag, and newly coded.
Without saying, I connected the cables, but the only thing that's not obvious is the way I connected the cables. The cables for the motherboard's sound card (Linux) has the right-angle connectors connected to the motherboard while the straight plugs are connected to the switch box, and the cables for the sound card are connected the opposite way - the right-angle connectors are connected to the switch box while the straight plugs are connected to the sound card.
I didn't take any pictures afterwards, since I was still a bit upset with the Loctite destroying the plastic of the plugs. While typing this, I checked the cables that I made and they seem to be solid (I didn't check for possible shorts), but considering what's done is done, I'll just use them for something else.
The switch box works fine and it's a bit funny that even with holding an ear against the box, it's hard to hear the relays because of how loud the switch is. I may remake the switch box again, taking all the things I've learned with this one as a precaution, though it won't look/function much differently.
I had also thought of another switch box design where the box would be inside Melty, though instead of one cable running in/out, it would be six instead. The other problem would be making a proper 5.25" mount for it as well.
Things I've learned:
- Take breaks more often when doing repetitive tasks to ensure less mistakes (shaving the grooves off).
- Allow a bit of slippage when drilling holes (power input jack hole).
- Check the board design against the data sheet more often.
- Be very careful with Loctite and plastics.
No comments:
Post a Comment