Retrospective

The arcade machine has been completed for about four months now. I have added a few arcade games and gone through the process of pulling out the control panel and updating the Arduinos and the SD cards a few times. Every time, something went wrong. A wire breaking, an Arduino not taking the sketch, and so on.

So this post is about things I learned and things I would do differently.

Cabinet

For the cabinet assembly, there are a couple of things. The first is that I would use a table saw for my straight cuts (e.g., the back, front, top and bottom panels). Whenever possible, I would also use the table saw for the mitered cuts, like the ones below the control panel. Secondly, I would make the dado cuts a little wider. I used 3/4” MDF and made 3/4” dado cuts. The pieces fit very snugly into the cuts. In fact, they fit so snugly that I had some issues when I was gluing it all together. So I would probably make 7/8” dado cuts for 3/4” MDF.

Electronics

On the electronics side, the biggest issue is the difficulty in updating the images for the button labels. Some things I would do differently there:

  • Drive the Arduino inputs directly with the GPIO on the Pi rather than going through a relay bank. I used the relays because I was not sure whether the Pi could handle the load, but the inputs are high impedance, and I could still power the Arduinos and displays in parallel with the Pi. I love the click of the relays, though!
  • For the connections to the main board, use snap connectors such as Molex instead of connectors with screws or soldering wires (especially solid-core wires) directly to the board
  • Use a low-assert relay for the peripherals
  • Use a GPIO ribbon cable instead of DuPont wires to connect the Pi to the main board. This would also mean soldering a connector to the main board for the ribbon cable, and connecting the peripheral relay to the main board instead of to the Pi (with another snap connector)

I would say that I would choose a more convenient place to store the button label images, but I have yet to find a display that small that can load images from a different source.

Of course, I have no intention of ever building another arcade machine. I’m glad I built this one, and I love it. The effort required to make another one would not be worth it when I already have one. So this post is, as I said, just reflection.

I will make a “Look at the cool thing that’s all finished” post soon (I think) with cool photos and videos of the finished product.

Final piece: polycarbonate shield in front of the TV

Back when I was making dado cuts in the profiles, I made a cut in each one to hold a piece of clear, scratch-resistant piece of polycarbonate to protect the TV. When I went to put the polycarbonate in place, I saw that it was too thick for the notches I had cut.

I tried beveling the edges, hoping that would be enough to get it to fit.

That helped, but it wasn’t enough. I used a curved rasp to widen the notches, because a flat rasp wouldn’t fit.

Once I had removed enough material for the polycarbonate to fit, I cleaned it up with a vacuum and repainted the notches. To get all the dust off of the TV screen and the polycarbonate, I used Brillianize, which worked amazingly well.

As a final touch, I painted a small piece of trim and nailed it along the bottom of the polycarbonate to help keep it in place.

An Enhancement (because of course)

Once the arcade was together and operational, it started to bother me that there were no labels on the buttons for navigating EmulationStation and selecting games. There are menu options at the bottom of the screen that EmulationStation put there to be helpful, but it is not obvious in my case which button is meant.

Adding labels for this case would be a little bit of work because the current operation is to have the screens turned on when a game is running, and off when a game is not running.

First, I needed a number to use to indicate to the Arduinos that the “no game” image should be displayed. Since I have to add this to an array on the Arduino, I just picked the next available number, which was 91. I didn’t need to update /opt/retropie/configs/all/buttons.cfg since I don’t need to look up the number based on the game. It will always be 91. But I updated the file anyway, just to prevent myself from re-using 91 at some point in the future. And it looks better if I add more games later, which I have actually done here.

Of course, I needed to also update the Arduino code by extending the array of filenames.

Next, I had to create the images. I wanted them to look similar to what is displayed by EmulationStation, so I found a similar font and used the same colors.

I didn’t want to change the Arduino code to be able to change images while it’s running, so I had to make sure to turn them off first each time I want to change the image. Here is a comparison between the current behavior and the behavior I wanted:

Current Behavior

  • On game launch: turn on displays with selected game
  • On game exit: turn off displays

Desired Behavior

  • On system boot: turn on displays with ES images
  • On game launch: turn off displays and turn them back on with selected game
  • On game exit: turn off displays and turn them back on with ES images

I started with the reset that happens when a game exits. Recall that in /opt/retropie/configs/all there is a file called runcommand-onend.sh. This script is executed when any game is exited. I have this script call /home/pi/bin/resetButtons.sh the resetButtons.sh script in turn calls a python script called resetButtons.py. This python script simply turned off all the relays, powering down the displays. I updated resetButtons.sh to include loading the ES images after waiting one second once the displays are shut off.

#!/bin/bash
python /home/pi/bin/resetButtons.py
sleep 1
# Set pins to 91 (see /opt/retropie/configs/all/buttons.cfg)
binaryNumber=`echo "obase=2;91" | bc`
python /home/pi/bin/setButtons.py $binaryNumber

