Skip to content

Klipper: the 3D-printer firmware that moved the math to a Pi

Klipper runs a 3D printer's motion math on a Raspberry Pi and leaves the printer board to execute steps on schedule. That split is why hobby printers print fast without ringing, and what it costs.

A 3D-printed calibration tower standing on a wooden workbench, its walls showing faint ripple echoes near the corners, with a spool of teal filament behind it
A 3D-printed calibration tower on a workbench, with a spool of teal filament behind it.
On this page

In brief

  • Klipper splits the work: a Raspberry Pi computes every step time, and the printer board only executes the schedule, to 25 microseconds or better.
  • Input shaping cancels the printer's own vibrations, removing the ripples called ringing, but only after the resonance is measured, by tower or accelerometer.
  • Pressure advance compensates for filament pressure in the nozzle, keeping corners sharp and seams clean at speed.
  • The cost is a second computer, setup time, and retuning whenever the toolhead changes; the project ships from its master branch with no versioned releases.
  • The Voron project was an early adopter, and Creality now ships Klipper-based firmware on the Ender-3 V3 KE, listing input shaping and 500 mm/s.

A few years ago, a fast 3D print was a contradiction. Push a hobby printer much past 50 millimetres per second and the corners went soft, the walls rippled, and the machine shook across the desk. Today the same class of machine prints three or four times that fast and the walls come out clean. The motors did not get better. The math moved.

That is Klipper, an open-source firmware that splits the job in two. A Raspberry Pi, or any small Linux computer, does the thinking: it works out exactly when each stepper motor should step, from the physics of acceleration and the geometry of the machine. The printer's own board does almost no thinking at all. It receives a compressed schedule of step times and executes each one when told, to within 25 microseconds. The board became a metronome. The Pi became the brain.

The board was the bottleneck

Traditional 3D printer firmware runs entirely on the printer's microcontroller, and that chip was always the weakest part of the machine. It has to read G-code, work out the kinematics, and pulse the stepper motors, all on a processor that in older printers is an 8-bit chip running at 16 megahertz. The usual workaround was estimation: approximate the motion with shortcuts like the Bresenham algorithm and accept the timing errors. Klipper's documentation puts the alternative plainly. The host calculates precise step times from the kinematic equations, compresses the resulting schedule, and sends it to the board, which follows it or says so loudly if it cannot.

Two boxes joined by an arrow: the Raspberry Pi host computes every step time and sends a compressed schedule, and the printer board executes each step at the requested time
The split at the heart of Klipper: the Pi does the thinking and the printer board keeps the time. Facts from the Klipper Features documentation. Source.

The numbers show how much headroom the split buys. Klipper's own step benchmarks put a 16 megahertz AVR board, the chip in a decade of budget printers, at 157,000 steps per second on one motor. A modern STM32H723 board reaches 7.4 million. The host code is mostly Python, which the project says makes new kinematics easier to add, and the same design lets one printer run several microcontrollers at once, with the host keeping their clocks synchronised. One board can drive the extruder while another runs the heaters. Configuration lives in a single text file, printer.cfg, so changing a setting means editing a line and restarting, never reflashing the board.

The practical payoff is that an old printer can get faster without new hardware. The project's documentation notes that existing RepRap-style printers can run Klipper without hardware modification, just by adding a Raspberry Pi. That is the pitch that made it spread: the upgrade is a small single-board computer and an evening, not a new machine.

The ringing fix

Speed exposed a second problem, and it is the one Klipper is now best known for solving. Every fast move shakes the printer's frame, and the shake repeats on the print as faint echoes of every edge, a defect called ringing or ghosting. Klipper introduced input shaping to desktop 3D printing in late 2020: an open-loop technique that splits each move into smaller moves timed so the second cancels the vibration of the first, the way noise-cancelling headphones cancel a sound wave with its opposite.

Shaping only works if the printer's resonance is measured first, and the project is blunt that the measurement is the job. The documented method is to print a tall test tower with the acceleration rising in bands, then measure the distance between the ripples on its walls with calipers and work out the frequency from the print speed. The docs' worked example comes out at 49.4 hertz. An accelerometer bolted to the toolhead, the ADXL345 is the usual one, measures it directly instead. Two shaper settings then trade against each other: MZV causes less smoothing of fine detail, while EI tolerates a mismeasured frequency better. Pick wrong and the cure softens the print it was meant to sharpen.

The docs also warn that ringing usually starts in the hardware. A loose belt, a springy frame, or a heavy toolhead shakes first, and the project says to check and fix those before touching the shaper. At very low resonance frequencies, below about 20 to 25 hertz, the advice is to stiffen the printer or lighten the moving mass rather than shape harder, because shaping at those frequencies smooths the part more than it steadies it.

Pressure advance

The same split gives Klipper a second trick. Molten filament behaves like a spring: pressure builds in the nozzle as the extruder pushes, and it keeps oozing after the extruder stops. Pressure advance compensates by feeding extra filament during acceleration and less during deceleration, so corners stay sharp and seams stay clean. The project calls its version smooth pressure advance, because it avoids the sudden extruder speed changes that made earlier implementations unstable. Like input shaping, it is calibrated per material, and the docs treat it as a tuning value rather than a switch to flip.

What it costs

Klipper is not a free lunch, and its own documentation is honest about the price. It needs a second computer, a Linux host, running next to the printer. Installation means flashing the printer board with Klipper's small microcontroller firmware and running the host software on the Pi, with a web interface such as Mainsail or Fluidd on top. The tuning never quite ends either: change the toolhead, tighten a belt, or bolt on a heavier fan, and the resonance moves with it, so the frequency has to be measured again.

The project itself is a decade old and still rolling. Kevin O'Connor started it in 2014, and the repository, public under GPL-3.0, shows about 12,090 stars and 6,437 commits as of today, with no versioned releases: development ships from the master branch. The Voron project, which builds fast open-hardware CoreXY printers, was an early adopter, and the idea has since crossed into the mainstream. Creality's Ender-3 V3 KE, a 279 dollar printer, runs Creality OS, which Creality describes on its own page as based on the popular Klipper firmware, and lists input shaping as a feature with a 500 millimetre per second top speed. Klipper signed a partnership with board maker BigTreeTech in 2022.

Who should switch

The switch makes sense for people who print a lot, whose printer's board is the limit, and who would rather edit a text file than reflash firmware. It makes less sense for someone who prints occasionally and whose prints already look fine: the setup evening buys nothing, and the tuning is a hobby in itself. The cheapest test needs no new firmware at all. Print a ringing tower on the setup you already have, measure the ripples, and work out the frequency. If the number lands where shaping works, and the machine is mechanically sound, Klipper is the tool that uses it. If the tower shows a loose belt instead, the fix is a wrench, not a Pi.

Related reporting

More from grep.tips

All articles