Portable Arcade and Media Player
by FrankA2 in Circuits > Gadgets
16533 Views, 304 Favorites, 0 Comments
Portable Arcade and Media Player
This project started after I made a full size retro arcade cabinet powered by a raspberry pi. The full size cabinet was great for a basement but I wanted to make a portable version with a few cool features:
- 2 Player with cordless (ended up using Bluetooth) arcade style joysticks.
- Support for both game emulation and media player features (play games or watch movies).
- Support for a "built-in" LCD as well as plugging in to a TV.
- Remote control for navigation.
I also wanted to do this relatively cheap so I've used a few things I had from the previous build as well as some things I had laying around including an old laptop, a rarely used humidor (yes, a humidor) and a random box I got with Mets logo on it (no clue where it came from).
The basic setup is this:
- The "main" box (from the Mets box) has in it a Raspberry pi loaded with 2 operating systems - a PiPlay image for arcade games and a RaspBMC for watching movies.
- Also in the box is a hard drive I removed from my old laptop and a USB hub for powering the RPi and the hard drive.
- The box has external ports for HDMI and a female DC power input (more on this later).
- The "big box" (the humidor) has the laptop's LCD screen mounted to the inside as well as an LCD controller board. It also has ample space so that the main box can fit inside it.
- (2) Bluetooth enabled joystick boxes with 4 arcade buttons, a joystick and some extra buttons for navigation.
- These are very much based on this Adafruit project.
The nice part about this setup is that when I plan on using another TV I just need the smaller box, when I want to use the LCD I need the bigger box but the small box is in it. In both setups I only need 1 power source (see the power section for more info).
Materials Needed
This is a list of some of the materials I needed to purchase or rummage for:
- Raspberry Pi B+
- 8 GB SD Card
- USB Bluetooth Dongle
- USB Wifi Adapter
- SATA Hard Drive Adapter
- 4 Port Powered USB Hub (I got the amazon one - 5v/2.5A)
- SATA Hard Drive (I used one from an old laptop)
- LCD Screen (I took apart the screen from an old laptop)
- LCD Controller (Contact vendors on ebay, give them your LCD model and they'll help get you the right controller)
- Small box
- Bigger box (big enough to mount your LCD in the inside and fit the smaller box and LCD controller)
- About 5 DC power connectors both male and female.
- A 12V / 5A power DC power supply
- A set of arcade buttons and joysticks - I got a set of Happ off ebay pretty cheap.
- A few extra buttons (I bought these from AdaFruit)
- 2 Joystick boxes - I used the "Walnut Hollow Unfinished Wood Box, Roomy" from Amazon
- 2 EzKey bluetooth modules from Adafruit.
- 2 battery packs
- Lots of connector wires (you can use all different types, I mixed and matched based on what I had
- 2 5V/3A UBECs (got them off amazon)
Tools
Here are some tools I used to complete this build:
- Soldering iron / solder
- Screwgun / drill
- 1 1/8th inch drill bit
- 5/8 inch drill bit
- Assorted files
- Oil based paint
- Sandpaper
Disassembling an Old Laptop
To save some money (and make the project a little more interesting) I utilized an old laptop's hard drive and LCD screen. Each laptop is different and I recommend searching for your specific brand and how to take it apart. When complete I had an LCD and a SATA hard drive. Once the LCD was out I looked for the model number. To find an appropriate LCD controller you should look on ebay for a reputable (good rating) seller and contact them with your LCD model number. Remember most of these come from China so plan on waiting a few weeks for shipping. The picture above shows what my LCD controller looked like.
Raspberry Pi Setup
I'm not going to go into too much detail in this section but here are the highlights.
- I used BerryBoot so that I could dual boot my Pi.
- One OS image utilized the PiPlay OS image
- The other image used RaspBMC
You can find lots of tutorials on setting up each. While setting up I recommend directly connecting a USB keyboard and a regular monitor until you get everything work. Load your ROMS and watch a movie with XBMC. Get everything working with a regular keyboard and monitor before starting anything more advanced.
You will also need to connect a USB WiFi and Bluetooth Dongle to the Pi.
While setting up the XBMC you will also want to connect your external hard drive. The external drive will need more power than the RPi can provide so we use a powered 4 port USB hub. The power will be provided to the USB hub, out of the hub a regular microUSB cord will be used to power your RPi and a special SATA cable will connect from the hub to BOTH the hard drive and the pi. Basically the hub powers the hard drive and the data is transferred from the SATA connection to the Pi.
I also purchased this remote, it works wireless and makes it easy to control basic functions of the Pi, most importantly picking your OS from the BerryBoot screen - highly recommended.
Main Box Connections
For my main or "small" box I wanted to have 2 external connections, power and HDMI, everything else would be contained within the box. I used this old box I found in my closet you need something big enough to fit your components and have room for the connections, especially the HDMI ones as they need a good amount of clearance.
In the box is the raspberry pi with its wifi/BT dongles. The 4 port powered hub and the hard drive. All of the connections were pretty straight forward as seen in the picture.
The first exception was the HDMI cable where I used a mountable HDMI male to female connector. I mounted the female side on the top of the box so it would be simple to connect to a TV as well as to the LCD when the small box goes in the big box.
Next was power. This was a little more complicated, after some trial and error what I did was I used a DC female connector - from there i split it so that it fed two seperate UBECs which basically dropped the voltage from 12V to 5V. Coming out of one UBEC I connected the power to the Raspberry Pi via GPIO pins and the other ubec connected to the male side of the power adapter needed for the hub. I tried this with just one UBEC but was getting under-voltage warnings from the Pi.
When this step was done I could connect the box to power and TV from the two connections.
Joysticks
There are 3 high-level steps for creating each joystick:
- Setup the Bluetooth adapter (EzKey)
- 'Build' the box
- Final Connections
Setup Bluetooth
You can either connect the adapter to a PCB or directly use the pins provided. I did both but I'll focus on the latter (non-PCB) approach. To start setup the provided pins on the board and solder the pins from the underside. Next you need to connect some power to the adapter so we can pair it and test it out. Connect the red wire coming from the battery pack to the Vin terminal on adapter and the black wire to the G terminal. The adapter's LED should start flashing.
Next, I paired the adapter with my home PC so I could remap the keys. You have the ability to map the key associated with each of the numbered pins (0-11) on the ezkey. I chose to map the keys using the key mappings I used on my home arcade, which were based on this diagram . For more information on pairing and mapping keys see this excellent guide.
After mapping the keys I then paired the adapter to the Raspberry Pi also using the details from the guide linked above. After pairing I could test the bluetooth adapter but creating a short between one of the mapped pins and ground.
Build the Box
In prepping the box the first thing to do is layout where you want your buttons and joystick. You need to plan for where the button controls will be attached inside the box so that you leave enough room for connections. I ended up going with 4 game buttons, as well as a start and select/coin button. I also used an extra button for "escape" just on the player one control. Each box also had a latching button to control the power. I used cheaper Happ buttons and joysticks for most buttons and a few smaller Adafruit buttons for things like escape and the power button. The Happ buttons are a lot bigger and more of a headache fitting inside the small box - I'd probably recommend going with more of the smaller Adafruit buttons.
For the Happ buttons I drilled 1 1/8" holes, the Adafruit buttons used 5/8" buttons. You can see in the picture how I arranged the buttons, but any arrangement that fits should work.
I then painted the boxes with an oil based primer and black paint that I had around. Definitely an optional step but I think it came out better. After 2 coats, some sanding and time for drying it was now time to place all the buttons in the box and tighten them into place.
Final Connections
With the box built the last step was to connect all the wires. I used some quick disconnect wires and a female pin connector to connect the buttons to the Ez-Key. I created two ground loops one for the right side buttons and one for left (buttons and joystick). Each button maps to a pin on the Ez0Jet which in turn maps to a key press (as defined in the Setup Bluetooth section).
I also added a latching button to the power supply so that it's easy to turn the joystick on and off.
The Big Box
So the "Big Box" basically serves as way to utilize an old Laptop LCD and house the smaller box. The big box itself was a rarely used humidor I had laying around I wanted something that I could fit the LCD on and the small box in. The LCD fit almost perfectly into the lid, I just needed to do some minor filing to have it fit in.
To get the LCD to connect to the Pi you need an LCD controller which will take in HDMI and then have a connector to your LCD. Your best bet to getting the controller is to contact a vendor with high ratings on Ebay (Search LCD Controller Board). Tell them the model of your LCD and they will help you out. I found 2 vendors that were both very helpful. Remember these are coming from China and will take a few weeks to arrive.
All of the boards I saw required 12V power. So I used another female DC adapter that would be the power input for the big box, that then fed 2 male connectors. One went to the LCD board and the other could be used as input to the 'small box' (remember the small box had two UBECs so it could take in 12V and convert it down to 5 safely).
The rest was just some mounting of the board and LCD using some spare screws. This part was relatively easy.
Enjoy!
When it was all said and done I had both a media player and arcade that could operate in two modes. In the big box mode everything is self contained and all you need is power from the power adapter. This is great for traveling to some place that may not have a TV with HDMI.
The second mode just request the smaller box and makes it easy to plug in ANY HDMI TV and allow you to use your wireless joysticks to play games or watch a movie. Can't wait to take it with me on my next trip.