PenBot is a linkage-based drawing robot (plotter) with coaxial motors that converts human faces into vector portraits. Loosely inspired by the Line-us robot and early line-us clone projects, it evolved through multiple iterations to become a unique artistic machine.
Originally designed to sign yearbooks at the end of senior year, the project grew into an exploration of inverse kinematics, computer vision, and mechanical control. The goal was simple: create a robot that could leave a lasting impression through personalized artwork.
The robot uses a two-link planar mechanism with coaxial motors. This configuration trades some accuracy for simplicity and a compact design, though the current prototype is fairly large.
Key Components:
Coaxial stepper motors for the two-link arm
3D-printed PLA parts using Ender 3 components
Electronics enclosure for all control systems
Raspberry Pi 5 with webcam support
Converting from screen coordinates to the robot's radial system requires complex inverse kinematics. Wandian Lee developed the original math and C code for the coordinate system. The project later transitioned to MicroPython on a Raspberry Pi 5 with Adafruit stepper motor HATs. Much of the refactored python code currently running on the system was created by James Todd.
The Desmos calculations show the trigonometric relationships needed to handle coordinate transformations and calculate where the linkage moves the pen.
The system uses OpenCV and path tracing libraries to convert faces into drawable vectors:
Webcam captures real-time images
Face detection and feature extraction
Conversion to vector paths optimized for the robot's constraints
Motor control executes the drawing
Each portrait is unique to the person interacting with the project.
At OpenSauce 2025, PenBot drew over 50 portraits of expo attendees. The robot performed semi-reliably in a high-traffic environment, though it worked better with a variable power supply than battery power, and had overheating issues with the pi and motors.
The linkage configuration has clear advantages and limitations:
Pros:
Compact mechanical design
Uses common 3D printer parts
Relatively simple construction
Cons:
Limited drawing accuracy
Complex coordinate math required
Larger footprint than initially planned
The project went through many iterations and revisions. Starting with basic automation concepts, it evolved into a complex system integrating mechanical design, mathematics, computer vision, and real-time control.
PenBot successfully bridges engineering and art, creating personalized drawings while demonstrating robotics concepts to general audiences. The project shows how technical challenges can evolve into meaningful applications that engage people with both technology and creativity.
GitHub Repository with all of the code coming soon!