IN PROGRESS PROJECT
NETWORKED KINETIC SYSTEM
#EmbeddedSystems #RS485Protocol #MotorControl #PIDControl #KiCad #AIAssistedDev
CODENAME: WALLABY KINETIC
CODENAME: WALLABY KINETIC
End-to-end networked motor control system with custom PCB, communication protocol, and real-time web dashboard.
Wallaby Kinetic is a networked kinetic art installation that coordinates an array of stepper motors in real time. Each motor has a custom PCB on its back; all are daisy-chained on an RS485 bus. An ESP32-S3 controller orchestrates motion patterns and hosts a live web dashboard for real-time control and monitoring. The entire stack — custom protocol, PID control, PCB, and browser frontend — is designed and built from scratch, with AI-assisted development playing a central role throughout the process.
The system has three layers. A Svelte web app connects over WebSocket to the ESP32-S3 controller, which translates commands into RS485 packets. Each motor node (SAMD21 + TMC2209 driver + AS5600 encoder) runs a closed-loop PID controller to track the target angle and reports status back when polled. The full round trip runs at 10–20 Hz per motor.
Motor Node Controller
Each node runs on a SAMD21 and controls one motor.
Closed-Loop PID: TMC2209 driver + AS5600 magnetic encoder at 800 kHz I2C. PID algorithm established and fine-tuned with Claude Code. Velocity feedforward from the controller compensates for noisy derivative.
Homing: Two-pass StallGuard4 stall detection against a mechanical end-stop.
State Machine: HOMING → HOMED_IDLE → RUNNING → WATCHDOG_STOP → ERROR.
PCB Design
Node PCB designed in KiCad, mounts directly on the stepper motor back. Integrates SAMD21 MCU, TMC2209 driver, AS5600 encoder, RS485 transceiver, shift register for DIP address, NeoPixel connectors, SWD header, and power regulation. Controller PCB is not yet designed (currently using an off-the-shelf ESP32-S3 dev board).
The ESP32-S3 controller generates real-time sine wave positions for each node and packages them into compact 14-byte packets — bundling motor position, velocity feedforward, and LED parameters into a single frame sent over the RS485 bus.
The dual-core architecture dedicates Core 1 entirely to the motor loop while Core 0 serves the web dashboard over WiFi, with FreeRTOS queues bridging the two so a browser interaction flows into a motor command without blocking either task.
The controller hosts the entire frontend from internal flash, making the system a self-contained appliance.
Web Dashboard
Designed mobile-first in Figma for on-site use, the dashboard serves as both a creative control surface and a diagnostic tool.
The interface features a 3D motor visualization that responds to live position data, per-motor status cards with health and motion readouts, interactive sine wave controls with throttled real-time updates, and per-motor position override. Every frame from the controller renders immediately in the browser.
Technical Highlights
PID with noisy encoder
AS5600 noise amplified derivative term. Solved with velocity feedforward from the controller instead of KD. Result: ±4.2° tracking on a 0.3 Hz, ±60° sine wave.Cross-core concurrency
FreeRTOS task separation + dedicated queues eliminated a crash bug from ws.textAll() called on the wrong core.
NeoPixel vs RS485 timing
Deferred-update pattern avoids interrupt-disabled window during pixel clock-out from dropping RS485 bytes.Encoder–motor direction coupling
Raw angle mirrored in encoder library when direction DIP is flipped, so all downstream math self-corrects.
Tech Strack
Node — SAMD21 · TMC2209 · AS5600 · RS485 · C++ / PlatformIO
Controller — ESP32-S3 · FreeRTOS · ESPAsyncWebServer · WebSocket · LittleFS
Frontend — Svelte 4 · Vite · WebSocket (20 Hz)
PCB — KiCad 9
Protocol — Custom RS485, half-duplex, 115200 baud
Design — Figma (dashboard UI)
AI Tools — Claude Code · Gemini + MCP (Figma → Svelte)
AI-Assisted Development Workflow
This project deliberately leverages AI coding tools throughout the development process — not as a black box, but as a collaborative workflow where I direct the architecture, design decisions, and hardware integration while using AI agents to accelerate implementation and iteration.
Protocol Design & Implementation
I planned the RS485 custom protocol structure and used Claude Code to implement and iterate on the packet parser, state machines, and the full controller/node communication stack.PID Algorithm & Tuning
The closed-loop PID controller was established and systematically fine-tuned with Claude Code — iterating through gain values, analyzing encoder noise characteristics, and arriving at the feedforward-based approach that solved the noisy derivative problem.
Dashboard Design & Frontend
I designed the web dashboard UI in Figma, then used Gemini with MCP (Model Context Protocol) to translate the Figma designs into Svelte components.Backend–Frontend Integration & UX
Claude Code was used to bridge the ESP32 WebSocket server and the Svelte frontend — wiring telemetry data to UI stores, implementing throttled command sending, and fine-tuning the real-time animation and user experience of the dashboard.
The result is an AI-augmented development workflow where I own the system design, hardware decisions, and overall direction, while AI tools handle the high-velocity coding, debugging, and iteration cycles that would otherwise slow down a solo developer building a full-stack embedded system.