İçeriğe geç
KURUMSAL Kurumsal teknoloji · İşletmenize özel mühendislik Kurumsal Yazılım · Yönetilen Sunucular · Kurumsal E-posta · LiteSpeed + CloudLinux · Imunify360 Güvenlik · cPanel Yönetim · Uygun pakette 3 Gbps'ye kadar ağ profili
AIOR

Klipper Kalibrasyonu: Bed Mesh, Input Shaping ve Pressure Advance

  • Konu başlatıcısı Konu başlatıcısı Aior
  • Başlangıç tarihi Başlangıç tarihi

Aior

Administrator

Yetkili üye
Katıldı
2 Nis 2023
Mesajlar
929
Tepki puanı
2
Puan
18
Yaş
41
Konum
Turkey
Web sitesi
aior.com
Konu sahibi

Klipper'a geçen ya da Klipper ile gelen bir yazıcı alan kullanıcıların çoğu aynı dört konuda takılır: input shaping, pressure advance, bed mesh ve Z ofseti. Her birinin kendi komutu var, ama sıra yanlış olunca bir ayar diğerini sessizce bozar. Bu rehberde AIOR ekibi olarak FDM yazıcılarda izlediğimiz kalibrasyon sırasını adım adım veriyoruz. Komutlar ve yapılandırma bölümleri Ekim 2026 itibarıyla klipper3d.org'daki güncel belgelerle (Config_Reference, Measuring_Resonances, Pressure_Advance, Bed_Mesh, Rotation_Distance) karşılaştırıldı. Bazı hazır yazıcılar eski bir sürüme dayanan ya da kendi makrolarını kullanan bir üretici çatalıyla (fork) gelir; böyle bir makinede önce üreticinin belgesine bakın.

1. Klipper nedir, printer.cfg nerede durur?​

Klipper iki parçadan oluşur. Hareket planlamasını ve kinematik hesapları Raspberry Pi gibi tek kartlı bir bilgisayarda (SBC) ya da başka bir Linux makinede çalışan ana yazılım (Klippy) yapar; yazıcı kartındaki mikrodenetleyiciye (MCU) yüklenen aygıt yazılımı (firmware) yalnızca zamanlanmış adım ve ısıtıcı komutlarını uygular. Moonraker bu ikilinin üstünde bir API sunar; Mainsail ve Fluidd tarayıcıdan kullandığınız arayüzlerdir. Ana bilgisayar veya kart seçimi aşamasındaysanız ESP32, STM32, Raspberry Pi ve RP2040 karşılaştırmamız seçenekleri tartıyor.

Bütün ayarlar printer.cfg dosyasındadır. MainsailOS veya KIAUH ile yapılan Moonraker tabanlı kurulumlarda dosya genellikle ~/printer_data/config/printer.cfg, günlük dosyası ~/printer_data/logs/klippy.log yolundadır; eski kurulumlarda ~/printer.cfg olabilir.
  • Her adımdan önce yedek alın: Mainsail veya Fluidd'den dosyaları indirin ya da scp ile kopyalayın. SAVE_CONFIG tarihli bir yedek (printer-YYYYMMDD_HHMMSS.cfg) oluşturur; elle yaptığınız düzenlemelerin ise yedeği yoktur.
  • SAVE_CONFIG bloğuna dokunmayın. Kalibrasyon sonuçları dosyanın sonundaki #*# satırlarına yazılır. Aynı ayar dosyanın üst kısmında da varsa Klipper onu yorum satırına çevirir; [include] edilen bir dosyadaysa SAVE_CONFIG "conflicts with included value" hatasıyla durur.
  • SAVE_CONFIG Klipper'ı yeniden başlatır; baskı sırasında çalıştırmayın. RESTART yapılandırmayı yeniden yükler, FIRMWARE_RESTART ayrıca MCU'daki hata durumunu temizler.

2. Kalibrasyon sırası ve nedenleri​

Her adımın sonucu bir sonrakinin girdisidir:
AdımKomut / ayarNeden bu sırada?
1. Mekanik kontrolKayışlar, kasnak set vidaları, tekerler veya raylar, şaseGevşek bir kayışı yazılım düzeltemez; sonraki ölçümler de bozulur.
2. Eksen rotation_distanceKayış adımı × kasnak diş sayısı; vidalı milde tur başına ilerleme (lead)Donanımdan hesaplanır, ölçülerek ayarlanmaz.
3. Ekstrüder rotation_distanceİşaretle, 50 mm it, ölçAkış ve pressure advance doğru ekstrüzyonu varsayar.
4. PIDPID_CALIBRATESıcaklık dalgalanırsa ekstrüzyon da dalgalanır.
5. Prob ofseti ve tekrarlanabilirlikGET_POSITION, PROBE_ACCURACYTutarsız bir probla tesviye ve mesh anlamsızdır.
6. Tabla tesviyesiSCREWS_TILT_CALCULATE, Z_TILT_ADJUST, QUAD_GANTRY_LEVELEğimi mekanik olarak giderir; mesh'e küçük farklar kalır.
7. Z ofsetiPROBE_CALIBRATE veya Z_ENDSTOP_CALIBRATEProb belgesine göre X/Y ofsetli bir probda eğimi değiştirmek önceki sonucu geçersiz kılar.
8. Bed meshBED_MESH_CALIBRATEBed_Mesh belgesi önce Z ofsetinin kalibre edilmesini ister.
9. Input shapingSHAPER_CALIBRATE veya ringing kulesiŞekillendirici (shaper) değişince pressure advance'in yeniden ayarı gerekebilir.
10. Pressure advanceTUNING_TOWER ve SET_PRESSURE_ADVANCEEkstrüzyon ve şekillendirici sabitlendikten sonra yapılır.
11. İvme limitlerimax_accel, square_corner_velocitySeçilen şekillendiricinin yumuşatmasına bağlıdır.
Mekanik kontrolde kayış gerginliğinin dengeli, kasnak set vidalarının (grub screw) sıkı, eksantrik somunlu tekerlerin boşluksuz olduğunu, eksenlerin elle itildiğinde takılmadığını ve şasenin gönyesinde olduğunu doğrulayın. Ardından Klipper'ın Config_checks belgesindeki temel testleri yapın: QUERY_ENDSTOPS ile sınır anahtarlarını, STEPPER_BUZZ STEPPER=stepper_x (ve diğer motorlar) ile motor bağlantısını ve yönünü kontrol edin. Klipper'ın rezonans belgesi de titreşim izlerinin çoğunlukla mekanik kökenli olduğunu ve önce bunların giderilmesi gerektiğini vurgular.

3. rotation_distance: eksenler ve ekstrüder​

Klipper adım/mm yerine rotation_distance kullanır: motorun bir tam turunda eksenin ya da filamentin aldığı yol. Marlin'deki adım/mm (steps/mm) değerinden dönüşüm: rotation_distance = (tur başına tam adım × mikro adım) / (adım/mm); örneğin 200 × 16 / 93 = 34,409.

Kayışlı eksenlerde değer kayış adımı × kasnak diş sayısıdır (2 mm adımlı GT2 kayış ve 20 diş için 40); yaygın T8 trapez mil (2 mm adım, 4 ağızlı) için 8'dir. X/Y/Z'de "işaretle ve ölç" yöntemini kullanmayın; belgeye göre bu eksenler için yeterince hassas değildir ve büyük olasılıkla sonucu kötüleştirir. Dişli ekstrüderlerde gear_ratio tanımlanır; "3:1" diye satılan BMG tipi dişliler aslında 50:17'dir.

Ekstrüder için belgedeki ölç ve düzelt (measure and trim) yöntemi:
  1. Hotend'i baskı sıcaklığına ısıtın (Klipper varsayılan olarak 170 °C altında ekstrüzyona izin vermez).
  2. Filamente, ekstrüder girişinden yaklaşık 70 mm uzakta bir işaret koyun ve mesafeyi kumpasla ölçün.
  3. Aşağıdaki komutlarla 50 mm filamenti yavaşça itin; yaklaşık 50 saniye sürer. Arayüzdeki "Extrude" düğmesini kullanmayın; hızlı iter, oluşan basınç sonucu bozar.
  4. Kalan mesafeyi ölçün: gerçek itme = ilk ölçüm − son ölçüm.
  5. Yeni değer = eski rotation_distance × gerçek / istenen. Üç ondalık basamağa yuvarlayıp [extruder] bölümüne yazın ve RESTART verin. Fark 2 mm'yi aşıyorsa testi tekrarlayın.
