Skip to content

3D Printer Resonance Compensation (Input Shaping): Complete Setup Guide

  • 3DISM 

If you’re chasing speed without sacrificing print quality, then Input Shaping is your secret weapon. This powerful feature in Klipper firmware helps eliminate ringing and ghosting by compensating for mechanical vibrations in your 3D printer.

In this complete setup guide, you’ll learn how to:

  • Understand what Input Shaping is
  • Set it up step by step using Klipper
  • Use tools like the ADXL345 accelerometer
  • Achieve smoother prints at higher speeds

Perfect for CoreXY, Cartesian, and even Delta printers—this is a must-know technique in 2025 for modern print tuning.


What Is Input Shaping in 3D Printing?

Input Shaping is a software-based technique that reduces vibrations in your printer by modifying how movement commands are sent to the motors. Instead of jerky accelerations that cause ringing, it “shapes” movements to prevent those oscillations from occurring in the first place.

What Problems It Solves

  • Ringing (ghosting) on print surfaces
  • Inaccurate dimensions due to overshoot
  • Reduced print quality at high speeds
  • Frame resonance effects

How It Works (In Simple Terms)

Every time your print head changes direction, it creates vibrations. Input Shaping measures these vibrations and mathematically cancels them out using inverse patterns.

It’s like adding shock absorbers to your print head’s movements.


Hardware You’ll Need

ComponentPurpose
ADXL345 accelerometerMeasures vibrations in X/Y axes
Raspberry Pi or MCU (e.g., STM32)Reads sensor data
Wiring or SPI cableConnects ADXL345 to Pi or MCU
Screwdriver, tape, zip tiesFor mounting and routing wires

📌 Klipper supports both Pi-connected and MCU-connected accelerometers.


Step-by-Step: Input Shaping Setup in Klipper


Step 1: Install the ADXL345 Accelerometer

  • Mount the sensor on the print head or carriage using double-sided tape or screws.
  • Ensure it’s firmly fixed—loose mounting causes bad readings.

📌 Orientation matters! The labels X, Y, Z on the sensor should match your printer’s axes.


Step 2: Wire the ADXL345 to Your Raspberry Pi (SPI Connection)

ADXL345 PinPi Pin
VCC3.3V (Pin 1)
GNDGND (Pin 6)
SDAGPIO2 (Pin 3)
SCLGPIO3 (Pin 5)
CSGPIO8 (Pin 24)
SDOGPIO9 (Pin 21)

You can also connect the sensor to a microcontroller board if preferred (e.g., via SPI/UART).


Step 3: Install Required Packages on Raspberry Pi

SSH into your Pi and run:

bashCopyEditsudo apt update
sudo apt install python3-numpy python3-matplotlib python3-scipy

Then navigate to the Klipper directory and install the firmware for the accelerometer:

bashCopyEditcd ~/klipper
make menuconfig
  • Select “Linux process” for the micro-controller architecture
  • Save and run:
bashCopyEditmake
sudo service klipper stop
./scripts/calibrate_shaper.py /dev/ttyUSB0

📌 Replace /dev/ttyUSB0 with your actual device path if different.


Step 4: Run the Vibration Test

Use this Klipper command to measure resonance:

gcodeCopyEditSHAPER_CALIBRATE AXIS=X
SHAPER_CALIBRATE AXIS=Y

The printer will perform a quick test using frequency sweeps. The results will be saved as .csv files.


Step 5: View and Analyze the Results

To generate graphs showing vibration frequencies:

bashCopyEdit~/klipper/scripts/calibrate_shaper.py ~/resonances_x_*.csv -o ~/x.png
~/klipper/scripts/calibrate_shaper.py ~/resonances_y_*.csv -o ~/y.png

This will generate visual plots of frequency vs amplitude.

📌 Look for resonance peaks and identify ideal shaper types (like MZV, EI, or 2HUMP_EI).


Step 6: Apply the Recommended Input Shaper Settings

After analysis, Klipper will recommend the best Input Shaper configuration. Example:

iniCopyEdit[input_shaper]
shaper_type_x = 2hump_ei
shaper_freq_x = 41.3
shaper_type_y = mzv
shaper_freq_y = 38.2

Add this to your printer.cfg, save, and run:

gcodeCopyEditRESTART

Understanding Input Shaper Types

Shaper TypeBest ForNotes
MZVSimple vibrationsMinimal impact on acceleration
EIComplex dampingMore aggressive shaping
2HUMP_EIDual frequency peaksVery effective for high-speed printers

Try each type and observe results via test prints if needed.


Recommended Test Prints After Setup

  • Ringing test tower – shows before/after results
  • Acceleration tower – helps optimize acceleration values
  • Speed benchy – test surface finish at various speeds

📌 Run the tests before and after enabling Input Shaping to visually confirm improvements.


Tips for Best Results

✅ Ensure sensor is mounted securely
✅ Disable input shaping during mechanical tuning (belts, pulleys)
✅ Rerun calibration after major hardware changes
✅ Combine with Pressure Advance and Resonance Compensation for optimal quality
✅ Don’t exceed acceleration values that your printer frame can’t handle


Common Problems and Fixes

ProblemFix
Noisy graphsCheck sensor wires or power supply
Inaccurate resultsConfirm axis orientation and wiring
Printer won’t moveCheck firmware and sensor communication
No improvementTry different shaper types or check for loose frame components

FAQs

Q1: Do I need to recalibrate Input Shaping often?

Only when:

  • You upgrade belts, hotend, or frame
  • You change acceleration values significantly

Q2: Can I use Input Shaping without an accelerometer?

Yes, Klipper has a manual tuning mode using ringing tests, but an ADXL345 gives far better accuracy.

Q3: Is Input Shaping compatible with all printers?

Yes. Klipper supports Cartesian, CoreXY, Delta, and SCARA machines.

Q4: Will Input Shaping reduce print time?

Indirectly, yes. It allows you to increase acceleration safely, which reduces print times without sacrificing quality.


Conclusion

Input Shaping in Klipper is one of the most powerful tuning tools available for 3D printers in 2025. With just a simple sensor and a few commands, you can drastically reduce ringing, push your speeds higher, and produce crisp, clean prints—even on high-speed CoreXY machines like the QALAM 300.

Follow this guide step-by-step, and your printer will run smoother, faster, and more accurately than ever before. Once set up, it’s like having your own built-in print optimizer working in the background!

Leave a Reply

Your email address will not be published. Required fields are marked *