3D Printing (General)

Input shaper for 3D printers: what it is and how to calibrate it

Input shaper is a Klipper feature that measures your printer's resonant frequencies and applies a digital filter to cancel the ringing and ghosting artifacts that appear on printed surfaces after sharp corners.

Published 2026-05-17

What is input shaper?

Input shaper — sometimes called resonance compensation — is a filter built into Klipper firmware that reduces the ringing and ghosting artifacts you sometimes see in 3D prints: those faint wavy echoes that appear alongside sharp edges or after direction changes.

The root cause is mechanical resonance. When the print head changes direction quickly, the frame, belts, and carriage flex slightly and then bounce back. That bounce travels through the nozzle and leaves a ripple pattern on the surface of the print. Input shaper measures the frequencies at which your printer resonates, then applies a digital filter that pre-cancels those vibrations before they happen.

The result is cleaner corners and sharper edges at higher print speeds, without necessarily slowing the printer down.

What you need before you start

Input shaper is a Klipper feature. If you are running stock Creality, Bambu, or Prusa firmware, the feature may be called something different. Bambu implements its own resonance compensation internally on newer machines. This guide focuses on Klipper.

Hardware you will need:

  • A printer running Klipper (on Raspberry Pi, CB1, or similar)
  • An accelerometer. The most common is an ADXL345 breakout board, available from the usual electronics suppliers. Some printers include one on the toolhead already — the Creality K2 Plus, for example, has one built in.
  • If adding an ADXL345: a few short Dupont wires and somewhere to mount the board temporarily on the toolhead. It only needs to be present during the measurement.

Connecting an ADXL345

If your printer does not have a built-in accelerometer, wire an ADXL345 to the SPI pins on your Raspberry Pi:

1. Identify the SPI pins on your Raspberry Pi's 40-pin header: GPIO10 (MOSI), GPIO9 (MISO), GPIO11 (SCLK), and GPIO8 (CE0). 3.3 V and GND are on the header as well. 2. Connect the ADXL345: VCC to 3.3 V, GND to GND, SCL to SCLK (GPIO11), SDA to MOSI (GPIO10), SDO to MISO (GPIO9), CS to CE0 (GPIO8). 3. Mount the board to the toolhead as rigidly as possible. Tape or a cable tie is fine for a one-off measurement, but any flex in the mount will corrupt the result. Orient it so the sensor axes roughly match the printer's X, Y, and Z. 4. In printer.cfg, add the following sections:

``` [adxl345] cs_pin: rpi:None

[resonance_tester] accel_chip: adxl345 probe_points: 150, 150, 20 ```

Replace the probe_points values with coordinates near the centre of your bed at a height you can actually reach. Save the file and send FIRMWARE_RESTART.

Running the measurement

Once Klipper recognises the accelerometer — ACCELEROMETER_QUERY in the console should return live data — you can run the sweep:

1. Home all axes. 2. Send TEST_RESONANCES AXIS=X in the Klipper console (Mainsail or Fluidd). The printer moves the head through a sweep of frequencies on the X axis, typically taking 30–60 seconds. 3. Repeat for Y: TEST_RESONANCES AXIS=Y. 4. The tests generate CSV files in /tmp/ on the Raspberry Pi. Process them with:

``` ~/klipper/scripts/calibrate_shaper.py /tmp/resonances_x_*.csv -o /tmp/shaper_x.png ~/klipper/scripts/calibrate_shaper.py /tmp/resonances_y_*.csv -o /tmp/shaper_y.png ```

5. The script prints recommended shaper settings for each axis, for example:

``` Recommended shaper is mzv @ 48.4 Hz ```

6. Add those values to printer.cfg under a new section:

``` [input_shaper] shaper_freq_x: 48.4 shaper_type_x: mzv shaper_freq_y: 41.2 shaper_type_y: mzv ```

Save and restart Klipper. That is the core calibration done.

Choosing a shaper type

The script may suggest several options — ZV, MZV, EI, 2HUMP_EI, 3HUMP_EI. These refer to different filter shapes with different trade-offs:

  • ZV is the simplest, with low processing latency. It works well on stiff, well-tuned machines but is sensitive to shifts in resonant frequency.
  • MZV (Modified Zero Vibration) is a good default for most printers. Its suppression band is slightly broader than ZV.
  • EI (Extra-Insensitive) handles machines where the resonant frequency shifts under load — useful on heavier print heads or flexible frames.
  • 2HUMP_EI and 3HUMP_EI are for printers with complex resonance behaviour. They apply stronger smoothing but reduce the maximum usable acceleration.

The script ranks each option by the acceleration penalty. For most desktop FDM printers, MZV is a sensible starting point. If you are printing with a heavy toolhead or on a less rigid frame, try EI and compare the output graphs.

Reading the graphs

The PNG output from the calibration script shows a frequency response curve. The peak identifies the resonant frequency of that axis; the height of the peak relative to the noise floor indicates how severe the ringing problem is.

A sharp, tall peak means a strong resonance at a specific frequency — belts may be too tight or too loose, or the carriage has a geometric weakness at that frequency. A broad, low hump is more forgiving and typically produces clean prints after calibration.

Multiple peaks close together often indicate loose fasteners, worn bearings, or a belt resonating at a harmonic. Tighten everything down and repeat the measurement before relying on the shaper values.

Checking your results

Print a standard ringing test tower — the one in the Klipper documentation or the Ellis ringing test model on Printables. Compare a before print and an after print. Surface ripples should reduce significantly or disappear.

If ringing persists, check:

  • The accelerometer was rigidly mounted during the test. Even slight board flex invalidates the readings.
  • Klipper was restarted after saving the config.
  • The probe_points coordinate in [resonance_tester] is actually reachable — an out-of-bounds coordinate can silently abort the test.
  • Belts are tensioned consistently on both sides of the carriage.

Input shaper compensates for resonance in a mechanically sound machine. It does not fix ringing caused by worn bearings, a loose Z-axis coupler, a cracked frame, or an unbalanced part-cooling fan. If ringing is severe and persists after correct calibration, a mechanical inspection is likely needed first.

Notes on the Creality K2 and K2 Plus

The K2 Plus ships with an accelerometer on the toolhead. Its Klipper-derived stack includes a [resonance_tester] section already configured; you can send SHAPER_CALIBRATE from the console and Klipper will sweep both axes and apply the recommended values automatically, without the manual Python script step.

If you are running a community Klipper build on the K2 (original or Plus), the process is the same as above, but the accelerometer pinout depends on which board revision you have. The Hark Tech K2 troubleshooting guide covers the specific config lines for common K2 board variants.

When to mail it in

If ringing persists after a correct input shaper calibration, the likely cause is a mechanical fault — worn linear rails, a loose pulley, a cracked carriage, or a damaged belt. These need hands-on inspection to diagnose properly.

If you would rather not work through the Klipper configuration yourself, or if you have tried calibration and still cannot get clean corners at reasonable print speeds, I can help. Send the printer in, and I will run input shaper calibration, inspect the motion system, replace any worn components, and return it within a few working days. The booking form and contact details are at harktech.co.uk/contact.html.