Ringing — those ghosted vertical lines echoing sharp corners on your prints — is the printer’s mechanical resonance made visible. Every direction change excites the frame at its natural frequency. Input shaping cancels that vibration by slightly modifying the motion profile: the printer overshoots, undershoots, then settles back on the intended path, with the overshoot deliberately tuned to cancel the frame’s ringing. You can tune it by printing a test tower and measuring with calipers. Or you can strap a $3 accelerometer to your toolhead and get a perfect measurement in 30 seconds.
How Input Shaping Actually Works
When your print head accelerates around a sharp corner, the sudden force change excites vibration in the printer’s frame. That vibration decays over a few oscillations, but during those oscillations, the nozzle is displaced from its intended position — and each displacement leaves a visible mark on the print surface.
Input shaping convolves the motion command with a carefully-timed impulse response. The shaper sends the printer on a path that overshoots slightly, then corrects — so the mechanical vibration and the shaping-induced motion cancel each other at the nozzle tip. The result: the extruder moves smoothly through corners and the print surface shows no ghosting.
Different shaper algorithms make different tradeoffs:
| Shaper | Vibration Reduction | Smoothing (corner round-off) | Best For |
|---|---|---|---|
| ZV (Zero Vibration) | Moderate | Low | High-detail parts, low-frequency resonance |
| ZVD (ZV + Derivative) | Good | Moderate | General purpose, good balance |
| MZV (Modified ZV) | Good | Low | High-speed printing, recommended default |
| EI (Extra Insensitivity) | Excellent | High | Printers with multiple resonance peaks |
| 2HUMP EI | Best | Highest | Frames with complex vibration modes |
| Shaper off | None | None | Baseline measurement only |
Step 1: Install ADXL345 Accelerometer
Hardware needed:
– ADXL345 accelerometer module (GY-291 breakout, $3-5)
– 4x Dupont female-to-female jumper wires (10cm)
– Mounting solution: zip ties, double-sided tape, or a printed mount
Connection to Raspberry Pi (Klipper):
| ADXL345 Pin | Raspberry Pi GPIO |
|—|—|
| VCC | 3.3V (Pin 1) |
| GND | GND (Pin 6) |
| SDA | GPIO 2 / SDA (Pin 3) |
| SCL | GPIO 3 / SCL (Pin 5) |
Connection to mainboard (Marlin):
Most Marlin boards (SKR, Creality 4.2.x) don’t natively support SPI accelerometer input for automatic calibration. Use Klipper for measurement, then transfer the shaper parameters to Marlin manually. Or use the manual ringing tower method described later.
Enabling in Klipper:
Add to printer.cfg:
[mcu rpi]
serial: /tmp/klipper_host_mcu
[adxl345]
cs_pin: rpi:None
spi_bus: spidev2.0
[resonance_tester]
accel_chip: adxl345
probe_points:
100, 100, 20
Restart Klipper. Verify the accelerometer reads with ACCELEROMETER_QUERY in the console — it should return values around 9.8 m/s² on the Z axis (gravity).
Step 2: Mount the Accelerometer
Mount the ADXL345 to the toolhead — as close to the nozzle as possible. The accelerometer measures toolhead vibration, and mounting it on the extruder body or hotend carriage gives the most accurate reading.
Mounting options:
– Printed bracket: Design or download a bracket that bolts to the extruder mounting points. Secure the ADXL345 with M2 or M3 screws through the board’s mounting holes
– Zip tie: Fasten the board to the hotend fan duct. Ensure it’s rigid — any wobble in the mounting creates false measurements
– Double-sided tape: For quick measurements. Less rigid than screws, but adequate for identifying the dominant resonance frequency
The orientation matters: the ADXL345 measures X, Y, and Z axes. Mount it squarely aligned with the printer’s axes. The X axis of the chip should point along the printer’s X axis.
Step 3: Run Resonance Measurement
Klipper:
TEST_RESONANCES AXIS=X
TEST_RESONANCES AXIS=Y
The printer will shake the toolhead (for X) and the bed (for Y) through a frequency sweep, typically 5-133 Hz. This takes about 60 seconds per axis. The results save to /tmp/resonances_x.csv and /tmp/resonances_y.csv.
View the graphs:
~/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
The graph shows amplitude vs frequency. The tallest peak is your printer’s dominant resonance. Most Cartesian printers resonate between 40-70 Hz on X and 30-50 Hz on Y. CoreXY machines tend to be higher — 60-90 Hz.
Step 4: Select and Apply Shaper
The calibrate script recommends a shaper and frequency. Example output:
Fitted shaper 'mzv' frequency = 48.4 Hz (vibrations = 2.3%)
Recommended shaper is mzv @ 48.4 Hz
This means: use the MZV shaper at 48.4 Hz, and expect 97.7% vibration reduction.
Apply in Klipper:
[input_shaper]
shaper_freq_x: 48.4
shaper_type_x: mzv
shaper_freq_y: 38.2
shaper_type_y: zv
X and Y typically need different shapers because the mechanics differ — X moves the toolhead (low mass), Y moves the bed (high mass). The Y resonance is usually lower and broader.
Marlin users (manual transfer):
Since Marlin lacks native accelerometer support, either use Klipper temporarily just for measurement (flash Klipper to SD card, measure, flash Marlin back), or use the manual ringing tower:
- Print a ringing test tower (90° corner test piece)
- Start with
M593 X D0 F40(disable shaper for X, 40Hz start) - Increase frequency in 5 Hz increments:
M593 X D0 F45,M593 X D0 F50 - The frequency that shows minimal ghosting at the corner is your resonance
- Set permanently:
M593 X D0 F48.4for ZVD shaper at 48.4 Hz
Marlin’s D0 selects ZVD shaper. ZV is D1, EI is D2, 2HUMP EI is D3.
Step 5: Validation Print
Print a calibration cube or ringing test tower at your target speed (typically 100-150mm/s outer walls). Examine corners under angled light — ghosting should be invisible. If faint ghosting remains, run the measurement again; the ADXL345 mounting may have shifted, or your belt tension changed since the last measurement.
Ringing Troubleshooting Table
| Observed Pattern | Likely Cause | Fix |
|---|---|---|
| X-axis ghosting only | X-axis belt loose or X-axis resonance uncalibrated | Tighten X belt, re-run X resonance test |
| Y-axis ghosting only | Y-axis belt loose or bed resonance uncalibrated | Tighten Y belt, re-run Y resonance test |
| Diagonal ghosting on both axes | Frame resonance not isolated to one axis | Check frame bolt tightness, try EI shaper |
| Ghosting after shaper applied | Shaper frequency inaccurate | Re-measure — ADXL may have shifted |
| Smoothing at corners (not ghosting) | Shaper too aggressive for speed | Switch from EI to MZV or ZVD |
| Ghosting at low speed only | Belt tension too high | Loosen belt slightly, re-measure |
What Most Makers Get Wrong
Mistake 1: Measuring resonance once and never again. Belt tension changes over time (belts stretch, idlers wear). A shaper tuned for 48 Hz won’t work when belt wear drops the resonance to 42 Hz. Re-measure every 200-300 print hours or after any mechanical change (belt replacement, linear rail upgrade, toolhead swap).
Mistake 2: Using the same shaper for X and Y. X moves the toolhead (typically 300-500g including hotend). Y moves the entire bed (2-5 kg on a 300mm printer). These have completely different resonance profiles. Measure and configure them independently.
Mistake 3: Selecting EI or 2HUMP EI when MZV would be sufficient. Higher-order shapers reduce vibration more but introduce more corner smoothing. At 100mm/s, EI smoothing rounds off fine detail like text embossing on the bottom layer. Use the lowest-order shaper that eliminates visible ringing — for most printers, that’s MZV.
Mistake 4: Mounting the ADXL345 on the bed for Y-axis measurement on a bed-slinger. The bed itself doesn’t ring — the frame does. On a bed-slinger (Ender 3 style), the Y measurement should still come from the toolhead because the toolhead sees the bed’s vibration transferred through the frame. The Klipper docs recommend toolhead mounting for both axes. Some CoreXY printers benefit from bed-mounted Y measurements.
Mistake 5: Ignoring the recommended acceleration limits after applying a shaper. Input shaping reduces the effect of resonance, but it doesn’t eliminate it entirely. If the calibrate script recommends max_accel: 7000 for MZV at 48 Hz, and you set acceleration to 12000, the shaper can’t keep up. Respect the recommended acceleration limit — it’s calculated from the residual vibration percentage.
⚠️ Regulatory Notice: The ADXL345 accelerometer and Raspberry Pi integration described in this guide are for bench-level printer calibration only. When modifying printer firmware or configuration, ensure compliance with the manufacturer’s warranty terms. Some modifications to the printer’s motion system may affect safety certifications. As of 2026, always verify that your printer’s emergency stop and thermal runaway protection remain functional after any firmware or configuration changes.
Our Klipper vs Marlin firmware comparison covers the migration path if you’re considering switching to Klipper specifically for input shaping. For the mechanical side of vibration reduction, the belt tensioning guide ensures your baseline resonance is measured on a properly-tensioned motion system.
The ADXL345 accelerometer module costs less than a spool of filament and eliminates hours of iterative ringing tower prints. The GY-291 breakout board with pre-soldered header pins is available in the uavmodel printer electronics collection.
