Skip to content

Latest commit

 

History

History
270 lines (189 loc) · 10.1 KB

File metadata and controls

270 lines (189 loc) · 10.1 KB
CM-Deck Logo

License: CC BY-NC-SA 4.0 GitHub Stars GitHub Forks GitHub Issues YouTube

A clamshell-style cyberdeck built around the Raspberry Pi Compute Module 5.
Custom carrier board · Low-profile mechanical keyboard · Trackpad · OLED display


📺 Build Video

CM-Deck Build Video

Watch the full build — from PCB design and 3D-printed prototypes to soldering, debugging, and final assembly.


✨ Overview

CM Deck is a fully custom, handheld cyberdeck built from scratch. It features:

  • 🧠 Raspberry Pi Compute Module 5 as the brain
  • 🔌 Custom carrier board with USB, display, and power circuitry
  • ⌨️ Low-profile mechanical keyboard with integrated trackpad
  • 🖥️ Small OLED status display
  • 🖨️ 3D-printed clamshell enclosure
  • 🔋 Battery-powered and portable

⚠️ Known PCB Issues (Fix in Progress)

The current PCB revision has three known issues that will be corrected in the next update:

# Issue Timestamp
1 Flash chip CS pin not connected 11:09
2 Power button needs jumper pads for wire connection 16:32
3 Missing open jumper pad on 3V3 line of DSI connector 15:09

📁 Repository Structure

cmdeck/
├── boms/                        # Bills of materials (CSV/spreadsheet)
│   ├── bom_mainboard.csv        # Components for the CM5 carrier board
│   └── bom_keyboard.csv         # Components for the keyboard PCB
│
├── enclosure/
│   └── exports/
│       └── STL/                 # 3D-printable enclosure parts
│           ├── top_shell.stl    # Upper clamshell half (display side)
│           ├── bottom_shell.stl # Lower clamshell half (keyboard side)
│           ├── hinge_*.stl      # Hinge mechanism parts
│           └── misc/            # Brackets, standoffs, and other hardware mounts
│
├── firmware/
│   └── qmk/                     # QMK keyboard firmware source
│       ├── config.h             # Pin assignments and hardware config
│       ├── keymap/
│       │   └── keymap.c         # Key layout definition
│       └── rules.mk             # Build rules and MCU target
│
├── images/                      # Project photos and assets
│   ├── CM-Deck_Logo.svg         # Project logo (vector)
│   └── CM-Deck_Thumbnail.jpg    # YouTube build video thumbnail
│
├── pcbs/                        # KiCad PCB design files
│   ├── mainboard/               # CM5 carrier board
│   │   ├── mainboard.kicad_pcb  # PCB layout
│   │   ├── mainboard.kicad_sch  # Schematic
│   │   └── gerbers/             # Fabrication-ready Gerber files
│   └── keyboard/                # Keyboard controller PCB
│       ├── keyboard.kicad_pcb
│       ├── keyboard.kicad_sch
│       └── gerbers/
│
├── .gitignore
├── LICENSE
└── README.md

Note: File names above are illustrative — actual names may vary slightly. Browse the folders directly for the exact contents.


🖨️ Enclosure — enclosure/exports/STL/

The enclosure is a clamshell design modelled in Autodesk Fusion 360 and exported as STL files for 3D printing. The design went through multiple prototype iterations before the final version — see the build video at 07:40 for the full journey.

Recommended print settings:

Setting Value
Material PLA or PETG
Layer height 0.2 mm
Infill 20–30%
Supports Required for hinge areas and display cutouts
Perimeters 3+ walls for structural parts

Parts overview:

File Description
top_shell.stl Upper half of the clamshell — holds the display
bottom_shell.stl Lower half — houses the keyboard and mainboard
hinge_*.stl Hinge mechanism components
misc/ Standoffs, brackets, and any auxiliary mounting hardware

