Ringing (also called ghosting or echoing) shows up as faint, evenly spaced ripples trailing off corners and printed text, worse the faster a printer accelerates into a direction change. The traditional fix is mechanical: stiffen the frame, shorten belts, cut moving mass. Input shaping is the software answer: instead of moving less violently, the firmware pre-distorts motion commands so the vibration a move would cause arrives out of phase with itself and cancels out. Klipper popularized this on desktop printers, and a version now ships built into stock firmware on some newer machines too.
None of this replaces basic maintenance. Your belts need to be at even, correct tension before you touch an accelerometer, since loose or damaged belts are a mechanical problem input shaping cannot fix, only compensate around at best, and that groundwork is covered in 3D Printer Belt Tension. This guide covers what that one only mentions in passing: the accelerometer-based calibration procedure, the actual commands, and how to pick a shaper.
Every printer frame has a natural frequency it rings at when disturbed, usually different for X and Y since mass distribution differs between the axes. The old way to find it was printing a test tower at rising acceleration and measuring ripple spacing with calipers. An accelerometer on the toolhead replaces that: Klipper shakes it through a frequency sweep, records the real vibration response per axis, and turns that into a graph and a shaper recommendation within minutes.
Wiring and mounting the accelerometer
The ADXL345 is the accelerometer Klipper’s documentation is built around, and the most common choice, though Klipper also supports the MPU-6050/9250 family, LIS2DW, and LIS3DH parts. One detail catches people out: the ADXL345 must run over SPI, not I2C, since Klipper’s docs say the I2C link is too slow, and a small number of cheap clone boards are hard-wired for I2C only, identical-looking but useless here.
Wire it to whatever runs the Klipper host, usually a Raspberry Pi, over its SPI header, or to a dedicated microcontroller like a Pi Pico if you don’t want permanent wires to your main Pi. The sensor must mount rigidly to the toolhead (and separately to the bed, on printers where the bed moves) and stay electrically isolated from the metal frame: Klipper’s docs warn that letting the sensor or its screws touch bare metal risks a ground loop that can damage the board. Beyond "rigid and isolated," the docs give no mounting hardware or torque spec, since that depends on your toolhead, so treat any particular mount as printer-specific.
Software setup and a sanity check
Klipper needs NumPy and matplotlib in its Python environment to process resonance data, neither installed by default. In printer.cfg you need a section for the accelerometer chip (an [adxl345] section with its chip-select pin) and a [resonance_tester] section naming that chip and giving it probe_points, a safe XY position over the bed where the toolhead can be shaken freely. Once Klipper restarts, run ACCELEROMETER_QUERY first to confirm the wiring, then MEASURE_AXES_NOISE for a baseline noise reading per axis. Klipper’s docs put a normal reading around 1 to 100; numbers in the thousands usually mean a loose mount, an unbalanced fan, or a wiring fault worth chasing down before the real test, since noisy input produces an unreliable shaper recommendation.
Running the resonance test
- Turn off anything that could contaminate the reading, mainly the part cooling fan and any other toolhead fan.
- Run
TEST_RESONANCES AXIS=X. It shakes the toolhead through a frequency sweep hard enough to look alarming the first time, so watch it rather than walk away. If it seems excessive for a light machine, loweraccel_per_hzin[resonance_tester](default 75). - Run
TEST_RESONANCES AXIS=Y. On a bed-slinger, move the accelerometer from the toolhead to the bed between the two measurements, since those are what actually move on each axis. - Feed the CSVs to
~/klipper/scripts/calibrate_shaper.pyfor a graph and recommendations, or skip straight toSHAPER_CALIBRATE, which runs the test and analysis together and can save the result withSAVE_CONFIG. - Add the recommended
shaper_freq_x,shaper_freq_y, andshaper_typeto[input_shaper]inprinter.cfg, ifSAVE_CONFIGhasn’t already done it.
A typical console result, taken from Klipper’s own documentation, reads like this:
Fitted shaper 'zv' frequency = 34.4 Hz (vibrations = 4.0%, smoothing ~= 0.132)
Fitted shaper 'mzv' frequency = 34.6 Hz (vibrations = 0.0%, smoothing ~= 0.170)
Fitted shaper 'ei' frequency = 41.4 Hz (vibrations = 0.0%, smoothing ~= 0.188)
Fitted shaper '2hump_ei' frequency = 51.8 Hz (vibrations = 0.0%, smoothing ~= 0.201)
Fitted shaper '3hump_ei' frequency = 61.8 Hz (vibrations = 0.0%, smoothing ~= 0.215)
Recommended shaper is mzv @ 34.6 Hz
Each line also carries a suggested maximum acceleration for that shaper, more useful day to day than the graph itself. On the graph, look for peaks: one sharp, well-defined peak means a single dominant resonance a shaper can cancel cleanly. A messy plot with several broad, overlapping peaks means more than one resonant mode close together, common on machines with accessories bolted to the gantry, and no single shaper frequency cancels all of it.
Picking a shaper type
Klipper ships six shapers: ZV, MZV, ZVD, EI, 2HUMP_EI, and 3HUMP_EI, trading vibration suppression against smoothing (rounded corners, blurred fine detail) in this order: ZV < MZV < ZVD ≈ EI < 2HUMP_EI < 3HUMP_EI. By Klipper’s own numbers, MZV holds vibration under 5% within roughly plus or minus 4% of its target frequency, EI widens that to about plus or minus 20%, and 2HUMP_EI and 3HUMP_EI widen it further still at the cost of real smoothing.
MZV is the default worth starting from for most machines, suppressing ringing well with the smallest smoothing penalty. EI suits bed-slinger printers, since the bed’s resonance frequency drifts as filament builds up and adds moving mass over a print, and EI tolerates that drift better. 2HUMP_EI and 3HUMP_EI exist for printers with more than one resonance peak close together, delta printers being the classic case since resonance varies with toolhead position, and they’re calculated to straddle multiple peaks rather than one frequency. ZV suppresses and smooths the least, useful mainly when the measured frequency is already low (under roughly 20 to 25 Hz), where even MZV smooths more than you’d like.
Don’t agonize over this by hand: SHAPER_CALIBRATE and calibrate_shaper.py already test the curve against all six and return whichever trades off best. Override that pick for a specific reason (delta kinematics, a bed-slinger, trading more ringing for a higher acceleration ceiling), not as a default move.
Applying it: the input_shaper section
[input_shaper]
shaper_freq_x: 45.2
shaper_type_x: mzv
shaper_freq_y: 38.6
shaper_type_y: ei
X and Y frequently land on different frequencies, and sometimes different shaper types too, so splitting shaper_type_x and shaper_type_y instead of one shared shaper_type is normal, not an edge case. Z can be tuned the same way with shaper_freq_z and shaper_type_z, but most people skip it, since Klipper ties Z shaping mainly to delta printers, heavy beds moving in Z, or fast Z-hops. SET_INPUT_SHAPER also works as a runtime command for testing a shaper live, without editing the config and restarting.
Input shaping and max_accel
This is the part people get backwards. Input shaping doesn’t raise your printer’s safe acceleration ceiling by itself, and costs nothing in print time by itself either. What it does is let you raise max_accel further than you could get away with unshaped, because the ringing that used to appear at that acceleration is now cancelled. Push max_accel too far past what the shaper can handle, though, and ringing gets traded for smoothing instead: rounded corners and fine details that shrink or vanish.
The suggested max_accel in the calibration output is a ceiling for avoiding excess smoothing, not a promise your motors and frame can sustain it: Klipper’s documentation calls it theoretical, since the real limit depends on mechanical stiffness and stepper torque. Set max_accel to whichever is lower, the shaper’s ceiling or what your machine can handle, with margin, and leave square_corner_velocity at its default of 5 mm/sec, since raising it works against what the shaper is doing.
Confirming it actually worked
Restart Klipper after saving the config, then print something with real corners at the acceleration you actually intend to use, not a slow test print where ringing wouldn’t have shown up anyway. If the rippling near corners is visibly reduced or gone, it worked. If a different problem shows up instead (blobbing, softened edges, small features filling in), that’s smoothing from too aggressive a shaper or too high a max_accel, worth backing off rather than assuming failure.
Resonance frequencies also drift: a hotend swap, a new accessory, or belts loosening again can shift the numbers enough that eliminated ringing comes back, a sign to re-measure rather than a new problem. Klipper’s documentation also warns against running the full test constantly, since it deliberately drives the printer near its own resonance and repeated exposure adds wear and risks something working loose, so treat it as a one-time job, or an occasional one after a mechanical change, not a ritual before every print.
Machines that already do this for you
Some newer printers build the hardware and workflow in at the factory. Bambu Lab’s "Auto-Calibration" routine, documented on Bambu’s own wiki, bundles vibration compensation with bed leveling, nozzle height, and motor noise cancellation into one sensor-driven process from the printer’s screen or Bambu Studio, no wiring or command line needed: the same idea as Klipper’s input shaping, an onboard accelerometer measuring real resonance so firmware can shape motion to cancel it, just packaged as an automatic routine.
Several current Klipper-based machines, including Creality’s K1 and K2 series and Anycubic’s Kobra 3, ship with an accelerometer already wired to the toolhead board and a guided self-test in the printer’s menu that runs essentially the same measurement, without the owner ever opening printer.cfg. Exact wording and re-check frequency vary by brand and firmware version and aren’t consistently documented publicly. If your printer already does this, everything above this section is optional reading, not a missing step.
Is the accelerometer worth buying
If you’re running stock or near-stock acceleration and only occasionally see faint ringing, the old print-and-measure tower method plus a generic MZV default gets you most of the benefit for free. The accelerometer earns its keep once you push speed and acceleration meaningfully past stock: at that point you’re chasing a moving target, and guessing max_accel by trial and error against an unmeasured resonance frequency is far slower than a couple of minutes of automated sweeping. If the printer already has the sensor built in, there’s no real argument either way: run the routine after any mechanical change and get back to printing.