Kod:
G91
G1 E50 F60
G90
Marlin rehberlerindeki 100 mm yerine neden 50 mm? Klipper'da yalnızca ekstrüzyon yapan hareketler varsayılan olarak 50 mm ile sınırlıdır (max_extrude_only_distance); daha uzun bir komut "Extrude only move too long" hatası verir. Örnek: eski değer 33,500, ölçümler 70,00 ve 21,20 mm ise gerçek itme 48,80 mm, yeni değer 33,500 × 48,80 / 50 = 32,696 olur. Eksik itmede değer küçülür; bu, adım/mm'nin artırıldığı Marlin mantığının tersidir.

4. PID kalibrasyonu​

Klipper belgesine göre başka aygıt yazılımlarından veya örnek dosyalardan alınan PID değerleri çoğu zaman kötü çalışır; her yazıcıda yeniden ölçün:
Kod:
PID_CALIBRATE HEATER=extruder TARGET=210
SAVE_CONFIG
PID_CALIBRATE HEATER=heater_bed TARGET=60
SAVE_CONFIG
Belgedeki örnek hedefler 170 °C ve 60 °C'dir; en sık bastığınız sıcaklığı seçmek de yaygındır. PID ile sürülen tabla ısıtıcısı saniyede on kez açılıp kapanabilir; mekanik röleli bir tablada bu uygun olmayabilir, o durumda control: watermark kullanılır. Ekim 2026'da PID_CALIBRATE hesabındaki bir hata düzeltildi: eski kod olması gerekenin iki katı değerler öneriyordu. Isıtıcınız sorunsuzsa değişiklik gerekmez; sıcaklık sürekli salınıyorsa Klipper'ı güncelleyip testi tekrarlayın.

5. Prob ofsetleri, tabla tesviyesi ve Z ofseti​

X/Y ofseti​

G28 ile eksenleri sıfırlayın, tablaya bir parça maskeleme bandı yapıştırın, PROBE komutunu verin ve probun tam altını işaretleyin. GET_POSITION ile konumu not edin; G1 komutlarıyla nozulu işaretin tam üstüne getirip konumu yeniden okuyun. x_offset = nozulun X konumu − PROBE sırasındaki X konumu; y_offset aynı şekilde hesaplanır. Değerleri [probe] veya [bltouch] bölümüne yazıp RESTART verin.

Tekrarlanabilirlik: PROBE_ACCURACY​

Tablanın ortasında PROBE_ACCURACY çalıştırın; varsayılan olarak 10 ölçüm alır. Prob belgesine göre en büyük ve en küçük ölçüm arasındaki farkın (range) bir Z adım mesafesi ya da en fazla yaklaşık 0,005 mm olması normaldir; fark 0,025 mm'yi aşıyorsa prob tesviye için yeterince tutarlı değildir. Prob hızını düşürmeyi, bağlantı parçasını sağlamlaştırmayı veya samples ve samples_tolerance ile çoklu ölçümü deneyin. Prob sıcaklıkla kayabildiği için tesviye araçlarını hep aynı sıcaklıkta çalıştırın.

Tabla tesviyesi (tramming)​

  • Vidalı tablalar: [screws_tilt_adjust] bölümüne, prob her vidanın üstündeyken nozulun koordinatlarını yazın ve screw_thread ile vida tipini (CW-M3, CW-M4, CW-M5 gibi) seçin. G28'den sonra SCREWS_TILT_CALCULATE çalıştırın. "adjust CW 01:15" saat yönünde bir tam tur artı çeyrek tur demektir (dakikalar saat kadranındaki dakikalardır). İlk vida referanstır; belge, bütün düzeltmeler 6 dakikanın altına inene kadar tekrarlamayı önerir.
  • Birden fazla Z motoru: [z_tilt] ile Z_TILT_ADJUST, dört Z motorlu gantry'de [quad_gantry_level] ile QUAD_GANTRY_LEVEL kullanılır; ardından G28 Z vermek yaygın bir uygulamadır.

Z ofseti ve kâğıt testi​

Z eksenini probla sıfırlayan yazıcılarda PROBE_CALIBRATE, fiziksel Z sınır anahtarı olanlarda Z_ENDSTOP_CALIBRATE kullanılır. İkisi de kâğıt testine dayanır: nozul ile tabla arasına normal fotokopi kâğıdı koyar, TESTZ ile hafif bir sürtünme hissedene kadar nozulu indirirsiniz. Belge, testin nozul ve tabla oda sıcaklığındayken ve nozulda plastik kalmamışken yapılmasını ister; yaklaşık 0,1 mm'lik kâğıt kalınlığı ısınmadaki genleşmeyi kabaca karşılar. Aşağıdaki G1 satırı nozulu 235 mm'lik bir tablanın ortasına getirir; koordinatları kendi tablanıza göre değiştirin:
Kod:
G28
G1 X117.5 Y117.5 Z10 F6000
PROBE_CALIBRATE
TESTZ Z=-0.1
TESTZ Z=-
ACCEPT
SAVE_CONFIG
TESTZ Z=- ve Z=+ son iki yüksekliğin ortasına gider ve ince ayarı hızlandırır. Son ince ayar ilk katmanda yapılır: baskı sırasında Mainsail veya Fluidd'deki Z ofset düğmeleriyle (SET_GCODE_OFFSET Z_ADJUST=-0.01 MOVE=1) çizgiler hafifçe yassılaşıp boşluksuz birleşene kadar ayarlayın. Baskı bitince Z_OFFSET_APPLY_PROBE (sınır anahtarlı yazıcıda Z_OFFSET_APPLY_ENDSTOP) ve ardından SAVE_CONFIG çalıştırın; yoksa START_PRINT içindeki SET_GCODE_OFFSET Z=0.0 düzeltmeyi bir sonraki baskıda sıfırlar.

6. Bed mesh: yapılandırma, profiller ve uyarlanabilir mesh​

mesh_min ve mesh_max nozulun değil, probun koordinatlarıdır. Örnek: X/Y hareket aralığı 0–235 mm olan bir yazıcıda prob nozulun 40 mm solunda ve 10 mm önündeyse (x_offset: -40, y_offset: -10), prob X'te -40 ile 195, Y'de -10 ile 225 arasına ulaşabilir. Tabla kenarından pay bırakınca:
INI:
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 10, 10
mesh_max: 190, 220
probe_count: 5, 5
algorithm: bicubic
fade_start: 1
fade_end: 10
  • Varsayılan lagrange enterpolasyonu eksen başına en fazla 6 noktaya izin verir; 7x7 gibi yoğun bir ağ için bicubic gerekir, o da her eksende en az 4 nokta ister.
  • Ulaşılamayan bir nokta "Move out of range" hatası verir. Probun erişemediği kenar şeritlerde Klipper ağın en yakın kenar değerini kullanır.
  • Tablayı baskı sıcaklığına getirip birkaç dakika bekledikten sonra BED_MESH_CALIBRATE çalıştırın. Ağı BED_MESH_PROFILE SAVE=pei60 ile adlandırıp SAVE_CONFIG ile kaydedin.
  • Klipper 2023'ten beri default profili açılışta kendiliğinden yüklemez; START_PRINT içinde ya yeni ağ ölçün ya da BED_MESH_PROFILE LOAD=pei60 ekleyin.
  • Uyarlanabilir mesh (adaptive mesh): BED_MESH_CALIBRATE ADAPTIVE=1 ADAPTIVE_MARGIN=5 yalnızca nesnelerin kapladığı alanı ölçer. Bunun için printer.cfg'de [exclude_object] bölümü, G-code dosyasında da START_PRINT'ten önce EXCLUDE_OBJECT_DEFINE satırları gerekir. Bu satırları OrcaSlicer'da "Exclude objects" seçeneği, PrusaSlicer'da Klipper G-code türüyle birlikte "Label objects: Firmware-specific" ayarı üretir; Moonraker'da [file_manager] altındaki enable_object_processing: True ise dilimleyicinin yorum olarak yazdığı nesne etiketlerini bu komutlara çevirir. [exclude_object] bölümü yoksa Klipper "Exclude objects not enabled. Using full mesh..." yazar; bölüm var ama dosyada nesne tanımı yoksa hiçbir uyarı vermeden tam ağ ölçer. Uyarlanabilir mesh devredeyse konsolda "Found 3 objects" gibi bir satır görünür. Belgeye göre uyarlanabilir mesh, tam ağdaki farkın bir katman kalınlığını aşmadığı makinelerde en iyi sonucu verir.
Mainsail veya Fluidd'deki yükseklik haritasında düzgün bir eğim genellikle eksik tesviyeyi, kase ya da kubbe şekli çarpılmış bir tablayı, mıknatısların üstündeki tekil sıçramalar ise manyetik alandan etkilenen endüktif probu gösterir (bunun için faulty_region seçenekleri vardır). Eğimi vidalarla düzeltin: mesh küçük yüzey farklarını yazılımla telafi eder, ama gevşek bir tablayı ya da boşluklu bir gantry'yi düzeltmez.

