RetroPie Arcade V4.0

With all the RetroPie/Raspberry Pi Arcades being built, I decided I would try my hand at one from a Raspberry Pi 3 – but I wanted mine to be a little different. I’ve never really cared for exposing the ports on the Pi in order to plug in power/video/USB, so I used pass-through ports. I also didn’t include a screen, as it’s designed to be plugged into a TV/monitor, and I really don’t have room for even a ½ size arcade machine in my house. There is an internal exciter for sound with a switch to change between HDMI and internal sound/headphones output, and a potentiometer to control the exciter volume. Since there are plenty of projects online describing button and OS setup, I’ll just tell you what else I did differently.

A Teensy LC microcontroller board from SparkFun controls the power circuit. When the power button is pressed, the Teensy LC that monitors it activates a relay which controls power to the Raspberry Pi, turning it on. The Raspberry Pi then sends a high signal to the microcontroller to indicate it’s powered up and the Teensy turns the button and stick LEDs on. When the power button is pressed again to turn the Pi off, the Teensy sends a signal to the Pi and the Pi begins the shutdown process. Once the OS is completely shut down, the Teensy deactivates the relay – turning the Pi off completely and shutting down the lights. The Teensy is powered as long as the machine is plugged in, but the power draw is minimal so I’m not too worried about it. There’s also a small red LED on the cover of the box to indicate that it’s plugged in.

The back of the box has the potentiometer switch for sound, external speaker/headphone jack, a barrel connector for power, microSD card slot, HDMI connection, and two USB ports. One USB port passes through to the Raspberry Pi USB port so I can connect a flash drive, additional controllers, etc. The other USB port connects to the Teensy, allowing me to reprogram it if I want to change the lighting without having to open the box. Two vents on the side allow airflow, and look pretty cool with the lights active. The exterior microSD card slot is connected to the Pi via a microSD card extender cable.

The label decals over the ports were created using a Cricut crafting machine. Previous versions of the box had gaming artwork on the cover and sides, but for the final version I really liked the plain black look with the glow of the buttons.

The buttons are clear arcade buttons from Adafruit. They felt a bit spongy to me, so I added an additional spring to each one which gives them a nice solid feel. And since I was using clear buttons, I added a strip of 6 Neopixels around each button to add lighting effects. Since every led is individually addressable and RGB, I can create many different lighting effects on each individual button, including multiple colors on one. Currently, the buttons light up according to the system being emulated – only two buttons lit up for NES, all six for SNES (colored to match the original controller), one for Daphne, etc. This was done by writing a small python script to read the active system and pass the info to the Teensy using a custom 3-channel 1-bit interface (which I have designated “DragonSpeech” because, why not?). The joystick also lights up thanks to a mini Neopixel inside a hollow shaft and ball from www.paradisearcadeshop.com. There are also a couple of other random lighting effects that occur while the system is powered up but no game is being played.

The buttons are great for arcade games, but I also have a PlayStation 3 controller that is connected via Bluetooth and a USB gamepad to play console games. There is a small dongle plugged into the Pi so I can use a wireless keyboard and mouse, which allows me to play DOS games and work with the terminal without opening up the box or occupying the one external USB port. The USB port is really handy for plugging in a flash drive and transferring files, or plugging in an extra USB controller.

I used a ribbon cable and rectangular connectors to make the connection to everything on the cover so it’s easily removable. It’s much easier to make changes and fixes with the cover detached. The arcade stick and all external buttons were set up directly through the Pi’s GPIO using Adafruit’s excellent Pocket PiGRRL tutorial. There’s also additional wires from each button to the Teensy, which monitors them as interrupts and flashes each button white as it is pressed.

This is the box with the cover removed. The wiring is pretty messy, but space is tight and I’ll get back to clean it up eventually. ☺

A lot of things in this build are overkill and there are much less expensive RetroPie gaming machines that can be built, but it was also a learning experience. I had a lot of fun adding components and figuring out how to make everything work together.

About this author

Image of Jerry Sturre

Jerry Sturre, Supervisor - Applications Engineering at DigiKey, works with his team to assist customers to find better ways to utilize new technology and parts to complete their projects. He joined DigiKey in 2001 and moved to the Applications Engineering department in 2014. Jerry earned his Associate in Applied Science degree in Electronics Technology from Northland Community and Technical College. An avid tinkerer and gamer, he spends much of his free time with either a soldering iron or game controller in his hands.

More posts by Jerry Sturre
 TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum