Introduction: PIXELCADE - Mini Bartop Arcade With Integrated PIXEL LED Display
**** Improved Version with Integrated LED Marquee Here ****
A bartop arcade build with the unique feature of an integrated LED display that matches the selected game. The character art on the cabinet sides are laser cut inlays and not stickers.
A huge thanks to Tobias for posting the original laser cut CAD design for this project. This project leverages the design from Tobias with the following modifications:
- An integrated PIXE: LED ART display that changes with the selected RetroPie game
- Laser cut side art inlays
- Audio amp with volume control knob
- Shutdown/Restart Button
- Acrylic vs. Wood
Note that the instructions from Tobias are very clear on how to assemble the case so refer to his Instructable when in doubt.
All laser cut .SVG files, software scripts, LED GIF images and animations, wiring table, and artwork for this project are here in GitHub.
Parts
1x momentary panel mount push button (.62" mounting hole)
(2) 12mm Dome Pushbutton - Red - E-Switch PV5S64019
(1) 12mm Dome Pushbutton Green - E-Switch PV5S64018
(2) 12mm Dome Pushbutton Yellow - E-Switch PV5S64016
(1) 12mm Dome Pushbutton White - E-Switch PV5S64012
(1) 12mm Dome Pushbutton Black - E-Switch PV5S64011
1x 2.1mm Panel Mount DC Jack (.33" mounting hole)
1x Rocker On/Off Panel Mount Switches (you'll need 2 but the PIXEL:Maker's Kit comes with 1)
1x microSD card (128 GB is a good size for this project)
1x Official Raspberry Pi Monitor
1x 32x32 P4 Pitch LED Matrix 5" x 5" - Adafruit or other sources
2x Mini Oval Speakers 35mm x 20mm
1x Stereo audio cable (right angle is better but normal will fit and is ok too)
6x Super Bright 5mm White LEDs (for back lighting the marquee)
1x microUSB jack (use an old microUSB cable and chop off the large USB side)
1x Mr. Clean Magic Eraser Sponge
Screws, Nuts, Stand-Offs
8x 4/40 x 3/16" pan head screws (for maintenance ports)
2x 4/40 x 7/16" pan head screws ?
4x M3 screws x 5mm (for joystick mounts)
4x M3 square hex nuts (for joystick mounts)
8x 2/56 x 1/2" pan head screws black (for speakers)
8x 2/25 nuts (for speakers)
(2) Hex Stand-Off Aluminum, 1/4" Hex, 1-1/8" Long, 4-40 Thread
(4) Hex Stand-Off Aluminum, 1/4" Hex, 5/8" Long, 4-40 Thread
4x rubber bumper pads for the bottom
Acrylic & Glue
4x 12x20" Black Acrylic Sheet , 1/8" thick
4x 12x20" Red Acrylic Sheet , 1/8" thick
1x 12x20" White Acrylic Sheet - 1/16" thick
1x 12x12 Translucent Smoke Acrylic Sheet, 1/8" thick (optional LED matrix diffuser)
1x 12x12 Clear Acrylic Sheet, 1/8" thick
Misc colored sheets depending on desired arcade character inlays (optional)
Acrylic Cement Glue
Acrylic Cement for Capillary Application
Low Density Polyethylene Bottle Applicator
Optional
Kaptop tape (for securing the cables to the Pi header)
1x USB Audio Adapter (this is not really needed, while the Pi audio is known to be poor, I can't really tell the difference with this one)
Dupont Female Pin Crimp Terminals 2.54mm Pitch (for making your own cables with DuPont connectors that plug into the Raspberry Pi GPIO 40-pin header but you can also just use off the shelf cables and splice them which is cheaper
Tools
Laser Cutter (I used a Glowforge with a 19.5" x 11 cutting area)
4/40 Tap Tool (for tapping eight 4/40 holes for the maintenance ports)
Step 1: Measure Before Laser Cutting!
VERY IMPORTANT: Before you laser cut the acrylic for this project, be sure and have all parts on hands first and measure to ensure they fit the mounting holes in the laser .SVG files. Here are items in particular to check and adjust. If you don't do this, you'll end up having to scrap and re-cut a lot of acrylic.
1. 32x32 P4 HUB75 LED Matrix - The one used in this project I bought direct from China, not from Adafruit and different LED panel manufacturers have different mounting hole locations.
2. Speakers - I did not use the speakers in the link and instead had some lying around my shop. The ones in the link I think are close but am not sure the mounting holes will line up exactly.
3. Buttons - You'll be fine on the 30mm arcade button holes but do check the 7 push button mounting holes vs. your buttons. The push button mounting hole on the back is larger than the 6 push button holes on the front.
I used a Glowforge laser cutter and all the .SVG laser cut files are sized for the cut size of the Glowforge at 19.5" x 11".
Step 2: Inking the Engraved Acrylic
Laser cut and engrave "Red 2 - Back Side and Front Panel Push Buttons.svg". Note the lines in the front panel are laser scored and the text laser engraved.
Leave the acrylic masking tape on and brush paint India ink generously. Let the India ink dry for a couple of hours or longer.
Once dry, remove the acrylic masking tape and you'll be left with some residue to be removed. Take some strong duct tape like Gorilla duct tape and press it hard on the engraved text and then tear off. Repeat this a few times and most of the ink residue will be removed. Then use either a wet soft sponge or a Mr. Clean magic eraser sponge to take off the rest.
Step 3: Bottom and Back Sides W/ Maintenance Ports and PIXEL LED Panel Mount
Laser cut the following files:
- Black 1 - Bottom Maintenance Port.svg
- Red 1 - Back Maintenance Port and LED Matrix Mount.svg
The assembly and glueing of the maintenance ports is a little tricky, best to refer to step 3 from Tobias.
Step 4: Mounting the PIXEL Board and LED Matrix Panel
Go ahead and remove the acrylic masking tape on both sides now.
First mount the PIXEL PCB board and then mount the LED panel on the other side. Pay attention to the orientation & make sure the LED panel is facing up matching the label on the acrylic mount.
Next mount the screw in the lower right hand of the PIXEL board to the panel.
Mount the LED panel using (6) M3 x 8mm screws. Note the LED panels are threaded for M3 screws, 4/40 will not work.
It's optional but I recommend to add a diffuser panel on top using hex stand-offs. Remove the masking from the bottom side of the diffuser panel and leave the mask on the top side.
Note the hex stand-offs go on the inside holes, not the outside.
Now mount the hex nuts using four screws.
Note my hex stand-offs were not quite long enough and I had to use a few washers as spacers. See the diagram on the amount of clearance you need or the front diffuser panel will bow.
Step 5: Front Display With Monitor and Raspberry Pi
Laser cut these files:
- Black 2 - Monitor Bevel and Marquee.svg
- Black 3 - Front Screen Inside and Outside.svg
Attach the Pi monitor and Raspberry Pi. Be sure and fit the Pi monitor on the frame without the slot. This assembly step is tricky so be sure and refer to step 4 in Tobias's Instructable to get this part right.
While waiting for the first layer to dry, add screws in the speaker holes to ensure alignment.
Now is a good time to install RetroPie, the pre-built image you'll install on your Pi microSD card. At the end of the RetroPie install, you'll be prompted to configure inputs. Hook up a generic USB keyboard and use these keys:
D-PAD UP - Up Arrow
D-PAD DOWN - Down Arrow
D-PAD LEFT - Left Arrow
D-PAD RIGH - Right Arrow
Start - A
Select - S
A Button - Z
B Button - X
X Button - C
Y Button - V
Hold down any key to skip the rest of the keys until you get to Hotkey Enable
HOTKEY ENABLE - SPACE
When you get to OK press the button you have configured as the A Button which in this case is "Z"
Step 6: Arcade Control Panel With Joystick Inlays
Laser cut:
- Black 4 - Control Panel.svg
- Thin White 1 - Marquee White Liners.svg
First cut the Top and Bottom layers in "Black 4 - Control Panel.svg" and engrave the green rectangles 1mm deep (this may take a second pass).
Then using the same file, hide the "Top" and "Bottom" layers and unhide the "Inlay layer". Flip over the top cut-out as in the purple text in the picture. Engrave the arcade directional inlays 2mm or .06" deep. On my Glowforge laser cutter, this took 2 passes using the default setting for Thin 1/8" Acrylic.
You may need to file a little bit before the inlays are flush. Once flush, use acrylic cement to glue in the inlays.
Now screw in the joystick to the bottom layer with the screws and square nuts. Do a test and place the top layer on top of the bottom layer and ensure you've engraved deep enough such that the two layers are flush. Then use acrylic cement to glue the two layers together and clamp.
The Sanwa joystick I got was default configured for 8-way. My interest is 80s arcade games which are mostly played with a 4-way joystick. So this is a good time to change from 8-way to 4-way which is easily done by moving a template piece on the bottom of the joystick, this video explains how to switch from 8-way to 4-way and vice-versa. Using the bottom maintenance port of the arcade machine, you can change back and forth later after everything is installed but space is limited and it'll be much easier to do that now.
Use your the continuity tester on your multimeter and then label each wire on the Joystick (up, down, left, right).
Step 7: LED Light Bar for Marquee Backlight
Black 1 - Bottom Maintenance Port.svg contains the acrylic for the LED light bar so you've already printed this out.
Wire up the 6 220 ohm resistors and 6 super bright white LEDs according to the schematic. The long end of the LEDs should go towards the resistor and +5V and the short end towards GND.
Step 8: Wiring
Refer to the wiring diagram schematics and make the power cable which will consist of a female DC jack which will then 4 way split to the Pi (microUSB connector), PIXEL:LED ART Board (right angle DC barrel jack connector), audio mini amp (hook-up wire), and LED light bar (hook-up wire). Find an old microUSB cable and cut off the large USB connector end and splice and solder to this power cable for the connection to the Pi.
Put together a wiring table that maps each joystick direction and button to the corresponding pin on the Pi and assigned keyboard key. If you map to the same keys I did, then you can use the config files in the next steps out of the box.
You'll need female DuPont cables to connect to the 40-pin GPIO header on the Pi. I ended up making my own cables which was pretty fun but also a lot of work and you'll also need a crimper and the female DuPont terminals. It'll be faster and cheaper to just use stock female to female DuPont cables that you probably already having lying around and splice/solder them. If you do end up making your own DuPont cables, it turns out they are not easy to make, I found this YouTube video tutorial very helpful and was able to make them with ease after that.
Make the cables for the buttons and joystick and don't connect to the Pi yet. You'll connect to the Pi in the next step. In general, each cable should be ~13 inches long, that will be long enough to reach the Pi when mounted. If you can, use a different color for each cable (use black for all GND) or label each cable which will make things easier in the next step.
Step 9: Putting It All Together!
Now comes the fun part where you put everything together! But first mount all 6 buttons on the front red panel, the 4 arcade button and the joystick on the black control panel, and the power jack, toggle switches, and audio amp on the back panel. You won't be able to mount the buttons and joystick after the case is together due to lack of elbow room.
Follow the pictures to assemble things together but do not glue anything yet and instead use some blue painter's tape to keep things together for now. Once you get to the picture labelled "After you get here, connect wires to the GPIO Pi Header", then start to connect the wires to the pins on the Pi header.
Follow the table you put together in the previous step to connect each wire to the Pi header. It will be very cramped and not so easy to connect the pins to the Pi header so have patience.
Once you have everything connected, power the system up and do a full test that includes testing the joystick and every button. To test, we'll need to install a utility from Adafruit called Retrogame which converts the joystick and button inputs from the Pi's GPIO into keyboard inputs. By using Retrogame, you won't need a separate USB arcade keyboard emulator which is nice.
Follow these instructions from Adafruit to install Retrogame. After you've installed Retrogame, then copy this retrogame.cfg file to the /boot directory on your Pi. The retrogame.cfg file here assumes you have followed the same keyboard mappings and pin connections in the wiring table from Step 8 - Wiring. If you have used different pins or keyboard mappings, no worries, just make the corresponding changes in retrogame.cfg. Chances are you've connected a pin or two wrong so just test every input and correct.
This tutorial guides you through how to setup the combined shutdown and restart button.
Once everything is working, now you're ready to make things permanent. If you happen to have some Kapton tape, that's a nice way to secure the Pi pins ensuring they won't come loose later. Wrap some Kapton tape around the pins and Pi header. But no worries if you don't, it should still be fine.
Now turn the arcade on its side. At this point, you only have the left side installed, the right side is still open. Use your capillary action acrylic solvent applicator to glue the acrylic. Acrylic solvent works very quickly and will be sturdy in less than 5 minutes and does not need to be clamped. Here's a good primer on using acrylic solvent.
Attach the pieces for the marquee (make sure to do this before adding the right side). And then glue the 1/16" thick white pieces to the inside of the marquee also, the white makes for a better light box effect. Also attach the two hex stands for the LED light bar and mount the LED light bar. The LED bar should be facing inwards, this makes for a diffused light box effect. If the LEDs are facing front, the LEDs will not be diffused enough and you'll see LED round bright spots.
Now attach the right side and glue that using the acrylic solvent.
Lastly, use a grinder or Dremel tool to grind down the left and right sides such that they are flush (the black notches may be sticking out a little bit). You'll want to do this so the outside pieces when attached will be nice and flush.
Step 10: Marquee
I tried both a laser cut marquee and a professional printed marquee on translucent film. Best results definitely with the professional print.
For the professional print, I went with https://gameroomsolutions.com/shop/marquee-print/ , it was $25 at the time of this writing for the print and since my marquees are small, they printed 2 for $25.
Here are my marquee source files in Adobe Illustrator you can modify for your design.
http://vectorlib.free.fr/ has some arcade art in vector format which will save you a lot of time.
The dimensions for this marquee is 9.06" x 2.17". I sandwiched the printed marquee between two pieces of clear acrylic and added a little bit of acrylic glue on the edges to keep the two pieces together. The marquee is a tight fit and snaps into the case without the need to permanent glue so you can swap marquees later.
Step 11: Left and Right Outside Panels & Inlays
The arcade character inlays are optional but a pretty nice effect if you've got the time. If not using the inlays, then you could also use a service like this to print some side art stickers or just leave the sides solid red which would still be nice.
If not using the inlays, then modify Red 4 - Side Pieces Outside.svg and delete the inlay outlines. If you want personalize with your own favorite arcade characters, here's a great resource for arcade sprites. Then it's a matter of isolating each color of the sprite and then tracing in a vector program like Illustrator or Inkscape. Warning, this is a good amount of work. If you want to stick with the characters I used, use this file to laser cut each color of each character.
As you laser cut each color of each character, lay them out on a table and only glue to the arcade side once you know everything fits together right. Chances are there will be some mistakes (I made a bunch) so if you glue too soon, you'll be in trouble as the acrylic solvent is permanent.
Also VERY IMPORTANT, you don't want to use the red color for any of the inlay characters as the side panel is already red. So if your desired arcade sprite has red, then substitute another color as I did with the Dig Dug character for example changing from red to black.
Step 12: Software Scripts for the The PIXEL: LED ART Matrix Integration
Almost done! The last step is to add some scripts such that the PIXEL: LED ART display will change artwork automatically based on the selected platform or game from RetroPie. Fortunately, RetroPie includes a hook called runcommand which is a linux bash shell script (.sh) that runs prior to each game launching. So we'll add our own runcommand script that passes the current game and platform to a command line Java program (pixelc.jar) that then writes a corresponding GIF to the LED display. As your install may include many games, you can just pick the games you want to do a special LED design for and use a generic LED design for each platform. I've made custom GIFs for ~50 games and also a platform specific GIF for ~40 platforms (atari2600, nes, snes, gameboy, mame, genesis, neogeo, etc.) which you can use to get started. And if you make your own and are open to share, please do let me know (comment here or github pull request) and I'll add to the repo for others.
This script does the following:
- Checks if an LED GIF matches the selected game. If yes, write it to the LED display
- If no, then check if there is a generic LED GIF for the selected emulator (ex. mame, atari2600, nes, etc.), If yes, write that to the LED display
- If no game specific LED GIF and no emulator specific LED GIF exits, then write a generic LED GIF
- Before writing, check that the new LED GIF is not the same as is already there. If it's the same one, then no need to write again and skip to save time.
Note that after the LED GIF has been written to the PIXEL LED Board's local microSD card, the PIXEL LED Board is handling the LED Display updates and no CPU cycles are being burned by your Pi to drive the display which is a good thing as your Pi will need those CPU cycles to run RetroPie.
Installation Steps
Check if Java 8 is installed on your Pi.
java -version
If Java 8 is not installed:
sudo apt-get update
sudo apt-get install oracle-java8-jdk
First create a directory on your Pi called pixelcade.
mkdir /home/pi/pixelcade
Copy the contents here to this pixelcade folder on your Pi.
Note: You must have the Android and Pi firmware installed on your PIXEL:LED ART board which is the default, the iOS/Android firmwares will not work. Double check that the PIXEL:LED ART board is USB connected to the Pi. Also ensure that the toggle switch on the PIXEL:LED ART board is facing the USB direction and not facing the BT direction. Check that your Pi detects the PIXEL:LED ART board.
ls /dev/ttyACM0
And you should get back
/dev/ttyACM0
Copy runcommand-onstart.sh and runcommand-onend.sh to /opt/retropie/configs/all/ on your Pi and then make runcommand-onstart.sh and runcommand-onend.sh executable
sudo chmod +x /opt/retropie/configs/all/runcommand-onstart.sh
sudo chmod +x /opt/retropie/configs/all/runcommand-onend.sh
You can customize this script if you like and below is an explanation on how this script works. But note that if you follow the installation steps, you won't need to touch this script.
1. Sets the path where pixelc.jar is located. If you copied pixelc.jar in /home/pi/pixelcade, then leave this line as is
PIXELPATH="/home/pi/pixelcade/";
2. Checks that the PIXEL:LED ART board is connected. If yes, we keep going and if no, the script terminates.
if $pixelexists | grep -q '/dev/ttyACM0';
3. RetroPie passes to this script in the form variables the selected game rom and selected game platform (atari2600, nes, mame, etc.). The code snippet below will first detect the game platform and select an LED design for that specific platform. Then it will check if a specific .GIF exists matching the selected game rom name. For example, if the selected rom game is 1941.zip, the script will look for mamelibretro/1941.gif. If that GIF exists, then that will be used as the LED marquee and if it doesn't exist, the default platform GIF will be used.
if [[ $PLATFORM == "mame-libretro" ]] || [[ $PLATFORM == "mame-mame4all" ]] || [[ $PLATFORM == "arcade" ]];then
echo "Entered ${PLATFORM} If Statement" >&2 if [[ -f "$MARQUEEGIF" ]]; then GAMEIMAGE=$MARQUEEGIF
echo "File $MARQUEEGIF exists so we'll write it to the LED marquee" >&2
else
if [[ -f $MAMEDEFAULT ]]; then
GAMEIMAGE=$MAMEDEFAULT
echo "File $MARQUEEGIF DOES NOT exist, defaulting to generic LED marquee: ${GAMEIMAGE}" >&2
else
GAMEIMAGE=$MAMEDEFAULT <
echo "File $NGPCDEFAULT DOES NOT exist, defaulting to generic LED marquee: ${GAMEIMAGE}" >&2
fi
fi
fi
4. This last command in the script does the actual write to the LED display.
java -jar "/home/pi/pixelcade/pixelc.jar" --gif="/home/pi/pixel/mame-libretro/1944.gif" --64x32 --write --silent
The game (1944.gif in this example) will be passed dynamically. Remove --silent when initially setting up and troubleshooting to see the screen output.
Also note that each time a game is launched, a log file will be written to /root/dev/shm/runcommand.log which will be very helpful for troubleshooting.
So go ahead and modify per your needs and also create GIFs for your favorite games and copy them to /home/pi/pixel/%platform-name (atari2600, mame-libretro, etc.) and then copy your version of runcommand-onstart.sh to /opt/retropie/configs/all/ . When creating your GIFs, be sure and name them the same as the rom name (ie, 1941.gif , 1941j.gif etc.) and note you'll make copies for game that have multiple rom versions.
For the combined restart and shutdown button on the back, here is the script for that
Since this installation is for a vertical orientated monitor, here is a nice vertical theme for RetroPie
I ported this software to Windows too, here is an example installation using the Maximus Arcade front end on Windows in a larger LED marquee installation.
Step 13: Lessons Learned
A few things I would have done different:
The PIXEL: LED Art display is nice but really would have been better as a mounted marquee on the front. I plan to do another build with a 64x32 LED matrix and then will just need to modify the laser cut design for the larger marquee.
I mainly play 80s arcade games, most of which play better on a vertically mounted monitor vs. the horizontal mount in this project.
RetroPie and MAME have lots of function buttons which I can remember what each one does since I programmed them but rightfully so, my wife and kids don't and have requested labels on all buttons for the next build.