Skip to the content.

🎹 Piano Player – Mechatronics Design Project

🎯 Project Objective

Design and build a full‑range electromechanical piano‑playing system capable of actuating all 88 keys of a standard acoustic piano using MIDI performance data.

The project began as a fully remote collaboration, with mechanical, electrical, and firmware development performed in Taiwan. Over time, it evolved into a long‑term embedded systems and real‑time control R&D platform, serving as a vehicle for learning, architectural experimentation, and scalable mechatronic design.


🧩 System Overview

The system is built around a modular actuator architecture consisting of two identical 44‑key subsystems, each responsible for half of the keyboard. This modularity supports:

The architecture cleanly separates:

This separation ensures direct actuation while enabling flexible external control, observability, and experimentation.


🧩 Early Design Constraints & Rationale

Initial design discussions established several constraints that shaped the first prototype:

These constraints strongly influenced the early mechanical layout, electronics partitioning, and firmware structure.


⚙️ Mechanical Design

Mechanical design was carried out in Autodesk Fusion 360, with emphasis on:

Due to limited workshop access and budget constraints, the prototype frame was built from laser‑cut plywood and perspex, assembled using mechanical fasteners rather than adhesives. This allowed fast design revisions and mechanical experimentation during early testing.

Design artifacts:


⚡ Electronics

Original Architecture (Arduino‑Based)

The first-generation system required independent control of 88 servo motors, one per piano key. To support this:

All schematics and PCB layouts were created in KiCad, with fabrication performed by JLCPCB.

PCB documentation:

While functional, this architecture revealed limitations:

These limitations motivated a full system redesign.


💾 Embedded Software

Initial Firmware (Arduino)

The original firmware:

Although successful, the monolithic structure struggled with timing problems as the Arduino was severely underpowered for the job.


🔧 System Redesign & Modern Architecture

The system is now being re‑architected as a modern embedded control platform focused on determinism, scalability, and robustness.

Hardware & Control Evolution

Firmware Architecture (Zephyr RTOS)

The embedded control layer has been ported to Zephyr RTOS running on an STM32WB55, introducing:

This architecture cleanly decouples real‑time actuation from non‑deterministic external inputs.


🌐 Host Control & Web Interface

To support remote testing and flexible playback, a host‑side control layer provides:

Evolution of the Host System

The webserver originally ran on a Raspberry Pi 2B, but under heavy load (multiple clients, large MIDI files, real‑time updates) the Pi became CPU‑bound. To improve responsiveness and reliability, the system was migrated to a more powerful openSUSE Linux workstation, resulting in:

This migration reflects the system’s evolution from a simple test interface to a robust orchestration layer.

Web UI Screenshot


📸 Media

Arduino Prototype

STM32 / Zephyr Prototype (Current)

Note: Only one 44‑key subsystem is shown. The second subsystem was provided to a collaborator for independent testing, and the architecture is validated on a half‑keyboard before full 88‑key reintegration.


🚧 Current Status & Next Steps

Completed

In Progress

Planned Enhancements