Raspberry Pi Compute Module 4 (CM4)
Pocket Retro Cyberdeck
Überblick
An ultra-compact, pocketable retro gaming and computing cyberdeck powered by a Raspberry Pi core, featuring an integrated display, mechanical keyboard, and USB-C rechargeable battery pack using off-the-shelf modules and 3D printed parts.
Systemarchitektur
- POWER_MANAGEMENT → COMPUTE_MODULEPowerMain regulated 5V power supply rail for the compute module and peripherals
- COMPUTE_MODULE → DISPLAY_MIPIGPIOMIPI DSI display interface and power connection
- COMPUTE_MODULE → KEYBOARD_MCUUSBUSB virtual COM / HID connection for keyboard and macro control
- COMPUTE_MODULE → AUDIO_CODECSPII2S digital audio bus interface
Stückliste
| Teilenummer | Typ | Komponente | Hersteller | Gehäuse | Menge | Datenblatt | Übereinstimmung |
|---|---|---|---|---|---|---|---|
| TPS61088 | POWER | TI BQ25896 + FUSB302 + TPS61088 Manages dual-cell Li-Ion battery charging, USB-C PD voltage negotiation, and stable 5V system rail generation. | Texas Instruments | — | 1 | Übereinstimmend | |
| CM4 | MCU | Raspberry Pi Compute Module 4 (CM4) Acts as the main operating system host for retro-gaming emulation, terminal tasks, and desktop environments. | Gardner Bender | — | 1 | Übereinstimmend | |
| X800 | DISPLAY | 4.0 inch DSI IPS LCD Panel (480x800) Provides sharp visual output for retro-emulation, terminal windows, and desktop UI. | ATI | BGA | 1 | Übereinstimmend | |
| STM32F030C8T6 | MCU | STM32F030C8T6 Microcontroller Handles low-level GPIO matrix scanning for Kailh low-profile mechanical switches and custom macro handling. | STMicroelectronics | 48-LQFP | 1 | Übereinstimmend | |
| CM4 | RF | On-module Wi-Fi / Bluetooth (CM4 Built-in) Provides wireless networking for terminal tasks, SSH, and Bluetooth peripheral pairing. | TDK | — | 1 | Übereinstimmend | |
| I2S | AUDIO | I2S Audio DAC & Miniature Speaker Delivers retro sound effects, game audio, and system alerts. | — | — | 1 | Ausstehend |
Bauanleitung
Procurement & Preparation
- Source all active modules and discrete ICs including the CM4, TPS61088, STM32F030C8T6, 4.0-inch DSI IPS LCD panel, I2S Audio DAC, miniature speaker, and Kailh low-profile mechanical switches.
- 3D print the Pocket Cyberdeck enclosure halves (top and bottom shells) using PETG or ABS filament with 3 perimeter walls and 20% infill.
- Prepare the custom PCB layout for the keyboard matrix supporting the Kailh low-profile switches and STM32F030C8T6 microcontroller.
Hardware Assembly & Wiring
- Solder the power management ICs (TI BQ25896, FUSB302, and TPS61088) to the power regulation PCB to establish the 5V_SYS power rail.
- Mount the CM4 onto its carrier board and connect the 4.0-inch DSI IPS LCD Panel using the DSI ribbon cable (DSI_TX_P, DSI_TX_N, DSI_CLK_P, DSI_CLK_N, 3V3, GND).
- Wire the keyboard MCU (STM32F030C8T6) to the CM4 via USB (USB_D_P, USB_D_N, VBUS, GND) and wire the I2S Audio DAC and miniature speaker to the CM4 SPI/I2S pins (I2S_BCLK, I2S_LRC, I2S_DIN, 3V3, GND).
- Secure all internal modules, battery pack, and the mechanical keyboard assembly into the 3D printed bottom enclosure shell using M2 heat-set inserts and machine screws.
Firmware Setup
- Flash the custom QMK/TMK or bare-metal keyboard firmware onto the STM32F030C8T6 microcontroller using an ST-Link V2 programmer.
- Flash Raspberry Pi OS (or a specialized retro-gaming distribution like RetroPie/Lakka) onto the CM4 eMMC or an SD card.
- Configure the `/boot/config.txt` file to enable the DSI overlay for the 4.0-inch 480x800 IPS LCD panel and the I2S audio driver for the DAC.
Testing & Calibration
- Perform a cold-boot power test using a USB-C PD charger connected to the BQ25896/FUSB302 charging circuit and verify the 5V_SYS rail output with a multimeter.
- Test display rendering and touch/keyboard input by navigating the OS desktop and typing a test string on the Kailh mechanical keyboard.
- Validate audio output by playing system test sounds through the I2S DAC and miniature speaker, then test Wi-Fi and Bluetooth peripheral connectivity.
Dokument
Pocket Retro Cyberdeck
An ultra-compact, pocketable retro gaming and computing cyberdeck powered by a Raspberry Pi core, featuring an integrated display, mechanical keyboard, and USB-C rechargeable battery pack using off-the-shelf modules and 3D printed parts.
Design Overview
| Item | Details |
|---|---|
| Product Type | Pocket Cyberdeck |
| Key Functions | Retro gaming emulation, Retro-computing and terminal tasks, Integrated mechanical keyboard input, Integrated display output, Rechargeable battery power with USB-C PD |
| Power Source | Li-Ion Battery |
| Connectivity | WiFi, Bluetooth, USB-C |
| Size | Ultra-compact pocketable PDA style |
| Environment | indoor |
| Difficulty | Advanced |
| Est. Time | 6-8 hours |
System Architecture
Power Topology: USB-C PD input negotiates 9V/12V or 5V, charges dual-cell Li-Ion batteries via BQ25896, and steps up/down to provide clean 5V (for CM4 and display backlight) and 3.3V (for MCU, logic, and audio) rails.
Module List
| Module ID | Type | Name | Function | Voltage |
|---|---|---|---|---|
| POWER_MANAGEMENT | POWER | TI BQ25896 + FUSB302 + TPS61088 | Manages dual-cell Li-Ion battery charging, USB-C PD voltage negotiation, and stable 5V system rail generation. | 5V |
| COMPUTE_MODULE | MCU | Raspberry Pi Compute Module 4 (CM4) | Acts as the main operating system host for retro-gaming emulation, terminal tasks, and desktop environments. | 5V |
| DISPLAY_MIPI | DISPLAY | 4.0 inch DSI IPS LCD Panel (480x800) | Provides sharp visual output for retro-emulation, terminal windows, and desktop UI. | 3.3V |
| KEYBOARD_MCU | MCU | STM32F030C8T6 Microcontroller | Handles low-level GPIO matrix scanning for Kailh low-profile mechanical switches and custom macro handling. | 3.3V |
| WIRELESS_RF | RF | On-module Wi-Fi / Bluetooth (CM4 Built-in) | Provides wireless networking for terminal tasks, SSH, and Bluetooth peripheral pairing. | 3.3V |
| AUDIO_CODEC | AUDIO | I2S Audio DAC & Miniature Speaker | Delivers retro sound effects, game audio, and system alerts. | 3.3V |
Design Schemes
High-Performance CM4 Cyberdeck ★
Raspberry Pi CM4 core paired with dedicated STM32 keyboard scanning MCU, MIPI-DSI high-res display, and advanced USB-C PD charging.
Trade-offs: Higher component count and cost, but delivers superior compute performance, mature software stack, and flawless multi-key mechanical typing response.
Key IC selection
main compute host
- Need: High-performance quad-core ARM SoC with native Linux OS support, DSI display interface, and PCIe/USB connectivity for a compact form factor.
- Class: System-on-Module (SoM)
- Shortlist: Raspberry Pi Compute Module 4 family, Allwinner/Rockchip based custom SoMs
- Pick: Select CM4 variant based on RAM (2GB/4GB) and eMMC storage requirements, balancing software ecosystem maturity and thermal envelope.
charger and power path controller
- Need: I2C-controlled switch-mode battery charger supporting multi-cell Li-Ion configuration with dynamic power path management and high input voltage tolerance.
- Class: I2C Switched-Mode Battery Charger IC
- Shortlist: TI BQ25896, Analog Devices MAX77829
- Pick: Select BQ25896 for its robust fast-charging capabilities, integrated boost bypass mode, and extensive ecosystem support for portable Linux handhelds.
input scanner and macro controller
- Need: Low-cost, low-power ARM Cortex-M0 MCU with adequate GPIO count for matrix scanning and USB/UART interface to host.
- Class: 32-bit ARM Cortex-M0 Microcontroller
- Shortlist: STMicroelectronics STM32F030C8T6, Nuvoton N76E003 (if 8051) / NUC126
- Pick: Select STM32F030C8T6 for optimal balance of cost, available flash/RAM for custom macro firmware, and rich peripheral timers.
Risk register
| ID | Area | Severity | Detail | Mitigation |
|---|---|---|---|---|
| r1 | thermal | high | The CM4 and TPS61088 boost converter are enclosed in a compact pocket cyberdeck chassis with limited airflow, risking thermal throttling during sustained retro-gaming emulation. | Integrate a thermal pad connecting the CM4 shield to an internal aluminum chassis plate or back cover acting as a passive heatsink. |
| r2 | power | high | Simultaneously driving high backlight brightness on the DSI display, peak CPU loads on the CM4, and mechanical keyboard backlight can cause system rail droop or unexpected reset via TPS61088 transient response limits. | Ensure bulk output capacitance (low-ESR ceramic and polymer capacitors) on the 5V system rail near the CM4 power pins and configure input current limits properly via BQ25896/FUSB302. |
| r3 | emi | med | High-frequency switching noise from the TPS61088 boost converter and the STM32 keyboard matrix scanning lines may couple into the CM4's on-module Wi-Fi/BT antenna or the audio DAC I2S traces, causing audio buzz or wireless packet loss. | Route I2S audio signals and RF sections away from the DC-DC boost layout; ensure solid ground planes and proper decoupling around power components. |
Key Components
5/6 modules matched to real parts. See the BOM tab for the full component table.
TI BQ25896 + FUSB302 + TPS61088 (TPS61088)
The candidate matches the primary MPN (TPS61088) and is manufactured by Texas Instruments, which is in the preferred man
Raspberry Pi Compute Module 4 (CM4) (CM4)
Candidate 1 matches the primary MPN 'CM4' and the preferred manufacturer 'Raspberry Pi'.
STM32F030C8T6 Microcontroller (STM32F030C8T6)
The candidate matches the primary MPN STM32F030C8T6 from STMicroelectronics.
I2S Audio DAC & Miniature Speaker (I2S)
Web recommendation: I2S (not in ES)
Build Summary
- Difficulty: Advanced
- Estimated time: 6-8 hours
- Tools required: Precision soldering iron with fine tip, Hot air rework station, Multimeter, Hex key set (1.5mm, 2.0mm), Wire strippers and cutters, ST-Link V2 programmer
See the Build tab for the full step-by-step assembly guide.
Generated by YuanQi AI Design System · Query: Build a cyberdeck with compact form factor, integrated display, mechanical keyboard, and Raspberry Pi Compute Module or SBC core.