Scope of project: After building a Bar-Top Raspberry Pi retro gaming machine I determined that while cool I cant take it around easily as it weighs about 40 lbs and is the size of a large microwave. And while fun for the basement perhaps Arthur would want to play it in the car for the long drives back to his Moms house.
My original plan for this build was based off the Adafruit PiGRRL but I I wanted the ability to play the SNES and Genesis emulators. I figured I would just need to add a couple more buttons and it would be a peace of cake. I thought wrong.
Unlike my other projects I bought almost everything for this build. I used my 10% off coupon for being a pro member with Adafruit, I have to say their support forums are great and the benefit of being an Instructables Pro member was worth it just with the savings on that one order. I chose the the 5" non touch TFT with HDMI input however in hindsight with the finished project I would have picked a analog/composite display as the driver board and signal wires are easier to route then HDMI.
I wanted to build a Gameboy and wound up with a cyberpunk looking headrest console. But the build was fun and the end result works. I am sure Arthur is going to like playing games instead of sitting for 3 hours in the car. Ill include pictures from the failed project just to show that sometimes things don't go perfectly and that is OK.
Take a break put it aside then when you come back you may have the fresh perspective to figure out the problem that was driving you insane in the first place.
Oh and I am sure I am going to drive someone nuts as I will switch between Metric and Imperial measurements with equal aplomb. Some things are only mentioned in MM and others are only referenced in inches. I will try to keep it all in millimeters for accuracy but somethings are only sold with inch measurements here in the states.
Shall we get to building? This took me about 3 weeks of tinkering after I scrapped the first 2 handhelds, I started pretty much as soon as I finished the bartop.
*Further note* The finished console is a full raspberry pi computer. With the wireless keyboard and mouse, and the little 802.11n wireless chip. I can exit emulation station using the controller or keyboard then boot to a shell or X to join wireless networks get on the internet or code. As everything is sealed in carbon fiber and plastic the wifi is needed to load ROM's and updates.
Step 1: Materials Used and Tools Required.
- Raspberry Pi B+ -$40 https://www.adafruit.com/products/1914
- 5 Inch TFT with mini driver HDMI - $60 https://www.adafruit.com/products/1928
- Pelican 1050 dry box - $15 Amazon http://goo.gl/zL13tV This link is for a blue one
- 3W class d Amplifier. - $6.70 Amazon http://goo.gl/3GCFBW
- Velcro Velstretch strap - $$8.50 Amazon http://goo.gl/IksPzs
- 4 pack Mini SPST 0.5-Amp Momentary Switch Normally Open. - $4 4-Pack may not be needed for your build
- USB SNES controller -$10 Amazon http://goo.gl/UjzRF5
- 270 degree HDMI flat port savers $2 each Monoprice or http://goo.gl/bLfZBj
- 270 degree right angle port saver monoprice or http://goo.gl/Z5sYP2
- 1ft HDMI cable $4 https://www.adafruit.com/products/2197
- Industrial 3M foam mounting tape - $7 Autozone or $5 amazon http://goo.gl/Unw0Oe
- small 802.11n adapter $12 https://www.adafruit.com/products/814
Materials used from stock on hand
- 2 speakers from a laptop
- desolder braid
- 1mm x 300mm x 100mm woven carbon fiber sheet. -$10 Hobbyking.com
- USB power pack from my solar charged phone charger build.
- wireless keyboard and mouse
- Razor saw
- Coping saw
- Aluminum straight edge
- 2 bar clamps
- Rulers, squares, compass, protractor, divisor
- Graph Paper with 5mm spacing between lines
- .5mm mechanical pencil and .5mm black pen
- CA glue
- #11 Exacto Knife
- Digital Calipers
- Scratch Awl
- Soldering Iron
- High Temp Hot Glue Gun
Safety Equipment. N100 Face Mask or respirator suitable for Carbon Fiber particulates & Safety glasses.
This is super important. Carbon Fiber gives off extremely fine particulates when shaped with power tools.
It will trash your lungs and your eyes so protect them and make sure you clean up with a damp rag when you are done working with it.
I wore a dust mask and I was still blowing black snot the following morning. Sorry if that is a image you didn't want to think about but hey you only got 2 eyes and 2 lungs may as well protect them.
Step 2: A Plan Never Survives the First Encounter...
See that nice wood panel above in the pictures?... yeah... The finished wood case was too big for Arthur to hold. I went back to the drawing board and decided on a SNES controller for it is the right mix of button layout for all the classic systems and it was smaller then the 6 button genesis controller. Since I was going for a external controller I decided that a pelican case would be cool for the housing and would look nicer then a wooden box strapped to the headrest.
The only reason I am keeping this step in here is to show off my fancy carpentry and that i was able to reused the template and my plan for the display for the carbon fiber face plate.
As we all know a bit of forethought to the function of a handheld will make or break the device. The Gameboy and Game Gear were super comfortable to play and one could use one for hours with out any adverse effects. The PS Vita on the other hand is a torture device. I really wanted to like it but no matter what I added to the vita I still wound up with numbness and cramps.
I was going to pay homage to the Gameboy but the 5 inch TFT that I chose changed the profile from the 3.5" Pie plate. The larger screen would have made the MAMEBoy profile a bit too wide.
To make the plans of the case I went old school. I broke out the pencils pens and paper, grabbed my rulers and went to town. I will eventually get around to scanning my drawings if someone wants to make a wooden one.
Step 3: Software Side.
Since I am using the software image from my Bartop I am linking to its software configuration here. https://www.instructables.com/id/Raspberry-PiCade-B...
Using the win32diskimager I wrote my backup image from the bartop to this card so for detailed directions on how to configure the controls The steps are the same to manually assign controls or after you copy the image to the card you can edit the Retroarch config with the following mappings under input player 1
Open leafpad then open home/pi/RetroPie/configs/all/retroarch.cfg
Select+Start will exit the ROM
Select+LB will save
Select+RB will load save states
Scroll down in the retroarch.cfg to this code:
input_player1_joypad_index = 0
input_player1_b_btn = 2
input_player1_a_btn = 1
input_player1_y_btn = 3
input_player1_x_btn = 0
input_player1_l_btn = 4
input_player1_r_btn = 5
input_player1_start_btn = 9
input_player1_select_btn = 8
input_player1_l_y_plus = -1
input_player1_up_axis = -1
input_player1_l_y_minus = +1
input_player1_down_axis = +1
input_player1_l_x_minus = -0
input_player1_left_axis = -0
input_player1_l_x_plus = +0
input_player1_right_axis = +0
input_enable_hotkey_btn = 8
input_exit_emulator_btn = 9
input_enable_hotkey_btn = 8
input_save_state_btn = 4
input_enable_hotkey_btn = 8
input_load_state_btn = 5
Download your base image This is going to be about a 1GB or larger file so while it is downloading you can format and get your SD card ready for writing the image. The most current version at the time of this writing is V2.3 http://blog.petrockblock.com/retropie/retropie-dow...
The second piece of software is the SD Association card formatter utility, this will ensure that the SD card is properly formatted to the SD association standard. This may prevent possible card corruption however I don’t know for certain. My thought is that if the standards org recommends it then it is the best practice. I have had better luck with this utility then the windows format utility for SD cards. https://www.sdcard.org/downloads/formatter_4/
The last piece of software to download is the Win32DiskImager I downloaded my copy directly from source forge as they don’t seem to put any junk in their download. This utility will serve two purposes the first is to write the image to the card. And the second is to create a backup ISO once you have it configured the card to your liking. http://sourceforge.net/projects/win32diskimager/
I installed the win32diskimager using Win7 compatibility as administrator for it to work properly.
After you have written the image to your SD card insert it in your Pi and Boot it with a network connection keyboard monitor and mouse.
The software image downloaded above will boot to emulation station press F4 when it states that you do not have a input configured to drop to the terminal.
If you are using a physical network cable you can run the following in the terminal window if not startx and manually start your wireless connection then open a terminal utility.
The final steps are to Expand the file system to use the entire drive,
You will need to perform option 1 to expand the file system to use the whole card.
Then option 8 for advanced options to configure the memory split to 256.
At this time you can perform a software overclock by selecting the desired level of overclocking, however remember overclocking is at your your own risk you may void your warranty.
I cannot be held liable if you Burn your Pi.
Step 4: Carvin the Carbon
The plate that I had I was extremely lucky with. It is the remnant of a 300mm x 100mm plate. and it just so happened to be the exact width and length I needed for the Pelican case. Unfortunately with test fitting everything I had to remove the inner rubber liner from the case so I will loose my waterproofing but it will still be super durable.
For the plate to work properly I needed to cut a panel out for the viewable area of the the display. I used the sketches made for the wooden face plate to give a template for the monitor. One thing to note To safely work with the cutter and dies I used a face mask eye protection and covered the plate with blue painters tape on both sides to prevent scratches. Carbon/epoxy dust will go everywhere so make sure you have a shirt on that you don't mind getting stained.
After taping off the plate and marking my cut lines I started at the middle and worked my way to the corners using a reinforced cutoff wheel with my Dremel tool turned to its fastest RPM let the speed do the work don't force the tool. If you don't get a straight enough line you can switch over to a fine grinding wheel to even out your cuts. A light touch is the key.
After cutting the display I slowly ground the corners round to match the radius of the inside edges of my case. Lots of trial and error then when I slipped on the last corner I ground a cable pass through for the coiled charge cable and the controller cable.
I drilled 2 holes for the power switch and a as of yet unprogrammed momentary button on GPIO25
Step 5: POWAAAAA!!!
I suppose the next best step is to figure out how to power everything. The battery pack with the case and 4 cells took up just way too much space in the box. It is time to route a remote switch and give it a diet.
As I am using stripped down electronics, to prevent shorts I am wrapping exposed contacts and boards with electrical tape. It may look like crap but they will be hidden under the carbon plate.
The power pack uses a momentary switch to turn it on and off. one short press to turn it on and a long hold to turn off. I added 2 leads to a push button then soldered them on either side of the existing surface mount push button.
To cut down on the size of the batteries. I used 2 18650 Li-Ion cells salvaged from a laptop battery by desoldering the brass battery contacts and soldering the wires to the positive and negative of the control board. Then I wrapped the whole mess in electrical tape to prevent it from shorting out. If I were doing it again I would have used a purpose built circuit instead of reusing this one.
The coiled Micro USB cable is attached to the case with a bit of non conductive hot glue. The pack is mounted using a strip of double sided foam tape.
Power is supplied to the components using a "squid" Y cable. I used the cable for the display and cut it into 2 6 inch lengths. I then cut a Micro USB cable so that the Micro male end was a 6 inch dongle stripping the + and - Wires and added a 2 pin JST connector to slip over the pins on the amp. I twisted all 4 of the (red) + leads together and soldered them finishing off with some heat shrink. I then did the same with the (black) - wires.
Step 6: Shorten Up the Controller Cable.
The USB SNES controller was a bit too long as it came with a 9ft USB cable. As the console is going to be on the seat back in front of my son, a 4 ft cable is more desirable.
After removing the screws that hold the controller make note of the colors of the wires, as the replacement or shorter cable needs to be soldered to the board in the same order.
To apply tension to the wires as I touched the iron to them I used a hemostat with my pinky finger gently pulling down, while my right hand melted the solder with the iron.
After all 4 wires are removed, I cleaned up the excess solder from the holes and pads with some desoldering braid.
Now that the holes are cleaned up thread the shorter cable into place and use a bit of solder to attach the wires to the control board then reassemble the controller ensuring that all button caps and rubber membranes are in the correct position.
Step 7: Mount the Display, and Cram It All in There, and Finish It Up.
First I lined the back of each circuit board with electrical tape to insulate the contacts then affixed a pad of double stick foam tape to each board.
The display is held in place with a bead of hot glue along the edges to the carbon fiber plate. I then attached the driver board to the display with double stick tape.
The Raspberry Pi board is test fit into place routing the cables and ensuring everything will fit under the plate. The amp was located so that a pocket screwdriver can fit in the cable pass through to turn the resistor knob.
Hey it all fits. Test it out before gluing the top plate on then you are good to go.
Now that the glue is all set up, I gently coiled the controller wire and used a peace of Velcro cable tie to keep it coiled. Then I wrapped the charge cable around the controller and gently closed the lid to ensure that it would close and latch. After that I threaded a peace of elastic Velcro strap through the molded slots in the side of the pelican case and strapped it to the back of my headrest. I mounted everything into the box in such a way that the lid functions as a controller rest when it is in the car. The lid also props the display into an optimal angle if the console is used on a table top.
Thanks for making it this far. I hope you get something out of this write up. It was one of the most frustrating things I ever built due to the multiple design changes and rebuilds. If you have any questions feel free to ask them in the comments and keep on tinkering.
Step 8: Redux
Howdy y'all. Well this little update is to address an issue I experienced with prolong use. One of the nice little 18650 cells I salvaged from old laptop batteries decided to catastrophically vent. I got lucky in that nothing expensive got toasted however it was a just par for the course with this build.
So to fix the power problem I grabbed a switching battery elimination circuit for an R/C and a 2.1mm female power socket and got to tinkering again.
Parts eliminated from the main build
18650 USB power supply
18650 Li-Ion cells
3 Amp 5V UBEC $5 from hobbyking http://goo.gl/hSJbZ8
2.1mm Female panel mount power socket (had)
Alkaline Battery Holder (had)
The cool thing about the Battery elimination circuit is that it can output 3A nominal with bursts of 6A at 5Volts DC and accepts an input voltage from 5.5-23VDC so noisy auto electrical systems should not be an issue. That and I can power it using alkaline dry cells in a battery holder or my bench top power supply. Through out the process I tested continuity for correct polarity after each connection and before plugging everything into the Pi/Display
I will also show the origami used to cram all this stuff into the box.
Steps to fix the power.
- Cut the USB connector from the wiring harness.
- Strip insulation to expose inner copper strands of the wire
- Prep heat shrink
- Solder UBEC power out to wiring harness and dress the joints with heat shrink
- Solder the power in to the 2.1mm socket.
- Remove the buttons from the panel as they wont be needed anymore
- Insert Amplifier shaft through one of the 2 holes
- Insert the 2.1mm power jack into the other
Test power up and reassemble.
To cram everything back into the box.
The Pi Goes in first followed with the HDMI cable looped twice. The driver board for the display is not affixed to anything but there is a 45 degree angle folded into the white ribbon cable to relocate the HDMI port along the long axis. As the bottom of the panel on my build is the one that is tricky due to the HDMI adapters ,I fit that side first. Then gently work the cables in the rest of the way in, ensuring everything is hooked up as I go. Ensure that the controller cable is routed through the cut out. Then snap the top edge into place. Power it up again and play a game, to ensure that you have video, audio and working controls, before tack gluing the panel back into place.
There ya go. More fails corrected and hopefully this thing is done for good.