Now that the arcade has taken on its proper identity, it’s time to install the electronics (LCD, speakers, and amplifier), Raspberry Pi, and connect all to power. I like to start with the LCD, but if you have large hands, I would wait to install the LCD and jump ahead to the subsystems and subassemblies section. The LCD covers up a significant entry point to the inside of the cabinet. If you have trouble working in small spaces, you’ll find the following rather similar to decorating a cake inside a dimly lit tissue box.
Installing the LCD
Subsystems and Subassemblies
We’ve started connecting cables to dedicated PCBs.
The HDMI-compatible LCD I’ve chosen is video only. Later versions support audio, but this batch does not. Next is audio.
But what if you want that larger speaker sound?
Control Panel Assembly
It’s time to assemble and wire the control panel for our arcade. There are two routes we can take with the control panel in conjunction with the Raspberry Pi. Because the Raspberry Pi has GPIO pins, we could use some software to poll the GPIO pins and interpret button presses and joystick inputs as keyboard inputs. The other route (and more universal) is using a keyboard encoder. The keyboard encoder is exactly as it sounds; it takes discrete inputs and encodes them to keyboard signals. You press a button, and the Raspberry Pi (or any PC that accepts USB HID devices) see a keyboard key activated. This is simple and essential component to build large-scale Multiple Arcade Machine Emulator (MAME) cabinets. It’s also my recommended way for MAMES with two or more players. I prefer keyboard encoders for single-player RPi cabinets too; that’s more because many of these encoders include wiring harnesses and I hate wiring. We will look at each approach.
We haven’t installed the Raspberry Pi into the cabinet yet and for good reason. Another option for implementing arcade controls is done by wiring directly to the Pi’s GPIO headers. It’s best to do this with easy access to the Pi, before it’s mounted into the cabinet.
The extra software you need is Adafruit’s Retrogame found here at their github repository: https://github.com/adafruit/Adafruit-Retrogame
I recommend following the associated instructions from Adafruit: https://learn.adafruit.com/retro-gaming-with-raspberry-pi
Because this file exists in/boot, you can edit it easily: either locally on the Pi or remotely via SSH.
Retrogame one-fits-most sample configuration
Keyboard KEY | GPIO pin # | Arcade Input |
---|---|---|
UP | 2 | Joypad Up |
DOWN | 3 | Joypad Down |
LEFT | 4 | Joypad Left |
RIGHT | 17 | Joypad Right |
A | 22 | "A" button |
B | 27 | "B" button |
X | 23 | "X" button |
Y | 24 | "Y" button |
F1 | 8 | "Menu" button for retroarch |
RIGHTSHIFT | 10 | "Select" button (Console) |
ENTER | 9 | "Start" button (Console) |
1 | 18 | "Start 1P" button (MAME) |
ESC | 7 | "Escape" key to exit ROM |
R | 11 | "R" button |
L | 25 | "L" button |
Wiring the joystick and buttons inputs to the RPi is simple since no pull-up resistor or additional hardware is needed. It is a tedious task to wire ten buttons with four directional inputs, all with a duplicate path that returns to ground. There is something we can do to assist with what goes where.
I’ve wired this before, hundreds of times. And I despise it. So, to ease the pain, I’ve got a few pro-tips or quality-of-life improvements. We’ve already settled on a button/keyboard mapping as defined in the example config file. Trust me, you want to settle on something before continuing.
I usually transcribe this in pencil on the underside of the control panel as I’m wiring. Basically, do as much prep work in advance to avoid wiring something wrong. This is usually (it will happen to you) where a wiring issue will arise.
Note
The button labels in Figure 6-36 are not only a general emulator/console mapping but also the literal keyboard keys they trigger. The exceptions are Enter and Right Shift; these trigger "Start" and “Select”, respectively. The “x button = x key”, “a button = a key” idea was to not confuse myself. This scheme has caused me some, but not a lot of confusion in hindsight.
With the rest of the hardware placed in the cabinet along with the appropriate controls (on/off switches) installed like in Figure 6-48, it’s time to wire power. These switches will control power, the backlight marquee lights. On the rear of the panel, we also mount the DC input jack, where main power enters the cabinet.
Powering Wiring
What’s in a Quality Part?
Outputs 12VDC @ 3A (enough power for this arcade without pushing our power supply to it’s limits).
Plug is center-positive (pretty common, somewhat standard in 12V DC power supplies).
UL listed with the file number (passed some rigorous testing; implies a quality power supply; we can probably trust the three ampere rating).
Long cord= very convenient.
There are many generic 12V power supplies. The aforementioned characteristics are ones to lookout for. In particular, we need enough current to power all our electronic components; 2amps is about what the arcade consumes, but picking a supply that outputs 2 amps wouldn’t give us any headroom. Any cheap supply (non-UL listed) might be able to meet a 2 amp continuous draw, but for how long before failure? Give yourself a safety factor of 50%. The power supply will have a longer lifespan and provide a more stable output if its normal operation is not bordering its specified output limits.
And there it is, the model number and manufacture. This all checks out fine. If we explore more, like the UL standard this power supply was tested against, we can identify what the intended use of this power supply is. A few clicks and links later, we find the standard: UL 6500: Standard for Audio/Video and Musical Instrument Apparatus for Household, Commercial, and Similar General Use. Even better. If you had $1,635, you could purchase a digital copy of this standard and determine what safety features the power supply might contain (over current, thermal shutdown, short-circuit protection) and what tests it passed to become UL listed (electric shock, resistance to fire, impact/drop testing, etc.).
That was sort of a sidebar, but it’s a quick glimpse into what separates quality electronics from everything else. It’s the largest contributor to cost too. One thing to note is, just because this arcade is connected to a UL listed power supply does not dictate the rest of the arcade can adopt the same pedigree. Just because the power supply is “safe” does not mean everything downstream is also safe.
Connect an HDMI Cable
Ground Loop Fixes in Audio
This audio abnormality is common in systems with two different power references. Let’s say you’re listening to music on your phone or MP3 player through a physical connection to your car stereo’s auxiliary jack (before Bluetooth was standard). If you plug your phone or MP3 player’s charging cable while listening to music, you might hear a hum or buzz in the audio. This is another scenario where a ground loop occurs. The fix is the same. You can easily buy a ground loop isolator for about $8, but it’s only $1.20 in parts, so why not make it? We’ve gone this far building the arcade, what’s one more custom part?
Buttoning Up
Remember bolts connect to the standoffs mounted into the speaker subassembly. See the cutaway in Figure 6-68.
Bonus Upgrades
There are a few little extra touches you can add to really make your cabinet pop. In the next few steps, I outline how to go above and beyond for a few little extra cool bonus features.
Animated LED Marquee
The required Arduino libraries to drive them are MD_Parola and MD_MAX72XX. A future project for me is to drive them with the Raspberry Pi and write a script that scrapes the ROM name currently loaded and pushes the string to the marquee. Someday.
Battery Powered
I rebuilt the inner shelf as a power regular with a custom step-down converter. Since the drill battery is 18v (nominal), we need to step the voltage down to the input power we design the arcade electronics to run off, 12v.
Neo Pixel LED Lighting
Keyboard for a Joystick
You might notice two “Esc” keys. The keycap sample packs I bought only have so many unique keys. Let’s just call it a place holder for now.
I’m pretty happy with the key-stick as a concept. I just wanted to showcase some ideas that can motivate your arcade to something very custom. You can still incorporate the traditional trackball setup too, but never be afraid to experiment.
Don’t think the custom PCBs are a cost-prohibited accessory. If you ever need to design and layout a custom PCB, try Eagle CAD, KiCAD, or EasyEDA. Getting custom and professional PCBs are surprisingly cheap. These PCBs were about $0.50 plus shipping. Seeed Studio, JLB PCB, and PCBway are cheap, low-quantity manufacturers great for prototype circuit boards.
Summary
Thanks for reading and following along. If it was your first introduction to arcade building and you’re feeling a bit overwhelmed, don’t worry! The best place to start is anywhere, as long as you start. Do not be concerned about the end result, you can only be accountable for the work you’re doing now—focus on the task at hand. Every arcade you build, your skills will increase. The next arcade you build will reflect this. I’ve been building for a long time.
The next chapter will focus on a two-player arcade design, a sort-of hybrid to the mini arcade (not portable, but transportable) and on a scale that’s a bit more practical for extended play.