UPDATE (9/1/2014): If you are looking to build a project like this, see my post on the Rabbit Engineering Model I1 device.
The I-PAC is a great input board for custom control panel builders (even if it was designed for arcade machine applications). Essentially it is a digital input board that will convert simple button (SPST) presses into a USB keyboard input. Exactly which keypress a button results in is programmable on the board with a nice custom GUI. I originally ran into these boards when building my arcade game cabinet, and then went back to them when building my FSX MCP project. They are great for custom flight sim controller projects because Windows natively supports multiple keyboards plugged in at once, so having the I-PAC running does not interfere with normal machine operation (you can keep typing etc.).
The problem with the I-PACs is that while they are not expensive (a 32 input model goes for $40), they are not exactly cheap either – I have already bought two of them for two projects, so the prospect of buying additional ones every time I come up with a new project is a bit painful in the wallet. So here is a project that will allow you to easily reuse an I-PAC across multiple projects. The idea is simple: Surface the inputs of the board through standard subminiature DB9 plugs, to create the I-PAC Distribution Box:
For my projects, I chose the 32 input I-PAC2 board. This board retains its programming after power-off, which saves you having to re-program it after every reboot. There is also a 56 input board (I-PAC4) if you need. Each DB9 has 9 pins, so that gives us a handy 8 inputs plus common (ground) per plug. With eight inputs per plug, we will need to expose 4 DB9s to allow all inputs on the I-PAC2 to be used.
Now we need a nice enclosure. Mouser sells the Bud Industries PT-11388-G which is a good size to keep on your desktop, and comfortably fits the I-PAC2, the 4 DB9s and all associated cables. We will also need the DB9 plugs (I used female plugs for this box, the applications will use male plugs), as well as lots of cable. For the sake of neatness, I decided to use IDE ribbon cables. I can tear away eight cables together, so that inside the box there are only 4 8-strand ribbons instead of 32 individual cables. This makes testing and repairs much simpler later. You can pick these up out of your scrap box (you do have a computer parts scrap box, right?) or at a PC recycling place.
Let’s get to building
The first task is attaching the I-PAC to the enclosure. The I-PAC has four holes for screws, so I cut a piece of 5mm MDF, which I hot glued to the plastic enclosure. I then used regular (but very short) wood screws to attach the I-PAC to the box. I plugged in the USB cable to the board, and cut a rounded notch in the enclosure to allow the cable to exit after the enclosure is closed.
The next step is to cut four square holes for the DB9s in the enclosure. These should be 20mm by 11mml. I cut mine using a Dremel, which left some some ugly scratches – but that’s fine because we will be spraying and putting a laminated paper face to cover up all that stuff. Once you have cut the hole, press the DB9s into them to check the fit (hand-file to adjust the fit as needed). When they are fitting snugly, drill out the screw holes on each side of the plug, using the DB9 itself as a drilling template.
At this point, you can spray the enclosure. I chose black (but I left the base the original grey colour). For ABS plastic, you can use the regular spray paint you find at hardware stores, but be sure to spray a couple of coats, otherwise small scratches can show the plastic underneath. Then while the paint dries, warm up your soldering iron and get ready for some soldering (4×9 = 36 pins needing attention). We will be using a ribbon of 8 cables for the inputs, with a lone cable for the common (ground). The reason for this is the way the I-PAC inputs are organized. The eight inputs will be right next to each other, but the common is at one end of the contact strip. Keeping all 9 cables together leads to the cable pulling in a weird way that makes it hard to squeeze all the cables in the enclosure at closing time. So pick a pin to use as common in all your plugs (I used pin 5, which is the top-left pin), and get to soldering. Be sure to give plenty of cable length – you should have enough to open the enclosure and lie to top to the side of the base with all the cables attached (a maxim for this kind of project: Never build anything you can’t take apart and fix later).
Once all the DB9s are soldered, you are ready to attach them to the top of the enclosure. To make the face of your box, you can use desktop publishing software, which allows you to create measured drawings that will print at a known size. I use Scribus, which is an open source application which has basic features, but more than enough for this sort of thing. I will give more details on making this sort of laminated face in a later post.
I decided to go for a retro-British look; I used wood grain texture (Long live the 2600!!) and instead of numbering the plugs, gave them a letter designator (A, B, C and D). Then I added a “Pin 5 is ground” legend to remind myself, and a “Mk 1 July 2011” caption, to keep track of all the future marks 😉
Once the DB9s are securely screwed into the enclosure, you can insert the cables into the contact strips in the I-PAC board. I labelled each ribbon with the letter of its DB9 (A, B, C, or D). This makes testing and debugging the project a lot easier, because if a contact on a particular DB9 fails, you can narrow down which cable which is failing by looking at the ribbon letter. The only other gotcha is that there are only two commons on the contact strip. Other than that, this is a simple step.
I would recommend that as you attach each DB9, you test the connection with a multimeter. Insert one probe into the user-facing side of the DB9, and press the other against the appropriate screw on the I-PAC contact strip. If a contact fails, check that you have properly inserted the cable into the contact strip first, as this is the most likely point of failure (another common problem is a broken cable, which means you will need to unsolder it, and re-solder a new one). Once everything is tested, you will have a big mess ‘o spaghetti to stuff in the enclosure.
Once it is closed up, you have a neat, simple way to connect new custom controllers to your PC. I will be posting about a new controller that uses the distribution box very soon.
The nice thing about this distribution box is that the I-PAC does not care if you have some of the inputs unused. So you could plug in one controller with 32 inputs, or one with 24 and another with 8, or just one with 4. As long as you are using male DB9s with pin 5 as the common pin (or whichever pin you chose), you can mix and match as much as you need.