I compiled all the information that I gathered designing and building this handheld game console so anyone can build it. This step-by-step guide contains the explanation of all the choices that I made, and the options that I left out of the table.
Feel free to challenge anything that doesn't make sense to you, since I'm no expert in any of these topics and I've just built this prototype to learn. Also, make sure to check the list of original sources for more detail documentation.
Anyone should be able to build a fully-working handheld console following this guide.
However, I'm currently working on fixing some structural issues on the enclusure, like the way the shoulder buttons interact with their respective tactile push buttons, or the way in which the different pieces join together. This means that the farthest this guide will take you for now will be to have these results:
Check out this post with the details of what needs to be fixed.
Do you want me to e-mail you when I have news about the console? Drop your address here:
I wanted the person building this console to be able to play games as early as the first step. That means having a proper game console from day one, and adding improvements in layers whenever the person can afford to work on it.
For example, I started playing games with just the Raspberry Pi connected to my PC monitor, an old keyboard, and a phone charger to power it. Later, I added a portable screen, then buttons, then a battery. And I was always able to play games regardless of which step of the process I was in.
I believe building your own things make you enjoy them the most. And, using them with no need to wait until you finish building them, can make the process even more enjoyable.
There is a chance that you have to buy only few materials to start playing games. The subsequent improvements will be upgrading those areas one by one, taking your time and spending money only when you can. That's exactly how I built mine in this video:
Even though I understand that not everyone can access the components that I've used for this build, you'll find that most of the decisions I made are ultimately defined by having more than one option available. For example, you can use a 10 years-old Raspberry Pi that you might have laying around collecting dust or buy one for cheap (they all have the same footprint).
I have plans, though, of building the same console but using the ultimate top-of-the-line components like an x86-based SBC capable of running SteamOS (like Latte Panda or anything with an AMD Ryzen embedded APU), an AMOLED screen, and a body carved from a single piece of aluminum.
I hope you've read the philosophy behind this project first and understand that you don't need to spend money in buying all the components at once. You can enjoy the console since day one with components that you potentially may have at home already.
These are the materials for the exact same final version I built. All of the listed items contain affiliate links. This means that without any cost to you, I might receive a small commision for sales:
- Raspberry Pi 4 Model B, 4GB RAM. Any Raspberry Pi 1, 2, 3, 4, or 5 is ok.
- 5-inches 800x480 IPS Screen with integrated speaker. Any screen of any size and resolution will do the job. Though, in my case, the housing that I designed can only accomodate the display that I linked here.
- PiSugar 2 Pro / 2 Plus / S Plus / 3 Plus. Any UPS hat with battery suitable for the model of Raspberry Pi you got will do the job. Though, in my case, the housing that I designed can only accomodate the UPS that I linked here.
- Soft Silicone 6mm Push-Buttons, or any tactile button is more than ok.
- Soft Tactile 8mm Buttons. These ones are more squishy, but no required.
- SD Card. Any SD card on this compatibility list is suitable.
- Breadboard to prototype a gamepad with the push buttons.
- Male to Female Jumper Wires. Sometimes you can get them bundled with the breadboard.
- 40-Pins (2x20) Female GPIO Header to convert the PiSugar into a top-mounted hat.
- M2.5 Screws and M2.5 Male to Female Standoff Spacers. They are often sold together and can be used on a variety of electronic projects.
- Aluminum Heatsink or any type of cooling for Raspberry Pi that can co-exist with a hat.
In order to run games or, like in my case, emulators the main thing needed is any kind of computer. Since I wanted this to be a handheld game console, my main priority was to get a small yet powerful computer. That's why I chose to work with a Single Board Computer (SBC). I've used one of them before to build an arcade cabinet so I know that SBCs can run games smoothly.
A single-board computer is a complete computer built on a single circuit board, with microprocessor, memory, input/output and other features required of a functional computer.
There are plenty of options in the market for SBCs. In my case I went for a Raspberry Pi 4 Model B. Note that at the time of building the console the Raspberry Pi model 4 was the latest on the market.
I like the Raspberry Pi for many reasons: it has a massive community, meaning that if you have a problem it is most likely that someone already found a solution for it. Also, all the models have the exact same footprint, meaning that you can build a project using a board from 2012 up until the most recent one, and the physical constraints to build a case around it are gonna be the same. This also makes it even more budget friendly.
Depending on the model there are more or less games that it will be able to emulate. Because of the games I wanted to be able to run, the Raspberry Pi that I went with has these specifications:
- Raspberry Pi 4 Model B
- 1.5 GHz 64-bit quad core ARM Cortex-A72 processor
- On-board 802.11ac Wi-Fi and Bluetooth 5
- 4 GB of RAM
- Micro HDMI
- Powered via USB-C
Other option that I think it was worth it considering was the Orange Pi 5, but it has a completely different footprint, and also it's too expensive.
Overclocking the Raspberry Pi
I covered this topic in another blog post about setting up RetroPie. In my opinion, only overclock it if you have an old Raspberry Pi model and you want to run very specific games. Also, keep in mind that doing it the wrong way voids the guarantee, so do it the right way as I described here.
The trade off on a handheld console is being conscious about heat dissipation. I added passive and active cooling to the case in case I wanted to overclock the Raspberry Pi, but I think it was unnecessary.
Slimming down the Raspberry Pi
At some point, my idea was to slim down the Raspberry Pi board to save some space. The idea of slimming down the board is simple: get rid of the tallest ports. The thing is, it would've been an interesting-to-watch video but I would force people to follow the exact same process to build the console.
Another option would've been to use the Raspberry Pi Compute Module (CM3 or CM4) which features the same components of a normal Pi but in a reduced space.
The main con was that I've never worked with it. I wanted to make this first iteration of the console with the things that I know the most, and then I could make it slimmer and faster adding another layer of enhacement.
Also, using the Compute Module would narrow down the options people have to build this console. I guess it's way more people who have a Pi laying around than those who have a CM.
I tried different projects that turn the Pi into an emulation powerhouse. The main 3 were Lakka, RetroPie and Recalbox. In my opinion, RetroPie is the most beginner friendly and it has a massive community behind. Feel free to explore the other ones by yourself if you're interested.
Step 1. Install RetroPie on a Raspberry Pi.
- Identify which model of Raspberry Pi you have.
- Connect a compatible SD card to your computer.
- Download and install the official Raspberry Pi Imager.
- On the Raspberry Pi Imager, go to "Operating System", then "RetroPie".
- Select the version that belongs to your Raspberry Pi model.
- Choose your SD card on the list to install RetroPie into it.
- Install games. I wrote an in-depth guide about it. You can always check RetroPie's official documentation for more details.
I've chosen a 5-inch screen because, in my opinion, the size went better with the case that I wanted to design. I knew that I wanted to use a normal console controller as a reference, and add a screen that fell like it was part of the design.
A counterexample for me was the PlayStation Portal, which is literally a PS5 controller cut in half and glued to the sides of a tablet. I didn't want that.
Aspect ratio: For this project I went for a screen with 4:3 ratio which is the same aspect ratio in old TVs. I wanted this console to be mostly a retro game machine. The 4:3 ratio is still good for running the newest games in 16:9 with horizontal black bars.
Resolution: 800x480 looks great for the size, although I wouldn't accept less than that resolution and I would definitely go higher if the price doesn't jump abruptly on a better model.
For projects like this I always think about audio as part of the display because HDMI is a standard for audio/video interface. The display that I've used came with an integrated speaker that made this build easier.
That was the approach I chose for my implementation. In case you want to adapt the design to have speakers, the second best option that I recommend to you is to consider speakers that were designed for portable screens. For example this one, although you will need to make sure you have the space needed inside your case.
Step 2. Connect it to a TV or monitor and plug in a keyboard.
- Using HDMI, connect the board to any TV, computer monitor, or the display I specified.
- Connect a keyboard.
- Connect the Raspberry Pi to a power supply.
- Turn on the Raspberry Pi.
- The first time you enter RetroPie it will ask you to set up all your buttons. Use your keyboard to map the keys you want. Important: take note of which keys you're assigning to which functionality.
These are the keys and the functionalities that I picked up for my prototype:
- W key: D-pad up
- S key: D-pad down
- A key: D-pad left
- D key: D-pad right
- H key: A
- G key: B
- F key: X
- T key: Y
- Q key: L1
- E key: L2
- Z key: R1
- C key: R2
- Right Shift key: Select
- Enter key: Start
The best way to prototype a gamepad and tinker until it works as expected is using a breadboard. In case you don't know what a breadboard is and how to use them, there are plenty of guides that talk about them like this tutorial on Sparkfun.
Buttons: For any project that need buttons, there is this standard 6mm tactile switch buttons that are everywhere. The only problem is that they feel super clicky. I found 2 variants that improve how they feel to the touch. These made out of silicone (still clicky but not so much):
And these ones are very squishy buttons (perfect for emulating that gamepad feeling):
GPIO pins: The Raspberry Pi has 40 pins (except for early models) that can be used for many different things. Any pin in green and yellow here is available to be used as a digital input. That means that you can connect any push button to them to be readed by the board.
Analog joysticks: For this first prototype I decided not to include analog sticks. The Raspberry Pi doesn't have any analog inputs, so it needs an entire implementation for that. I'm currently working on adding thumb sticks to the next version of the console by adding an Arduino Pro Micro connected via USB.
When I started the project, I had the idea to use "fake" analog sticks. By simply using an 8-way tactile switch I could have read the 8 directions as digital inputs, but I couldn't find any model to buy.
Step 3. Add your own custom buttons.
- Add tactile buttons to the breadboard and wire one of the legs to the ground row (-) of the board.
- Use jumper wires to connect the other leg of the push button to a pin on the Rasbperry Pi. You can connect any button to any available pin (see here) but it is imporant to take note of which button you're connecting to which pin. These are the pins I used:
- Enable SSH to be able to send files and to connect remotely to the Raspberry Pi. Consider assigning a static IP to the Raspberry Pi in order to make your workflow easier.
- Connect remotely to the Raspberry Pi:
$ ssh [email protected]
- Connected to the Raspberry Pi, download the Retrogame script from Raspberry-Pi-Installer-Scripts to install the Adafruit-Retrogame utility. This will allow you to map the GPIO pins to a virtual keyboard.
You will be prompted to select a configuration. Choose any option and follow the steps to reboot.
$ curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh > retrogame.sh $ sudo bash retrogame.sh
- Edit the Retrogame configuration file to map the GPIO pins to the keys you setted on step 2:
For a list of all the possible key IDs take a look at Retrogame's keyTable.h file. Here's an example of my retrogame.cfg file where I map my keyboard keys to the pins I've chosen:
$ sudo nano /boot/retrogame.cfg
# Key Pin Button W 19 # Up S 5 # Down A 13 # Left D 6 # Right H 20 # A G 21 # B F 12 # X T 16 # Y Q 9 # L1 E 11 # L2 Z 8 # R1 C 7 # R2 RIGHTSHIFT 10 # Select ENTER 26 # Start
- Save the changes and exit Nano. You can do both by just pressing Ctrl+X.
- Reboot the console and check that everything works as expected.
You should be able to navigate the interface, start games, and play them using your custom gamepad.
$ sudo reboot
04. Power supply
There are plenty of ways to power a Raspberry Pi without pluging it into a wall. The model 4 that I used has a USB-C port that needs 5V 3A to work (older boards need less amperage). This means that you could power this project with, for example, a simple power bank. There is also plenty of hats that allow you to add power from an external battery.
I decided to go with the PiSugar 2 Pro specifically for its features. There were many version of that same model after I got it, like the PiSugar 2 Plus, S Plus, and 3 Plus. All of them have the same footprint, therefore they should be compatible with this build. The important thing is to get the one with the 5000 mAh battery since this console needs a lot of power.
The PiSugar is a UPS. An UPS is a device that provides near-instantaneous backup electric power to the board when the input power source or main power "fails". It maintains the operation uninterrupted, and safely shut down when the power is too low.
The PiSugar connects via pogo pins. Unlike other hats, it sits on the back of the Rasbperry Pi, making it almost imperceptible. The sad thing was that I needed to transform the PiSugar into a normal hat because the connectors that hold the Raspberry Pi attached to the display (HDMI and USB) don't allow to have anything between them.
Batteries: Any lithium-ion battery with around 2500mAh should be enough to power a Raspberry Pi handheld console. The PiSugar came with 5000mAh, and they claim the battery life is 8-10 hours. For me it's been around half that time in total when making the Rasbperry Pi work at its maximum, emulating console games, and with the fan turned on.
Step 4. Install the PiSugar hardware.
- Remove the pogo pins carefully from the PiSugar. They should come out easily by pushing gently and twisting them in the right direction. If done correctly, this mod is completely reversible.
- Solder a 2x20 pins female GPIO header to the PiSugar. Note: there are solderless headers that require no soldering.
- Solder wires to the GPIO pins you will use for the buttons (the ones you set up in step 3).
- Connect the battery to the PiSugar.
- Attach the PiSugar to the Raspberry Pi for a quick first test.
- Turn the Rasbperry Pi on and disconnect it from power to make sure it works wirelessly.
Designing my own case took me a very long time. It wasn't time spent only on planning and execution, but also the compound results of uncountable years of dissasembling gamepads to repair them and taking note on how every piece works. I'll try to point the main things I had in mind while designing this console.
I started drawing 4 different versions with slightly different dimensions on Procreate for iPad. I already had all the components in hand so I already knew that the size of the screen and the depth of all the things were a constant. I made tiny changes in the position of the d-pad, the other buttons, and the length of the handles. The idea was to see which one looked more natural.
I modeled the console out of a rectangle box using t-splines. I basically defined one of the halves as a mirror of the other one (the green line on the screenshot) and started pulling its vectors until I got the shape I was looking for.
It took several iterations to get it right. One thing is drawing something on the screen and another different thing is to have it in its physical form. Also, 3d printing has its own set of constraints that you need to respect.
I printed all the prototypes in PLA to be able to iterate fast, but I used PETG to print the final product. This was actually a mistake. PETG ended up being an extremely soft material, so sanding it didn't result on a smooth surface. The reason I printed it in PETG was because I feared that the console could reach temperatures high enough to soften PLA. It turns out that that's not the case and I'm even working on the posibility of removing the active cooling system.
Since 3d printing is a different manufacture process than, for example, casting, it allows for different ways of assembly. Instead of the tradicional cut in half of any game console or gamepad, I made 3 different parts. The main reason was to being able to print it on my Prusa Mini (28 x 28 x 28 cm). I love the results and that the components are assembled from the sides instead of from the back.
Step 5. Bring it all together.
- Download the pcb-prototype-v0 (147 KB) and print it in PLA with 0.15mm layers and 15% infill.
- Glue the shoulder pieces to the main piece with super glue. The end result should look like this:
- Insert the push buttons into the holes. I put the squishy buttons on the d-pad and ABXY buttons, and the normal ones on the rest. The buttons should stay tight in place. Try changing the settings on the slicer if that's not the case.
- Solder the buttons to the PiSugar header.
- Attach the Raspberry Pi to the PCB-prototype using (2x) screws on the pins side and (2x) 10mm brass spacers on the other side.
- Add an aluminum heatsink to the Raspberry Pi processor. Although this step is entirely optional, for more demanding tasks such as gaming, it's recommended to have some form of passive cooling.
- Connect the PiSugar to the Raspberry Pi board and secure it with 2 screws.
The enclosure that I designed is not publicly available yet. I'm fixing some big flaws in the design before releasing it. In a nutshell: the mechanism that joins the main parts is weak, and the shoulder buttons are unusable after months (I'm switching to 90-degrees tactile buttons to imitate the xbox controller mechanism). Check out this post with the details.
In the meantime, try making your own case! Use cardboard, or a metal tin box. If you have a 3d printer, try designing one yourself on Thinkercad. It can be as simple as a rectangle. You can also modify existing enclosures to fit your components.
Do you want me to e-mail you when I have news about the console? Drop your address here:
Let me know how it goes! If you build it, send some pictures. Tell me what problems you found in the process, what you had to improve, what I can improve.