Measuring Resonances
Last updated
Last updated
Input Shaper is a Klipper-specific software technique for reducing ringing (also known as echoing, ghosting or rippling) in prints. See the Klipper guide on configuring Input Shaper for more details and the complete process.
1. Preparation
Check Connections Ensure that your accelerometer is properly connected. To test the connection, enter the following command in Mainsail:
You should see the current measurements from the accelerometer, including the gravity value. For example:
Check Sensor Noise Run the following command to measure the baseline noise on the axes:
You should receive baseline numbers for accelerometer noise on the axes (ideally in the range of ~1-100). High noise levels (e.g., 1000 and above) may indicate sensor issues, power problems, or excessive and unbalanced fan noise.
2. Measure Resonance
Run Resonance Tests To perform resonance tests, use the following command:
This will generate vibrations along the X-axis. If input shaping is enabled, it will be temporarily disabled, as resonance testing is ineffective with input shaping active.
Warning: Observe the printer during the test to ensure vibrations do not become excessive. You can stop the test in an emergency using the command if necessary. If vibrations are too strong, consider adjusting the accel_per_hz
parameter in the [resonance_tester]
section of your configuration file:
Repeat the test for the Y-axis:
This will generate two CSV files:/tmp/resonances_x_*.csv
and /tmp/resonances_y_*.csv
.
Process these files using the script on your Pi via an SSH tool. You can either use a single CSV file for each axis or average results from multiple CSV files if you performed tests at different points. If you do not wish to average results, delete any extra CSV files.Process the CSV files with:
This script will generate charts at /tmp/shaper_calibrate_x.png
and /tmp/shaper_calibrate_y.png
, showing frequency responses. You’ll also receive recommended frequencies and shapers for your settings. For example:
Add the recommended configuration to the [input_shaper]
section of your printer.cfg
:
Alternatively, select other configurations based on the charts. The peaks in the power spectral density on the charts correspond to the resonance frequencies of the printer.
3. Automatic Input Shaper Calibration
Run Automatic Calibration Instead of manually selecting shaper parameters, you can run automatic input shaper calibration from Klipper. Use the following command in Octoprint:
This will perform a full test for both axes and generate frequency response and suggested shaper CSV output (/tmp/calibration_data_*.csv
by default). Recommended shapers and frequencies will be displayed in the Octoprint console. For example:
If you agree with the suggested parameters, use the SAVE_CONFIG
command to save them and restart Klipper. Note that this does not update the max_accel
value in the [printer]
section. You should manually update it based on the recommendations.