Project GamePi: Raspberry Pi Based Portable Game Console

Hi!

DSC_3044

 

Hope you’re well. In this weeks episode of ‘Weird Electronic Devices You Can Make In Your Own Home’, we’ll be diving into a Raspberry Pi based handheld inside of a Game Boy (DMG). My inspiration to pick this one up was seeing the awesome SuperPiBoy,  as well as the wonderful PiGRRL from Adafruit. I took bits from both of those projects, and added my own small touch.

Parts:

My little bit of spice for this project were the additional 3 controls on the rear panel. Instead of using momentary switches,  I used capacitive touch sensors. I chose the standalone versions that Adafruit sells, because the form factor is favorable to this application, and for simplicity.

I started with a trashed original Game Boy. I found it in a lot buy with a broken Game Gear (I can see another project in my future… :)) for 15$. I handed off the internals to a chip tune obsessed friend, and began the conversion.

I chose not to retain any of the original parts, except for the plastics. I first measured the LCD window, and shaved it to the appropriate size for the 3.5 inch LCD. I shaved down as much of the internal plastics as I could. I then mounted the LCD in place with hot glue. The KB button PCB mounts using the original mounting hardware, no modification required.

DSC_3008

With that done, I soldered a ribbon cable onto the button PCB, and removed the 12v -> 5V regulator from the LCD PCB. I found a datasheet for the regulator on my board, but your results may vary. Apparently, there are many revisions of this device. Here’s a link to a thread which speaks out the conversion in detail (Thanks SuperPiBoy). You can see where I soldered on to the 5V OUTPUT pad on the chip footprint in the photo. Worst case, you can search the board for a chip that has 12V on one pin, and 5V on another, it is likely that’s the chip that needs to be removed.

DSC_3028

The LCD PCB ends up being slightly too large to fit into the case, but can be safely shaved down without having to move any traces. If you needed to keep going with the shaving, the buttons can be moved easily.

DSC_3007

With that done, the Mini USB breakout gets mounted where the old power switch was. It’s the perfect footprint for that spot, and with a tiny bit of shaving, gets supported by the plastic standoff post in that corner.

  • The USB 5v and GND output get tied to the LiPoly Charger 5V and GND.
  • The Charger BAT and GND get tied to the respective V+ and GND on your battery of choice. (Please though, only use LiPoly with the LiPoly charger, obviously.)
  • Pass the V+ from your battery through your SPDT switch, and then along to the PowerBoost V+ input.
  • GND on the battery can go straight to the PowerBoost GND.
  • 5V Output from the PowerBoost goes to the TP2 pin on the Raspberry Pi, and PowerBoost Output GND goes to TP1 pin on the Pi.

Congrats! Your Pi is powered. Your LCD board will also need 5V output from the PowerBoost, as well as the three capacitive sensor boards and audio amplifier.

DSC_3016

DSC_3017

DSC_3023

After a significant amount of shaving of the rear case, I was able to mount all of the aforementioned electronics. The chargers and power input devices are mounted on the recessed area of plastic for the cartridge. The capacitive pads are underneath the label area of the rear plastic. I mounted a female USB port where the old Link port was, and the SPDT switch where the volume knob used to be. I hotglued my snazzy Kitch Bent battery cover in place, and cut it’s locking tab to save space.

DSC_3020

I drilled holes in the center of the cap-pad plastics, so there can be a tactile feeling when searching for the buttons on the rear case. I also used a significant amount of nuts/bolts and standoffs to hold everything in place solidly, so the rear case is littered with bolts in different areas. I used a “Cell” format battery, so that it would sit nicely on the bottom of the case. The battery I chose also has an in-circuit thermal cutoff, so if there’s a problem charging it, it will (hopefully) prevent serious damage/fire. I cut the “fuel gauge” board off of the cell, as I didn’t need it.

DSC_3025

DSC_3026

DSC_3021

For the Raspberry Pi, I removed the Audio Jack, Composite Jack and relocated the USB port. Being a Model A, it did not have the Ethernet jack or second USB port. I soldered wires onto the respective areas to pull the signals I needed. Take care when soldering to the Composite Video pads, as it’s easy to damage the Pi’s composite output with too much heat. For the audio, I routed the Audio Jack output direct to the headphone port, as well as to the amplifier board. Since I did not have a “switched” variety headphone jack around for this project, I came up with the following arrangement. When booting, the Pi runs a program to check the state of the 3 Cap Pads. If they’re all HIGH, it will boot into “Headphone Mode” and drive the Shutdown pin on the amplifier board, freeing the headphone jack. For the speakers, I stuffed a set of Macbook (3Ohm) speakers into the area where the old GB speaker used to be. I tied them to the outputs on the amp board.

I trimmed down the GPIO pins down to half height, and soldered the Common Ground PCB and OUTPUT pins (from the cap-sensors) to their respective BCM GPIOs. I then cleaned up the wiring with a couple of wire ties, and routed the wires as best I could.

DSC_3033

DSC_3036

DSC_3035

And, that’s it!

As far as software goes, running on a Model A means that running RetroPie 2.0+ is out of the question (as ES 2.0 is apparently more graphically intense, and requires a 256/256 GPU split). I loaded RetroPie 1.10 onto a high speed SD card, and shimmed in my custom bits of software to glue everything together. Cave Story runs great! 😀

 Post-Mortem:

