Your prints have echo lines after sharp corners. Tightening belts didn’t fix it. Slowing down to 40mm/s makes the problem disappear — but you didn’t buy a printer to print slow. Input shaping is the solution, and this guide walks through the full calibration process on both Klipper and Marlin firmware.
What Input Shaping Actually Does
Input shaping cancels mechanical vibrations by pre-distorting the motion signal. When your print head accelerates around a corner, the sudden direction change excites the printer’s natural resonant frequency. The frame rings like a bell — those echoes appear on your print as ghosting lines parallel to every sharp edge.
Input shaping applies a precisely timed counter-signal that cancels the ringing before it reaches the print. The result: you can print at 100-150mm/s with corner quality that looks like 40mm/s. The catch: input shaping only works if you accurately measure YOUR printer’s resonant frequencies. Generic values from someone else’s printer won’t work — every frame, every belt tension, every moving mass produces different resonance.
Klipper Input Shaping: The ADXL345 Method
Klipper supports automatic resonance measurement using an ADXL345 accelerometer. This method is more accurate than the manual ringing tower method and takes 10 minutes instead of 2 hours.
Hardware Setup
ADXL345 wiring: Connect to the Raspberry Pi’s SPI pins (not the printer mainboard). The Pi’s SPI bus runs faster and avoids electrical noise from stepper drivers.
– VCC → 3.3V (Pi pin 1)
– GND → GND (Pi pin 6)
– CS → GPIO08 / CE0 (Pi pin 24)
– SDO → GPIO09 / MISO (Pi pin 21)
– SDA → GPIO10 / MOSI (Pi pin 19)
– SCL → GPIO11 / SCLK (Pi pin 23)
Mounting: Attach the ADXL345 firmly to the print head with a zip tie or double-sided tape. The accelerometer must not wobble — any movement between the sensor and the print head introduces measurement error. For bed-slinger printers, you’ll also need to mount it to the bed for Y-axis measurement.
Running the Resonance Test
Enable SPI on the Pi: sudo raspi-config → Interface Options → SPI → Enable. Reboot.
In Klipper, add to printer.cfg:
[adxl345]
cs_pin: rpi:None
spi_bus: spidev0.0
[resonance_tester]
accel_chip: adxl345
probe_points: 100,100,20
Run the X-axis test: TEST_RESONANCES AXIS=X. The print head will vibrate through a frequency sweep from ~5 Hz to 133 Hz. This takes about 1 minute per axis. Run Y-axis: TEST_RESONANCES AXIS=Y.
Analyzing the Graphs
Run ~/klipper/scripts/calibrate_shaper.py /tmp/resonances_x_*.csv -o /tmp/shaper_calibrate.png. Open the resulting PNG. You’ll see a frequency-vs-amplitude graph with one or more peaks:
- Single tall peak at 40-60 Hz: Typical for a well-built CoreXY or Cartesian with tight belts. Use the recommended shaper type and frequency from the console output.
- Multiple peaks (e.g., 35 Hz and 70 Hz): The 70 Hz peak is probably a harmonic of the 35 Hz fundamental. The script accounts for this and recommends the best shaper.
- Peak above 80 Hz: Very stiff frame — you can push acceleration higher. A peak at 100 Hz means your mechanical system is quiet and you can run 5000+ mm/s² acceleration without ghosting.
The shaper recommendation: The script outputs something like Recommended shaper_type_x = mzv, shaper_freq_x = 48.2 Hz. Add to printer.cfg:
[input_shaper]
shaper_type_x = mzv
shaper_freq_x = 48.2
shaper_type_y = mzv
shaper_freq_y = 52.1
Shaper Type Guide
| Shaper Type | Vibration Reduction | Smoothing (Corner Rounding) | Best For |
|---|---|---|---|
| ZV (Zero Vibration) | Moderate | Very low | Stiff frames, low resonance |
| MZV (Modified ZV) | Good | Low | General purpose — the default recommendation |
| EI (Extra Insensitive) | Excellent | Moderate | Printers with multiple close resonance peaks |
| 2HUMP_EI | Maximum | High | Poorly-damped frames or if frequencies drift with position |
| 3HUMP_EI | Maximum+ | Highest | Last resort — only when all others leave visible ghosting |
Marlin Input Shaping
Marlin 2.1+ supports input shaping without an accelerometer. You measure resonance manually using a ringing test tower.
Step 1: Slice a ringing tower (a 20×20mm square tower, 50mm tall, with sharp 90° corners). Print at your normal speeds (100mm/s recommended).
Step 2: Measure the distance between ghosting lines. Use digital calipers — measure from the center of one ghost line to the center of the next, in millimeters. Do this for both X and Y faces.
Step 3: Calculate frequency: frequency = speed / distance. At 100mm/s, if ghosting lines are 1.8mm apart: 100 / 1.8 = 55.6 Hz.
Step 4: Enable in Marlin firmware: #define INPUT_SHAPING_X 55.6 and #define INPUT_SHAPING_Y 55.6. Set shaper type: #define INPUT_SHAPING_TYPE_X MZV. Recompile and flash.
The manual method is less precise than the ADXL345 approach (±5 Hz accuracy vs ±1 Hz), but it’s accessible to anyone without hardware modification.
What Most Makers Get Wrong
Mistake 1: Copying someone else’s shaper values. A Voron 2.4 with tight belts might resonate at 65 Hz. An Ender 3 with stock belts resonates at 40 Hz. Same shaper frequency on the wrong printer makes ghosting worse, not better.
Consequence: Ghosting increases and you blame input shaping for making things worse. You disable it and go back to printing at 40mm/s.
Fix: Measure YOUR printer. No shortcuts. The ADXL345 costs $3 on AliExpress or $10 on Amazon — less than a spool of filament.
Mistake 2: Not re-measuring after belt changes. New belts, different tension, added weight (direct drive conversion, heavier hotend) all shift the resonant frequency. A 5 Hz shift is enough to degrade shaper effectiveness by 30-40%.
Consequence: Input shaping worked perfectly after calibration, but 6 months later ghosting is back. You reprint the ringing tower and discover the frequency shifted.
Fix: Re-measure after any mechanical change. Belt replacement and tension adjustment are the biggest frequency-shifters. Keep the ADXL345 permanently accessible — it takes 3 minutes to re-run the resonance test.
Mistake 3: Running accelerometer test at low acceleration. The default resonance test acceleration is conservative. Printing at 8000 mm/s² but testing at 3000 mm/s² means you’re measuring frequency at a different energy level than you’re printing at.
Consequence: Shaper is slightly off-target at your actual print speeds. Ghosting is reduced but not eliminated.
Fix: Match test acceleration to print acceleration. In Klipper: TEST_RESONANCES AXIS=X ACCEL_PER_HZ=75. This pushes more energy into the system and gives you a peak that represents actual printing conditions.
⚠️ Safety Notice: The calibration procedures described in this article involve the printer moving at high speed and frequency. Always supervise calibration runs. The ADXL345 wiring described uses low-voltage connections only — never modify mains wiring or AC-powered components. For enclosure builds, ensure proper ventilation when printing materials that emit fumes (ABS, ASA, nylon). Verify your printer’s electrical safety certifications are current according to 2026 regional standards.
Related Guides
Input shaping works alongside pressure advance for clean corners — see our Linear Advance and Pressure Advance guide for the extrusion side of corner quality. For firmware-specific setup, our Klipper vs Marlin comparison covers which firmware supports which input shaping features. And if ghosting persists after shaping, check your Belt Tensioning guide — loose belts produce resonance that even the best shaper can’t fully cancel.
Recommended Product
The ADXL345 accelerometer kit with pre-soldered pins and Dupont connectors is the essential input shaping tool. At uavmodel.com we stock a plug-and-play version with labeled wiring and a 3D-printed mount that clips onto most print heads — no soldering required. While you’re upgrading your printer’s electronics, our silicone bed mounts and belt tensioners reduce mechanical noise at the source, making input shaping even more effective.
