Introduction
Klipper is a 3D printer firmware that splits processing between a host computer (typically a Raspberry Pi) and the printer MCU. The host runs the motion planner and kinematics in Python, while the MCU handles real-time step generation. This architecture enables higher step rates, advanced algorithms, and runtime configuration changes without reflashing.
What Klipper Does
- Runs motion planning on a host computer for higher computational throughput
- Generates precise step timing on the MCU using pre-computed schedules
- Supports input shaping to eliminate ringing artifacts at high speeds
- Provides pressure advance for consistent extrusion during acceleration
- Allows runtime configuration changes via a plain-text printer.cfg file
Architecture Overview
Klipper consists of a Python host process and a C microcontroller firmware. The host receives G-code, computes kinematic moves with look-ahead, and sends timed step commands to the MCU over serial or USB. The MCU executes step pulses at precise intervals using hardware timers. Moonraker provides an HTTP/WebSocket API that web interfaces (Mainsail, Fluidd) use to control the printer. Multi-MCU setups allow distributing stepper control across several boards.
Self-Hosting & Configuration
- Install Klipper, Moonraker, and a web UI (Mainsail or Fluidd) on a Raspberry Pi or similar SBC
- Flash the Klipper MCU firmware to your printer board via USB, SD card, or DFU
- Configure printer.cfg with steppers, extruder, bed, probe, and kinematics settings
- Run input shaper calibration with an ADXL345 accelerometer for optimal print speed
- Use KIAUH or manual install scripts for initial setup and updates
Key Features
- Input shaping with automatic resonance measurement via accelerometer
- Pressure advance for clean corners and consistent extrusion width
- Multi-MCU support to combine multiple boards in a single printer
- Exclude objects to skip failed parts mid-print without restarting
- CANBUS support for simplified wiring with toolhead boards
Comparison with Similar Tools
- Marlin — Runs entirely on the MCU with no host dependency; Klipper offloads to a host for higher step rates and runtime config changes
- RepRapFirmware — Self-contained with built-in web interface; Klipper relies on external web UIs but offers superior input shaping implementation
- Smoothieware — 32-bit MCU firmware; Klipper achieves higher kinematic performance by using the host CPU
- grbl — Lightweight CNC controller; Klipper adds full 3D printing support and advanced motion algorithms
FAQ
Q: Do I need a Raspberry Pi for Klipper? A: A Raspberry Pi is most common, but any Linux SBC or even a laptop running Linux works. Some all-in-one boards (e.g., BTT CB1) include both the SBC and MCU.
Q: Can I keep my existing printer board? A: Yes. Klipper supports most 8-bit and 32-bit printer boards. The MCU firmware is flashed onto the existing board while the host software runs on the Pi.
Q: How does input shaping improve print quality? A: Input shaping applies a filter to the motion commands that cancels the mechanical resonance frequencies of the printer frame, eliminating ringing/ghosting artifacts visible on surfaces.
Q: Is Klipper harder to set up than Marlin? A: Initial setup requires configuring printer.cfg and flashing both the host and MCU. KIAUH simplifies installation. Once configured, runtime changes are easier since no reflashing is needed.