Advertisement
Advanced Time: 6–8 weeks Mechanical Engineering

3D Printer Design and Build

Design and build a CoreXY 3D printer from scratch with linear rails, precision motion, Klipper firmware, and input shaping.

3D PrinterFDMMarlinCoreXYStepper MotorAdditive Manufacturing
DifficultyAdvanced
Duration6–8 weeks
Components10 items
Steps7 steps

Introduction

Design and build a CoreXY 3D printer from scratch with linear rails, precision motion, Klipper firmware, and input shaping. This comprehensive guide covers everything from design through implementation, testing, and deployment.

Theory & Background

CoreXY is a motion system where both XY motors work together for every move. Moving X: motor A forward + motor B backward. Moving Y: motor A forward + motor B forward. Moving diagonal: only one motor runs. This eliminates the moving heavy motor common in bed-slinger printers (Ender 3 style), reducing moving mass — enabling faster, cleaner prints. Mathematically: motor_A = X + Y, motor_B = X - Y. Implementation: belts form a unique crossed path with idlers at specific positions.

Advertisement

Components & Requirements

10 components required for this project.

#ComponentPurposeQty
12020 Aluminum Extrusion (various lengths)Structural framex15m
2MGN12H Linear Rails (350mm)XY axis linear motionx4
3NEMA 17 Stepper Motors (1.8°, 0.4A)XY × 2, Z × 1, Extruder × 1 (+ spare)x5
4TMC2209 Stepper DriversSilent, sensorless homingx4
5BTT Octopus Pro Board32-bit controller with Klipperx1
6E3D Revo Voron HotendHigh-performance hotendx1
7BMG Extruder (dual drive)High-grip filament feedingx1
8Raspberry Pi 4 (Klipper host)Klipper firmware processingx1
9Kinematic bed mount + PEI spring steelRemovable magnetic print surfacex1
10ADXL345 AccelerometerResonance measurement for input shapingx1

Step-by-Step Implementation

Follow these 7 steps carefully.

1
CoreXY Kinematics

CoreXY is a motion system where both XY motors work together for every move. Moving X: motor A forward + motor B backward. Moving Y: motor A forward + motor B forward. Moving diagonal: only one motor runs. This eliminates the moving heavy motor common in bed-slinger printers (Ender 3 style), reducing moving mass — enabling faster, cleaner prints. Mathematically: motor_A = X + Y, motor_B = X - Y. Implementation: belts form a unique crossed path with idlers at specific positions.

2
Frame Design and Assembly

Design in Fusion 360 using standard extrusion lengths (200, 250, 300, 350mm — minimizes cuts). Key dimensions: bed size = print volume target × 1.3 for frame. Z-height: print volume + 150mm for gantry. Use corner cubes and L-brackets for all joints — critical for squareness. Frame squareness: measure diagonals with tape measure, tighten corner brackets until diagonals are equal within 0.5mm. Square frame is essential for accurate first layer.

3
Linear Rails and Motion Assembly

MGN12H rails for XY: rails mounted on X beam and Y axis. Carriage moves on hardened steel balls — much more rigid and accurate than V-wheels. Rail parallelism: both Y rails must be parallel within 0.1mm — use a precision jig or DFM spacing method (print test blocks). Belt tension: equal tension on both A and B belts is critical for correct CoreXY kinematics. Gates 2GT belt: tension to ~110Hz when plucked (measure with phone app).

4
Klipper Firmware Configuration

Klipper runs the motion planning on Raspberry Pi (ARM) and sends step/direction pulses to the MCU. This enables complex computations impossible on ATmega328. Configure printer.cfg: set stepper positions, motor currents, thermistor types, PID values for heaters. Calibrate: rotation distance (steps/mm), e-steps (extruder calibration), Z offset (nozzle-to-bed distance). Klipper enables: resonance compensation, pressure advance, exclude objects, firmware retraction, and mesh bed leveling.

5
Input Shaping for High-Speed Printing

At high speeds, printer vibrations cause ringing artifacts (waves or ghosting in prints). Input shaping measures and compensates for resonances. Mount ADXL345 on print head. Run TEST_RESONANCES command in Klipper. Python script generates frequency spectrum, identifies resonance peaks (typically 20–80Hz). Configure input shaper type (MZV, ZV, EI, 2HUMP_EI) and frequency. Result: print at 200–300mm/s with clean quality vs 50–80mm/s without shaping.

6
Bed Leveling and First Layer

