
Gameboy dmg
alxhoff/gameboy-dmg-pcb
PCB for Gameboy DMG with audio and GPIO expander to provide I2C interface to push buttons

PCB for Gameboy DMG with audio and GPIO expander to provide I2C interface to push buttons
Gameboy dmg is an open-source printed circuit board by alxhoff, from the alxhoff/gameboy-dmg-pcb repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 82.5 × 136.7 mm with 95 parts on 103 nets, routed with 524 tracks and 76 vias.
It is built around the MT3608, PAM8302AASCR and FS312F-G, with the FS8205, TP4056 and S8050 among its other parts. Its parts include 15 resistors, 12 capacitors, 8 connectors, 7 ICs and 4 diodes. It belongs with the retro computing and games boards of this library.
My revived Corona project, work in progress. The idea of this board is to be a single board drop in for the Gameboy DMG case that is readily availble from all the normal places (eBay, AliExpress etc.) to provide easy game emulation using a Raspberry Pi Zero with distros such as RetroPie. The whole style of the board is that the PCB itself is self explanitory and doesn't require you to go through the schematics, something almost anyone with a bit of soldering knowledge can put together. Many features of the board can be enabled/disabled or changed using the many solder jumper pads.
The board is made in two variants:
Both boards implement the core required features for creating a portable handheld device. The big difference is that the full size board can make use of the power switches and case cutouts that are more than 100mm from the bottom of the case, as well as being able to place the screen on the motherboard and not require a screen breakout to be used.
The core component of a handheld device is that is can be battery powered. As such, and to avoid using prefab shields, the board has an onboard Lipo charger and battery protection that then feeds a boost converter to provide the rest of the board with the required 5V to power the RPi, screen and audio.
The Lipo charger is based around a TP4056 charger and a FS312F-G & FS8205 protection IC combo, this feeds the MT3608 boost converter. The board has two through hole battery connections where a standard single cell 4.2v Lipo battery should be connected. The front side of the PCB also has charging status SMD LEDs that can be optionally connected by jumping the appropriate jumper.
The board uses the standard default button layout of the Gameboy DMG also providing eight extra button connections that can be made use of through the through hole connections. The buttons are to connectied to the RPi through an MCP23017 GPIO expander, for which I will write a Linux kernel driver once the hardware is complete, it will be linked here once I am done.
The board utilizes the PWM audio output of the RPi, providing both a simple low-pass RC filter as well as a 2.5W mono audio amplifier so that the board can actually produce a decent, and audiable, sound output. A compatible speaker 29mm 0.25W speaker should be attached to the appropriate through hole connectors.
The board utilizes the 240 x 320 ILI9341 TFT screens which are a breeze to use with Raspberry Pis through framebuffer copy drivers, such as this one. The smaller board provides a through hole breakout where you can connect, via ribbon cable, the screen's breakout board. I am using a 2.4" screen which requires no modification to the case but larger screens can be placed with minimal modification to the case, these breakouts are available on the larger board, connecting the ribbon cable directly to the board. The larger board uses an elongated footprint to give you complete freedom as to where you solder the board along the horizonal axis.
The small PCB provides an exact copy of the pinout found on the common LCD breakout boards such as 3.2" MSP3218, 2.8" MSP2807, 2.4" MSP2402, and 2.2" MSP2202.
These common breakouts also provide a NPN transisor current driver circuit that allow for PWM control on the backlight. The larger board has this on the motherboard.
| Function | Header Pin |
|---|---|
| MISO | 1 |
| BACKLIGHT/LED | 2 |
| SCK | 3 |
| MOSI | 4 |
| DC | 5 |
| RESET | 6 |
| CS | 7 |
| GND | 8 |
| 3.3V | 9 |
The large board uses a header for the ribbon cable to be connected directly. The pinout is as follows. Also see the relevant datasheets for the pinout
| Function | Header Pin |
|---|---|
| GND | 1 |
| RESET | 2 |
| SCK | 3 |
| DC | 4 |
| CS | 5 |
| MOSI | 6 |
| MISO | 7 |
| GND | 8 |
| 3.3V | 9 |
| BACKLIGHT LED Anode | 10 |
| BACKLIGHT LED Cathode | 11 - 14 |
The small board must provide headers for items that are found outside of the PCB's bounds, such as power switch, power LED etc. All of the headers should be labelled as to what they do.
There are a number of labeled jumpers that enable/disable functionality of external parts such as disabling the external power switch by bridging the boost supply's outbut stright to the 5V rail.
The following jumpers can be found on the board.
| Name | Reference | Description | Default State | Notes & WARNINGS! |
|---|---|---|---|---|
| Charging LEDs | JP11 | Enables the two onboard SMD LEDs that provide the status of charging from the TP4056 charger | Open | |
| Connect Boost | JP9 | Connects the battery charger/battery to the boost charger that then supplies the 5V rail | Open | |
| Power switch | JP8 | Shorts out the power switch, making the boost supply and the 5V rail always connected | Open | |
| Volume potentiometer | JP10 & JP14 | Will fix the audio input to the PAM8302 audio amp to the differential signal between the LP audio filter's output and ground, removing ability to control volume in hardware | Open | |
| PAM8302 Supply 3.3V | JP12 | Allows for the powering of the audio amplifier from 3.3V instead of the default 5V | Open | |
| PAM8302 Supply 3.3V | JP13 | Allows for the disconnecting of the audio amplifier from its default 5V supply | Closed | NEVER should both jumpers be connects and the device powered |
| GPIO Expander I2C | JP2 - JP4 | The GPIO expander responsible for the onboard Gameboy buttons is by default not attached to the RPi | Open | |
| TFT Backlight | JP6 & JP7 | The backlight for the LCD can be either driven by the GPIO pins (allowing PWM) or from a constant 3.3V rail, By default the screen is driven from the 3.3V rail, thus disabling PWM capabilities of the FB driver | Open & Closer respectivley | Both pins shouldn't be connected at the same time |
| RPi Audio Out | JP1 | By default the PWM audio output of the PRi's GPIO 13 is not connected to the audio pre-amp, amp and speaker, this must be enabled by the user | Open |
todo
The RPi Zero connects directly to the PCB, enough said :P
Large board needs to be branched from small board once it is finished
| Qty | Value | Footprint | References |
|---|---|---|---|
| 12 | SolderJumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP1, JP2, JP3, JP4, JP5, JP6, JP8, JP9, JP10, JP11, JP12, JP14 |
| 6 | SW_Push | pad:GAMEBOY_BUTTON_PAD-D6MM | A1, B1, DOWN1, LEFT1, RIGHT1, UP1 |
| 4 | 1K | Resistor_SMD:R_0603_1608Metric | R1, R4, R5, R10 |
| 3 | 100R | Resistor_SMD:R_0603_1608Metric | R7, R11, R12 |
| 3 | LED | LED_SMD:LED_0603_1608Metric | D1, D3, D4 |
| 2 | 10u | Capacitor_SMD:C_0603_1608Metric | C5, C9 |
| 2 | 1u | Capacitor_SMD:C_0603_1608Metric | C7, C8 |
| 2 | 220p | Capacitor_SMD:C_0603_1608Metric | C10, C11 |
| 2 | 22u | Capacitor_SMD:C_1210_3225Metric | C4, C6 |
| 2 | 2K | Resistor_SMD:R_0603_1608Metric | R6, R8 |
| 2 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J1, J8 |
| 2 | SW_Push | pad:GAMEBOY_BUTTON_PAD-DUAL_D4MM | SELECT1, START1 |
| 2 | SolderJumper_2_Bridged | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP7, JP13 |
| 1 | 0.1u | Capacitor_SMD:C_0603_1608Metric | C3 |
| 1 | 100n | Capacitor_SMD:C_0603_1608Metric | C12 |
| 1 | 10K | Resistor_SMD:R_0603_1608Metric | R13 |
| 1 | 10R | Resistor_SMD:R_0603_1608Metric | R15 |
| 1 | 10uF | Capacitor_THT:CP_Radial_D5.0mm_P2.00mm | C2 |
| 1 | 150R | Resistor_SMD:R_0603_1608Metric | R3 |
| 1 | 1k | Resistor_SMD:R_0603_1608Metric | R14 |
| 1 | 22uH | Inductor_SMD:L_7.3x7.3_H3.5 | L1 |
| 1 | 270R | Resistor_SMD:R_0603_1608Metric | R2 |
| 1 | 33nF | Capacitor_SMD:C_0603_1608Metric | C1 |
| 1 | 7K5 | Resistor_SMD:R_0603_1608Metric | R9 |
| 1 | Conn_01x04 | Connector_PinHeader_1.27mm:PinHeader_1x04_P1.27mm_Vertical | J4 |
| 1 | Conn_01x08 | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J3 |
| 1 | FS312F-G | Package_TO_SOT_SMD:SOT-23-6 | U3 |
| 1 | FS8205 | Package_TO_SOT_SMD:SOT-23-6 | U4 |
| 1 | LOGO | pad:Tux | G*** |
| 1 | LOGO | pad:RetroPie_logo | G*** |
| 1 | MCP23017_SO | Package_SO:SOIC-28W_7.5x17.9mm_P1.27mm | U1 |
| 1 | MSP_TFT_LCD | pad:MSP_TFT_LCD | LCD1 |
| 1 | MT3608 | Package_TO_SOT_SMD:SOT-23-6 | U5 |
| 1 | PAM8302AAS | Package_SO:MSOP-8_3x3mm_P0.65mm | U6 |
| 1 | RK10J_POT | pad:R503_POT | P1 |
| 1 | Raspberry_Pi_2_3 | Connector_PinHeader_2.54mm:PinHeader_2x20_P2.54mm_Vertical | J5 |
| 1 | S8050 | Package_TO_SOT_SMD:SOT-23 | Q1 |
| 1 | SS310 | Diode_SMD:D_SMA | D5 |
| 1 | SW_DPDT_x2 | pad:SS12F23 | SW1 |
| 1 | TP4056 | Package_SO:SOP-8_3.9x4.9mm_P1.27mm | U2 |
| 1 | USB_A | Connector_USB:USB_A_Stewart_SS-52100-001_Horizontal | J2 |
| 1 | USB_B_Micro | Connector_USB:USB_Micro-B_Molex-105017-0001 | J7 |
| 1 | XC6206PxxxMR | Package_TO_SOT_SMD:SOT-23 | U7 |
The 74 most common of 95 parts.

alxhoff/gameboy-dmg-pcb
PCB for Gameboy DMG with audio and GPIO expander to provide I2C interface to push buttons

cester-ino/OTTO-hardware
those specs refer to the tactile buttons version, but a led backlight button version is in the works too.

aziraphale/pride-badge-v1
🌈⚡Pride badge PCB with LEDs, STM32, and 3D printed diffuser+case!





sercami97/EstacionMeteorologica
Open source proyect for low cost weather station

HarkonenBade/batt
A 1S lipo charge/protect board based on the TP4056 and the FS312F
It measures 82.5 × 136.7 mm and has 2 copper layers, 1.6 mm thick.
95 parts, built around the MT3608, PAM8302AASCR, FS312F-G and FS8205. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the alxhoff/gameboy-dmg-pcb repository on GitHub, at the commit this page was made from: the board is gameboy-dmg-big/gameboy-dmg.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).