Marlin Input Shaping Tuning Guide - PrinterMods UK Ltd

What is Input Shaping and Why Should I Use It?

Input shaping is a software process that compensates for resonances to eliminate "ghosting" or ringing artifacts that may appear on 3D prints when changing directions quickly, as well as some of the vibrations of the printer itself. This process involves adjusting the accelerations while printing based on the M593 values set after tuning, which helps combat the vibrations caused by the change in print direction, resulting in cleaner prints. However, it is important to note that ringing artifacts are often caused by issues with the machine itself, such as a non-rigid frame, belt issues, and heavy mass movement from the bed or hotend. Therefore, these issues should be addressed first if possible. While not a mandatory feature, we have observed significant improvements in print quality during testing. The Marlin team introduced this feature in version 2.1.2, thanks to the work of tombrazier. If you would like to read more about Toms work on Marlins Input Shaping, you can find his github post here.

Prerequisites and Recommendations

✔️ Firmware updated to Marlin 2.1.2 or Unified 2.60 beta or later with Input Shaping enabled
✔️ For best results a 32bit board is recommended due to the extra processing required.
✔️ A slicer that can use custom Gcode macros, we recommend PrusaSlicer or SuperSlicer for this guide we will be using SuperSlicer.
✔️ A shiny/non-matte color filament to better highlight the ringing

Profile Setup & Slicing

For optimal results, it is recommended to calibrate your slicer and filament profiles. Teaching Tech offers an excellent resource for profile calibration that can be found here.

To perform a print test, download the Ringing Tower STL file and slice it using your preferred settings. If you are using a CoreXY printer, it is recommended to rotate the model by 45 degrees, which isolates the A and B components of the motion system. If you are using a printer other than CoreXY, the model should be sliced as imported.

✔️ Layer height set to .2mm
✔️ 1-2 perimeters or enable vase mode
✔️ 0 infill and top layers
✔️ Do not use the Arachne engine as it smooths out corners.
✔️ High speeds settings for external perimeters, (90mm/s+ or the fastest you can reasonably achieve)
✔️ High acceleration values (>= 1000mm/s^2) for X and Y
✔️ Disable any minimum layer time settings (in SuperSlicer: Filament Settings> Very short layer time> Layer time goal = 0 to disable)

Slicer Settings
✔️ Disable any slicer acceleration setting changes (Printer Settings>Machine ✔️ Limits and set Max feed rates/accels and jerk limits to 0
✔️ Turn off Linear Advance via the LCD menus on the printer or by adding M900 K0 to the starting Gcode
✔️ Add the Input Shaping Test Gcode into Printer Settings> Custom G-code >After later change Gcode
Slicer Settings

M593 F{(layer_num < 2 ? 0 : 15 + 45.0 * (layer_num - 2) / 297)} ; Hz Input Shaping Test

This will run a test range from 15Hz to 60Hz

Slice the model with the required changes and verify the speeds are correct in the Gcode Viewer tab by changing the View: Feature Type at the bottom left to Speed

Correctly Sliced file Correctly Sliced File
The model colour fully matches the max speed set

Incorrectly Sliced FileIncorrectly Sliced File
Speed is capped at some layers due to minimum layer time settings and will not yield the desired results

Measurements and Calculations

After the print is complete, you will want to find the point where the print looks the best with the least amount of ringing. Measure the heights of the best results on X and Y and use the formula:

15 + 45 * (z / 0.2 – 2) / 297

Where ‘z’ is the measured Z height of the best results or input the values into our Input Shaping Calculator to get the values and Gcode commands to set compensation values.Ringing Tower

For our example print the X looks best around 26.66mm and Y looks best around 26.62mm as well but your results may vary.

X Axis Measurement

X Axis Measurement

Y Axis Measurement

Y Axis Measurement

Using the calculator, our end frequencies are 34.89 for X and 34.86 for Y and can be input with the following Gcode command:

M593 X F34.89 Y F34.86

and saved with M500

The Results

Finally we print a test calibration cube print with Input Shaping off and with it tuned and turned on:

On the left, Input Shaping turned off — on the right, Input Shaping turned on and tuned!

A noticeable reduction in the X and Y “ghosting” with the new Input shaping enabled. Though it slightly rounds the corners of the print the quality improvement is great.

Although it is a new feature in Marlin, we have observed promising results in our testing and tuning of it. Unlike Klipper, which requires a raspberry Pi or ADXL to use, Marlin's feature does not have such a requirement.