Ender-5 Plus Klipper Kinematics Retrofit & Code-First Parametric Studio CAD

Large-format 3D printer linear-rail and ADXL345 Input Shaper retrofit paired with Python (build123d) & FreeCAD parametric studio optical mount engineering

01 / 01

Ender-5 Plus Klipper Kinematics Retrofit & Code-First Parametric Studio CAD

This project establishes a large-format 3D printer kinematics retrofit and code-first parametric CAD pipeline built to rapidly manufacture custom optical hardware, lighting modifiers, filter mounts, and analog darkroom agitation fixtures for photography studio operations.

While a commercial large-format FDM printer (Ender-5 Plus, 350×350×400mm) offers enough build volume to print oversized lighting reflectors and large-format view camera lens boards in a single piece, its stock V-slot POM rollers and long Bowden extrusion path suffered from mechanical play, severe ghosting, and surface ringing at elevated speeds. At the same time, designing threaded optical mounts and bearing press-fit interfaces in mouse-driven GUI CAD tools made it brittle to track material-specific thermal shrinkage and tolerance revisions under version control.

To overcome both bottlenecks, the machine was converted to Klipper firmware, full X/Y linear rails, and ADXL345 accelerometer-calibrated Input Shaping, paired with a Python build123d parametric CAD workflow managed in Git—delivering repeatable ±0.05mm mechanical accuracy directly in the studio.


1. Hardware Motion Kinematics Retrofit

The entire motion assembly of the cube-frame gantry was re-engineered with high-rigidity components to hold dimensional geometry under rapid acceleration.

code
+─────────────────────────────────────────────────────────────────────────────+
|                   Ender-5 Plus Kinematics Retrofit Architecture             |
+─────────────────────────────────────────────────────────────────────────────+
  [Cube Box-Frame Chassis] ──> Preserves full 350 × 350 × 400 mm build volume
           │
           ├─ [X/Y Linear Rail Conversion]: Stock V-slot POM rollers removed ──> MGN12H rails
           │   - Maintains 0mm axial backlash and eliminates uneven roller wear at high accel
           │
           ├─ [Direct-Drive Toolhead]: 800mm Bowden tube removed ──> Ultra-light integrated drive
           │   - Retraction distance reduced: 6.5mm ──> 0.6mm (prevents PETG stringing)
           │
           ├─ [Dual Z-Axis Leadscrew Sync]: Independent stepper alignment
           │   - Automated sub-millimeter bed leveling via Klipper z_tilt_adjust
           │
           └─ [Rigidly Mounted Accelerometer]: Toolhead-centered ADXL345 over SPI
               - Real-time structural resonance profiling under live print accelerations
  • Precision MGN12H Linear Rails: Stock POM wheels gradually wore flat spots during long print runs, introducing subtle backlash on the X and Y axes. Upgrading to 450mm high-carbon steel linear rails eliminated bearing slop and sustained mechanical rigidity across multi-dozen-hour continuous prints.
  • Direct-Drive Extruder Conversion: Moving the drive gear directly onto the toolhead eliminated melt-zone hysteresis caused by an 800mm Bowden tube. This sharply reduced corner bulging and stringing when printing high-temperature engineering filaments such as PETG and ASA.

2. ADXL345 Resonance Profiling & Klipper Input Shaper

When a large gantry changes direction abruptly, inertia excites structural frame resonances that telegraph onto printed walls as concentric ripples (ringing). To cancel these oscillations mathematically, Klipper's Input Shaping algorithms were tuned from empirical accelerometer telemetry.

1) Resonance Frequency Spectrum Measurement

With an ADXL345 3-axis digital accelerometer mounted to the toolhead, Klipper swept excitation frequencies from 10Hz to 130Hz to capture the Power Spectral Density (PSD) of each axis.

code
[X-Axis Primary Resonance Peak]: 46.2 Hz (Amplitude: 1.82e4)
[Y-Axis Primary Resonance Peak]: 38.4 Hz (Amplitude: 2.15e4)

2) Shaping Filter Configuration

Using the measured resonance peaks, distinct input shaper filters were assigned per axis: MZV on the X-axis for an optimal balance between vibration cancellation and corner sharpness, and EI (Extra Input) on the heavier Y-axis gantry for wider damping bandwidth.

ini
[input_shaper]
shaper_freq_x: 46.2
shaper_type_x: mzv
shaper_freq_y: 38.4
shaper_type_y: ei