7. Input shaping: ivmeölçerle rezonans ölçümü​

Sensör seçimi​

SensörArayüzNot
ADXL345Yalnızca SPIBelgeye göre I2C'nin veri hızı yetmez ve çalışmaz. Az sayıda kart SDO pini GND'ye bağlanarak I2C'ye sabitlenmiştir; SPI desteğini kontrol edin.
LIS2DW, LIS3DHSPI veya I2CI2C'de 400 kbit/s hızlı mod (fast mode) gerekir.
MPU-9250/6050, ICM20948 ailesiI2C (400 kbit/s)Bazı modüllerdeki 10K çekme (pull-up) dirençleri fazla büyüktür; değiştirilmeleri ya da paralel dirençle desteklenmeleri gerekir. "mpu-unknown" olarak görünen yonga büyük olasılıkla yenilenmiş (refurbished) bir parçadır, temkinli kullanın.
USB ivmeölçer kartlarıUSBBirçoğu RP2040 tabanlıdır ve Klipper MCU yazılımıyla ek bir [mcu] olarak çalışır; yazıcılar arasında kolay taşınır.

ADXL345'i Raspberry Pi'ye bağlama​

ADXL345 piniRPi piniRPi işlevi
3V3 (VCC)013,3 V besleme
GND06Toprak
CS24GPIO08 (SPI0_CE0_N)
SDO21GPIO09 (SPI0_MISO)
SDA19GPIO10 (SPI0_MOSI)
SCL23GPIO11 (SPI0_SCLK)
Yalnızca 3,3 V kullanın; seviye dönüştürücülü bir kartı 5 V ile beslemek Pi'ye zarar verebilir. Uzun kablolarda belge ekranlı CAT5e kabloyu ve çiftleri GND+MISO, 3.3V+MOSI, SCLK+CS şeklinde eşlemeyi önerir; GND iki uçta da bağlanır, ekran yalnızca Pi tarafında topraklanır. Sensörü ve vidalarını şasenin metal parçalarından yalıtın, çünkü toprak döngüsü elektroniğe zarar verebilir. Bağlantıyı taşıyıcıya (carriage) değil, yalıtkan bir baskılı parçayla doğrudan ekstrüder ya da hotend gövdesine sıkıca yapın.

Yazılım ve yapılandırma​

raspi-config ile SPI'yi etkinleştirin ve Pi'yi Klipper'ın "Linux MCU"su olarak kurun (RPi_microcontroller belgesi). Ardından:
Bash:
sudo apt update
sudo apt install python3-numpy python3-matplotlib libatlas-base-dev libopenblas-dev
~/klippy-env/bin/pip install -v "numpy<1.26"
~/klippy-env/bin/python -c 'import numpy;'
NumPy kurulumu yavaş bir kartta 10–20 dakika sürebilir; bellek azsa takas alanını (swap) açmanız gerekebilir. Son komut hatasız, yalnızca boş bir satır döndürmelidir.
INI:
[mcu rpi]
serial: /tmp/klipper_host_mcu

[adxl345]
cs_pin: rpi:None

[resonance_tester]
accel_chip: adxl345
probe_points:
    117.5, 117.5, 20
Bu örnekte test noktası 235 mm'lik bir tablanın ortası, yüzeyin yaklaşık 20 mm yukarısıdır. Aralık 2024'ten beri test yavaş süpürme hareketleri de içerir; noktanın çevresinde X/Y'de yaklaşık ±30 mm boşluk bırakın.

Ölçüm adımları​

  1. ACCELEROMETER_QUERY: eksenlerden biri yer çekimi ivmesini (yaklaşık 9800 mm/s²) göstermelidir. "Invalid adxl345 id (got xx vs e5)" görürseniz hemen yeniden deneyin; hata sürerse beslemeyi, kablolamayı ve lehimleri kontrol edin.
  2. MEASURE_AXES_NOISE: belgeye göre olağan değerler yaklaşık 1–100 arasıdır; 1000 ve üstü sensör, besleme ya da dengesiz fan sorununa işaret eder.
  3. Bütün fanları kapatıp SHAPER_CALIBRATE çalıştırın. İlk denemede yazıcının başında durun; titreşim aşırıya kaçarsa M112 ile durdurun ve [resonance_tester] içindeki accel_per_hz değerini varsayılanın altına (örneğin 50) indirin.
  4. Önerilen şekillendiriciyi SAVE_CONFIG ile kaydedin. SHAPER_CALIBRATE ve SAVE_CONFIG max_accel değerine dokunmaz; onu 9. bölümdeki gibi kendiniz belirlersiniz.
Grafik için TEST_RESONANCES AXIS=X ve TEST_RESONANCES AXIS=Y çalıştırıp oluşan CSV dosyalarını işleyin:
Bash:
~/klipper/scripts/calibrate_shaper.py /tmp/resonances_x_*.csv -o /tmp/shaper_calibrate_x.png
~/klipper/scripts/calibrate_shaper.py /tmp/resonances_y_*.csv -o /tmp/shaper_calibrate_y.png

Grafiği okumak ve şekillendirici seçmek​

Betik her şekillendirici için bir frekans, kalan titreşim yüzdesi, yumuşatma (smoothing) değeri ve "suggested max_accel" sınırı yazar.
  • zv: en az yumuşatmayı yapar, frekans hatasına en duyarlı olandır.
  • mzv: varsayılandır; çoğu yazıcıda iyi bir dengedir.
  • ei: frekans kaymasına daha dayanıklıdır ama daha çok yumuşatır; belgeye göre baskı büyüdükçe tablası ağırlaşan bed slinger yazıcılara uygun olabilir.
  • 2hump_ei, 3hump_ei: geniş ya da birden çok tepeyi bastırır; bedeli en fazla yumuşatmadır.
Tek ve keskin bir tepe genellikle sağlıklı bir mekaniğe işaret eder. İki ayrı tepe veya geniş bir yayılma gevşek kayış, oynak bir parça ya da fan titreşimi olabilir; CoreXY'de iki kayışı TEST_RESONANCES AXIS=1,1 OUTPUT=raw_data ve AXIS=1,-1 OUTPUT=raw_data ile ölçüp graph_accelerometer.py -c ile karşılaştırabilirsiniz. En düşük rezonans yaklaşık 20–25 Hz'in altındaysa belge önce yazıcıyı rijitleştirmeyi veya hareketli kütleyi azaltmayı önerir. Tablası Y'de hareket eden (bed slinger) yazıcılarda X'i sensör kafadayken (SHAPER_CALIBRATE AXIS=X), Y'yi sensör tablaya bağlıyken (SHAPER_CALIBRATE AXIS=Y) ölçün; her eksenden sonra SAVE_CONFIG verebilirsiniz. İki sensör varsa accel_chip_x ve accel_chip_y ile iki eksen tek seferde ölçülür. Eylül 2025'te ei, 2hump_ei ve 3hump_ei tanımları güncellendi; bunlardan birini kullanıyorsanız güncellemeden sonra yeniden kalibre edin. Kalibrasyonu her baskıdan önce tekrarlamayın: yoğun titreşim yazıcıyı yıpratır ve parçaları gevşetebilir.

Sensör yoksa: ringing kulesi​

docs/prints/ringing_tower.stl modelini 0,2 veya 0,25 mm katman, sıfır dolgu, sıfır üst katman, 1–2 çevre (veya 1–2 mm tabanlı vazo modu), dış çevrede 80–100 mm/s ve en fazla 3 saniyelik minimum katman süresiyle dilimleyin; dinamik ivme kontrolünü kapatın, modeli döndürmeyin. Baskıdan önce:
Kod:
SET_VELOCITY_LIMIT MINIMUM_CRUISE_RATIO=0
SET_PRESSURE_ADVANCE ADVANCE=0
SET_INPUT_SHAPER SHAPER_FREQ_X=0 SHAPER_FREQ_Y=0
TUNING_TOWER COMMAND=SET_VELOCITY_LIMIT PARAMETER=ACCEL START=1500 STEP_DELTA=500 STEP_HEIGHT=5
[input_shaper] bölümü henüz yoksa SET_INPUT_SHAPER "Unknown command" hatası verir; bu aşamada yok sayabilirsiniz. İvme her 5 mm'de 500 mm/s² artar. X işaretli yüzde, çentiklerin yakınında ilk bir iki salınımı atlayıp birkaç salınımı sayın (N) ve kapladıkları mesafeyi (D) ölçün; frekans = V × N / D, burada V dış çevre hızıdır. Belgedeki örnek: 100 × 6 / 12,14 ≈ 49,4 Hz. Aynısını Y işareti için yapın, iki değeri [input_shaper] bölümüne shaper_freq_x ve shaper_freq_y olarak yazın ve RESTART verin. Ardından kuleyi iki kez daha basın; ilk baskıdan önce:
Kod:
RESTART
SET_VELOCITY_LIMIT MINIMUM_CRUISE_RATIO=0
SET_PRESSURE_ADVANCE ADVANCE=0
SET_INPUT_SHAPER SHAPER_TYPE=MZV
TUNING_TOWER COMMAND=SET_VELOCITY_LIMIT PARAMETER=ACCEL START=1500 STEP_DELTA=500 STEP_HEIGHT=5
İkinci baskıda aynı sırayı SHAPER_TYPE=EI ile tekrarlayın. EI belirgin biçimde daha iyi değilse daha az yumuşatan MZV'yi seçin ve [input_shaper] bölümüne shaper_type: mzv ekleyin.

