AnetKlipperRamps

Ramps 1.4 İç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ı (printer.cfg) genel olarak Ramps 1.4 kart üzerinde çalışan Anet A8 veya AM8 yazıcılar için geçerlidir. Benzer diğer kartezyen yazıcılara kolayca uyarlanabilir. Ayrıca kullanışlı makrolar da içermektedir.

  • SKR 1.3 anakart ve A4988 sürücü kullananlar buradaki konfigürasyonu kullanabilir.
  • SKR 1.3 anakart ve TMC 2209 (2208) kullananlar buradaki konfigürasyonu kullanabilir.

Not: Tabla konumuna bağlı olarak position_endstop: hem X hem de Y için değer verilmelidir.

#############################################################################
###########           AM8-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-1a86_USB2.0-Serial-if00-port0

[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: ar54
dir_pin: !ar55
enable_pin: !ar38
endstop_pin: ^ar3
rotation_distance: 31.900 
full_steps_per_rotation: 200
microsteps: 16
position_endstop: -10
position_min: -10
position_max: 220
homing_speed: 35
second_homing_speed: 20
homing_retract_dist: 5

[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
endstop_pin: ^!ar14
rotation_distance: 31.900
full_steps_per_rotation: 200
microsteps: 16
position_min: -19
position_endstop: -19
position_max: 220
homing_speed: 50
second_homing_speed: 25
homing_retract_dist: 5

[stepper_z]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
endstop_pin: probe:z_virtual_endstop
rotation_distance: 7.904
full_steps_per_rotation: 200
microsteps: 16
position_max: 160
position_min: -5
homing_speed: 10.0
second_homing_speed: 3
homing_retract_dist: 3.0

#### İki ayrı sürücüye bağlı Z motorlar kullananlar içindir. Paralel kullanıyorsanız aşağıdakini silin
#### Bu durumda ikinci Z motor E1 sürücüsüne bağlanacak
[stepper_z1] 
step_pin: ar36
dir_pin: !ar34
enable_pin: !ar30
rotation_distance: 7.904
full_steps_per_rotation: 200
microsteps: 16

#####################################################################
#  Extruder Settings
#  Extruder ayarı BMG extrudera göre yapılmıştır. Başka kullanıyorsanız rotation_distance ayarlayın
#####################################################################

[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
heater_pin: ar8
sensor_pin: analog13
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_only_distance: 100
max_extrude_cross_section: 60.0
min_extrude_temp: 170
sensor_type: Generic 3950
control = pid
pid_kp = 28.628
pid_ki = 1.577
pid_kd = 129.901
min_temp: 0
max_temp: 28000
max_power: 1.0
######### Try to keep pressure_advance below 1.0
######### PA can be disabled by declaring a 0.0 value
#pressure_advance: 0.0

[verify_heater extruder]
max_error: 600
check_gain_time: 40
hysteresis: 25
heating_gain: 2

#####################################################################
#  Bed Heater
#####################################################################

[heater_bed]
heater_pin: ar10
sensor_type: Generic 3950
sensor_pin: analog14
min_temp: 20
max_temp: 11000
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: 10
heating_gain: 2

#####################################################################
#  Fan Control
#####################################################################

[heater_fan my_nozzle_fan]
pin: ar9
heater: extruder
heater_temp: 50.0
fan_speed: 0.4
max_power: 1.0

#####################################################################
#  Homing and Adjustment Routines
#####################################################################

[z_tilt]
z_positions:
    -5,110
    180,110
points:
    -5,110
    180,110
        
[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

##### BL Touch veya 3D Touch kullanmıyorsanız bu kısmı silebilirsiniz
[bltouch]
sensor_pin: ^ar18  # Z-max
control_pin: ar11
# 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

[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 0
max_temp: 90

#####################################################################
# Other Settings
#####################################################################

[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: ar16
sclk_pin: ar23
sid_pin: ar17
encoder_pins: ^ar31, ^ar33
click_pin: ^!ar35
kill_pin: ^!ar41

[board_pins arduino-mega]
#mcu: z
aliases:
    ar0=PE0, ar1=PE1, ar2=PE4, ar3=PE5, ar4=PG5,
    ar5=PE3, ar6=PH3, ar7=PH4, ar8=PH5, ar9=PH6,
    ar10=PB4, ar11=PB5, ar12=PB6, ar13=PB7, ar14=PJ1,
    ar15=PJ0, ar16=PH1, ar17=PH0, ar18=PD3, ar19=PD2,
    ar20=PD1, ar21=PD0, ar22=PA0, ar23=PA1, ar24=PA2,
    ar25=PA3, ar26=PA4, ar27=PA5, ar28=PA6, ar29=PA7,
    ar30=PC7, ar31=PC6, ar32=PC5, ar33=PC4, ar34=PC3,
    ar35=PC2, ar36=PC1, ar37=PC0, ar38=PD7, ar39=PG2,
    ar40=PG1, ar41=PG0, ar42=PL7, ar43=PL6, ar44=PL5,
    ar45=PL4, ar46=PL3, ar47=PL2, ar48=PL1, ar49=PL0,
    ar50=PB3, ar51=PB2, ar52=PB1, ar53=PB0, ar54=PF0,
    ar55=PF1, ar56=PF2, ar57=PF3, ar58=PF4, ar59=PF5,
    ar60=PF6, ar61=PF7, ar62=PK0, ar63=PK1, ar64=PK2,
    ar65=PK3, ar66=PK4, ar67=PK5, ar68=PK6, ar69=PK7,
    analog0=PF0, analog1=PF1, analog2=PF2, analog3=PF3, analog4=PF4,
    analog5=PF5, analog6=PF6, analog7=PF7, analog8=PK0, analog9=PK1,
    analog10=PK2, analog11=PK3, analog12=PK4, analog13=PK5, analog14=PK6,
    analog15=PK7,
    # Marlin adds these additional aliases
    ml70=PG4, ml71=PG3, ml72=PJ2, ml73=PJ3, ml74=PJ7,
    ml75=PJ4, ml76=PJ5, ml77=PJ6, ml78=PE2, ml79=PE6,
    ml80=PE7, ml81=PD4, ml82=PD5, ml83=PD6, ml84=PH2,
    ml85=PH7,

    # Common EXP1 header found on many "all-in-one" ramps clones
    EXP1_1=PC0, EXP1_3=PH0, EXP1_5=PA1, EXP1_7=PA5, EXP1_9=,
    EXP1_2=PC2, EXP1_4=PH1, EXP1_6=PA3, EXP1_8=PA7, EXP1_10=<5V>,
    # EXP2 header
    EXP2_1=PB3, EXP2_3=PC6, EXP2_5=PC4, EXP2_7=PL0, EXP2_9=,
    EXP2_2=PB1, EXP2_4=PB0, EXP2_6=PB2, EXP2_8=PG0, EXP2_10=
    # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi"
    # Note, some boards wire: EXP2_8=, EXP2_10=PG0

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 %}
Daha Fazla Göster

İlgili Makaleler

Başa dön tuşu
Kapalı

Reklam Engelleyici Algılandı

Lütfen Add Blocker uygulamanızı bu site için devre dışı bırakın. Rahatsız edici bir reklam uygulamamız yoktur. Please turn the Add Blocker off as you may see there is no annoying ads in the blog.