3D Printer Input Shaping: ADXL345 Accelerometer Calibration and Ghosting Elimination — 2026 Guide

You can chase ringing artifacts with lower acceleration for months. Or you can mount a $5 ADXL345 accelerometer, run a 60-second resonance test, and let the firmware cancel the vibrations before they reach the print. Input shaping is the single largest print quality upgrade available, and it takes less time than leveling your bed.

Step-by-Step: Input Shaping Calibration

Step 1: Understand the Two Types of Resonance

Every 3D printer has two dominant resonance frequencies: one on the X-axis and one on the Y-axis. When the print head changes direction at speed, the frame vibrates at these frequencies. The vibration shows up on your print as “ghosting” or “ringing” — parallel waves on flat surfaces near corners.

Input shaping works by applying a compensating filter that oscillates the stepper motors in opposition to the resonance, canceling it out. The two most common algorithms:

MZV (Zero Vibration): The simplest shaper. Zero residual vibration at the tuned frequency, but sensitive to frequency errors. If your actual resonance is 48Hz and you tune MZV at 45Hz, you still get ringing. Best for CoreXY printers with consistent resonance.

EI (Extra Insensitive): Slightly more smoothing than MZV, but tolerant of 15% frequency error. If your bed-slinger’s Y-axis resonance shifts slightly depending on bed position, EI handles the variance. Recommended for all bed-slingers.

ZV, ZVD, 2HUMP_EI, 3HUMP_EI: Variants with increasing smoothing and increasing frequency tolerance. ZVD is the sweet spot for most printers — good vibration cancellation without excessive smoothing.

Step 2: Mount the ADXL345 (Klipper)

The ADXL345 measures acceleration at 3200 samples per second. It connects to your controller board via SPI (4 wires) and mounts to the print head for X-axis measurement and the bed for Y-axis measurement.

Wiring (for BTT SKR Mini E3 V3, Raspberry Pi Pico, or any board with SPI):
– VCC → 3.3V (not 5V — the ADXL345 is 3.3V logic level)
– GND → GND
– CS → CS pin (chip select)
– SDO → MISO
– SDA → MOSI
– SCL → SCK

Klipper configuration (add to printer.cfg):

[adxl345]
cs_pin: PB12
spi_bus: spi1

[resonance_tester]
accel_chip: adxl345
probe_points:
    100, 100, 20  # Center of bed for CoreXY; mount point for bed-slingers

Mounting: Rigid connection is critical. Tape or zip ties allow the ADXL to shake independently of the toolhead — you’re measuring the mount’s resonance, not the printer’s. Use a screw or a press-fit TPU mount that clamps the board firmly. The accelerometer should not move relative to the nozzle.

Step 3: Run the Resonance Tests

X-axis test (ADXL on toolhead):

TEST_RESONANCES AXIS=X

The printer vibrates the X-axis through a sweep of frequencies (typically 20–110Hz). The ADXL measures the vibration amplitude at each frequency. After the test completes (60–90 seconds), the Klipper console displays the recommended shaper type and frequency:

Fitted shaper 'zv' frequency = 48.2 Hz (vibrations = 1.4%, smoothing ~= 0.032)
Fitted shaper 'mzv' frequency = 47.8 Hz (vibrations = 0.8%, smoothing ~= 0.035)
Fitted shaper 'ei' frequency = 51.3 Hz (vibrations = 1.1%, smoothing ~= 0.041)
Recommended shaper is mzv @ 47.8 Hz

Y-axis test:

TEST_RESONANCES AXIS=Y

For bed-slingers, the ADXL stays on the bed (remove it from the toolhead). The Y-axis test measures the bed’s resonance, which is typically lower frequency (25–50Hz) and higher amplitude than the X-axis.

Step 4: Apply and Verify the Results

Add to printer.cfg:

[input_shaper]
shaper_freq_x: 47.8
shaper_type_x: mzv
shaper_freq_y: 38.2
shaper_type_y: ei

Then print a ringing test tower (a narrow tower with sharp 90° turns at each Z increment). Compare the before/after surface finish. Ghosting that was visible from 30cm should now be invisible or barely visible under direct light.

