I have already built an arcade joystick before and it was huge (60x30x12 centimeters for 2 players), also hard to use cause you would need a PC with all the emulation ready for play, etc .. so that one ended up being stored somewhere I can't remember collecting dust but I still wanna play old school games with a stick and big buttons.
After that experience I wanted a better solution which it must have:
- Built in system: plug & play with a TV by HDMI
- Small size: easy to carry and store
- Scalable: plug into it another joystick for more players
- Joystick only mode: ready to use only the joystick for any other system by USB
Best option I've found is by using a RaspberryPi with RetroPie plus an USB HUB and a custom made USB signal switch. BUT I didn't want to expose the raspberry pi, I wanted a closed box with all IO ready to use.
I know this is nothing epic original but I just wanted to document and share all the stuff I came up with for each part of the build so you can build your own, improve the one you already have or even use it as inspiration for your next project.
This instructable wont be a step by step DIY for the exact same build because it has a lot of custom stuff that you may get an easier workaround with the stuff you already have in your home. Although I will try to go through it all so you don't have to re-think everything to make one with same features.
If you build one or have taken something from here please share a pic in the comments, I'd love to see it!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: What You Would Need
First thing here I'll be putting links to the components I got for my build as reference I didn't buy any of mine from those sellers cause I bought all from local sellers in my country.
1. Raspberry Pi: As I said in the Intro this is system works with RetroPie so you would need a Raspberry Pi, I used the latest Pi 3 B+ but I think you can use version 2 also. The only thing here is if you go with a Pi Zero games you can play are a lot less and the build may change in some parts (since I have extended the Pi IO like Audio, USBs, HDMI and Power button) so check the schematics picture to see if it make sense for you.
2. Kit for an Arcade Joystick: I haven't bought one, instead I've assemble my own by getting 6 of the small buttons (24 mm instead of 30 mm) and 2 buttons (start and select) of 12 mm from an electronics store since I wanted an small size joystick but you would mainly need:
- A stick
- 2 buttons for start and select
- N buttons for play (that is totally up to you, I used 6 cause it make sense for the games I wanna play which have X, Y, A, B, L and R buttons)
- USB Joystick Interface
If you want more info on setups and all this stuff I recommend to check the RetroPie Wiki which has all the controls and buttons map too so it would help you decide the setup.
If you want the same stick, buttons and interface I used is this one (those are the exact components I used but not from that seller)
3. USB Hub: It's for opening the case and extend the ports of the raspberry pi so don't spend too much money on it. I bought the cheapest I could find (and which I knew was working fine on a RPi) from a local seller like this one (if you can find without switches even better I had to short them later to make them always ON)
4. Power button: This one is totally optional but it's really cool to have a power button with led for the system. Mine is this one in white led. MUST BE MOMENTARY don't get a latching one they come in both types.
Then some electronics that I will be listing on each step to keep this list short.
Step 2: The Prototype Box
Before I got into build the final box (mine built with MDF) I used the carton box where all the components come from the seller. That is something I recommend for sure, get a cardboard box or something inexpensive of near the size of your arcade and make all the holes and put the joystick in there, it's easier to test all the electronics before you start to make the final box.
Step 3: Electronics Overview
As you can see on first picture, the main idea was to extend the RaspberryPi out the box but also keeping the integrity of it (without soldering and smashing the RPi). This step is an overview of all the connections and cables that were required to build I'll cover each of those within steps.
Step 4: USB Hub Extension
In order to allow other players to hook up into your system you need usb ports which the RaspberryPi has already exposed but since we already have one joystick (our arcade) plugged into the RPi we need a way to expose usb ports out the box.
So buying the cheapest USB hub would do or use one you have around (USB 2.0 is enough for RPi). This will give you the ability to plug a keyboard, mouse, more arcade players, I mean ... if I have 1 more of this systems I could plug them together which was one of the ideas of this project.
One thing though, if you are buying try to get one:
- without leds (you may end up removing them)
- without switches (you will have to desolder them and solder a short to be always ON)
- all USB ports should be on one face (it's easier to expose from the box)
Step 5: HDMI Extension
This one was hard to find, the point is to have an extension that is a HDMI Male to Female so you can plug in a TV outside the box. Getting one short of this size around 5 cm was basically imposible locally for me so I ended up buying one of this type and then break open it so plastic wont get in the way.
The first thought was to get several 90° (L) Male to Female and do some sort of a chain from the RPi to the back of the box but breaking one of those 360° was fairly easy.
It would be much better and clean If you can get something like this one (which was what I couldn't find locally).
Step 6: Micro USB Power Extension
As the picture shows cut the cable to get the micro usb and then solder positive and negative into the micro usb female module.
USB 2.0 cables have 4 path in them, V+ (positive), GND (ground), Data+ and Data-. We only want power so if you find only 2 cables inside they are what we want otherwise you will need to find V+ and GND and discard the others.
DO NOT ASSUME POLARITY BY COLORS, I have found that having a red and black color (or red and white) doesn't necessary mean black or white are GND or red is V+.
So how do you identify them?, using the same you have and a multimeter:
Just plug the micro usb into the female module and test continuity between a cable and the VBUS (labeled on the module) or GND in the module, in that way you will know which to solder where.
Step 7: USB Switch Board Extension
This will require soldering on a pcb, I've used a perfboard and built the tracks by hand because the connection is pretty straight forward.
NOTE: ignore the MicroUSB in there, it happens that I've used the same piece of board to attach it.
The idea behind this is to make an usb commutator where the Joystick Interface goes to the Raspberry Pi OR to a USB Type B female so I could plug the joystick into a PC and use it away from the RetroPie system.
Components you would need:
- a Toggle Vertical Slide Switch (2 tracks)
- a USB Type-B Female: I have used this one because I couldn't find locally this one (Socket B - it's easier to solder)
- an USB cable (the one that came with the joystick arcade interface works fine)
I have set up an schematic on how to connect everything (picture) but basically what this is doing is joining V+ and GND for all USB together and then setting up D+ and D- into the commutator so it will be toggling data transmission between RPi OR the USB Female (output joystick).
An important thing for this, since this will be sharing voltage I recommend you to only use one or the other; do not use both at same time. I mean if you are going to switch to "only joystick mode" then switch off and unplug the raspberry pi power supply. Using some diodes would help a lot in there for security but sadly I have just realized about that haha *shrug*
Step 8: Headphones Extension
By default RetroPie will send audio through HDMI so sound will come up from the TV but I figured I may want to connect headphones which is kinda hard using the TV itself and since RetroPie supports to select audio output I setup this easy extension.
All you need is an audio jack 3.5 for chasis (like this one) and a cable with a male jack to plug into the raspberry pi.
Just solder Left, Right and GND and you have it.
Side note .. I haven't tried it out because I don't have Bluetooth headphones but they may just work by using one of the USB ports in the extension hub of this system and you can skip this step
Step 9: LED Power Button
First ... you can chose between a button with or without a led, if it doesn't have a led you can just skip the led part of this step but IT HAS TO BE A MOMENTARY BUTTON.
Second .. triple check your connections for this step if you do it wrong you can blow up your raspberry pi.
Talking about Linux (which is where RetroPie runs, a Raspbian distribution) you cannot switch off your system by cutting out the power since your SD could get corrupted. So a switch on/off button come really handy for this since I wanna be able to switch off the system at anytime but doing a nice and smooth shutdown.
This has already been taken care from an awesome post at http://www.barryhubbard.com/raspberry-pi/howto-raspberry-pi-raspbian-power-on-off-gpio-button/ by doing a python script that will trigger a shutdown command when shorting Pin 5 to ground (which there's one at Pin 6). So I'm not gonna go through that because it's all explained there step by step, I've followed it and it works perfect.
The LED part of this step
After getting that switch on/off ready I wanted a led but not just on/off light. I wanted an ON light when the Pi was ON but also a cool flickering when it was reading the SD just like the old school IO LED.
Raspbian has already that led feature in place so we just need to enable it:
- Insert your SD card into a PC
- Open at the root the file config.txt (use a text editor for this, like notepad++, do not open it with Word)
- Add the following line at the very end of the file:
That line will make it happen in GPIO 19 which is how I show in the schematics pictures.
What does it do? it just sends voltage ~3.3 v through that pin when the RPi is not reading and a "0 v" when it is reading the SD card.That gives the effect of flickering when is working.
This is only for RaspberryPi 3, if you have another version you would have to go through internet on how to do the same, I haven't checked for other versions but a good start would be at raspberry pi forum
How does an LED button work?
The simple way of thinking it is as a switch plus a led all in one. In a LED button you would find 2 pins for the LED which are going to have polarity and another 2 or 3 pins which are the same as a normal switch with the COM (common), NO (normally open) and NC (normally close).
To identify them you can use a multimeter: pins of the switch will have continuity when you press, you know, like a normal switch. LED pins wont have continuity in one way since it is a Diode so exchange positive and negative with your multimeter and if you don't have continuity in one direction those are the LED pins aaand that is the oposite polarity of it.
For the LED pins check the datasheet of the button it may have already a builtin resistor or not and you should put one, also it will tell how big the resistor is and how much (and min) voltage you can send to light it.
Which is the positive or negative it doesn't really matter, if you don't send too much voltage you can try both ways until it lights, it wont burn, just don't send more voltage that it can handle.
For the button I have got the LED has already a resistor for a 3 to 6 volts and since the RPi is sending ~ 3.3v I don't need anything else, just plug it into the GPIO.
Step 10: Panel Layout Design
There are plenty of layouts over internet just try "arcade panel layout" in google. I used one pretty common but I have started it over through Fusion360 cause my buttons weren't the common sizes, since I have done the entire thing by scratch I figure on share it here.
The first thing was to create a design in Fusion360 (which is free) and then create an Sketch. The cool thing here is we can do real measurements and export the entire sketch into a dxf format (attached as file in this step).
Right click on the Sketch > Save As DXF
Then I opened dxf file using Inkscape (which is also free) and from here I could edit last things and print it out in scale 1:1 which is awesome to do a perfect build on the acrylic and mdf (I haven't taken a photo for the print over acrylic and mdf but there is one with the prototype box)
Step 11: The Box
For the box I have chosen MDF of 9 mm and I designed 2 types of "L" to be 3D printed and assembly into any material thickness (I haven't tested them on other thickness BUT you cannot go above the 9mm since screws will overlap you should go to a thiner thickness).
I'm attaching all the STL. All holes are of 5 mm diameter cause they are thought for screw (~18 mm long if you use 9 mm thickness) and nuts (stamped) of 5/32 inches, the entire build is with those. I counted a total of ~40 screws and nuts.MDF
So this is where the build get's too custom, I mean you can use the 3D printed "L" to build the structure box but the IO sections are pretty custom (back connections and usb hub) by the stuff you bought and how you built it.
For the top side I have went with a 3 mm acrylic plus a 5.5 mm MDF as a support for an art paper.
The size of the box and it parts (it may vary for your thickness of material):
MDF 9 mm
- 2 of 70 x 200 mm
- 2 of 70 x 178 mm
- 1 of 160 x 200 mm
MDF 5 mm
- 1 of 160 x 200 mm
Acrycil 3 mm (a thiner one like 2 mm may be better tho)
- 1 of 160 x 200 mm
The final size of the box is 180 x 220 mm by 70 mm tall. With the 3D printed LEGs goes up to 200 x 240 mm by 80 mm tall.
Adding rubber feet at the bottom (glued with hot glue) made a huge difference, they are a must for keeping the entire thing in place while playing, take that into consideration if you build one for sure. The ones I've used are like these ones.
Step 12: Artwork
Well I'm not a designer or an illustrator so I just played a little in here, I didn't want a crawled artwork and I did kinda wanted to make an original one (there are a lot to download from internet just google "arcade artwork")
The entire box was covered using an Adhesive Photo Paper of 115 gr (A4) which I sprayed with a can of Transparent Varnish (an aerosol like this one) to keep the Ink in place (I've printed all of them with my inkjet printer).
For the artwork of the panel I used a Photo Paper of 150 gr (tried 230 gr but my printer didn't want to eat it). Design was pretty easy since I already have the SVG on Inkscape (step 10) so it was a matter of getting some design. But on the front was a little harder cause I have to mesure the current power button and audio jack positions and translate that to inkscape and then build the design around them (inkscape has a pretty solid way to work precisely so it wasn't hard really)
A couple of tips I have found doing this:
- Cover with a coat if you print your designs they will get removed after some use if don't do it
- If you are getting no real "blacks" on your prints: try printing in Paper mode instead of Photo Paper on your printer settings (I have no idea why but that was my issue)
- Make the holes after it is pasted into the wood (for the adhesive) it easier to match where to cut
- Don't screw it too hard or the screws will damage the adhesive paper
Runner Up in the
Game Life Contest