Multicolor AutoPen Gripper - Robotic Pen Changer & Drawer

AutoPen Gripper - Robotic Pen Changer & Drawer for MGN12 linier rail block.

What is this? This is a pen plotter / autopen, pen holder that can grab different pens while doing the same drawing.

Features: pen detection / pen changing functionality/ Pressure sensing

How? : It uses a servo to hold the pen. And another servo that makes the pen go up and down so it can draw on your CNC machine.

Requirements: A CNC frame that has a MGN12 mounting block on the Y linier rail trolly. See warning below about how to modify the servo Z for pressure sensing.

Janky Instructions :
Print at 100% infill ABS or better material PLA if you don't want it to last long, assemble. upgrade firmware

Janky Parts list:

1x plastic straw handle from a single push up pop snack (for liner in Z bearing and Servo Z handle)
Mgn12 linier rail.
2x, 5mm Rods 100mm long
2x, 5mm id , 10mm long bearings size for liner rail.
2x 5mm id 5mm length bearings for Z push arm.
M2 screws.
2x 5mm dia , 25mm long metal dowel stainless.
2x 20kg metal servos.
2x springs with a 5mm id.
1x ender3 type mechanical end stop switch for pen detection.
2 Bolts and 2 nuts either M3 or M4 size

WARNING! You must determine how will Z will determine it's travel distance.
Option 1 : Springs, Just toss some springs in it and set the Z offset.
Option 2: NO springs, And manually set the Z offset.
Option 3: Add a BL Touch or endstop sensor to determine Z.
Option 4: Modify the servo to be able to sense resistance. This eliminates springs and allows the machine to sense the exact pressure of the pen.

How to implement option 4 (Ai slop written for a SKR 1.3 with TMC 2209's, for the 20kg metal servo)

Power the vertical servo from its own stable supply (6–7.4V recommended, capable of 3A+ peaks). Don't share with the SKR's logic power if possible.
Cut/insert a low-value shunt resistor (0.1Ω – 0.25Ω, 5W rating) in the ground wire of only the vertical servo:Vertical servo GND → one leg of shunt
Other leg of shunt → SKR/system GND

Connect a wire from the servo-side of the shunt (the tiny voltage drop point) to one of the SKR 1.3's free analog-capable pins (via a small series resistor like 1k–10kΩ for safety). The SKR 1.3 has several available GPIO/ADC pins (often repurposed endstop or expansion pins — refer to the board pinout).
Optional: Add a simple RC filter (e.g., 100–470Ω + 10–47µF cap) to clean up noise.

The grip servo stays wired normally (use the endstop for detection, and you can safely cut its power after it closes and the switch triggers).How Pressure Control Works (Software Side)In your G-code or custom macro when it's time to draw:Command the vertical servo slowly toward the "down" angle (small increments, short delays).
Poll the analog pin repeatedly and calculate approximate current (V_drop across shunt ÷ resistance).
When current rises above your calibrated threshold (light pen contact), stop advancing the angle or back off 1–3° and hold that position.
This approximates consistent pressure without the springs doing the work.
Tune the threshold per pen type (very light for ballpoints, slightly higher for gel/markers).

You can store different thresholds for each color in your multicolor workflow.
/ End Ai Slop