Embedded Systems / Active Development

CAPY

A handheld computing platform developed through iterative hardware, firmware, and physical-interface design.

Platform ESP32
Display 320 × 240 TFT
Input D-pad + A / B
I/O Expansion MCP23017

Overview

Building a handheld from the hardware upward

CAPY began as an experiment in building a compact microcontroller-based handheld with a graphical interface and dedicated physical controls.

As the project developed, size, available I/O, wiring, input design, power, and enclosure thickness became engineering constraints of their own.

The current design evolved from an Arduino Mega proof of concept into a smaller ESP32-based system with expanded I/O, six-button controls, audio, portable power, and wireless capability.

Development

Prototype evolution

Prototype 01 — July 21, 2025

01

Arduino Mega 2560

Proof of concept

The original CAPY used an Arduino Mega 2560, TFT display, analog joystick, breadboards, and jumper wiring.

The Mega provided plenty of I/O and made it easy to validate the basic concept, but its physical footprint was too large for the compact handheld I wanted.

Design decision Replace the Mega with a much smaller ESP32.
02

ESP32

Handheld architecture

Prototype 02 moved the system to an ESP32 while initially retaining the TFT and planned joystick interface.

During breadboard development, the input design changed and the number of available GPIO connections became increasingly restrictive.

I added an MCP23017 I/O expander and replaced the joystick with six digital controls: a four-button D-pad plus A/Select and B/Back.

The breadboards and jumper wiring then became the next physical constraint. They worked for development, but made the device thicker and less organized than I wanted, leading to the custom enclosed version.

Result ESP32 + MCP23017 + D-pad/A/B + speaker + battery + custom enclosure.

Current Hardware

ESP32-based system

Processor

ESP32

Main processor with integrated Wi-Fi and Bluetooth.

Display

320 × 240 TFT

TFT_eSPI-compatible graphical display.

Input

6 buttons

Four-direction D-pad with A/Select and B/Back.

I/O

MCP23017

I²C GPIO expansion for the physical controls.

Audio

Speaker

Local audio output driven by the ESP32.

Power

Battery

Portable power for standalone operation.

Function Mapping
I²C SDA GPIO 27
I²C SCL GPIO 22
MCP23017 0x27
Buttons PA0, PA1, PA2, PA5, PA6, PA7
Speaker GPIO 26
Backlight GPIO 21

Engineering Decisions

Constraints shaped the design

01

Mega → ESP32

The Mega provided excellent I/O capacity but was physically too large. The ESP32 dramatically reduced the controller footprint.

02

Joystick → D-pad

The original analog joystick was replaced with dedicated digital controls that better fit the evolving handheld interface.

03

Add MCP23017

I/O expansion allowed six buttons to be supported without consuming the remaining ESP32 GPIO.

04

Breadboards → integrated hardware

Breadboards accelerated development but introduced unnecessary thickness and wiring complexity.

Platform Tradeoffs

The ESP32 solves some problems and creates others

The ESP32 gives CAPY a compact processor platform, but available I/O, memory, processing resources, and physical integration remain important constraints as the system grows.

Its built-in wireless hardware is a major reason to keep using it. Wi-Fi already supports network functionality such as NTP time synchronization and can later support weather data, OTA updates, and other online services.

Bluetooth provides another path for local communication, accessories, data sharing, and possible multiplayer functionality.

Wi-Fi NTP, OTA, weather, online services
Bluetooth Sharing, accessories, local communication

Next Revision

Smaller and more purpose-built

The next hardware revision will focus primarily on reducing physical size and replacing temporary prototyping hardware.

01

Soldered hardware

Move from removable breadboards to solderable prototyping board / perfboard with permanent, shorter hard-wired connections.

This should eliminate much of the plastic and connector height that currently contributes to the device's thickness.

02

3D-printed shell

Design an enclosure around the actual component dimensions instead of fitting components into a manually built shell.

Display mounting, buttons, battery placement, speaker openings, and internal supports can then be designed as part of one system.

03

Evaluate Pico / Pico W

A future revision may compare the ESP32 with the Raspberry Pi Pico family for I/O, memory, performance, board layout, and software support.

Because wireless functionality is valuable to CAPY, a Pico W-class platform would be the more direct alternative if connectivity remains a requirement.

04

Deeper hardware

Longer-term CAPY development can expand into custom peripherals, FPGA-based components, and increasingly low-level digital hardware.

The goal is for CAPY to continue evolving alongside my understanding of embedded systems and computer architecture.

CAPY remains an active engineering project. Future revisions will continue to document the problems, decisions, and tradeoffs that shape the system.

← Back to Projects