8. Pressure advance ayarı​

Pressure advance (PA), hızlanmada fazladan filament itip yavaşlamada geri çekerek nozuldaki basınç gecikmesini telafi eder; köşe şişmelerini ve sızmayı azaltır. Ekstrüder rotation_distance'ı ve nozul sıcaklığı ayarlanmış, input shaping tamamlanmış olmalıdır; teste başlamadan RESTART verin.

docs/prints/square_tower.stl modelini yaklaşık 100 mm/s hız, sıfır dolgu ve nozul çapının %75'i kadar katman yüksekliğiyle (0,4 mm nozul için 0,3 mm) dilimleyin; dinamik ivme kontrolünü ve "scarf joint" dikişlerini kapatın, diğer ayarlar olağan kalsın. Baskıdan hemen önce:
Kod:
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500
TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005
Doğrudan tahrikli (direct drive) ekstrüderde FACTOR=.005, uzun Bowden'da FACTOR=.020 kullanılır. PA her katmanda biraz artar: ideal değerin altındaki katmanlarda köşeler şişkin, üstündekilerde yuvarlak çıkar ve köşeye yaklaşırken ekstrüzyon zayıflar.

Köşelerin en iyi olduğu yüksekliği kumpasla ölçün; kararsız kalırsanız düşük olanı seçin ve katman değişiminin yapıldığı köşeyi hesaba katmayın. Değer = START + yükseklik × FACTOR: direct drive'da 11,0 mm için 0 + 11,0 × 0,005 = 0,055; belgedeki Bowden örneğinde 12,90 × 0,020 = 0,258. Sonucu [extruder] bölümüne pressure_advance: 0.055 olarak yazın ve RESTART verin; RESTART testin ivme ve köşe hızı ayarlarını da sıfırlar.
  • Belge tipik değerleri 0,050–1,000 aralığında verir (üst uç genellikle Bowden ekstrüderlerde görülür); 1,000'e kadar belirgin iyileşme yoksa PA'yı kapatın.
  • 0,200'ün üzerindeki değerlerde, normal ivmeye dönüldüğünde ekstrüder adım kaçırabilir; ivmeyi düşürün ya da PA'yı kapatın.
  • pressure_advance_smooth_time varsayılan olarak 0,040 s'dir (en fazla 0,2 s); çoğu kurulumda dokunmaya gerek yoktur.
  • PA filament markasına, rengine, sıcaklığa ve nozula göre değişir. Filament başına değer için dilimleyicinin filament başlangıç G-koduna SET_PRESSURE_ADVANCE ADVANCE=0.055 ekleyin; OrcaSlicer'ın filament ayarlarında ayrıca "Enable pressure advance" alanı vardır.
  • PA ayarlandıktan sonra belge, dilimleyicide küçük bir geri çekme (örneğin 0,75 mm) ve silme (wipe) kullanmayı, geri çekmede Z kaldırmayı (z-lift) ise kapatmayı önerir.

9. İvme limitleri: max_accel ve köşe hızı​

calibrate_shaper.py'nin önerdiği max_accel, şekillendiricinin aşırı yumuşatma yapmadan çalışabileceği teorik üst sınırdır, ayar önerisi değildir. X ve Y için verilen değerlerin küçüğünün altında, güvenlik payıyla başlayın; gerçek sınırı motor torku ve mekanik belirler. Ringing kulesindeki 0,15 mm'lik boşluk yumuşatmanın hangi ivmede başladığını gösterir; belge, titreşim ve yumuşatmadan çıkan iki değerin küçüğünü max_accel olarak seçmeyi önerir.
  • square_corner_velocity varsayılan 5,0 değerinde kalsın; değeri yükseltmek yumuşatmayı artırır.
  • max_accel_to_decel Ağustos 2025'te kaldırıldı; eski bir yapılandırma "Option 'max_accel_to_decel' is not valid in section 'printer'" hatası verir. Satırı silin; işlevini minimum_cruise_ratio (varsayılan 0,5) üstlendi.
  • printer.cfg'deki max_accel bir tavan değil, başlangıç değeridir: dilimleyicinin gönderdiği M204 veya SET_VELOCITY_LIMIT komutları onu doğrudan değiştirir. Dilimleyicideki ivme ayarlarını seçtiğiniz limitlerle uyumlu tutun.

10. START_PRINT ve END_PRINT makroları​

Başlangıç ve bitiş adımlarını printer.cfg'de makro olarak tutmak, değişiklikte yeniden dilimlemeyi gereksiz kılar. Aşağıdaki iskelet Klipper'ın sample-macros.cfg örneğinden türetildi:
INI:
[exclude_object]

[gcode_macro START_PRINT]
gcode:
    {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
    {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}
    M140 S{BED_TEMP}
    M104 S150
    G90
    SET_GCODE_OFFSET Z=0.0
    G28
    M190 S{BED_TEMP}
    BED_MESH_CALIBRATE ADAPTIVE=1
    G1 Z5 F3000
    M109 S{EXTRUDER_TEMP}
    G92 E0
    G1 X5 Y20 F5000
    G1 Z0.3 F600
    G1 X5 Y120 E10 F1200
    G92 E0
    G1 Z2 F600

[gcode_macro END_PRINT]
gcode:
    {% set max_z = printer.toolhead.axis_maximum.z|float %}
    {% set act_z = printer.toolhead.position.z|float %}
    {% set lift = [10.0, max_z - act_z]|min %}
    G91
    G1 E-2 F1800
    G1 Z{lift} F600
    G90
    TURN_OFF_HEATERS
    M106 S0
    M84
  • START_PRINT tablayı ısıtmaya başlar, ağ ölçülürken sızmasın diye nozulu 150 °C'de bekletir, eksenleri sıfırlar, tablanın ısınmasını bekler, uyarlanabilir mesh alır, nozulu baskı sıcaklığına getirir ve 0,4 mm nozul için kısa bir temizleme çizgisi (purge line) çeker. X/Y koordinatlarını kendi tablanıza göre değiştirin; Z_TILT_ADJUST veya QUAD_GANTRY_LEVEL kullanıyorsanız M190'dan sonra ekleyip G28 Z verin.
  • END_PRINT filamenti 2 mm geri çeker, nozulu eksen sınırını aşmadan en fazla 10 mm kaldırır, ısıtıcıları ve fanı kapatır, motorları serbest bırakır.
Dilimleyicinin başlangıç G-koduna sıcaklıkları parametre olarak verin; bitiş G-koduna yalnızca END_PRINT yazın:
Kod:
; OrcaSlicer
START_PRINT EXTRUDER_TEMP=[nozzle_temperature_initial_layer] BED_TEMP=[bed_temperature_initial_layer_single]
; PrusaSlicer / SuperSlicer
START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]
; Cura
START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}
Dilimleyici kendi M190/M109 komutlarını START_PRINT'ten önce ekleyebilir; dilimlenmiş dosyanın ilk satırlarını kontrol edin. PrusaSlicer'da bunu "Emit temperature commands automatically" seçeneği yönetir; Klipper belgesi Slic3r türevleri için makro çağrısından önce M140 S0 ve M104 S0 satırlarını eklemeyi önerir.

11. Sorun giderme tablosu​

