Build your own USB control panel

Build your own USB control panel

One of the toughest decisions I had to make in building my arcade cabinet was how to handle the control panel input. There are tons of different options, from using an ipac to hacking up an old keyboard, buying a prebuilt panel or even adapting a jamma interface.

My first interface used a PS/2 keyboard that I laid out in a matrix to avoid ghosting and hardwired controls to the small keyboard PCB. The keyboard used an 18×2 matrix and it became apparent very early on that this simply would not work for my cabinet.

If you intend on building a panel with less than 6 simultaneous inputs (ie two directionals for diagonal, and one button being pusch by both players at the same time), then a keyboard hack is by far the cheapest and easiest solution to work with. I will post a separate guide to building this interface.

However my cabinet needed to allow up to 12 inputs simultaneously. Thats diagonals + 4 buttons per player. My options were limited to buying an ipac USB 2 player version ($55 shipped), buying a complete unit like an X-Arcade ($149.99+S/H) or building my own. The ipac is definitely a great device and for anyone not adept with soldering, I whole heartedly recommend it. But since this was my custom project and because I wanted independent devices I decided to build my own USB interface.

For PCB’s I used two Gamez usb gamepads. They can be found for under 10 bucks a piece online, though I lucked out and got them for $4.99 each on a sale at compgeeks. You can use about any USB gamepad for this, so check ebay or local friends and you can usually find them for about 5 bucks each. The key for me was that each controller had regular dpad inputs + 8 buttons. The other crucial element was no blocking or ghosting, which these pads avoided perfectly. So this saved me 45 bucks from an ipac, with most of the features and the luxury of having two independent devices.

The only other item’s purchased came from Radioshack. Two small project boxes, two 9pin molex connectors, and three 4 pin molex connectors. Total cost for all this stuff was about 15 dollars. I also picked up two 100ft spools of wire to hook everything up.

Tools for the Project

Tools for the project

  1. Soldering Iron
  2. Solder
  3. Needle nose Pliers
  4. Xacto Knife
  5. Old AT connector
  6. New ATX power supply
  7. An ATX female connector and pins
  8. Multimeter
  9. Wire strippers
  10. Dremel
  11. Hot glue gun
  12. Project Box
  13. Molex connectors and pins
  14. 2 USB gamepads

The dremel is optional, but it makes cutting the project box a lot easier and faster. Also you can substitue any kind of epoxy or well bonding glue for the hot glue, but I prefer hot glue, it holds well and it still removeable if absolutely necessary.

Getting the Gamepad Unwrapped

The first step is to get to the PCB for the gamepad. You can simply unscrew it and remove the PCB or you have some fun with your dremel and a cutoff wheel and hack the controller to pieces to open it. I’m sure you can guess the route I took.
Gamepad PCB

Now that we have a nice clean PCB, it’s time to start mapping out our wiring. If you notice, on this and most gamepads, it uses a clamshell style connection with a carbon pad. This makes it super easy to solder in the necessary wires. If you look next to each button, there is a nice big contact point for the + side of the connection. There is a single common ground per controller, so its super easy to wire that right up to the ground point. Basically you just connect a wire to each + point you want to use and wire the single ground. Drop a few dabs of hot glue to keep those connections in place.
PCB Wiring

Next up is to connect the molex connectors and fit it into the project box. It is very important to consider both steps at once, so you can cut the wires to proper length without stressing any wires to fit the connectors into place or to have excess wire crowding the box.

I have never been a big fan of wiring up molex connectors, but it’s fairly straight forward. Clip a pin from the strip,
Molex Pins

insert the wire into the back end of the pin, use your needle nose pliers to crimp it, then drop a dab of solder on to keep it in there tight.
Molex Wired

Repeat for every pin. Then you simply push the pins into the molex connector. Make sure you have your ordering down before you start this, because it is a royal pain getting the pins back out if you mess up. I chose to wire Pin 1 as ground for the 9pin molex (handles the 8 input buttons) and then used the 4pin molex as the directional positives for the joystick.

Molex connectors wired

The connectors were split up on purpose, to make the connections easy to understand for anyone else who may need to reconnect the USB encoders. Both encoders have a 4 pin female molex connector which carries the 4 joystick directions (Up, Down, Left, Right) and a 9 pin molex that carries the 7 main buttons, start button and the common ground for everything.

The third molex connector in the picture is for the coin door inputs. I gave it a separate ground and then a positive terminal for each coin slot. I also reversed
the pinouts for this connector to ensure you couldnt plug in the joystick plug into the coin door plug. Only one of the two encoders has this third connector.

I used a couple of zipties to keep things clean, but that’s pretty optional.

Next up is putting it all in the project box. About 10 minutes using the dremel to notch out the molex holes (just used the cut and fit method until they snugly fit through) and then notched out a hole in the back to match the notch on the USB controller cord. I had to notch the cover out as well, because it uses an inner lip.

Project Box Cutouts
Lastly drop in the PCB and connectors, then close up with box with it’s included screws. The result is a sleek and very professional looking encoder box.
Molex connectors installed
Exit cable

Using this method makes creating your cables from the Panel to the encoder super simple. You need a single negative per player, and then run the positives separately to the male portion of each molex connector. It makes everything nice and tidy, and allows you to quick disconnect the encoder from the panel if you ever need to.