Close

Automatic Tool Alignment in XYZ

A project log for Limn: Pen Plotter with Toolchanger

Building a Pen Plotter with automatic toolchanger with components from an old RepRap style 3D Printer. Runs on Klipper.

prashant-sinhaPrashant Sinha 05/12/2026 at 08:560 Comments

Last weekend I spent ~30 minutes calibrating three pens manually. Annoyed, I decided to automate this process as well. For complete pen alignment we need to offset the XYZ coordinates -- the offsets are stored in a RFID tag (more details)

A Resistive Touch Panel was used to build a new plotter bed. By probing a tool over the panel at several location we can know the three spatial coordinates.

I used a Cheap Yellow Display (CYD) 2.8" which contains an XPT2046 resistive touch controller and panel. I removed the display entirely and soldered pigtails to four touch panel pins. Then I used another larger resistive panel that I reclaimed from an old car GPS. Magnetic Pogo Pins allow connecting the panel when needed.

The new bed is 2.5mm thick and magnetic alignement is highly repeatable. I posted a demo video of it in action.

Hardware

To connect the touch panel to klipper, I'm currently keeping the CYD in use.

Software

The CYD runs a very basic ESPHome firmware. It logs out the XY and Pressure values via serial port and can be read by a Python script. Klipper macros can use CLI command to run the script when probing to read the coordinates.

A PROBE_TOOLS macro will automate the whole process:

  1. Partial BLTouch bed mesh over the touch panel.
  2. Docks `reference tool` (T0) and probe at 4 locations. Stores the coordinates and scaling factor.
  3. Following steps are repeated from tool T1 to T4:
    1. Dock Tool
    2. Slow Probe to find tool Z offset
    3. Fast Probe at 4 locations
    4. Calculate XYZ offset from reference pen
    5. Write the offset to pen's RFID tag
    6. Undock Tool
  4. Partial bed mesh on paper area (A6 size).
  5. Repeat from T0 to T4:
    1. Dock Tool (also reads the tag)
    2. Draw alignment pattern
    3. Undock
  6. User/Camera confirmation

Roughly 10 units of displacement on the touchscreen corresponds to 1-2mm toolhead movement, in my observation. I'll work on alignment script next, given that I seem to have all the required parameters about tools available.

Github repo will be updated soon containing the config changes. 

PS: The screen that comes with the CYD is also sufficient, I just had some extra available. It was slightly thicker as well since I couldn't easily remove the display layer.

Discussions