Hata / belirtiOlası nedenNe yapmalı?
Probe triggered prior to movementProb hareketten önce tetiklenmiş: BLTouch hata modunda, pin mantığı ters, prob tablaya fazla yakınProb serbestken QUERY_PROBE "open" göstermeli (BLTouch'ta önce BLTOUCH_DEBUG COMMAND=pin_down ve COMMAND=touch_mode). Ters ise pin tanımındaki ! işaretini ve kablolamayı kontrol edin. Hata modundaki BLTouch'ı BLTOUCH_DEBUG COMMAND=reset ile sıfırlayın, Z'yi kaldırıp yeniden deneyin.
Timer too close (MCU kapanması)Klipper'ın hata açıklamasına göre çoğunlukla aşırı yüklenmiş ana bilgisayar: işlemci yükü, yoğun takas (swap), disk hatası, aşırı ısınma, kararsız voltajYüksek çözünürlüklü kamera yayını gibi ağır işleri azaltın; Raspberry Pi'de vcgencmd get_throttled çıktısının 0x0 olduğunu doğrulayın; kaliteli güç kaynağı ve SD kart/SSD kullanın.
Lost communication with MCUUSB kablosu, Pi güç kaynağı, aşırı yüklenen yazıcı güç kaynağı, ezilmiş kablolar, karışan 5 V beslemeleriKaliteli, kısa USB kablo kullanın; düşük voltaj uyarılarını giderin; MCU'yu tek bir 5 V kaynağından besleyin.
Invalid adxl345 idSPI başlatma sorunu, kablolama, lehim, I2C'ye sabitlenmiş kartHemen yeniden deneyin; pin eşleşmesini, 3,3 V beslemeyi ve SPI'nin açık olduğunu kontrol edin.
Move out of range (mesh sırasında)mesh_min/mesh_max prob ofsetiyle ulaşılamayan noktalar içeriyorProbun erişim aralığını yeniden hesaplayın; BED_MESH_OUTPUT PGP=1 ile üretilen noktaları listeleyin.
bed_mesh: cannot exceed a probe_count of 6lagrange ile eksen başına 6'dan fazla noktaalgorithm: bicubic kullanın.
SAVE_CONFIG ... conflicts with included valueKaydedilen ayar [include] edilen bir dosyada da tanımlıAyarı o dosyadan silin veya yorum satırına çevirin.
İvmeyi artırınca katman kaymasıMotor torku yetersiz, sürücü akımı düşük, kayış veya kasnak gevşek, dilimleyici M204 ile limiti aşıyormax_accel'i düşürün, kasnak vidalarını ve kayışları kontrol edin, sürücü akımını motor ve sürücü belgelerine göre doğrulayın. Motor seçimi için servo, step motor ve VFD seçimi rehberimize bakın.
Input shaping sonrası titreşim izi sürüyorŞekillendirici etkin değil, ölçümde fan açıktı, sensör gevşekti, mekanik değişti ya da kusur aslında titreşim izi değilSET_INPUT_SHAPER'ı parametresiz çalıştırıp etkin değerleri görün; fanlar kapalıyken yeniden ölçün; betiğin listesindeki ei veya 2hump_ei'yi kendi önerilen frekansıyla deneyin. Kusur kuledeki çentik desenini izlemiyorsa nedeni mekanik ya da ekstrüzyondur.

12. Sık yapılan hatalar​

  • Pressure advance'i input shaping'den önce ayarlamak: Klipper'ın rezonans belgesi, şekillendirici ayarlandıktan sonra PA'nın yeniden ayarlanması gerekebileceğini söyler; iş iki kez yapılır.
  • Soğuk tablada mesh almak: Tabla ısınınca şekli değişir, prob da sıcaklıkla kayabilir. Baskı sıcaklığında, birkaç dakika bekledikten sonra ölçün.
  • Başka bir yazıcının değerlerini kopyalamak: rotation_distance, PID, Z ofseti, rezonans frekansları ve PA makineye, hatta filament makarasına özgüdür.
  • rotation_distance oranını ters kurmak: Doğrusu yeni = eski × gerçek / istenen; eksik itmede değer küçülür.

Sık sorulan sorular​

Input shaping için ivmeölçer şart mı?
Hayır. Ringing kulesiyle frekansı elle ölçebilirsiniz; ivmeölçer daha hızlıdır ve birden çok rezonans tepesini gösterir.

ADXL345'i I2C ile bağlayabilir miyim?
Klipper belgesine göre hayır; I2C'nin veri hızı yetmez. SPI kullanın ya da I2C ile çalışan desteklenen bir sensör (MPU ailesi, LIS2DW) seçin.

Pressure advance'i ne sıklıkla ayarlamalıyım?
Yeni bir filament markasına veya rengine, farklı bir nozula ya da başka bir baskı sıcaklığına geçtiğinizde. Belge her makara için ayrı kalibrasyon önerir.

Her baskıdan önce mesh almalı mıyım?
Uyarlanabilir mesh kullanıyorsanız evet; her dosya farklı bir alanı ölçer ve belge bu ağların yeniden kullanılmamasını söyler. Kararlı bir tablada kayıtlı bir profili yüklemek de yeterli olabilir.

SHAPER_CALIBRATE'i ne zaman tekrarlamalıyım?
Kayış gerginliği, hotend, fan kanalı, tabla veya kafa ağırlığı değiştiğinde ve şekillendirici tanımları güncellendiğinde. Rutin olarak her gün çalıştırmayın.

Sonuç ve sonraki adımlar​

Klipper'da iyi sonucu tek bir ayar değil, doğru sıra belirler: mekanik, rotation_distance, PID, prob ve tesviye, Z ofseti, mesh, input shaping, pressure advance ve en son ivme limitleri. Her adımdan önce printer.cfg'nin yedeğini alın, sonuçları not edin ve bir parçayı değiştirdiğinizde yalnızca etkilenen adımları tekrarlayın. Ayrıntılarda resmi Measuring Resonances, Pressure Advance ve Bed Mesh belgeleri esas alınmalıdır. Kalibre edilmiş bir yazıcı ölçüsü tutan fonksiyonel parçaların ön koşuludur; tersine mühendislik veya prototipleme için desteğe ihtiyacınız olursa AIOR'un 3D tarama, tasarım ve üretim çözümlerine göz atabilirsiniz. Takıldığınız bir adım olursa yazıcı modelinizi, Klipper sürümünüzü ve ilgili hata satırını yazarak burada yeni bir konu açın.

Most people who move to Klipper, or buy a printer that ships with it, get stuck on the same four things: input shaping, pressure advance, bed mesh and Z offset. Each has its own command, but in the wrong order one setting quietly undoes another. This guide walks through the calibration order the AIOR team follows on FDM printers, step by step. Commands and config sections were checked against the current documentation on klipper3d.org (Config_Reference, Measuring_Resonances, Pressure_Advance, Bed_Mesh, Rotation_Distance) in October 2026. Some ready-made printers ship a vendor fork of Klipper that is based on an older release or uses its own macros; on those machines, read the vendor's documentation first.

1. What Klipper is and where printer.cfg lives​

Klipper comes in two halves. The host software (Klippy) runs on a Raspberry Pi or another Linux single-board computer (SBC) and does the motion planning and kinematics; the firmware on the printer's microcontroller (MCU) only executes precisely timed step and heater commands. Moonraker adds an API on top, and Mainsail or Fluidd are the browser front ends. If you are still choosing the host or controller hardware, our ESP32 vs STM32 vs Raspberry Pi vs RP2040 comparison covers the trade-offs.

Everything is configured in printer.cfg. On Moonraker-based installs (MainsailOS, KIAUH) it usually lives at ~/printer_data/config/printer.cfg, with the log at ~/printer_data/logs/klippy.log; older setups may use ~/printer.cfg.
  • Back up before every step: download the files from Mainsail or Fluidd, or copy them with scp. SAVE_CONFIG writes a timestamped backup (printer-YYYYMMDD_HHMMSS.cfg) on its own, but your manual edits get no backup.
  • Leave the SAVE_CONFIG block alone. Calibration results go into the #*# lines at the end of the file. If the same option also appears higher up, Klipper comments that line out; if it lives in a file pulled in with [include], SAVE_CONFIG stops with "conflicts with included value".
  • SAVE_CONFIG restarts Klipper, so never run it mid-print. RESTART reloads the config; FIRMWARE_RESTART also clears an error state on the MCU.

2. The calibration order, and why​

Each step produces the input for the next one:
StepCommand / settingWhy at this point
1. Mechanical checksBelts, pulley grub screws, wheels or rails, frameNo setting fixes a loose belt, and every later measurement would be off.
2. Axis rotation_distanceBelt pitch × pulley teeth; lead per turn for a lead screwCalculated from the hardware, not tuned by measuring.
3. Extruder rotation_distanceMark, extrude 50 mm, measureFlow and pressure advance assume correct extrusion.
4. PIDPID_CALIBRATETemperature swings turn into extrusion swings.
5. Probe offsets and repeatabilityGET_POSITION, PROBE_ACCURACYLevelling and meshing with an inconsistent probe is pointless.
6. Levelling / trammingSCREWS_TILT_CALCULATE, Z_TILT_ADJUST, QUAD_GANTRY_LEVELRemoves tilt mechanically so the mesh only handles small deviations.
7. Z offsetPROBE_CALIBRATE or Z_ENDSTOP_CALIBRATEPer the probe guide, changing bed tilt invalidates an earlier result when the probe has an XY offset.
8. Bed meshBED_MESH_CALIBRATEThe Bed_Mesh guide requires a calibrated Z offset first.
9. Input shapingSHAPER_CALIBRATE or ringing towerPressure advance may need re-tuning once the shaper changes.
10. Pressure advanceTUNING_TOWER with SET_PRESSURE_ADVANCEDone once extrusion and shaping are settled.
11. Acceleration limitsmax_accel, square_corner_velocityDepend on the smoothing of the chosen shaper.
For the mechanical pass, confirm that belt tension is even, pulley grub screws are tight, eccentric nuts leave no play in the wheels, every axis moves freely by hand and the frame is square. Then run the basic tests from Klipper's Config_checks guide: QUERY_ENDSTOPS for the switches and STEPPER_BUZZ STEPPER=stepper_x (and the other motors) for wiring and direction. Klipper's resonance guide also points out that ringing usually has mechanical causes, and those should be fixed first.

3. rotation_distance for the axes and the extruder​

Instead of steps/mm, Klipper uses rotation_distance: how far the axis or the filament travels per full motor revolution. To convert a Marlin steps/mm value: rotation_distance = full steps per rotation × microsteps / steps_per_mm, for example 200 × 16 / 93 = 34.409.

On belt axes it is belt pitch × pulley teeth (40 for a 2 mm GT2 belt on a 20-tooth pulley); a common T8 lead screw (2 mm pitch, 4 starts) gives 8. Do not use measure-and-trim on X, Y or Z: the documentation says it is not accurate enough there and will likely make things worse. Geared extruders use gear_ratio; BMG-style gears sold as "3:1" are actually 50:17.

The documented measure-and-trim procedure for the extruder:
  1. Heat the hotend to printing temperature (by default Klipper refuses to extrude below 170 °C).
  2. Mark the filament about 70 mm from the extruder inlet and measure that distance with calipers.
  3. Extrude 50 mm slowly with the commands below; it takes about 50 seconds. Do not use the front end's Extrude button, which runs fast enough for pressure to skew the result.
  4. Measure the remaining distance: actual = first reading − second reading.
  5. New value = old rotation_distance × actual / requested. Round to three decimals, put it in [extruder] and RESTART. If the error was more than about 2 mm, repeat the test.
Kod:
G91
G1 E50 F60
G90
Why 50 mm rather than the 100 mm many Marlin guides use? Extrude-only moves are capped at 50 mm by default (max_extrude_only_distance), so a longer one fails with "Extrude only move too long". Worked example: old value 33.500, readings of 70.00 and 21.20 mm, so 48.80 mm actually moved and the new value is 33.500 × 48.80 / 50 = 32.696. Under-extrusion makes the number smaller, the opposite of Marlin, where you would raise steps/mm.

4. PID tuning​

The Klipper docs warn that PID values taken from other firmware or example configs often work poorly, so tune every printer:
Kod:
PID_CALIBRATE HEATER=extruder TARGET=210
SAVE_CONFIG
PID_CALIBRATE HEATER=heater_bed TARGET=60
SAVE_CONFIG
The documented examples use 170 °C and 60 °C; many people pick the temperature they print at most. Under PID control a bed heater may switch on and off ten times a second, which may not suit a mechanical relay; in that case use control: watermark. A fix landed in October 2026: PID_CALIBRATE used to recommend values twice what they should have been. If your heaters behave, nothing needs to change; if temperatures keep oscillating, update Klipper and run the test again.

5. Probe offsets, levelling and Z offset​

XY offsets​

Home with G28, put a piece of painter's tape on the bed, run PROBE and mark the spot directly under the probe. Note the toolhead position with GET_POSITION, then jog the nozzle over the mark with G1 moves and read the position again. x_offset = nozzle X − X during PROBE, and the same for y_offset. Put the values in [probe] or [bltouch] and RESTART.

Repeatability: PROBE_ACCURACY​

Run PROBE_ACCURACY near the bed centre; it takes 10 samples by default. According to the probe guide, a range (max − min) of one Z step or up to about 0.005 mm is normal, and above 0.025 mm the probe is not accurate enough for bed levelling. Try a slower probe speed, a stiffer mount, or multiple samples with samples and samples_tolerance. Probes can drift with temperature, so always run levelling tools at the same temperature.

Levelling and tramming​

  • Screw-adjusted beds: in [screws_tilt_adjust], list the nozzle coordinates at which the probe sits over each screw, and set screw_thread (CW-M3, CW-M4, CW-M5 and so on). After G28, run SCREWS_TILT_CALCULATE. "adjust CW 01:15" means one full turn plus a quarter, clockwise (minutes on a clock face). The first screw is the reference; the docs suggest repeating until every adjustment is under 6 minutes.
  • Multiple Z motors: use Z_TILT_ADJUST with [z_tilt], or QUAD_GANTRY_LEVEL with [quad_gantry_level] on a four-motor gantry; homing Z again afterwards (G28 Z) is common practice.

Z offset and the paper test​

Printers that home Z with the probe use PROBE_CALIBRATE; printers with a physical Z switch use Z_ENDSTOP_CALIBRATE. Both rely on the paper test: slide ordinary copy paper under the nozzle and step down with TESTZ until you feel slight friction. The docs ask for nozzle and bed at room temperature and a nozzle free of plastic; paper of roughly 0.1 mm stands in for the thermal expansion you get when everything heats up. The G1 line below centres the nozzle on a 235 mm bed; adjust the coordinates for yours:
Kod:
G28
G1 X117.5 Y117.5 Z10 F6000
PROBE_CALIBRATE
TESTZ Z=-0.1
TESTZ Z=-
ACCEPT
SAVE_CONFIG
TESTZ Z=- and Z=+ bisect between the last two heights, which narrows things down quickly. The final trim happens on the first layer: while printing, use the Z offset buttons in Mainsail or Fluidd (SET_GCODE_OFFSET Z_ADJUST=-0.01 MOVE=1) until the lines are slightly flattened and fuse without gaps. After the print, run Z_OFFSET_APPLY_PROBE (Z_OFFSET_APPLY_ENDSTOP on switch-homed printers) and then SAVE_CONFIG; otherwise the SET_GCODE_OFFSET Z=0.0 in START_PRINT wipes the correction on the next print.

6. Bed mesh: configuration, profiles and adaptive meshing​

mesh_min and mesh_max are probe coordinates, not nozzle coordinates. Example: on a printer with 0–235 mm of X/Y travel whose probe sits 40 mm left of and 10 mm in front of the nozzle (x_offset: -40, y_offset: -10), the probe can reach X -40 to 195 and Y -10 to 225. Leaving a margin from the bed edges:
INI:
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 10, 10
mesh_max: 190, 220
probe_count: 5, 5
algorithm: bicubic
fade_start: 1
fade_end: 10
  • The default lagrange interpolation allows at most 6 points per axis; a denser grid such as 7x7 needs bicubic, which in turn needs at least 4 points per axis.
  • An unreachable point fails with "Move out of range". Along edges the probe cannot reach, Klipper applies the nearest edge value of the mesh.
  • Bring the bed to printing temperature, wait a few minutes, then run BED_MESH_CALIBRATE. Name the result with BED_MESH_PROFILE SAVE=pei60 and store it with SAVE_CONFIG.
  • Since 2023 Klipper no longer loads the default profile at startup; either probe a fresh mesh in START_PRINT or add BED_MESH_PROFILE LOAD=pei60.
  • Adaptive meshing: BED_MESH_CALIBRATE ADAPTIVE=1 ADAPTIVE_MARGIN=5 probes only the area the objects occupy. It needs [exclude_object] in printer.cfg and EXCLUDE_OBJECT_DEFINE lines in the G-code ahead of START_PRINT. OrcaSlicer's "Exclude objects" option writes those lines, as does PrusaSlicer's "Label objects: Firmware-specific" with the Klipper G-code flavor; Moonraker's enable_object_processing: True under [file_manager] instead converts object labels that the slicer wrote as comments. Without the [exclude_object] section Klipper prints "Exclude objects not enabled. Using full mesh..."; with the section but no object definitions in the file, it quietly probes the full bed. When adaptive meshing is active, the console shows a line such as "Found 3 objects". The docs add that adaptive meshes work best on machines whose full mesh varies by no more than one layer height.
In the Mainsail or Fluidd height map, a uniform slope usually means the bed needs tramming, a bowl or dome means a warped bed, and isolated spikes over the magnets mean an inductive probe is reacting to the magnetic field (the faulty_region options exist for that). Fix tilt with the screws: the mesh compensates small surface deviations in software, but it does not fix a loose bed or a gantry with play.

7. Input shaping: measuring resonances with an accelerometer​

Choosing a sensor​

SensorInterfaceNotes
ADXL345SPI onlyThe docs say I2C has too little throughput and will not work. A few boards are hard-wired for I2C with SDO tied to GND, so confirm SPI support.
LIS2DW, LIS3DHSPI or I2CI2C needs 400 kbit/s fast mode.
MPU-9250/6050, ICM20948 familyI2C (400 kbit/s)Some modules ship 10K pull-ups that are too large and must be replaced or paralleled with smaller resistors; a chip reported as "mpu-unknown" is probably refurbished, so use it with caution.
USB accelerometer boardsUSBMany are RP2040-based and run Klipper MCU firmware as an extra [mcu]; easy to move between printers.

Wiring an ADXL345 to a Raspberry Pi​

ADXL345 pinRPi pinRPi function
3V3 (VCC)013.3 V power
GND06Ground
CS24GPIO08 (SPI0_CE0_N)
SDO21GPIO09 (SPI0_MISO)
SDA19GPIO10 (SPI0_MOSI)
SCL23GPIO11 (SPI0_SCLK)
Use 3.3 V only; feeding 5 V to a board with a level shifter can damage the Pi. For longer runs the docs recommend shielded CAT5e with the pairs GND+MISO, 3.3V+MOSI and SCLK+CS; GND is connected at both ends and the shield only at the Pi end. Insulate the sensor and its screws from the metal frame, because a ground loop can damage the electronics. Mount it rigidly on the extruder or hotend body rather than the carriage, using a printed, insulating mount.

Software and configuration​

Enable SPI with raspi-config and set the Pi up as Klipper's "Linux MCU" (see the RPi_microcontroller guide). Then:
Bash:
sudo apt update
sudo apt install python3-numpy python3-matplotlib libatlas-base-dev libopenblas-dev
~/klippy-env/bin/pip install -v "numpy<1.26"
~/klippy-env/bin/python -c 'import numpy;'
Building NumPy can take 10–20 minutes on a slow board, and with little RAM you may need to enable swap. The last command should print nothing but an empty line.
INI:
[mcu rpi]
serial: /tmp/klipper_host_mcu

[adxl345]
cs_pin: rpi:None

[resonance_tester]
accel_chip: adxl345
probe_points:
    117.5, 117.5, 20
In this example the test point is the centre of a 235 mm bed, about 20 mm above the surface. Since December 2024 the test also includes slow sweeping moves, so leave roughly ±30 mm of X/Y clearance around the point.

Running the measurement​

  1. ACCELEROMETER_QUERY: one axis should read gravity, about 9800 mm/s². On "Invalid adxl345 id (got xx vs e5)", retry immediately; if it persists, check power, wiring and soldering.
  2. MEASURE_AXES_NOISE: the docs give roughly 1–100 as normal; 1000 or more points to a sensor, power or unbalanced-fan problem.
  3. Switch every fan off and run SHAPER_CALIBRATE. Stay with the printer the first time; if the shaking gets violent, stop with M112 and lower accel_per_hz in [resonance_tester] below its default (50, for example).
  4. Store the recommended shaper with SAVE_CONFIG. Neither SHAPER_CALIBRATE nor SAVE_CONFIG touches max_accel; you set that yourself, as described in section 9.
For graphs, run TEST_RESONANCES AXIS=X and TEST_RESONANCES AXIS=Y, then process the CSV files:
Bash:
~/klipper/scripts/calibrate_shaper.py /tmp/resonances_x_*.csv -o /tmp/shaper_calibrate_x.png
~/klipper/scripts/calibrate_shaper.py /tmp/resonances_y_*.csv -o /tmp/shaper_calibrate_y.png

Reading the graph and choosing a shaper​

For every shaper the script prints a frequency, the remaining vibrations, a smoothing value and a "suggested max_accel" limit.
  • zv: the least smoothing, but the most sensitive to frequency errors.
  • mzv: the default and a good balance on most printers.
  • ei: more tolerant of frequency drift but smooths more; the docs suggest it may suit bed slingers, whose bed gets heavier as the print grows.
  • 2hump_ei, 3hump_ei: suppress broad or multiple peaks, at the cost of the most smoothing.
A single sharp peak usually suggests healthy mechanics. Two separate peaks or a broad hump can point to a loose belt, a loose part or fan vibration; on CoreXY you can record both belts with TEST_RESONANCES AXIS=1,1 OUTPUT=raw_data and AXIS=1,-1 OUTPUT=raw_data and compare them with graph_accelerometer.py -c. If the lowest resonance is below roughly 20–25 Hz, the docs suggest stiffening the printer or reducing the moving mass first. On a bed slinger, measure X with the sensor on the toolhead (SHAPER_CALIBRATE AXIS=X) and Y with it on the bed (SHAPER_CALIBRATE AXIS=Y); you can run SAVE_CONFIG after each axis. With two sensors, accel_chip_x and accel_chip_y cover both axes in one run. The ei, 2hump_ei and 3hump_ei definitions changed in September 2025, so recalibrate after updating if you use one of them. Do not re-run calibration before every print: the vibration is hard on the machine and can loosen parts.

No sensor: the ringing tower​

Slice docs/prints/ringing_tower.stl with 0.2 or 0.25 mm layers, no infill or top layers, 1–2 perimeters (or vase mode with a 1–2 mm base), 80–100 mm/s on external perimeters and a minimum layer time of 3 seconds or less; disable dynamic acceleration control and do not rotate the model. Before printing:
Kod:
SET_VELOCITY_LIMIT MINIMUM_CRUISE_RATIO=0
SET_PRESSURE_ADVANCE ADVANCE=0
SET_INPUT_SHAPER SHAPER_FREQ_X=0 SHAPER_FREQ_Y=0
TUNING_TOWER COMMAND=SET_VELOCITY_LIMIT PARAMETER=ACCEL START=1500 STEP_DELTA=500 STEP_HEIGHT=5
If there is no [input_shaper] section yet, SET_INPUT_SHAPER answers "Unknown command", which is safe to ignore at this stage. Acceleration rises by 500 mm/s² every 5 mm. On the side with the X mark, near the notches, skip the first oscillation or two, count several oscillations (N) and measure the distance they span (D); frequency = V × N / D, where V is the external perimeter speed. The documented example is 100 × 6 / 12.14 ≈ 49.4 Hz. Repeat for the Y mark, write both values into an [input_shaper] section as shaper_freq_x and shaper_freq_y, and RESTART. Then print the tower twice more; before the first print, run:
Kod:
RESTART
SET_VELOCITY_LIMIT MINIMUM_CRUISE_RATIO=0
SET_PRESSURE_ADVANCE ADVANCE=0
SET_INPUT_SHAPER SHAPER_TYPE=MZV
TUNING_TOWER COMMAND=SET_VELOCITY_LIMIT PARAMETER=ACCEL START=1500 STEP_DELTA=500 STEP_HEIGHT=5
For the second print, repeat the sequence with SHAPER_TYPE=EI. Unless EI is clearly better, pick MZV, which smooths less, and add shaper_type: mzv to [input_shaper].

8. Pressure advance tuning​

Pressure advance (PA) compensates for the lag of pressure in the nozzle by pushing extra filament while accelerating and pulling it back while decelerating, which reduces corner bulges and ooze. Extruder rotation_distance and nozzle temperature should already be tuned and input shaping finished; issue RESTART before the test.

Slice docs/prints/square_tower.stl at around 100 mm/s, with no infill and a layer height of about 75% of the nozzle diameter (0.3 mm for a 0.4 mm nozzle). Turn off dynamic acceleration control and scarf joint seams and leave the rest at normal settings. Right before printing:
Kod:
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500
TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005
Use FACTOR=.005 for a direct drive extruder and FACTOR=.020 for a long Bowden. PA rises a little on every layer: below the ideal value the corners bulge, above it they come out rounded with weak extrusion leading into the corner.

Measure the height of the best-looking corners with calipers; when in doubt, take the lower one and ignore the corner where the layer change happens. Value = START + height × FACTOR: on a direct drive, 11.0 mm gives 0 + 11.0 × 0.005 = 0.055; the documented Bowden example is 12.90 × 0.020 = 0.258. Write pressure_advance: 0.055 in [extruder] and RESTART, which also clears the test's acceleration and cornering settings.
  • The docs give typical values of 0.050–1.000, the upper end usually for Bowden setups; if nothing improves up to 1.000, leave PA disabled.
  • Above about 0.200, the extruder may skip steps once normal acceleration returns; lower the acceleration or disable PA.
  • pressure_advance_smooth_time defaults to 0.040 s (200 ms maximum) and rarely needs changing.
  • PA depends on filament brand, colour, temperature and nozzle. For per-filament values, put SET_PRESSURE_ADVANCE ADVANCE=0.055 in the slicer's filament start G-code; OrcaSlicer's filament settings also have an "Enable pressure advance" field.
  • Once PA is tuned, the docs recommend a small slicer retraction (around 0.75 mm) with wipe enabled, and turning off z-lift on retract.

9. Acceleration limits: max_accel and cornering​

The max_accel that calibrate_shaper.py suggests is the theoretical ceiling at which the shaper still works without excessive smoothing; it is not a recommendation. Start below the smaller of the X and Y suggestions, with a safety margin, because motor torque and mechanics set the real limit. The 0.15 mm gap in the ringing tower shows where smoothing begins, and the docs recommend using the smaller of the two accelerations from ringing and smoothing as max_accel.
  • Keep square_corner_velocity at its default of 5.0; raising it adds smoothing.
  • max_accel_to_decel was removed in August 2025, and an old config fails with "Option 'max_accel_to_decel' is not valid in section 'printer'". Delete the line; minimum_cruise_ratio (default 0.5) took over its job.
  • max_accel in printer.cfg is a starting value, not a ceiling: M204 or SET_VELOCITY_LIMIT commands from the slicer replace it directly. Keep the slicer's acceleration settings in line with the limits you chose.

10. START_PRINT and END_PRINT macros​

Keeping start and end steps as macros in printer.cfg means you can change them without re-slicing. This skeleton is derived from Klipper's sample-macros.cfg:
INI:
[exclude_object]

[gcode_macro START_PRINT]
gcode:
    {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
    {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}
    M140 S{BED_TEMP}
    M104 S150
    G90
    SET_GCODE_OFFSET Z=0.0
    G28
    M190 S{BED_TEMP}
    BED_MESH_CALIBRATE ADAPTIVE=1
    G1 Z5 F3000
    M109 S{EXTRUDER_TEMP}
    G92 E0
    G1 X5 Y20 F5000
    G1 Z0.3 F600
    G1 X5 Y120 E10 F1200
    G92 E0
    G1 Z2 F600

[gcode_macro END_PRINT]
gcode:
    {% set max_z = printer.toolhead.axis_maximum.z|float %}
    {% set act_z = printer.toolhead.position.z|float %}
    {% set lift = [10.0, max_z - act_z]|min %}
    G91
    G1 E-2 F1800
    G1 Z{lift} F600
    G90
    TURN_OFF_HEATERS
    M106 S0
    M84
  • START_PRINT starts heating the bed, holds the nozzle at 150 °C so it does not ooze while meshing, homes, waits for the bed, runs an adaptive mesh, brings the nozzle to printing temperature and lays a short purge line sized for a 0.4 mm nozzle. Adjust the X/Y coordinates to your bed; if you use Z_TILT_ADJUST or QUAD_GANTRY_LEVEL, add it after M190 followed by G28 Z.
  • END_PRINT retracts 2 mm, lifts the nozzle by up to 10 mm without exceeding the Z limit, switches off the heaters and fan and releases the motors.
Pass the temperatures from the slicer's start G-code, and put only END_PRINT in the end G-code:
Kod:
; OrcaSlicer
START_PRINT EXTRUDER_TEMP=[nozzle_temperature_initial_layer] BED_TEMP=[bed_temperature_initial_layer_single]
; PrusaSlicer / SuperSlicer
START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]
; Cura
START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}
Slicers may insert their own M190/M109 before START_PRINT, so check the first lines of the sliced file. In PrusaSlicer the "Emit temperature commands automatically" option controls this; for Slic3r derivatives the Klipper docs suggest putting M140 S0 and M104 S0 before the macro call.