[printer]
max_velocity: 250
max_accel: 4500
square_corner_velocity: 5.0
  • Damping Performance: Even at 4,500 mm/s² acceleration, vibration energy was attenuated by more than 92%, suppressing surface ringing below the threshold of visual inspection.

3) Pressure Advance Calibration

Pressure Advance was calibrated to dynamically compensate for nozzle chamber pressure lag during acceleration and deceleration ramps.

  • On the direct-drive toolhead with PETG, pressure_advance = 0.042 eliminated corner swelling and produced crisp, razor-sharp 90-degree edges.

3. Code-First Parametric CAD with Python build123d

Studio fixtures demand tight mechanical tolerances—optical filter threads, 1/4-20 UNC tripod mounts, light-tight O-ring grooves, and bearing press-fit clearances. Traditional click-driven GUI CAD histories frequently suffer from topological naming failures when upstream parameters change. Adopting build123d to declare B-Rep geometry in pure Python eliminated brittle manual rebuilds.

python
"""
Parametric optical filter ring modeling excerpt in build123d
"""
from build123d import *

# Studio optical specification parameters (unit: mm)
FILTER_THREAD_DIA = 77.0    # Standard 77mm lens filter diameter
PITCH = 0.75                # Optical filter thread pitch
MATERIAL_SHRINKAGE = 1.007  # ASA thermal shrinkage compensation factor (0.7%)
BEARING_FIT_GAP = 0.12      # Rotating ring press-fit clearance

with BuildPart() as studio_mount:
    # 1. Construct outer main body
    with BuildSketch() as sk:
        Circle(radius=(FILTER_THREAD_DIA * MATERIAL_SHRINKAGE + 16.0) / 2)
        Circle(radius=(FILTER_THREAD_DIA * MATERIAL_SHRINKAGE) / 2, mode=Mode.SUBTRACT)
    extrude(amount=18.0)

    # 2. Machine 1/4-20 tripod insert mounting holes
    with Locations(PolarLocations(radius=48.0, count=4)):
        CounterBoreHole(radius=4.2 / 2, counter_bore_radius=7.0 / 2, counter_bore_depth=3.5)

    # 3. Cut internal light-baffle labyrinth hairline grooves
    with Locations(Face.top()):
        # Concentric micro-grooves to suppress stray studio light reflections
        for r in [39.0, 40.5, 42.0]:
            Hole(radius=r, depth=0.8)

Engineering Advantages of Code-First CAD

  1. Git-Native Mechanical Versioning: Every change to outer diameter, thread depth, or assembly clearance is captured cleanly in standard Git commit diffs.
  2. Global Shrinkage Parameter Propagation: Switching production filament from PLA to rigid ASA or chemical-resistant PETG requires updating a single constant (MATERIAL_SHRINKAGE), mathematically recalculating every bore, fillet, and thread pitch simultaneously.
  3. Headless Artifact Generation: Automated Python execution exports production-ready .step and .stl meshes reproducibly in headless CI/CD environments.

4. Field Deployments in Studio & Darkroom Operations

Key custom fixtures fabricated on this retrofitted platform and actively deployed in production:

  • Large-Format View Camera Lens Board Adapter: Eccentric adapter mounting modern high-resolution optics onto Linhof-standard boards, incorporating an ASA labyrinth light-trap seal to prevent light leaks.
  • 77mm / 82mm Rotating Optical Polarizer Mount: Precision-toleranced with a 0.12mm sliding clearance to provide smooth, dry-damped manual rotation without lubricants.
  • Darkroom B&W Film Reel Auto-Agitation Jig: Magnetically coupled agitation fixture printed in high-density PETG for chemical resistance against photographic developer and fixer baths.

5. Engineering Outcomes

  • 2.5× Print Speed Increase with Superior Surface Finish: Structural stiffening and Input Shaping raised usable print acceleration from 1,200 mm/s² to 4,500 mm/s² while maintaining ghost-free surface quality.
  • ±0.05mm Dimensional Consistency: Applying shrinkage-compensated build123d formulas enabled zero-play mating between 3D-printed housings and machined aluminum optical threads.
  • Turnaround Compressed from Weeks to Hours: Custom optical adapters that previously required 1–2 weeks of external CNC outsourcing now move from parametric design to physical field verification in under 4 hours.

Related Build Logs & Articles

1 post