I also added a call to this script to /opt/retropie/configs/all/autostart.sh, so we have taken care of two of the items in the list of desired behavior: the startup and game exit. Now we just need to turn off the displays before setting the pins to load the game images. I did this by adding a call to /home/pi/bin/resetButtons.py to /home/pi/bin/loadButtons.sh (along with a one-second sleep). Here is the updated loadButtons.sh

#!/bin/bash
system=$1
gameline=`grep "^$system " /opt/retropie/configs/all/buttons.cfg`
echo "gameline is $gameline"
gameNumber=$(echo $gameline | cut -d ' ' -f 2-)
echo "Game number is $gameNumber"
binaryNumber=`echo "obase=2;$gameNumber" | bc`
echo "Binary Game Number is $binaryNumber"
python /home/pi/bin/resetButtons.py
sleep 1
python /home/pi/bin/setButtons.py $binaryNumber

That takes care of the third item in the desired behavior list. Next, I had to go through the long process of updating the images on the SD cards and re-flashing the Arduinos. Once it was all back together, the player-one buttons are labeled properly for EmulationStation:

This image highlights the fact that I didn’t cut out the rectangular hole for the button 2 (SELECT) LCD quite correctly. This isn’t obvious for most games, because most of the images don’t have text that close to the edge. I’m not going to open it up to correct this issue, but I will take care of it if I ever have to open it up for another reason.

Finishing touches

With the arcade machine assembled and operational, there were just a few finishing touches it needed.

The first was that I had to do something to cover the gap at the top of the control panel.

That gap is not only kind of ugly, but it allows the control panel to slide up and down. The gap is small enough to be covered by some T-mold.

But the gap is too wide to actually hold the T-mold in place. I solved this problem with some window sealer strip.

I put one strip on either side of the barb, leaving a gap where the aluminum support is. Then I stuffed the T-mold / window sealer assembly into the gap. It worked pretty well.

The next issue was the TV. The LG logo was showing, and there were gaps on the bottom and sides where you could see right in to the cabinet.

To solve this, I got a sheet of flexible plastic that had a pattern on one side. I cut out a frame and stuck it to the TV with more of those adhesive dots.

Next, I did some paint touch-ups where some paint had been scraped off during the installation of the electronics.

Now the only thing left is to add a polycarbonate sheet in front of the TV to protect it. Overall, it’s looking pretty good!

Electronics installation: power button, internal wiring, and control panel

I decided to put the power button on the top of the arcade, on the left side, near the back. The threads on the button I chose do not extend 3/4”, so I had to drill a larger hole part way up from the bottom to accommodate the nut.

The button has a normally open and a normally closed contact, so I used the continuity setting on my multimeter to determine which two contacts I needed. I bent the normally closed contact slightly to mark it.

Then I fed the wire through the nut and the hole to solder the connections. I put some shrink tubing on the wires so could cover up the connections.

Here it is installed

Next I clipped the wires to the proper length, and added the connector to plug in to the control panel.

At this point, I had all the connections needed for the control panel, so I connected them and installed the panel.

The last step for wiring was to get power into the cabinet. This required a hole for the power plug socket. This needed to be a mostly rectangular hole, so I drilled three smaller holes and used the reciprocating saw to cut out the wood between them. It didn’t turn out pretty, but it will work. I’ll put a bit of epoxy putty in the gap at the top.

Nothing that will ultimately be plugged in inside the cabinet uses the grounding pin, so I didn’t connect it. The wire I am using has red and black insulation, so I followed the RV wiring standard instead of the house wiring standard, which is that black is common and red is hot.

There will never be much stress on the outlet box inside the cabinet, so I attached it with adhesive instead of screws.

I also used them on the transformer for the amplifier.

The design required the Raspberry Pi to have constant power while the power for all other components is switched through the relay controlled by the Pi. So I put in a power brick and plugged everything but the Pi into it.

I put it up near the marquee since it also has 5V USB sockets on it. That way I could plug the marquee LEDs directly into it and not reauire a separate USB power adapter.

To make one outlet switched and one constant power, I needed to break the tab connecting the two outlets on the hot side.

Th next step was to wire up the outlet as follows:

  • Red wire coming in from wall power to the top outlet hot side
  • Black wire coming in from wall power to either outlet common side (I chose the top)
  • One wire from the relay to bottom outlet hot side
  • The other wire from the relay to the top outlet hot side

This wiring will make the top outlet constant power and the bottom outlet switched. I originally just wrapped the wires arounf the screws and rightened them, but since these are stranded wires, they spread out under the screw and it didn’t look like a good connection. So I tinned the ends with solder, and it went much better. Here is is all wired up:

I plugged everything in and tested it. The first time I loaded a game, the labels didn’t light up. I pulled the control panel out and saw that the positive wire for feeding power into the relay bank circuitry was disconnected. I reconnected it and everything worked.

So now all the components are installed and functional. There are a few final cosmetic touches and it will be done!