11. Troubleshooting table​

Error / symptomLikely causeWhat to do
Probe triggered prior to movementThe probe was already triggered: BLTouch in error mode, inverted pin logic, probe too close to the bedWith the probe free, QUERY_PROBE should report "open" (on a BLTouch, first run BLTOUCH_DEBUG COMMAND=pin_down and COMMAND=touch_mode). If inverted, check the ! on the pin definition and the wiring. Reset a BLTouch in error mode with BLTOUCH_DEBUG COMMAND=reset, raise Z and retry.
Timer too close (MCU shutdown)Per Klipper's error hint, usually an overloaded host: CPU load, heavy swap, disk errors, overheating, unstable voltageCut heavy jobs such as high-resolution webcam streams; on a Raspberry Pi check that vcgencmd get_throttled returns 0x0; use a good power supply and SD card or SSD.
Lost communication with MCUUSB cable, Pi power supply, overloaded printer PSU, damaged wiring, mixed 5 V suppliesUse a short, good-quality USB cable; fix under-voltage warnings; power the MCU's 5 V from a single source.
Invalid adxl345 idSPI initialisation glitch, wiring, soldering, a board fixed to I2CRetry immediately; then check the pin mapping, the 3.3 V supply and that SPI is enabled.
Move out of range (during meshing)mesh_min/mesh_max include points the probe cannot reach given its offsetsRecalculate the probe's reachable area; list the generated points with BED_MESH_OUTPUT PGP=1.
bed_mesh: cannot exceed a probe_count of 6More than 6 points per axis with lagrangeSet algorithm: bicubic.
SAVE_CONFIG ... conflicts with included valueThe saved option is also defined in an [include]d fileDelete or comment out the option in that file.
Layer shifts after raising accelerationNot enough motor torque, low driver current, loose belt or pulley, slicer M204 above your limitLower max_accel, check pulley grub screws and belts, verify driver current against the motor and driver documentation. For motor selection, see our servo, stepper or VFD selection guide.
Ringing still visible after input shapingShaper not active, fans running during measurement, loose sensor, changed mechanics, or the defect is not ringing at allRun SET_INPUT_SHAPER with no parameters to see the active values; re-measure with fans off; try ei or 2hump_ei from the script's list, each at its own fitted frequency. If the defect does not follow the notch pattern of the tower, the cause is mechanical or extrusion.

