Intro: Handheld PC/Retropie Hybrid
This instructable is based on the Super Game Pi by Adafruit. While it is similar to the super game pi, my hybrid system is different than any I have seen by being primarily a raspbian pc + the option of running retropie with integrated gaming controls.
I will go through the steps for how I designed and built this unit.
The total cost was approx. $231 but I also already have a 3d printer that prints up to 10" XYZ. I saved up for quite a few months to get the parts for this project.
While it was a big investment. I feel it was worth it because it really helped develop 3d modeling skills, 3d printing design + limitations, and troubleshooting. It also got me learning to use Linux.
Step 1: Parts Sourcing
I began this project by first identifying & purchasing the required parts for building my RPi Hybrid.
The adafruit guide provided the list of everything I needed. I diverted from their list and opted for the larger 7" screen and a different type of tactile buttons. I didn't feel it was necessary to purchase a SNES controller just to destroy it.
Here is their guide if you want to look into it.
Here is a list of my order. Since adafruit spent the time to put together this project, I thought it would be fair to purchase my parts from them.
Step 2: 3D Models of Critical Components
I really didn't like the design of the Adafruit case and I wanted to make this project my own, so I believe the best way to do that is to make my own design for the case.
This is where I really got heavily invested in the 3d modeling of the project. This step was, in my opinion, the longest portion of the project.
I first had to 3d model all the critical components of the system. These models would later be used to design my housing and get an accurate layout of the insides of the system.
Step 3: 3D Model of Housing and Layout.
Because I had modeled the components for the system. I was able to create a housing and combine everything into an assembly in Solidworks to check the fit, layout and clearances of the components and the form factor of the housing itself.
Designing the housing was the longest part of the whole project for me because I am a bit picky in my designs. I went through 5 revisions before I found a design I found visually appealing and functional.
Step 4: 3D Printing
Once my housing model was completed. I went to convert it into g-code and 3d print it.
The front half took about 24hrs to print ( I reduced the speed to around 40% to minimize the chance of failures). The back half was actually not designed at this time because it was not critical to have it yet, but Ill include it in this step. It took around 14hrs at 60% speed.
Some of these pictures were not taken chronologically because as I said earlier, I technically had not finish the back half of my housing at this time.
Step 5: Wiring / Mounting
Once the housing was finished, I went to begin procedures for mounting and wiring the components.
The first step was to tap all the holes that were going to be used for mounting. I had to buy a tap and tap holder which added an extra $15 on top of the parts. I went with #4-40 machine screws mainly because they were the smallest I was able to find at ACE Hardware. The screws in total ended up adding around $4 to the total.
Once the holes were tapped, I began mounting the components to their respective places on the housing + board.
The boards were set in place, I routed and measured the wires, removed the boards, soldered the connections and secured the boards to their new home. I also did test power ups during the procedure.
The speakers, screen, and tactile buttons were the only components I hot glued, everything else was fastened with #4-40 screws.
The Adafruit guide for wiring the Super game pi was helpful in determining which wires connect to which boards. I would recommend following that section to get the correct wiring.
I did feel their guide to be a bit out of order so I didn't actually follow it systematically. I simply went to the sections that applied to my situation at the time.
Step 6: Wiring / Mounting
Once the wires were measured, cut, test fit, and routed, I was able to mount the PCBs and begin making my mounts permanent.
The speakers, screen, and tactile buttons were hot glued, and the PCBs were fastened with screws.
The HDMI cable was a bit too wide for my design so I had to trim the outer sheathing a little bit to get a good fit.
The rest of the wiring was pretty straight forward using the Adafruit guide section for wiring.
For the battery, I was able to keep it from shifting by adding small amounts of weather stripping to the battery retainer. It worked perfectly.
Step 7: Installing Raspbian Jessie and Retropie
Once everything was wired and ready to go, I felt it was time to install Raspbian and Retropie.
I installed Raspbian Jessie using an .IMG file and win32diskimager. I formatted my memory card and flashed the OS onto it. The operation was pretty straight forward.
After the OS was flashed onto the memory card, I had to modify the config.txt file in order to display the image on the 7" screen. I added these to the bottom of the config.txt file
This info was on the adafruit guide.
hdmi_cvt 800 480 60 6 0 0 0
A copy of my config.txt file is attached
I then proceeded to install the SD card into the RPi.
Step 8: Closing Up the Case and Power Up
After finishing up my wiring, I closed up the case with two screws and prepared for power up. If all the connections were correct, It should power up and the screen should turn on.
My first attempt failed.
Step 9: Troubleshooting
Problem #1 - The unit was not powering up.
Solution#1 - Because i was powering the RPi using GPIO, that is where i started. The GPIO pins were wired backwards. Once I figured this out, I was able to boot up the unit.
Problem #2 - The unit would lose power at random and I could only maintain power on with the battery disconnected but the power cable plugged in.
Solution #2 - It seemed the Powerboost 500 I ordered was faulty as shown in the picture. After some troubleshooting and speaking with Adafruit support, I was sent a new powerboard. I didn't work on my system again until I received the new powerboard.
NOTE: My unit still powers off unexpectedly, but only during boot up. I have yet to determine the cause but I believe it may, at some point be pulling too much current for the powerboost 500 to handle, causing the board to cut off power to protect the electronics.
Problem #3 - The display wouldn't display anything useful.
Solution #3 - I noticed in my config.txt file, the format was really messed up. After separating the different lines of settings, I was able to get a picture. Im not sure why the config.txt was like that but It was a guess to reformat it, and the guess paid off.
After these problems were sorted out, I was able to progress onto OS configurations.
Step 10: OS Config
Once Raspbian was booting up, did the recommended things on first initialization.
Expanded the filesystem through raspi-config, changed whatever else I felt needed changing.
Followed Adafruit guide "Setup WiFi Adapter"
After that, I finally was able to install RetroPie. I did this by using the RetroPie setup script and doing a binaries-based installation. The guide for that is here.
Once RetroPie was installed, I went back to the Adafruit guide "Adafruit Retrogame Setup" & "Map buttons to Pi GPIO" section.
At this point the system was operational. I launched the raspi-config again and enabled the boot into command line with logging in.
Since Linux has memory commands, i can choose emulationstation simply by cycling through the previouly used commands. Now I can choose emulation station or start working from the command line if I have a keyboard plugged in.
Step 11: Final Results
With the unit nearly complete, I can show it off. It still has some bugs and I also plan on giving it some upgrades (a headphone jack, 3d printed slots to hold the wifi dongle + mini keyboard). But those can be for a later time.
Thanks for looking and if you think my project is good, please vote for me in the 3d printing contest.