Thursday, 16 July 2015

Tabletop Arcade Machine


 *The information found in my blogs is provided for free; I do want people to use the information and reproduce or expand on my projects. If you produce a blog or publish work using the information found here and are using elements that are unique to my designs, I simply ask that you link back to my blogs and videos and credit the resource as a courtesy to myself and others who take the time to add to the online electronics hobby community. 
 
While trying to decide on a project for a capstone project, I thought it would be fun to build an arcade machine; No one was on board, so we instead built a home automation/monitoring system (boring). Link to Home Automation Project

Moving along... I decided that I still wanted a machine anyway, so it might not be as polished as it
would have been if I made it as a capstone project, but it definitely has all the components needed for a good time! My only partner for this home project was my son Max.

The system is based around the popular Raspberry Pi model B computer (Check the link if you don't know about this computer), running the RetroPie software, which is available free (or donation) which boots your machine directly into a menu which allows you to select your emulator.

The first thing I did was acquire a monitor, which I actually picked up at a college asset sale in October (8 months ago). It was only $5 for a 17" monitor, and I don't think the aspect is quite 4:3, but it is close, which makes it more suitable for emulating older consoles. If you were to use a modern 16:9 screen, you would either have black bars on the left and right sides, or you would be stretching the image. Cocktail games are actually meant to be run on a monitor flipped 90 degrees, so the black space on the sides with a 16:9 monitor with cocktail games would be very large! If I build another machine, I will either hunt down a suitable CRT monitor, or another "square" monitor. The only issue with a VGA monitor on the Pi is that the Pi has an HDMI port, which I handled by using an HDMI to VGA adapter from eBay, which worked out just fine! Expect to pay less than $5 bucks, and make sure it actually has the support circuitry, and isn't just a "dumb" adapter.

The next component to worry about was the joystick and buttons. I dug around on eBay, and it looked like my best bet was to buy a kit. It's hard to link to auctions that end, but here's a try: joystick I bought
 This is a  picture of the kit if you wish to find the auction or buy one similar. The seller was fair, and I did receive it in a timely manner. I was however unimpressed with the buttons. The final arcade machine has the board with the controls screwed in, so I can remove it later, as I may yet swap them out. They do seem to do the trick and haven't given me much trouble, but they are a non-standard size; I didn't have a hole-saw the proper size, so the fit wasn't great. I did do an unboxing video for this set on YouTube. I was pretty upset in the video, but it worked out, the seller was fine, and the USB joystick adapter board did work fine with Mame/RaspberryPi, so if you're on a budget, you may still consider this set as an option.

 


The next step in the project wasn't mandatory, but it did simplify the project. I took the monitor apart so that I could remove it from the stand and enclosure, and also so I could try to steal power for the Raspberry Pi from it. I made the assumption that the circuitry and buttons on the monitor were being powered by a 5V supply line, and I was curious to see if I could tap into that.
I moved ahead and took the monitor apart and attached a cut-off MicroUSB cable to a 5V power line inside the monitor's guts and I was successful at powering the Pi. The only draw back to this is that I don't know what the max current output of the monitors 5V rail is, so this may fail in the future, or be unable to supply a Raspberry Pi 2 down the road; for now, I'll take it! The 5V rail is also used to power the audio system. The bonus of this technique is that I can simply plug the power cord into the monitor to power the entire project!



I had to decide on dimensions for the cabinet now, and the only thing I really knew for sure was the size of the monitor. I went into draftSight and started drawing out what I thought would work well, and I came up with this:
DWG File

To build the cabinet, I decided on a 4'x4' sheet of 1/2" MDF, as it was only $20 at Home Depot and the texture is preferable to plywood. Cutting and painting was the most time-consuming aspect of the project. Here is the video we made of us cutting out the parts using a table-saw and a jig-saw.
 
The panels were assembled by pre-drilling holes then putting nails in. A better method would be to use a router and cut grooves in, but I made due with what I had, and it worked out just fine. If you don't drill first, you will most certainly split the wood! I also cut the bottom part of plastic off the monitor which originally held the user buttons (I simply used a back-saw).

To add sound to the project, I decided to use LM386 amplifiers attached to speakers I picked up from the surplus store. I had all the electronics parts I needed on hand, so it worked out well. You may consider using computer speakers instead, but I feel my approach made the project a little more personal.
Link to Stereo LM386 Amplifier project
(It is complex enough that I don't want to get into too much detail here). This is a video demonstration of the LM386's in a stereo configuration, mechanically joined by two  logarithmic potentiometers, and being powered off of a 5V pin from the Raspberry Pi:
It's worth noting: The Raspberry Pi has no shielding, so even if you're listening to the audio with headphones, you will notice click and popping and noise. I may in the future put a metal shield which is bonded around both the Pi and my sound board. If you look closely in my video, you will also notice that the shielding on the cable I used for speaker wire is tied to ground to help suppress it from picking up additional noise. I think I made this video before attaching some 104 (0.1uF) caps directly in front of the + and - supply to the LM386 chips, which helped a lot with knocking noise off from the Pi.

Here we have the unveiling of the arcade cabinet:

This is pretty much how it will stay until I get the new Raspberry Pi. The project was fun, and I think I enjoyed building it more than I like playing on it! You may find you need to go into the RaspPi config and overclock it to 900MHz (if you're using an original Pi, not the Pi 2), as I was having some stutters in some games, but at 900 MHz, most of the stuff I was doing ran just fine.


 There you have it, the Pi Arcade Machine. I know this project has been beat to death, and loads of
information has been done, but hopefully this info still encourages or helps someone out. This has also been one of my more popular projects (as far as social media goes), and I'm happy to add more Raspberry Pi projects to the internet! Thanks for checking this out, and I'll leave you with one last thing, my blooper reel from building the cabinet.







No comments:

Post a Comment