For the unruly boys who will never grow up!Follow project
Sometimes I feel old and tired but that sensation suddenly disappears at the very first moment when I begin a new electronic project. In particular, the PI arcade machine project evoked me plenty of memories of enjoyable moments and nice feelings from my earliest youth when I used to walk into the arcade saloon to ‘invest’ part of my weekend pay in a coin-operated entertainment of sounds and colours. That was the meeting point for all of us from Friday to Monday and we had clearly established ranks in our group during that time as a function of our skills. We had soccer games, experts, street fighter authorities, shooter specialists and platform arcade professionals like my case. Several years ago, I built my own arcade machine using plywood and an old computer running the multiple arcade machine (MAME) emulator and old car speakers to play the music. Here I just needed to connect the joysticks and pushbuttons to the computer using the parallel port (the parallel port is an outdated connection port used generally to connect the printers to the computer). I could tell you dozens of stories about this and maybe I would do it sometime but let’s go to the point with the arcade machine project. The thing is that the arcade machine was finally disassembled because it needed a lot of space but I luckily kept the control panel (joysticks and pushbuttons), which are the ones that I will use in the project described here.
The things you will need for this project are:
- Plywood and/or methacrylate panels
- Raspberry pi 2/3
- Coloured cables (crimp tool or soldering iron)
- Electrical strips
- Drill, jigsaw, screwdriver and other common tools
- 2 Arcade joysticks and 8 pushbuttons
As you probably know, raspberry pi offers many different distros to be run by the system from media centres to fully operative multipurpose systems. Among them, retropie and recalbox offer the possibility to add arcade emulation capabilities to your Raspi in a simple and straightforward way. Both are stable and user-friendly systems but the selection of one or another emulator is on the user side (here I will use recalbox but everything can be applied to retropie). The part of installing the distro into your SD is thoroughly explained elsewhere so here I will focus on the fabrication of the control pad and the connections of the controls, which from my point of view are the things that let you feel the real experience of an arcade game :,-)
First things first. We will need some wood panels, methacrylate or anything similar for the structure. You can adjust the structure according to the number of joysticks and pushbuttons that you want to add. In my case, I will use two joysticks in order to enable two-player games and three buttons for each player plus two additional buttons to start the game for one or two players. These buttons and joysticks as well as other models can be easily found through amazon, aliexpress and many other similar electronic stores. After you have decided the number of controls you have to start the drilling process in order to accommodate them in your control panel. Finally, it is recommended to add some walls on the sides in order to stabilize the control panel at it is shown in the images. Otherwise, all the weight will be on the backside connections, which is not recommended if you want a long-lasting control panel. It is also interesting to decorate the control panel with an appropriated art image. In my case, I found a bundled image with many different arcade game characters, which I printed and glued below the methacrylate to prevent damage. The final result is shown in the image.
After installing the controls and finishing the panel it is time to go on with, from my point of view, the most interesting part of the project. Now, it is time to arrange all the connections with the raspberry pi. There are several electronic boards that work as an interface between the pushbuttons and joysticks and the raspberry pi using the Rpi USB port (a simple search of ‘arcade controller’ in google will give you different options and prices) but it is not really necessary. In this case, I will do it the hard way, connecting all the controls to the general-purpose input/output (GPIO) port provided by Rpi. This solution is a little bit more complicated but can save you some money for your next electronics project.
Here it is important to organize all the wiring if you do not want to screw things up. In the image it is represented the organization of the cables using electrical connector strips in one end and crimped connections (you can also do some soldering work here) to the switches in order to prevent bad connections. Note that the controls have been organized in two blocks and the connections have been replicated for each player with 8 switches for each one (blue player and red player). All the switches have two connectors with one of them connected to the common terminal (GND - black cables) and bundled together in a black electrical strip in the centre of the panel.
The remaining switch connectors (8 wires) are connected separately to a white electrical strip on each side of the panel (see the images). The joystick has 4 switches corresponding to the right, left, up and down positions and the other 4 switches correspond to the X, Y, A and B push buttons.
In order to connect the switches to the Rpi I used an 8 wire coloured network cable that easily permitted to identify the wire connected to each switch. I also used dupont cables to finish the connections with the Rpi GPIO port as it is shown in the image. It is also recommended to fix the Rpi to the board. I used a 3D printed case obtained from thingiverse (https://www.thingiverse.com/thing:922740)
Finally, you just need to power the Rpi up and connect the HDMI output port to your monitor or TV in order to start playing (it is required to configure recalbox and install some ROMs previously but this has been already explained in detail in the RECALBOX webpage). I also recommend connecting a wireless keyboard to the Rpi in order to facilitate the navigation in recalbox but it is not strictly necessary.
The arcade control panel shown in this project was used for competitions during the Public University of Navarra Electronic week in collaboration with the i2tec electronics student association as is shown in the video below.