AnetKlipperSKR Serisi
SKR v1.3 İçin Örnek Klipper Firmware Konfigürasyon
Anet A8 & AM8 Yazıcılar ve A4988 sürücüler için

Klipper bir 3D Yazıcı firmware yazılımıdır. Bu firmware yazılımı ile ilgili detayı şu adreste bulabilirsiniz: https://www.klipper3d.org/
Bu konfigürasyon tanımlamaları genel olarak SKR v1.3 kart ile çalışan AM8 (Anet A8 metal profil yükseltilmiş hali) içindir. Bu tanımlamalar SKR v1.3 kart yükseltmesi yapılmış Anet A8 için de geçerlidir. Ayrıca alt kısımda kullanışlı makrolar da içermektedir.
Not: Tabla konumuna bağlı olarak position_endstop: hem X hem de Y için değer verilmelidir.
# This file contains common pin mappings for the BIGTREETECH SKR V1.3 # board. To use this config, the firmware should be compiled for the # LPC1768. ############################################################################# ########### CONFIGURATION STARTS HERE ########### ############################################################################# [mcu] ### kartın serial değerini öğrenmek için ssh konsolda "ls /dev/serial/by-id/*" komutunu yazın serial: /dev/serial/by-id/usb-Klipper_lpc1768_1E70000F801C3DAF883E975CC22000F5-if00 [printer] kinematics: cartesian max_velocity: 300 max_accel: 1000 max_z_velocity: 20 max_z_accel: 100 ##################################################################### # X/Y/Z Stepper Settings ##################################################################### [stepper_x] step_pin: P2.2 dir_pin: !P2.6 enable_pin: !P2.1 endstop_pin: !P1.29 # P1.28 for X-max rotation_distance: 31.900 full_steps_per_rotation: 200 microsteps: 16 position_endstop: -10 position_min: -14 position_max: 220 homing_speed: 50 second_homing_speed: 25 homing_retract_dist: 5 [stepper_y] step_pin: P0.19 dir_pin: !P0.20 enable_pin: !P2.8 endstop_pin: !P1.27 # P1.26 for Y-max rotation_distance: 31.900 full_steps_per_rotation: 200 microsteps: 16 position_min: -26 position_endstop: -24 position_max: 220 homing_speed: 50 second_homing_speed: 25 homing_retract_dist: 5 [stepper_z] step_pin: P0.22 dir_pin: !P2.11 enable_pin: !P0.21 #### Eğer limit switch ile endstop yapıyorsanız baştaki # kaldırın #endstop_pin: !P1.25 # P1.24 for Z-max #### Eğer BL Touch veya 3D touch türü tabla seviye sensörü kullanıyorsanız baştaki # kaldırın endstop_pin: probe:z_virtual_endstop rotation_distance: 7.904 full_steps_per_rotation: 200 microsteps: 16 position_endstop: 0 position_max: 200 position_min: -5 homing_speed: 10.0 second_homing_speed: 3 homing_retract_dist: 3.0 ##################################################################### # Extruder Settings # Extruder ayarı BMG extrudera göre yapılmıştır. Başka kullanıyorsanız rotation_distance ayarlayın ##################################################################### [extruder] step_pin: P2.13 dir_pin: !P0.11 enable_pin: !P2.12 heater_pin: P2.7 sensor_pin: P0.25 smooth_time: 3.0 rotation_distance: 3.7376 #Bondtech 5mm Drive Gears full_steps_per_rotation: 200 microsteps: 16 nozzle_diameter: 0.4 filament_diameter: 1.75 max_extrude_cross_section: 50.0 max_extrude_only_distance: 780 sensor_type: Generic 3950 control: pid pid_Kp: 27.666 # Bu 3 PID değerini PID kalibrasyon ile ayarlayınız. pid_Ki: 1.724 pid_Kd: 111 min_temp: 15 max_temp: 260 max_power: 1.0 ######### pressure_advance değeri 1.0 altında olmalıdır. 0.0 deaktif olduğunu gösterir pressure_advance: 0.0 #pressure_advance_lookahead_time: 0.0 [verify_heater extruder] max_error: 600 check_gain_time: 40 hysteresis: 15 heating_gain: 2 ##################################################################### # Bed Heater ##################################################################### [heater_bed] heater_pin: P2.5 sensor_type: Generic 3950 sensor_pin: P0.23 min_temp: 10 max_temp: 110 smooth_time: 3.0 control: pid pid_Kp=75.945 pid_Ki=1.285 pid_Kd=1122.092 [verify_heater heater_bed] max_error: 120 check_gain_time: 60 hysteresis: 5 heating_gain: 2 ##################################################################### # Fan Control ##################################################################### [fan] pin: P2.3 kick_start_time: 0.5 off_below: 0.10 [heater_fan my_nozzle_fan] pin: P2.4 heater: extruder heater_temp: 50.0 fan_speed: 0.4 max_power: 1.0 ##################################################################### # Homing and Adjustment Routines ##################################################################### [safe_z_home] home_xy_position: 110,110 # center of print bed speed: 30 z_hop: 6 z_hop_speed: 5 [bed_mesh] mesh_min: 30,15 mesh_max: 195,195 probe_count: 5,5 horizontal_move_z: 5 algorithm: bicubic ##FOLLOW THE FORUMULA FOR relative_reference_index, for example: [(5x5)-1] / 2 = 12 relative_reference_index: 12 [bltouch] ##### BL Touch veya 3D Touch kullanmıyorsanız bu kısmı silebilirsiniz sensor_pin: ^P1.24 # Z-max control_pin: P2.0 # Some BLTouch V3 and many clones apparently require this pin_up_touch_mode_reports_triggered: False pin_up_reports_not_triggered: False x_offset: 27 y_offset: 5 z_offset: 2.950 #Mevcut - (yeni değer) > 2.900 - 0.040 (+ ofset olunca çıkartıyoruz) speed: 3.0 samples: 2 ##################################################################### # Other Settings ##################################################################### [temperature_sensor raspberry_pi] sensor_type: temperature_host min_temp: 0 max_temp: 90 [idle_timeout] gcode: {% if "xyz" in printer.toolhead.homed_axes %} G91 ; relative positioning G1 Z5 F18000.0 ; move up 5mm G90 ; absolute positioning G1 X{printer.toolhead.axis_maximum.x} Y{printer.toolhead.axis_maximum.y} F18000.0 ; park nozzle at rear {% endif %} TURN_OFF_HEATERS M84 ; disable steppers timeout: 1800 ;30 min # Pause/Resume Functionality [pause_resume] recover_velocity: 100 # This adds the 'respond' G-Code that you can use to send commands back to OctoPrint [respond] default_type: echo # add virtual sd card [virtual_sdcard] path: ~/gcode_files [display_status] ##################################################################### # Display Routines # RepRapDiscount 128x64 Full Graphic Smart Controller ##################################################################### [display] lcd_type: st7920 cs_pin: P1.19 sclk_pin: P1.20 sid_pin: P1.18 encoder_pins: ^P3.26, ^P3.25 click_pin: ^!P0.28 #kill_pin: ^!<RST> [output_pin beeper] pin: P1.30
Yukarıdaki kısım ana konfigürasyon kısmıdır. Aşağıdaki makrolardan istediklerinizi printer.cfg konfigürasyon dosyasının alt kısma ekleyebilirsiniz veya farklı bir config dosya yapıp, ana printer.cfg içinden çağırabilirsiniz.
##################################################################### ### MACROS ##################################################################### [gcode_macro PRINT_START] gcode: #Get Bed and Extruder temperature from Slicer GCode {% set BED_TEMP = params.BED_TEMP|default(60)|float %} {% set HOTEND_TEMP = params.EXTRUDER_TEMP|default(200)|float %} #Preheat nozzle and bed M104 S{HOTEND_TEMP} M140 S{BED_TEMP} #Home IS_G28 #Move up to clean bed #G1 Y{Y_MAX - 20} Z{Z_MAX/4.0} F6000 #Heat nozzle and bed M190 S{BED_TEMP} M109 S{HOTEND_TEMP} BED_MESH_PROFILE LOAD=default PRIME_LINE SET_SKEW XY=142.34,141.05,100.61 M117 Printing... [gcode_macro PRINT_END] gcode: M400 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-4.0 F3600 ; retract filament G91 ; relative positioning G0 Z20 F3000 ; move nozzle up 25mm TURN_OFF_HEATERS M107 ; turn off fan G90 ; absolute positioning G0 X110 Y200 F3600 ; park nozzle at rear SET_SKEW CLEAR=1 M117 Finished! ; display message # Prime the nozzle [gcode_macro PRIME_LINE] gcode: SAVE_GCODE_STATE NAME=BEFORE_PRIME #Get Printer built volume dimensions {% set X_MAX = printer.toolhead.axis_maximum.x|default(200)|float %} {% set Y_MAX = printer.toolhead.axis_maximum.y|default(200)|float %} {% set Z_MAX = printer.toolhead.axis_maximum.z|default(200)|float %} #Get Nozzle diameter and filament width for conditioning {% set NOZZLE = printer.extruder.nozzle_diameter|default(0.4)|float %} {% set FILADIA = printer.extruder.filament_diameter|default(1.75)|float %} #Set Start coordinates of priming lines {% set X_START = 7.0|default(7.0)|float %} {% set Y_START = 30.0|default(30.0)|float %} #Calculate Primer line extrusion volume and filament length {% set PRIMER_WIDTH = 1.25 * NOZZLE %} {% set PRIMER_HEIGHT = 1.2 * NOZZLE %} M117 Prime Line M83 IS_G28 G92 E0 ;Reset Extruder G1 Z5.0 F3000 ;Move Z Axis up G1 X{X_START} Y{Y_START} Z{PRIMER_HEIGHT} F6000.0 ;Move to start position G1 X{X_START} Y{Y_MAX - 2*Y_START} Z{PRIMER_HEIGHT} F1500.0 E20 ;Draw the first 100mm line G1 X{X_START + PRIMER_WIDTH} Y{Y_MAX - 2*Y_START} Z{PRIMER_HEIGHT} F5000.0 ;Move to side a little G1 X{X_START + PRIMER_WIDTH} Y{Y_START} Z{PRIMER_HEIGHT} F2000.0 E20 ;Draw the second line - return G92 E0 ;Reset Extruder G1 Z5.0 F3000 ;Move Z Axis up RESTORE_GCODE_STATE NAME=BEFORE_PRIME [gcode_macro NOZZLE_CLEAN] # Use for scrubbing the nozzle to keep it clean and ensure accurate z height gcode: {% set I = 5 %} G0 Z10 F3000 ;lift z 10mm IS_G28 SAVE_GCODE_STATE NAME=cleaning ;save pre-run g-code state (relative/absolute, etc) #G91 ;relative positioning G90 ;absolute positioning G0 X-10 Y40 F3000 ;move to nozzle scrubber G0 Z2 F5000 ;lower z to brush height G91 ;relative positioning M117 Cleaning... # loop scrub move back/forth I amount of times {% for wipe in range(1,I|int,1) %} {% for distance in [50,-50] %} G0 Y{distance} F10000 {% endfor %} {% endfor %} G0 Z10 F3000 ;lift z 10mm RESTORE_GCODE_STATE NAME=cleaning ;restore previous g-code state (relative/absolute, etc) M117 Ready... ######## Filament Change [gcode_macro M600] gcode: {% set X = 110 %} {% set Y = 0 %} {% set Z = 40 %} SAVE_GCODE_STATE NAME=ADVANCEDPAUSEUNLOAD PAUSE M83 ; set extruder to relative G1 E-10.0 F3600 ; retract filament G91 G1 Z{Z} F2400 G90 G1 X{X} Y{Y} F18000 UNLOAD_FILAMENT ; Unload the filament. {printer.gcode.action_respond_info("Ready to Load New Filament")} RESTORE_GCODE_STATE NAME=ADVANCEDPAUSEUNLOAD [gcode_macro UNLOAD_FILAMENT] gcode: # {% if printer[printer.toolhead.extruder].temperature > 180.0 %} {% set DISTANCE = 500 %} M400 SAVE_GCODE_STATE NAME=UNLOADFILAMENT M117 Unloading... M82 ;Absolute extrusion G92 E0 G1 E2 F3600 G1 E0 F3600 G1 E4 F3600 G1 E0 F3600 G1 E8 F3600 G1 E0 F3600 M83 ;Relative extrusion G1 E-25 F3600 G4 P3000 G1 E{DISTANCE|float * -1} F3000 M82 ; Absolute extrusion M400 M117 Done! UPDATE_DELAYED_GCODE ID=CLEAR_DISP DURATION=10 RESTORE_GCODE_STATE NAME=UNLOADFILAMENT # {% endif %} [gcode_macro LOAD_FILAMENT] # Extrusion lengths must be adjusted for your particular configuration before use gcode: # {% if printer[printer.toolhead.extruder].temperature > 180.0 %} SAVE_GCODE_STATE NAME=LOADFILAMENT M83 ; set extruder to relative G1 E45 F300 ; quickly load filament to down filament path G1 E20 F300 ; slower extrusion for hotend path G1 E20 F150 ; prime nozzle with filament G1 E10 F150 ; prime nozzle with a bit more filament RESTORE_GCODE_STATE NAME=LOADFILAMENT # {% endif %} [gcode_macro IS_G28] gcode: {% if "x" not in printer.toolhead.homed_axes or "y" not in printer.toolhead.homed_axes or "z" not in printer.toolhead.homed_axes %} { action_respond_info("Homing ...") } G28 {% else %} { action_respond_info("Homing already done. Skipping...") } {% endif %} [gcode_macro OFFSET] gcode: {% set D = 0.025 %} set_gcode_offset z_adjust={D} NULL_MOVE [gcode_macro BABY_UP] gcode: OFFSET D=0.025 [gcode_macro BABY_DOWN] gcode: OFFSET D=-0.025 [gcode_macro NULL_MOVE] gcode: G91 G1 Z0 Y0 X0 G90 [gcode_macro PAUSE] description: Pause the actual running print rename_existing: PAUSE_BASE # change this if you need more or less extrusion variable_extrude: 1.0 gcode: ##### read E from pause macro ##### {% set E = printer["gcode_macro PAUSE"].extrude|float %} ##### set park positon for x and y ##### # default is your max posion from your printer.cfg {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} ##### calculate save lift position ##### {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} ##### end of definitions ##### PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description: Resume the actual running print rename_existing: RESUME_BASE gcode: ##### read E from pause macro ##### {% set E = printer["gcode_macro PAUSE"].extrude|float %} #### get VELOCITY parameter if specified #### {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} ##### end of definitions ##### {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} [gcode_macro CANCEL_PRINT] rename_existing: BASE_CANCEL_PRINT gcode: #TURN_OFF_HEATERS CLEAR_PAUSE SDCARD_RESET_FILE BASE_CANCEL_PRINT [gcode_macro TEMPADJUSTPA] gcode: #ABS {% if printer.heater_bed.target >= 100 %} SET_PRESSURE_ADVANCE ADVANCE=0.05585 {% endif %} #PETG {% if printer.heater_bed.target > 65 and printer.heater_bed.target < 100 %} SET_PRESSURE_ADVANCE ADVANCE=0.0785 {% endif %} #PLA {% if printer.heater_bed.target <= 65 %} SET_PRESSURE_ADVANCE ADVANCE=0.0325 {% endif %}