⌨️ Keyboard Firmware — firmware/qmk/

The keyboard runs QMK firmware, an open-source keyboard firmware framework. The source in this folder defines the key matrix, pin assignments, and keymap for the CM Deck's built-in keyboard controller.

Key files:

File Purpose
config.h Matrix pin assignments, USB descriptor, debounce settings
keymap/keymap.c Layer definitions and key bindings
rules.mk Target MCU and enabled QMK features

Prerequisites

# Install QMK CLI
pip install qmk

# Set up QMK environment (first time only)
qmk setup

Building

# Copy the firmware folder into your QMK keyboards directory
cp -r firmware/qmk ~/qmk_firmware/keyboards/cmdeck

# Compile
qmk compile -kb cmdeck -km default

Flashing

# Flash via QMK CLI (put the keyboard into bootloader mode first)
qmk flash -kb cmdeck -km default

To enter bootloader mode, short the BOOT and GND pins on the keyboard PCB while plugging in USB — or press the physical reset button if one is populated on your board.

Alternatively, use QMK Toolbox (Windows/macOS) for a GUI-based flashing experience with no terminal required.


🔌 PCBs — pcbs/

The project uses two custom PCBs, both designed in KiCad. Each board folder contains the schematic, PCB layout, and fabrication-ready Gerber files.

Mainboard (CM5 Carrier Board)

The carrier board plugs into the Raspberry Pi Compute Module 5 via its high-density board-to-board connectors and breaks out:

  • USB-A host ports
  • DSI display connector
  • Power management and battery charging circuitry
  • I²C bus for the OLED status display
  • USB connection to the keyboard controller MCU

See the build video at 01:55 for a walkthrough of the schematic and layout decisions, and 09:40 for the bring-up and debugging process.

Keyboard PCB

A compact PCB for the low-profile mechanical key switch matrix, including:

  • Low-profile key switch footprints (Choc-style)
  • Trackpad flex connector
  • Microcontroller running QMK firmware
  • USB connector for host communication

Ordering PCBs:

Gerber files in each board's gerbers/ subfolder can be uploaded directly to any PCB manufacturer. This project was fabricated through PCBWay.

⚠️ Review the known issues before placing an order on the current revision.


📋 Bill of Materials — boms/

The boms/ folder contains CSV files listing every component needed to build the boards. Open them in any spreadsheet app (Excel, LibreOffice Calc, Google Sheets) or import into a sourcing tool like Octopart or Mouser BOM Manager.

Columns included:

Column Description
Reference PCB reference designator (e.g. R1, C4, U2)
Value Component value or part name
Footprint PCB footprint identifier
Quantity Number of units needed
Supplier / MPN Suggested source or manufacturer part number

🗂️ Build Timeline

Phase Timestamp Description
Project Goals 00:20 Design goals and feature set
PCB Design 01:55 Schematic and layout in KiCad
Prototyping 07:40 3D-printed enclosure iterations
Electronics 09:40 Soldering and PCB bring-up
Integration 13:45 Fitting everything together
Assembly 18:55 Final mechanical assembly
Usage & Features 23:10 Demo and full walkthrough

🛠️ Tools Used

Tool Purpose
KiCad PCB schematic and layout
Autodesk Fusion 360 Enclosure CAD design
QMK Firmware Keyboard firmware
Bambu Lab 3D Printers Enclosure prototyping and final prints
PCBWay PCB fabrication

📜 License

This project is licensed under CC BY-NC-SA 4.0.

CC BY-NC-SA 4.0

You are free to share and adapt this work for non-commercial purposes, as long as you give appropriate credit and distribute under the same license.


🙏 Credits & Acknowledgements

  • PCB design guidance — @PhilsLab
  • PCB manufacturing — PCBWay
  • Keyboard firmware — QMK

Soldered by hand. Powered by coffee. Built by Salim Benbouziyane.

⭐ Star this repo if you found it useful!