Update 3/16/2014: thanks to everyone who voted for this project in the Game.Life 4 contest!
The motivation for this project came when I combined my Raspberry Pi voice-controlled electrical outlets with a RetroPie. Due to the number of peripherals and cables involved (a powered USB hub, microphone, two USB controllers, breadboard, wireless remote, plus the normal HDMI and power cables for the Pi), this led to a pretty tangled mess of wires that didn't exactly look great sitting in the TV cabinet. So, I wanted to build a nice case to hold everything that looked something like a regular game console - ideally with external connections for the USB devices, an HDMI port, a power switch, and a single power cord (shared by the Pi and the USB hub).
The normal way to do this would be with a custom project box and regular panel mount connectors, like these HDMI and USB ones from Adafruit. To do that, you need to either machine or laser-cut a custom panel to fit all the connectors, and I don't have the means to do so (yet....cough, cough, Full Spectrum Laser contest). I've seen a bunch of cool Raspberry Pi LEGO cases out there - but most of them just enclose the Raspberry Pi itself, without all the extra space for a USB hub and breadboard, or sturdy external panel mount connectors.
Enter Sugru, a self-setting rubber that you can mold by hand, kind of like Play-Doh or modeling clay*. Let it sit for 24 hours and it hardens into a tough, slightly flexible rubber. I'd recently used it for the first time to waterproof a small DC motor for a different project, and realized it would be great for this: build a case out of LEGOs, and use Sugru to firmly seal in the panel mount connections - no machining or lasering required. Rather than using regular panel mount connectors (which have screw terminals that I wouldn't need for this approach), I could use either very short extension cables or female-female couplers to create the panel mounts. The result is a very fun and kid-friendly approach to building a stylish case, without requiring any tools.
So, you could use this idea for ANY project that requires panel mount connections - it doesn't have to be Raspberry Pi-related. I'll just be using my RetroPie "console" as an example since it contains a variety of different connectors (HDMI, USB, barrel jack). I'll also include a power switch (a nice addition since the Pi doesn't have one built in), but that part requires a bit of soldering. It should be pretty easy to adapt the process for any other connections you need for your project (VGA, RCA, pushbuttons, slide switches, etc etc).
*Sugru has an Instructables account where they post their own projects that use Sugru. I am in no way affiliated with the company, nor is this an endorsement of the product. I first found out about Sugru when I won a couple packets as a prize in a different contest, and decided this would be a cool use for it. If you know of a different, cheaper, or better material to use, please mention it in the comments below (for example, I'm curious if plain old modeling clay would work, but my hunch is that it would be too brittle once dried).
Step 1: Materials
Materials - here are the materials required to build the panel mount connectors only. I'll assume you already have your own electronics project that you need to build a case for at this point. If you need different types of connectors (e.g. VGA), you'll have to get the appropriate type of extension cable or female-female coupler.
Step 2: Dry run with LEGOs
Show All 11 Items
Sugru has a working time of about 30 minutes. That means that you need to plan your LEGO build out in advance - don't open all the Sugru, then panic as you try to assemble your whole case in half an hour! You should already have an idea of how many and what kind of ports you need for your project. The next thing to decide is how you want them to be arranged. Do you want to build a somewhat permanent case out of LEGOs with multiple ports built into the same walls? There's nothing wrong with that, but I decided to opt for a more modular approach - I built an individual box around each port. While the end result is a little bulkier than it could have been, it means I can swap ports out or move them around if I ever decide to do a different project in the future.
I'd recommend just doing a "dry run" - build the LEGO structures without using any Sugru. Make sure your cables fit snugly, with a little room around the sides to pack in some Sugru and hold them in place. As you can see above, I tried this for my USB, HDMI, and barrel jack connectors. I used 4x4 plates for the base and top of each box, and 1x4 plates/bricks for the side walls (as needed depending on the height).
Step 3: Use the Sugru
Show All 13 Items
Ok, so now you've practiced, and you have a plan for how this is all going to fit together, right? Gather LEGO the pieces you'll need for your first panel mount connector (or multiple connectors, if you're building them into one big structure), along with one pack of Sugru and the appropriate cable or coupler. Here you can see I've got one USB extension cable, two 4x4 plates, four 1x4 bricks, and one matching pack of red Sugru. Now:
Step 4: Bonus step: power switch
Making a power switch isn't much different from making the panel mount connectors. The only difference is that you'll need to solder some sort jumper wires onto the terminals on the back of the switch, so you can easily access them from inside the case. The rest of the steps are the same - do a dry run with LEGOs to build an enclosure for the switch, then seal it in with Sugru.
I used heat-shrink tubing to seal up my soldered connections, which you can shrink using a hair dryer. Electrical tape will also work just as well.
Step 5: Bonus step: wiring the power switch
Show All 8 Items
Ok - so you made the panel for the power switch, and next you need to wire it into your power cable.
Step 6: Let the Sugru sit for 24 hoursBe patient! Sugru takes 24 hours to harden completely. You don't want to start plugging things in and deform the ports while the Sugru is still soft. Let your creations sit out overnight.
Step 7: Build your case
Show All 15 Items
Now for the really fun part - building the actual case! Your panel mount connectors should be all ready to go, so it's mostly a matter of figuring out cable management and fitting all the components nicely in the inside of the case, and aesthetics on the outside of the case. You might want to make a diagram first to help you figure out how everything will fit together. Again, I've provided a diagram in case you're following my build exactly, but you'll probably need to adjust this part for your project.
Here you can see my approach: on the outside, I wanted four front-facing USB ports along with the power switch for easy access, and then the HDMI and barrel jack on the back of the case (similar to what you'd find on a regular game console, DVD player etc). Inside, I have the Raspberry Pi, USB hub, wireless remote, and a perf board (I switched over from the solderless version, didn't want things falling apart inside the case).
There is certainly room for improvement in the future - particularly with cable management inside the case. Here's an open question for the electronics gurus out there, because I don't know much about digital data transmission: can cutting up a USB or HDMI cable and re-soldering it using thinner, more flexible wires (e.g., standard 22 AWG stranded hookup wire) mess things up? The stiffness of the USB and HDMI cables was a big limiting factor, but I have no idea if those cables are specially designed, and a sloppy solder joint or wire with different resistivity could prevent them from working properly. Any insight you can provide in the comments would be much appreciated!
One last thing to consider when designing you case is easy access to the inside, in case you need to debug or change something. My windows allow me to access the Pi's SD card, but that's about it. If something didn't work on my first boot-up, I would have had to take off the roof to double check connections. Building in hinges for the roof might have been a better decision, but luckily for me everything worked on the first try.
Step 8: Plug it in!
Much better! I now have a stylish case that doesn't look so out of place in the TV cabinet, right alongside the Wii, DVD player, and cable box. Plug everything in and fire it up for a test run. If something doesn't work, you'll have to go back inside the case and double check all the connections.
As always, if you have your own variation or build to show off, or some suggestions for improvements on the process, please leave a comment!