Electronics Installation: TV, lights, speakers and amp

The first bit of electronics I decided to install was the TV. This is the bulkiest item, and I didnt want to worry about any wires getting in the way while I installed it. The installation went pretty smoothly. I drilled a couple of holes in each end of the mounting board and slid the TV into place. Then I drove some screws into the holes.

Next was the lights for the marquee. The LED roll I bought was long enough to go across the light board three times. The light board is 8” tall, so to keep the light distribution as even as possible, I made rows at 2”, 4”, and 6”. There is enough of a gap between the light board and the speaker board that I could run the cord for the lights under the light board instead of having to drill a hole.

Since I had cut the strips apart to install them, I had to solder wires to reconnect them.

I plugged in the lights to be sure the connections were good.

Then I slid the marquee into place to see how it looked.

In this image, you can still tell that there are individual light points behind the marquee, but that is an instance of the camera pulling out detail that can’t be seen in person. Also, there is light leaking from the bottom because the speaker board is not in place.

Speaking of which, now that the marquee lights were installed, I could install the speakers. First, I used the speakers as templates to mark and drill pilot holes for the screws, and then I installed the speakers and grills.

The most challenging part of installing the speaker board was getting the marquee into the slot. The version of marquee that I ordered from GameOnGrafix was a printed piece in between two thin sheets of plexiglass. But the notches I cut were not wide enough for both pieces of plexiglass, so I decided to forego the one behind the marquee. As a consequence, the printed material kept sliding up instead of going into the groove. I used several pieces of scotch tape to keep the printed material up against the plexiglass, making sure that the tape would not extend above the groove.

Another challenge was that the T-mold on the profiles overhangs the edge slightly, so the speaker board kept getting caught on it. I used an artist knife to trim the sections of T-mold that were in the way.

At one point I dropped the speaker board and it snapped off the bracket for the amplifier. I used hot glue to fix it and it seems to be holding. If the glue fails, I’ll have another bracket printed.

To keep the amplifier from sliding out, I bought some rubber adhesive feet, similar to the ones that I removed from the amplifier so I could slide it into the bracket. I slid the amp into the bracket and then stuck on the feet.

Here is the amp with everything plugged in:

And here is how the cabinet is looking so far:

Finally ready for the electronics!

Once the cabinet was primed and the middle section was painted, it was ready for the decals and the T-mold. I installed the T-mold on the

I didn’t take any photos or video of the decal installation process, so I’ll just share the video that I followed here:

When I was laying out the first decal I realized that I should have made it a little taller, as it didn’t go all the way to the top corner. I slid it up a little, and used some black paint to cover the parts it missed.

The second side was not as bad, and I kept the decal even with the bottom, so I only had to paint a little at the top. The paint matched the black in the decal really well, so it looks really good now.

For anyone who hasn’t read this entire blog, the image in the design is a reference to this poster:

Screenshot

Speaker Board

The board that holds the speakers actually serves a few purposes – holding the speakers of course, but also supporting the bottom of the marquee and giving the top part of the cabinet a finished look.

Because this piece will be attached after the cabinet is painted and the marquee backlights are installed, it will be screwed in rather than glued in. I decided to make it removable by using machine screw inserts.

First I held the piece in place with some duct tape and drilled pilot holes through the speaker board and into the mounting pieces so that the alignment would be correct.

I had planned to do two bolts on each side, but the profile pieces blocked my drill. Turns out that one bolt per side holds it pretty solidly. I used a countersink bit so the bolts could be flush.

Next I had to make sure the marquee would fit, and cut a notch in the top of the speaker board to support the bottom of the marquee. Unfortunately when I had assembled the cabinet, the left side of the roof slipped back a little and the notches in the roof and profile didn’t line up.

I used a utility knife to cut the notch in the roof a little wider in the front so at least the front of that groove would line up with the one in the profile. I had a little adjustment to do on the right side as well.

I also used a keyhole saw to extend the notches on the profile all the way down, so there would be room to insert the marquee and then slide it into the notch in the roof.

I held up one of the pieces of plexiglass to see how much to cut off. I didn’t need to be completely precise since there is a bit of wiggle room in the notches.

I trimmed it by scoring and snapping the edge off with a pair of pliers.

Then I used the trimmed plexiglass as a template to trim the marquee. I centered it so I could trim the same amount off each side.

The last step for the marquee was to cut a groove in the speaker board. With the speaker board installed, I marked where the side grooves line up. I also traced the inside top of the speaker board so I could be sure that the speaker holes would not interfere with the light board or the mounting boards on the sides.

Since there was already a pretty deep groove for the T-mold on the front of the speaker board, I had to make sure the notch for the marquee wasn’t too deep. I once again used the angle base for the router to get the 10-degree angle I needed.

I marked out the centers for the speaker holes and drilled them with a 4” hole saw.

The groove lines up pretty well with the grooves in the profile.

Here are some photos showing the fit of the marquee and the speaker holes.