As covered in our Klipper vs Marlin guide, Marlin also supports input shaping (since 2.0.9), but the calibration requires manual measurement of ringing distance with calipers rather than an automated ADXL sweep. Klipper’s ADXL method is faster and more accurate.

Input Shaping Reference Table

Shaper Type Vibration Reduction Smoothing (blur) Frequency Tolerance Best For
ZV Minimal Lowest Very narrow (±5%) Precision CoreXY at low speeds
MZV Good Low Narrow (±8%) CoreXY, general use
ZVD Very good Moderate Better (±10%) Bed-slingers, medium-speed
EI Good Moderate Wide (±15%) Bed-slingers, high-speed
2HUMP_EI Very good Higher Wide (±15%) Large-format, variable loads
3HUMP_EI Excellent Highest Widest (±20%) Heavy beds, loose frames

The tradeoff: More vibration cancellation = more smoothing. Smoothing means the printer slightly rounds sharp corners to avoid exciting resonance. For functional parts where dimensional accuracy matters more than surface finish, use ZV or MZV. For display models where surface finish is everything, use EI or ZVD.

What Most Makers Get Wrong

Mistake 1: Mounting the ADXL with tape or a zip tie.
Consequence: The accelerometer rattles against the mount at its own frequency. The resonance test captures the ADXL’s vibration instead of the printer’s, producing garbage data. You’ll tune your printer for a frequency that doesn’t exist.
Fix: Rigid screw mount or press-fit TPU holder. The ADXL should not wiggle when you push on it with a fingertip.

Mistake 2: Running the resonance test with belts at incorrect tension.
Consequence: Loose belts shift the resonance frequency lower. Tight belts shift it higher. If you tune input shaping with loose belts, then tighten them a week later, your shaper is now tuned for the wrong frequency.
Fix: Tension belts first. Use a frequency meter app (Spectroid on Android) or the “pluck test”: X-axis belt should ring at roughly 90–110Hz for a 6mm GT2 belt on a typical printer. Then run the resonance test. If you re-tension later, re-run the test.

Mistake 3: Using the same shaper for X and Y without testing both axes.
Consequence: X-axis resonance (toolhead) and Y-axis resonance (bed) are almost always at different frequencies. A 48Hz mzv shaper that’s perfect for the X-axis does nothing for a 35Hz Y-axis resonance.
Fix: Run separate TEST_RESONANCES AXIS=X and TEST_RESONANCES AXIS=Y. Apply separate shaper_freq_x and shaper_freq_y values. The axes have different mass and different belt paths — their resonance is never identical.

Mistake 4: Assuming input shaping fixes all surface artifacts.
Consequence: Ringing from resonance is one of many surface defects. Input shaping does not fix: inconsistent extrusion (flow rate calibration), Z-banding (lead screw issue), VFAs/vertical fine artifacts (stepper motor cogging), or salmon skin (driver microstepping).
Fix: Fix one problem at a time. Input shaping eliminates ghosting near corners. If you still see diagonal patterns across flat surfaces, that’s VFAs — those are motor/driver artifacts that input shaping can’t address. As detailed in our Z-wobble fix guide, vertical banding is mechanical — check your leadscrew alignment before blaming the shaper.

For printers upgrading to Klipper input shaping, the BTT ADXL345 USB accelerometer (pre-wired with a USB-C connector) eliminates the SPI wiring headache. Plug it into your Raspberry Pi, add two lines to printer.cfg, and run the test. Available at uavmodel.com along with the BTT SKR Mini E3 V3 for a complete Klipper upgrade kit.

⚠️ Safety Notice: Input shaping calibration involves rapid axis movements. Secure all cables and loose items on the printer bed before running resonance tests. The printer will vibrate at various frequencies — this is normal test behavior, not a malfunction. Always ensure your printer is on a stable surface. Electrical safety: the ADXL345 operates at 3.3V logic level — connecting to 5V will destroy the chip. Use only the 3.3V pin on your controller board.


Leave a Comment

Scroll to Top