← Projects
Assistive Technology + Hardware·2025–2026·Published May 31, 2026

Ender Refab: Accessible Pen Plotter

An Ender 3 3D printer converted into a gesture-controlled pen plotter for people with limited hand or arm mobility. Custom Python desktop software uses MediaPipe hand tracking so users can draw by moving their hand in front of a webcam — no mouse or keyboard required. Built with Miles and Troy for an AT course final project.

Python 3PySide6MediaPipeOpenCVPySerialGoogle Gemini APIArduino C++Marlin FirmwareG-code

Why I built it

Drawing and creative expression typically require fine motor control — a barrier for people with conditions like cerebral palsy or muscular dystrophy. This project removes that barrier: if you can move your hand in front of a camera, you can draw. The Ender 3 was chosen because it's affordable, widely available, and runs Marlin firmware that can be repurposed as a CNC pen plotter with minimal hardware changes.

How it works

The hardware side involved stripping the Ender 3's extruder and adding a servo-controlled pen mount, wiring an Arduino Leonardo as a solenoid safety controller, and extending the Y-axis to handle full letter-size paper. The software is a PySide6 desktop app that captures webcam frames, runs MediaPipe hand landmark detection on a background thread, maps pinch gestures to pen-down/up commands, generates G-code from the resulting paths, and streams it to Marlin over USB serial.

Overview

The project splits into two layers. Hardware: the Ender 3 becomes a plotter by replacing the extruder with a servo pen mount, extending the Y-axis beyond the stock 220 mm to reach full letter height, and adding an Arduino safety controller that cuts the solenoid after 20 seconds regardless of software state. Software: a multi-panel Python desktop app handles six input modes — hand gesture drawing (the primary accessible path), freehand canvas, geometric patterns, handwriting generation, SVG import, and Gemini AI image conversion. Every mode ultimately produces a G-code job that streams to the machine in real time. The hard part was making the gesture-to-ink pipeline feel immediate and reliable — latency in hand tracking, serial buffering, and mechanical motion all had to stay low enough that the machine felt like a direct extension of the user's movement.

Process

01

Strip the extruder, add a pen mount

The Ender 3's hotend and extruder assembly were removed and replaced with a 3D-printed servo pen mount. The servo raises and lowers the pen at the Z axis position — Marlin's Z-move commands were repurposed to drive the servo rather than a lead screw.

02

Extend the Y-axis for full-size paper

The stock Ender 3 Y travel is 220 mm — too short for letter paper (279 mm). Longer guide rods and a custom printed carriage extension were added, and Y_MAX_POS in Marlin's Configuration.h was updated to match. The control software's bed dimensions were updated to reflect the new working area.

03

Wire a hardware safety controller

An Arduino Leonardo controls the solenoid via a relay on pin 2. It enforces a 20-second solenoid cutoff in hardware regardless of software state, and monitors a physical E-stop button. This was a deliberate design choice — safety limits that can survive a software crash or lost serial connection.

04

Build the gesture-to-G-code pipeline

MediaPipe's hand landmark model runs on a dedicated background thread, measuring thumb-to-index distance each frame. When the pinch threshold is crossed and held for 200 ms, a pen-down command triggers. Hand XY position is remapped from normalized webcam coordinates to plotter bed coordinates and streamed as G1 moves over serial. Latency through the full chain — camera → MediaPipe → serial → Marlin → motion — had to stay low enough to feel direct.

05

Add fallback input modes

Hand tracking is the primary accessible path, but not every user or session needs it. A freehand canvas, SVG importer, pattern generator, handwriting engine, and Gemini AI converter were added so the plotter can be used without a camera and without any motor input at all — just pick a pattern and hit plot.


Outcome

The result is a working assistive drawing tool built entirely from consumer hardware and open-source software. A user who cannot hold a pen or operate a mouse can move their hand in front of a $25 webcam and produce real ink drawings on standard letter paper.