DIY retro game console based on Raspberry Pi Zero[Copy link]
Source: Endless Fun
Although there are many retro game consoles developed based on Raspberry Pi, they are also easy to buy.
But it is still necessary to recommend the following one - a retro game console based on Raspberry Pi Zero .
Because it shows us two versions, including a breadboard version, it makes it easier to understand the principles of game console construction and greatly lowers the threshold for DIY. The materials used are also easy to obtain.
The main features of this project are as follows:
Using PAL display
Powered by a Raspberry Pi Zero, it uses the RecalBox OS operating system, which also comes with some pre-installed games
Powered by the IP5306 IC, a 5V 2A constant boost IC for mobile power circuits, perfect for powering the Raspberry Pi Zero
The first half of the project is the breadboard version, and the second half is the PCB version.
Materials List
Raspberry Pi Zero × 1
16 GB memory card (8 GB also available) × 1
TV screen × 1
HDMI to micro HDMI adapter × 1
5V 2A charger/power supply with stable output of 2A × 1
Keyboard × 1
USB to microUSB adapter × 1
RecalBox OS image file/ Raspberry Pi Image Flasher × 1
Normal button × 1
Customized PCB board × 1
IP5306 IC × 1
10uf 0805 capacitor × 1
USB port × 1
microUSB port × 1
Lithium-ion battery with CON2 connector cable × 1
CON2 connector × 1
10k 0603 resistor × 1
2R 0805 resistor × 1
Vertical button × 1
1. Preliminary Concept
The device consists of a PCB board and a 3D printed housing, which are connected by screws.
The front side is the display and buttons, using a 4.3-inch display, about the size of 135mman x 140mm, larger than the ordinary Gameboy screen, and the back side is the Raspberry Pi Zero with boost converter circuit and lithium-ion battery.
2. Configure the RecalBox system
Download the Raspberry Pi image file
Select the right OS for your deviceChoose hereRecalBox
Select your systemChoose hereRpi0
After the installation is complete, connect the Raspberry Pi to the TV monitor and keyboard.
Boot up the device and RecalBox will work fine.
3. GPIO wiring schematic diagram
Note: In the schematic diagram, one end of the button is connected to the GPIO port and the other end is grounded.
Click here to download the high-definition version of the schematic.
4. Display and GPIO Control
There are many types of monitors, including HDMI ports and ribbon cable ports. Here, we choose a PAL-format car monitor (with a PAL port) for cost considerations. Because the operating voltage of the car monitor is 12V, and a 5V or 3.3V monitor is required here, the internal step-down circuit of the monitor needs to be modified. Here, the 12V to 3.3V step-down chip is removed, and VCC and GND are added to the capacitor at the Vout end to provide 5V voltage for the monitor.
To get the PAL port to work with the display, you need to edit some stuff in the config file. Use the keyboard to enter the SSID and password in the network settings. (Connect it with winSCP)
The following content needs to be edited:
SDTV output settings
The HDMI display connected to the Raspberry Pi will output its video signal, but under the PAL port, you need to set the SDTV output.
Go to boot> config.txtChange Default Settingssdtv_mode, delete #and add sdtv_aspect = 1, and addHDMI linesin front #. (As shown in the picture, check Boot/config.txtand copy the content)
GPIO Control
GPIO port and button settings.
Enter recalbox>> >sharesystemrecalbox.conf
Enable GPIO external buttons by following the two steps below
Set controller.gpio.enabled=1(was 0 before) and controller.gpio.args.map=1,2change to controller.gpio.args.map=1( 2was the second player)
After changing the default settings (check D2 GPIO Controllers as shown in the picture), then restart, RecalPi will be able to work with PAL ports and custom buttons.
5. Improve the Breadboard Version
A customized GPIO adapter is used here, and the wiring is changed. Refer to the picture to connect one end of the button to the GPIO port and the other end to the ground. After completion, you can test whether the button is working properly by connecting it to a TV. If there is no problem, replace the TV with a car monitor, connect the VCC of the car monitor to 5V, connect the ground wires together, and then power it with a 5V 2A power supply. The car monitor will display the picture successfully (note the previous SDTV settings).
6. Designing the Circuit Board
Draw the PCB file according to the circuit built on the breadboard, including 13 buttons connected to the Rpi Zero, plus the power circuit driven by the IP5306 IC. The IP5306 is a power management chip suitable for 3.7 V lithium-ion batteries, which can adjust the output voltage. Here it is increased to 5V 2A for Raspberry Pi and car displays.
The design process is as follows:
First, the overall structure was designed in Fusion360, and then the PCB Outline was modeled in My PCB Cad software using Fusion360's PCB Layout. (Here, additional hotkey buttons were placed in the classic Gameboy layout)
7. Circuit board proofing
Send the production file Gerber to the PCB manufacturer for proofing.
Gerber file click to read the original text to download.
8. Soldering PCB
SMD component soldering
Apply solder paste to the pads to be soldered, place the components, and then place the PCB on the SMD heating plate for reflow soldering. The heating plate heats the PCB from the bottom up until the solder paste melts. When the solder paste melts, remove the PCB from the heating plate and cool it for 3-4 minutes. Then repeat this operation in the correct component soldering order.
THT component welding
Add the USB port, button, and CON2 connector to the PCB board and solder them.
Finally, solder the female header. The soldering of the PCB board is complete. Connect the lithium-ion battery and connect the USB power monitor to the USB port to check whether the USB output is 5V. If it is OK, connect it to the Raspberry Pi Zero W (RecalBox has been installed and the configuration file has been changed).
9. Overall assembly
Use the 3D printed support parts to fix the display to the 3D printed case, mount the circuit board to the case with four M2 screws, and connect the VCC, GND and PAL ports of the display to the Raspberry Pi and the circuit board. Once completed, you can start Recalbox through the ON – OFF vertical button.
Click here to download the 3D printing file.
Done! Start your retro gaming journey!
10. Add more games
To add a game, you only need to download the corresponding ROM. The specific steps are as follows:
Go to Settings> Network Settings, add the SSID and password of the router, connect the Raspberry Pi to the network, and you can see the IP address of the Raspberry Pi at the top of the network settings menu. Then open Win SCP on the computer, enter the IP address of the Raspberry Pi, the username is root, and the password of pi is recalboxroot.
Go to recalbox> share> rom, here are all the ROM files, if you want to play one of the games, just copy and paste its ROM file into the GBA folder.
After restarting the Raspberry Pi and opening the GBA emulator, you can see the newly added games.