Making a USB Game Controller
Intro: Making a USB Game Controller
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:
- Laser Cutter
- 3D printer
- Stencil Printer
- Pick and Place machine - Manual or Automatic
- Reflow oven
- Soldering iron
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):
- 4 Screws
- Front plate
- Buttons
- 4 Nuts
- 4 Spacers
- PCB
- 4 Nuts
- Back plate
- 4 Nuts
26 Comments
pjcasanis 7 months ago
fishaquariumgabi 2 years ago
and Quantity (pcs) of PCB, please replay
Jiwanesanket 4 years ago
andreperez 5 years ago
Does it work with RetroPie?
LukasZ17 6 years ago
Thank you for sharing your project. I'm able to burn the Leonardo bootloader and also to programm it with your code (via icsp-port). My problem is, that the usb-port seems not to work. My computer can't detect any usb-device. Do I need an additional driver, i though the Leonardo bootloader should be enough, right? Thanks!
MikeB649 6 years ago
jhodges15 9 years ago
NextFab 9 years ago
Mainly because they are pretty accessible and are a great way to make your electronics or other projects look polished and nice with a great casing!
TSJWang 9 years ago
Yea I agree with you jhodges15. It's not as accessible as drills, dremels, or gluesticks and scissors.
I feel like actually building a product is more fulfilling than printing it.
I won't lie though, I'd love to have a printer.
jhodges15 9 years ago
Nosknut. 6 years ago
As a matter of fact, the 3D printer revolution was 2016. Now you can get one for $100. Thats probably less then most drills aso. You dont have to do the cases however. You could do some designing yourself and figure out a way to do it without the 3D printer. Even maybe just making it all in wood ...
KeifD 7 years ago
I usually look at it and think. "Do I have the things to make this." No? Get them or move on. Or the other option I think of is, can it be made with other materials I have available?
Just be happy people take the time to share these!
I personally bought a 3d printer so I can make cool things like this!!
jhodges15 9 years ago
NextFab 9 years ago
We definitely understand where you're coming from, however we are a makerspace and we have all these tools available for public access. So a lot of our Instructables are done using these tools and showcasing what can be done with access to them. They are very cool tools to use and are pretty available to the public, so we want to put out our designs for people to see what can be done when combining all sorts of different processes. Of course, not everyone can make all of them, however we want this to be available to those who can.
kid1024 7 years ago
kid1024 7 years ago
OğuzA4 7 years ago
Do anybody has the ARDUINO CODE ?
qquuiinn 9 years ago
JuKieNABORS 9 years ago
NICE! good thing i can use the 3d printer and laser cutter at school.
kermit.t 9 years ago