How to Calibrate Input Shaper and Pressure Advance in Klipper
Introduction
Input Shaper and Pressure Advance are Klipper's two most powerful features for print quality. Input Shaper compensates for mechanical resonances — the vibrations that cause ringing (ghosting) on sharp corners and curved surfaces. Pressure Advance compensates for the delay between extruder motion and nozzle flow — eliminating corner blobs, improving dimensional accuracy, and allowing faster print speeds. Together, they can transform a mediocre printer into one that produces commercial-quality results. This guide explains the physics behind each feature, provides step-by-step calibration procedures, and shows you how to tune both to perfection for your specific machine.
What You Need
- Klipper firmware installed and running
- Accelerometer (ADXL345, MPU9250, or LIS2DW12) for Input Shaper OR use Klipper's resonance tester
- Calipers for measuring test prints
- Filament in good condition (dry, consistent diameter)
Part 1: Input Shaper
How It Works
Every mechanical system has resonant frequencies where vibrations amplify. When a printer's nozzle changes direction, the frame and belts ring at these frequencies, creating visible artifacts on the print surface. Input Shaper modifies the motion command signal to cancel out these resonances before they reach the mechanical system — similar to noise-canceling headphones. It does this by splitting motion commands into multiple smaller moves timed to destructively interfere with the resonant frequency.
Shaper Types
- ZV (Zero Vibration): Cancels one frequency, minimal speed penalty
- ZVD (Zero Vibration Derivative): Cancels one frequency with better robustness, slightly more smoothing
- EI (Extra-Insensitive): Cancels a range of frequencies, more smoothing, good for unknown/multiple resonances
- MZV (Modified ZV): Compromise between ZV and ZVD
- MVZV: Multi-frequency variant for complex resonances
Method A: Automatic Calibration with Accelerometer
Wiring the ADXL345
- VCC → 3.3V (NOT 5V — ADXL345 is 3.3V only)
- GND → GND
- SCL → Raspberry Pi GPIO 3 (SCL)
- SDA → Raspberry Pi GPIO 2 (SDA)
- CS → 3.3V (SPI disabled, I2C mode)
Install Dependencies
cd ~/klipper sudo apt install python3-numpy python3-matplotlib ~/klipper/scripts/install-klipper.shConfigure the Accelerometer
[adxl345] axes_map: x,y,z [resonance_tester] accel_chip: adxl345 probe_points: 117.5, 117.5, 20Run Calibration
RESONANCE_TESTER_ACCEL_CHIP=adxl345 TEST_RESONANCES AXIS=X TEST_RESONANCES AXIS=YKlipper moves the toolhead back and forth at increasing frequencies while the accelerometer records vibrations. It generates:
- resonances_x.png — vibration spectrum for X axis
- resonances_y.png — vibration spectrum for Y axis
Calculate Optimal Shaper
SHAPER_CALIBRATE AXIS=X SHAPER_CALIBRATE AXIS=YKlipper recommends the best shaper type and frequency. The output looks like:
Recommended shaper_type_x = mzv, shaper_freq_x = 48.4 HzUpdate Config and Save
[input_shaper] shaper_type_x: mzv shaper_freq_x: 48.4 shaper_type_y: mzv shaper_freq_y: 42.1Then: SAVE_CONFIG
Method B: Manual Calibration (No Accelerometer)
If you do not have an accelerometer, use the ringing tower test:
- Download the ringing_tower.stl from Klipper's docs
- Print it at 100mm/s with acceleration at your normal setting
- Examine the ringing patterns on X and Y faces
- Measure the distance between ringing lines with calipers
- Calculate frequency: freq = speed (mm/s) / distance (mm)
- Example: 100mm/s speed, 2.1mm ring spacing → 47.6 Hz
- Start with shaper_type = mzv and calculated frequency
- Print another test and fine-tune
Testing Results
- Print a sharp-corner test cube (40x40x20mm)
- Compare with Input Shaper on vs off
- Ringing should be dramatically reduced or eliminated
- If corners look rounded, the shaper is too aggressive — try ZV or lower frequency
Part 2: Pressure Advance
How It Works
When the extruder pushes filament, the molten plastic in the nozzle behaves like a spring — it compresses under pressure and decompression takes time. When the print head decelerates for a corner, the extruder slows, but the nozzle keeps extruding due to this stored pressure. This creates a blob at the corner. When accelerating out of the corner, the opposite happens — a slight under-extrusion. Pressure Advance compensates by advancing (or retarding) the extruder position relative to the toolhead motion, keeping nozzle pressure constant.
Calibration Procedure
Step 1: Prepare
- Use a single-wall test model (e.g., calibration cube with no infill, 2 perimeters)
- Ensure your extruder e-steps are calibrated first
- Use your standard printing temperature and speed
Step 2: Print the PA Test
- Use Klipper's built-in pressure advance tower:
- Or manually slice a tower with PA values labeled in G-code:
- Print at your normal outer wall speed (30-50mm/s)
Step 3: Analyze the Print
Examine the corners of the test print:
- Too low PA (0.00-0.02): Bulging corners, over-extrusion at deceleration points
- Optimal PA: Sharp, clean corners with no bulge or gap
- Too high PA (0.08+): Under-extrusion at corners, gaps, weak walls
Step 4: Fine-Tuning
- Find the section with the best corners
- Note the PA value
- Print a finer-resolution test around that value (steps of 0.005)
- Select the best value
Step 5: Update Configuration
[extruder] pressure_advance: 0.04 pressure_advance_smooth_time: 0.04SAVE_CONFIG and restart Klipper.
Pressure Advance by Filament Type
- PLA: 0.02 — 0.06
- PETG: 0.04 — 0.08
- ABS/ASA: 0.03 — 0.06
- TPU: 0.08 — 0.15 (flexible filaments need much more PA)
Part 3: Combined Testing
With both features enabled, print a comprehensive test:
- 40x40x20mm hollow cube (2 walls, no infill, no top)
- 50mm/s print speed
- 3000mm/s² acceleration
Inspect for:
- Corner sharpness (PA check)
- Wall surface quality (Input Shaper check)
- Consistent wall thickness (both)
Advanced: Tuning for Speed
Once calibrated, you can increase acceleration without ringing:
- Start with your current acceleration (e.g., 1500mm/s²)
- Print the test cube
- Increase acceleration by 500mm/s²
- Reprint and check quality
- Continue until quality degrades
- Back off 20% for reliable daily printing
Typical results after tuning:
- Cartesian printers: 3000-5000mm/s² acceleration
- CoreXY printers: 5000-10000mm/s² acceleration
Troubleshooting
Input Shaper Issues
- Rounding of corners: Shaper too aggressive — use ZV or lower frequency by 5-10%
- Still seeing ringing: Frequency may have changed — re-run calibration
- Shaking/vibration: Normal during resonance test — keep hands clear
- Accelerometer not detected: Check wiring (3.3V not 5V), I2C address
Pressure Advance Issues
- Retraction problems after PA: You may need to reduce retraction distance (PA reduces needed retraction)
- Gaps at seams: PA too high — reduce by 0.01
- Blobs at seams: PA too low — increase by 0.01
- Thin walls: Check extruder calibration first — PA cannot fix under-extrusion
Pro Tips
- Recalibrate when you change hardware: New belts, different hotend, modified toolhead — all change resonances
- Store PA per filament: Use Klipper's SAVE_VARIABLE to store optimal PA for each filament type
- Run at lower accel for first layer: High acceleration can cause first layer issues
- Input Shaper reduces ringing but does not increase rigidity: Loose belts still need tightening
- Pressure Advance works with any speed: The PA value is speed-independent in Klipper
- Use a macro to toggle IS and PA for testing:
Conclusion
Input Shaper and Pressure Advance are the two calibration steps that separate average prints from exceptional ones. Input Shaper eliminates ringing artifacts by compensating for mechanical resonances, letting you run higher accelerations without surface degradation. Pressure Advance eliminates corner blobs and gaps by synchronizing extruder pressure with toolhead motion. Both calibrate in under an hour and the results are permanent until hardware changes. A properly tuned Klipper printer with IS and PA enabled can print at 2-3x the speed of an untuned Marlin machine while producing cleaner surfaces and sharper corners.
Related Guides
- OrcaSlicer Complete Guide: Every Setting Explained for Maximum Print Quality
- Pressure Advance Calibration for Better Print Quality
- How to Calibrate E-Steps and Flow Rate for Dimensional Accuracy
- How to Manage Klipper Firmware on the Anycubic Kobra 3 V2 with ACE Pro
- Pressure Advance Calibration for OrcaSlicer and Klipper
- Klipper Bed Mesh Calibration
- Pressure Advance Tuning on the Kobra 3
- Anycubic Kobra 3 Complete Setup Guide: Unboxing, Calibration, and First Print