12. Common mistakes​

  • Tuning pressure advance before input shaping: Klipper's resonance guide says PA may need re-tuning after the shaper is set, so you end up doing it twice.
  • Meshing a cold bed: the bed changes shape as it heats and probes can drift with temperature. Mesh at printing temperature after a few minutes of soak.
  • Copying another printer's values: rotation_distance, PID, Z offset, resonance frequencies and PA are specific to the machine, and PA even to the spool.
  • Inverting the rotation_distance ratio: the correct form is new = old × actual / requested; under-extrusion makes the value smaller.

FAQ​

Do I need an accelerometer for input shaping?
No. The ringing tower lets you measure the frequency by hand; an accelerometer is faster and shows multiple resonance peaks.

Can I connect an ADXL345 over I2C?
Not according to the Klipper docs; I2C does not have the throughput. Use SPI, or pick a supported sensor that works over I2C (the MPU family, LIS2DW).

How often should I re-tune pressure advance?
Whenever you change filament brand or colour, nozzle or printing temperature. The docs recommend calibrating for each spool.

Should I mesh before every print?
If you use adaptive meshing, yes: each file probes a different area and the docs say adaptive meshes should not be reused. On a stable bed, loading a saved profile can be enough.

When should I re-run SHAPER_CALIBRATE?
After changing belt tension, hotend, fan duct, bed or toolhead mass, and after Klipper updates its shaper definitions. Not as a daily routine.

Conclusion and next steps​

With Klipper, the order of the steps matters more than any single setting: mechanics, rotation_distance, PID, probe and levelling, Z offset, mesh, input shaping, pressure advance and, last, the acceleration limits. Back up printer.cfg before each step, note the results, and when you swap a part, redo only the steps it affects. For the details, the official Measuring Resonances, Pressure Advance and Bed Mesh guides remain the reference. A calibrated printer is the precondition for functional parts that hold their dimensions; if you need help with reverse engineering or prototyping, AIOR's 3D scanning, design and manufacturing services may be useful. If you get stuck on a step, open a new thread here with your printer model, Klipper version and the exact error line.
 

Forum istatistikleri

Konular
925
Mesajlar
932
Üyeler
26
En son üye
Jessicawatson

Çevrimiçi üyeler

Şu anda çevrimiçi üye yok.

Öne çıkan içerik

AIOR
AIOR TEKNOLOJİ

Tüm ihtiyaçlarınız için Teklif alın

Hosting · Domain · Sunucu · Tasarım · Yazılım · Mühendislik · Sektörel Çözümler

Teklif al

7/24 Destek · Anında yanıt

Geri
Üst