Introduction: Making a USB Game Controller

About: Collaborative workspace with digital and traditional fabrication tools, 3D printers, CNC machines, classes, events, and professional consulting services.

Here at NextFab, we designed a fully functional, USB game controller for Philly Tech Week. This project will be particularly tricky without some more serious electronics equipment or a local makerspace with the proper tools, but we thought we would post our walk-through in case you do have the access and would like to make your own!

Tools Needed:

Supplies Needed:

  • Electronic components (list attached later)
  • PCB (Order from our Gerber files)
  • 1/8" Acrylic
  • NinjaFlex filament
  • Hardware (list provided later)

Step 1: Circuit Board

The first step in making your own USB game controller is to grab an Arduino and start prototyping. It is important to make sure you use an Arduino Leonardo, Micro, or Due as they have HID (human interface device) capabilities. Essentially this means that they can act as a keyboard or a mouse and hooked up to a computer via USB. So to start interfacing, we hooked up 10 buttons to the Arduino Micro on digital pins 2-6, 8-10, 12 and 13 using a couple current-limiting resistors on the 3 LEDs.

To make a final controller, it was necessary to condense the whole perf-board - Arduino and all - to fit on one small PCB. We designed the board for this using Altium Designer and have exported and attached the Gerber files needed for board manufacture. So feel free to download ours and send them to your favorite fab house to make your custom controller.

Step 2: Board Assembly

In order to make your controller, once you get your board, you have to assemble it. Due to the surface-mounted microcontroller chip, this assembly will be difficult without a stencil and a pick and place machine. If you have access to a pick and place, the process is pretty easy. However, in assembling this board, you must mount all the surface-mounted components first if you plan to use solder paste and a reflow oven rather than a soldering iron. After doing this, you can mount all of your through-hole components and solder them in place. Attached is a list of the components needed to assemble the board. You can cross reference the component names in the attached materials list with the silk screen on the PCB to see what components belong where.

Step 3: Programming

Now that you have your fully functional PCB, it's time to program that microcontroller! We attached our functional code for the microcontroller, but feel free to customize your own. We are using the microcontroller to make keyboard presses that are typical for computer games, with the rightfour buttons mapping to the ASWD keys, and the left four mapping to to the arrow keys. The start button maps to the enter key and the select button maps to the space bar. The code can be fully customized and you just need to follow the comments to see how to change the mapping of the buttons. This can be customized for many different games!

Step 4: 3D Printed Buttons

The next step is making the rubber buttons! For this part of the process, we used a 3D printer and a material called NinjaFlex to print a rubber-like material. The 3D file we designed for the buttons is attached here.

Step 5: Laser-cut Enclosure

We then designed a simple laser-cut acrylic enclosure for the controller for which the illustrator file is attached. We countersunk the top 4 screw holes so that the screws wouldn't protrude. We used 1/8 inch acrylic - opaque for the top and translucent fr the bottom - but use whatever looks best!

Step 6: Assemble!

Grab your assembled boards, buttons, acrylic, and hardware and assemble! We used:

  • (4) Flat 3/4" #4-40 screws
  • (12) #4-40 hex nuts
  • (4) #4 0.185" spacers

The assembly order should be (face down):

  1. 4 Screws
  2. Front plate
  3. Buttons
  4. 4 Nuts
  5. 4 Spacers
  6. PCB
  7. 4 Nuts
  8. Back plate
  9. 4 Nuts