From curve to paper
The drawing pipeline began with coordinates, not motor commands.
I built a Python tool that sampled parametric shapes into ordered X and Y coordinates. The robot then established its physical origin and followed each coordinate with encoder feedback to trace the path on paper.
Motion pipeline
From generated coordinates to encoder-controlled motion.
-
01
Generate
Python converted parametric curves into coordinate arrays in the order the pen needed to trace them.
-
02
Home
Each gantry moved toward its sensor boundary. Averaging the contact positions gave the controller a repeatable physical origin before a drawing began.
-
03
Track
Encoder feedback updated the remaining X and Y error while proportional motor commands moved both axes toward the next point.
-
04
Draw
The robot advanced only after both axes entered a 0.1 target tolerance, keeping each line segment tied to the generated path.
Vector control
Both axes had to arrive together.
Driving X and Y independently distorted diagonal lines. I derived proportional motor commands from the current axis errors, then normalized the X and Y velocity vector. That preserved the direction of each line segment while fresh encoder readings closed the position loop.
Mechanical iteration
Once diagonal tracking improved, gantry wobble became the main source of uneven lines.
The two-gantry layout could place the marker correctly while still allowing enough physical play to leave uneven lines. That made the remaining error mechanical rather than something the controller could tune away.
We modelled and printed custom spacers to constrain the gantry assembly. Reducing that wobble made the plotted lines more consistent and let the software corrections carry through to the page.