When shaving the case down to fit the LCD, I neglected to do something about the standoffs for securing the two halves of the case together. This lead to complications at the very end of the project, because there was no reliable way to join the halves together. I fixed this by hot gluing a bolt down in two corners of the case. I then fed a machine screw up into the case, and into the bolt. My screws ended up being the perfect length to pull the bolt, without going all the way through. It hurts the project’s aesthetics, as it’s clear the halves no longer join seamlessly, but it has an acceptable amount of mechanical strength.

The Capacitive Sensors are HIGH when active, and LOW when dormant. The opposite is true for the Common Ground Button PCB, which (when the internal pullups are activated) are HIGH when dormant and LOW when active. This lead to complications using Retrogame (the Adafruit C utility used to convert the physical button presses into keyboard events), as the ‘always-active’ buttons would pin it. I’m in the process of writing a program that is compatible with mixed button conditions, and will update this post when I push it to my git.

DSC_3042

 

 

 

Project I-Love-Lamp: Adafruit Qualia + Lamp

Hi dere, internet.

It’s me, the human embodiment of a baloney sandwich, at it again.

DSC_2989

Recently, one of my favorite sites in the whole Multiverse, Adafruit, released a new product called the Qualia Board! If you haven’t heard, this little board makes it easy to use your iPad Retina (3/4) screen, as a secondary monitor! That’s 2048×1536 resolution on a ~10 inch panel. Pretty fantastic.

I purchased one of the bareboards and got to work. (There’s also this awesome kit, if hand rolling is not your thing. The kit is pretty rad all on it’s own.) The idea is, to take the iPad screen, mount it in an iPad shell, and mount the iPad shell onto a lamp base! I did something similar in one of my previous projects with a broken Nexus 7. I really am happy with my little N7 Lamp, so I decided to give it another shot with something a little bigger.

Parts:

Adafruit Qualia Board

iPad Retina Screen

Hampton Bay Architect’s Lamp (22 in. Matte Black)

Display Port (Full Size) to MiniDisplayPort (It MUST be DisplayPort, you cannot use a converter.)

12V-9V 1A Supply

I used: iPad 1 Back Panel

(You could probably do better with an iPad 3 Back Panel, but I couldn’t easily find one for cheap enough.)

Machine Screws:

8x 2x8mm

2x 3x12mm

2x #3 Flat Washers

12x #2 Metric Hex Nut

2x #3 Metric Hex Nut

Tools:

Grinder/Dremel Tool

Power Drill with various bits

Needlenose Pliers

Philips Screwdriver (or a flat, whatever head you chose for your machine screws)

Sharpie

Sheet of 8×11 Paper

 

The Plan:

First thing’s first. Take your drill, choose the appropriate size (one size larger than the silver rivets holding the lamp head to the arm), and drill out those pesky rivets. Snip and pull the AC cord out from the body of the lamp arm.

DSC_2970

DSC_2971

 

DSC_2972

 

Next, place your Qualia board onto the 8×11 sheet of paper. Trace it with the Sharpie. The ribbon cable for the screen will exit the LCD to the left middle of the iPad backing, if you have it mounted horizontally, so you have to cut it a whole to run it to your Qualia board. Trace a smaller rectangle inside the one you made when tracing your Qualia board, about 75% of the original size. This will be the template you use to cut the whole in your iPad backing. I completely botched this part of mine, and cut the hole too big, so I added some perfboard to mount the Qualia to.

DSC_2977

DSC_2978

Be sure to add some insulating material between the Qualia and the iPad backing. It’s conductive aluminum, and will potentially short it, otherwise. Test fit your iPad screen into the backing, make sure the ribbon can reach the board easily. It should not be bent in a strange way, or it can be damaged. It’s very easily broken, so be careful when handling the ribbon cable. Mark the 4 holes of the Qualia on the iPad backing (using your 8×11 sheet), and drill them using a #2+ drill bit. Mount the Qualia using 4x of your 2x8mm machine screws and the corresponding bolts.

Place your 8×11 sheet up to the end of the lamp arm, and mark the paper for the two oval holes. Use this as a template to drill the two holes in your iPad backing, where you’d like the arm to mount. I chose dead center (because the arm can go portrait/landscape). Use a #3+ drill bit. Place the 2x 3x12mm screws through the end of the lamp arm, through the iPad backing, put on the 2x #3 flat washers, and then thread on the #3 nuts on both screws. Make sure these are secure.

Now, place your iPad screen atop the 8×11 sheet of paper. Mark the 4 holes for the mounting bracket. Double check once more that the ribbon cable from the screen reaches and plugs in properly. Now, place your paper atop your iPad backing, and drill out the 4 mounting screw holes. Same drill bit that you used for the Qualia mounting points. Put your other 4 2x8mm screws through the backing, thread a single nut on each screw. Now, place your iPad screen onto those 4 bolts. Put another single nut on each screw to secure the screen in place. Connect your screen ribbon cable.

DSC_2979

DSC_2980

Plug in your DP and power cables, and run them down the arm. I secured mine with zip ties. Just make sure you leave the appropriate amount of slack on the cables, so that the arm can flex properly, or you’ll limit your motion.

DSC_2991

DSC_2986

Kapow! Done!

 

Post-Mortem:

I love that this thing articulates. My at-home desk is a very small table, and previously I did not have enough room for a second monitor. I’m addicted to having one thanks to my work-desk, so this totally beats that problem. It’s a neat little gadget. It could be a lot nicer looking if you used a donor broken iPad 3/4 as your shell, but I only spent 15$ on the iPad 1 backing, which is pretty cool for a sweet piece of a aluminum like that. Same goes for finding a 10 inch capacitive touch panel to place over the screen, but… that’s not that easy.