Manual tramming: adjust 4 bed screws until all corners are equal distance from nozzle (paper method: slight drag). Automatic mesh leveling: PROBE_ACCURACY test (probe 5× at same point, std dev < 0.01mm indicates good probe repeatability). BED_MESH_CALIBRATE samples 5×5 or 7×7 grid, stores height map. Applied during print to compensate for bed warp. Critical calibration: Z offset (live adjust during first print layer) — correct first layer is foundation of print quality.

7
Pressure Advance Calibration

Pressure advance (PA) compensates for filament pressure lag in bowden/direct drive. At corner: nozzle must decelerate before corner, then accelerate — without PA, corners have blobs. Print a calibration pattern: tower with varying PA values printed along height. Examine: find where corners are sharpest without gaps on straight sections. Set PRESSURE_ADVANCE=0.035 (typical for direct drive). Klipper computes smooth velocity profile incorporating PA automatically.

Code & Implementation

Core code for printer.cfg:

printer.cfg INI
# Klipper Configuration - CATB CoreXY Printer  [printer] kinematics: corexy max_velocity: 300 max_accel: 5000 max_z_velocity: 20 square_corner_velocity: 5.0  [stepper_x] step_pin: PF13 dir_pin: !PF12 enable_pin: !PF14 rotation_distance: 40          # 40mm per revolution (2GT 20T pulley) microsteps: 32 full_steps_per_rotation: 200   # 1.8 degree stepper endstop_pin: tmc2209_stepper_x:virtual_endstop position_endstop: 0 position_max: 300 homing_retract_dist: 0  [tmc2209 stepper_x] uart_pin: PC4 run_current: 0.800 diag_pin: PG6 driver_SGTHRS: 100             # Sensorless homing threshold  [extruder] step_pin: PA10 dir_pin: PA9 enable_pin: !PA8 rotation_distance: 22.6789511  # BMG extruder gear_ratio: 50:17 microsteps: 16 nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PA2 sensor_type: Generic 3950 sensor_pin: PF4 control: pid pid_Kp: 26.213 pid_Ki: 1.304 pid_Kd: 131.721 min_temp: 0 max_temp: 300 pressure_advance: 0.035  [input_shaper] shaper_freq_x: 52.3 shaper_freq_y: 48.7 shaper_type: mzv

Testing & Troubleshooting

Test 3D Printer Design and Build by verifying each subsystem individually before full integration.

!
Troubleshooting Tips

Verify power voltages, check ground connections, use serial monitor for debug.

Real-World Applications

*Rapid prototyping for product development
*Custom jigs and fixtures for manufacturing
*Replacement parts for discontinued products
*Educational models and teaching aids
*Prosthetic hand components
*Drone frame and component fabrication
*Mechanical linkage prototype testing
*Medical device concept models

Extensions & Next Steps

  • Add a tool changer for multi-material printing
  • Implement filament runout sensor with auto-pause
  • Build an enclosure for ABS/ASA printing (temperature control)
  • Add automated Z-offset calibration with load cell
  • Implement remote monitoring with Obico (formerly The Spaghetti Detective)

Interactive Playground

Coming Soon

An interactive simulator will be available here — simulate circuits and run code in-browser without hardware.

Frequently Asked Questions

What is the difference between FDM, SLA, and SLS 3D printing?
FDM (Fused Deposition Modeling): melts thermoplastic filament through a heated nozzle layer by layer. Cheapest, largest material variety (PLA, PETG, ABS, TPU, carbon fiber composites). Layer lines visible on parts. Typical accuracy: ±0.2mm. SLA (Stereolithography): UV laser cures liquid photopolymer resin. Smooth surface finish, excellent detail. Brittle and UV-sensitive resins, post-processing required (wash + cure). Typical accuracy: ±0.05mm. SLS (Selective Laser Sintering): laser sinters powder (nylon, metal). No support structures needed (powder supports), strong functional parts, very expensive ($50,000+).
What print speeds are achievable with input shaping?
Without input shaping: typical maximum useful print speed 50–80mm/s before ringing artifacts appear. With input shaping and high-acceleration motion system (CoreXY + direct drive): 200–300mm/s perimeter speed, 400–500mm/s infill speed. Voron printers are commonly tuned to 250mm/s with excellent quality. Bambu Lab X1C achieves 500mm/s using similar technologies. Speed is limited by: hotend melt rate (E3D Revo: ~25mm³/s), stepper motor torque at high RPM, and motor driver heat at high microstepping frequencies.
Advertisement