How klipper3d/klipper works
Klipper controls 3D printers by pairing host-side printer orchestration with one or more MCU firmware runtimes. The main workflow accepts printer configuration and G-code, plans motion, translates it into timed stepper activity, and communicates commands to MCU firmware that drives hardware. Host extensions add sensing, temperature control, calibration, and user-facing status features. The README establishes the host-plus-MCU product boundary; sampled sources confirm selected extension and MCU runtime behavior, while detailed host wiring and most extension interactions are inferred only at subsystem level.
Main entry points: klippy.py Printer runtime · extras Printer extensions · mcu.py MCU transport · gcode.py G-code
Components 17
Host control
- Configuration
klippy/configfile.py - Printer runtime
klippy/klippy.py - G-code
klippy/gcode.py
Motion execution
- Motion planner
klippy/toolhead.py - Kinematics
klippy/kinematics/__init__.py - Stepper control
klippy/stepper.py - Motion engine
klippy/chelper/itersolve.c
Printer features
- Printer extensions
klippy/extras - Heater control
klippy/extras/heaters.py - Sensors
klippy/extras - Display and menu
klippy/extras/display/display.py
MCU firmware
- MCU transport
klippy/mcu.py - Serial protocol
klippy/serialhdl.py - Clock synchronization
klippy/clocksync.py - MCU scheduler
src/rp2040/main.c
Other components
- Printer operator
- Printer hardware
Connections 20
- Printer operator → Configuration: configures
- Printer operator → G-code: submits commands
- Configuration → Printer runtime: configures runtime
- Printer runtime → G-code: dispatches commands
- G-code → Motion planner: requests motion
- Motion planner → Kinematics: plans axes
- Kinematics → Stepper control: maps movement
- Stepper control → Motion engine: queues steps
- Printer runtime → MCU transport: manages MCU
- MCU transport → Serial protocol: sends commands
- MCU transport → Clock synchronization: synchronizes clocks
- Serial protocol → MCU scheduler: transfers protocol
- MCU scheduler → Printer hardware: drives hardware
- Printer runtime → Printer extensions: loads extensions
- Printer extensions → Heater control: provides control
- Printer extensions → Sensors: provides sensing
- Printer extensions → Display and menu: provides interface
- Heater control → Printer hardware: controls temperature
- Sensors → Printer hardware: reads measurements
- Display and menu → Printer operator: shows status