Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This file contains pin mappings for the Creality CR-10S Pro V2. To use
- # this config, the firmware should be compiled for the AVR atmega2560.
- [mcu rpi]
- serial: /tmp/klipper_host_mcu
- [input_shaper]
- shaper_freq_x: 50
- shaper_freq_y: 21
- shaper_type: mzv
- [temperature_sensor raspberry_pi]
- sensor_type: temperature_host
- min_temp: 10
- max_temp: 100
- [adxl345]
- cs_pin: rpi:None
- [resonance_tester]
- accel_chip: adxl345
- probe_points:
- 150,150,20 #an example
- [virtual_sdcard]
- path: ~/gcode_files
- [display_status]
- [stepper_x]
- step_pin: ar54
- dir_pin: ar55
- enable_pin: !ar38
- rotation_distance: 40
- microsteps: 16
- full_steps_per_rotation: 200
- endstop_pin: ^ar3
- position_endstop: -2.5
- position_min: -3.3
- position_max: 309
- homing_speed: 20
- homing_retract_dist: 5
- [stepper_y]
- step_pin: ar60
- dir_pin: ar61
- enable_pin: !ar56
- rotation_distance: 40
- microsteps: 16
- full_steps_per_rotation: 200
- endstop_pin: ^ar14
- position_endstop: -19.5
- position_min: -19.5
- position_max: 295
- homing_speed: 20
- homing_retract_dist: 5
- [stepper_z]
- step_pin: ar46
- dir_pin: !ar48
- enable_pin: !ar62
- rotation_distance: 8
- microsteps: 16
- full_steps_per_rotation: 200
- endstop_pin: probe:z_virtual_endstop
- position_min: -2
- position_max: 300
- # 368 with no rods
- [extruder]
- # value for Petg sunlu
- #Petg:pressure_advance: 0.1225
- #PLA: pressure_advance: 0.078 new 0.057
- #ABS: pressure_advance: 0.077
- #ASA: pressure_advance: 0.0595
- pressure_advance_smooth_time: 0.040
- pressure_advance: 0.0595
- step_pin: ar26
- dir_pin: ar28
- enable_pin: !ar24
- rotation_distance: 22.6789511
- gear_ratio: 50:17
- microsteps: 16
- full_steps_per_rotation: 200
- nozzle_diameter: 0.400
- filament_diameter: 1.750
- max_extrude_only_distance: 500.0
- max_extrude_only_velocity: 70.0
- max_extrude_only_accel: 1000.0
- heater_pin: ar10
- sensor_type: EPCOS 100K B57560G104F
- sensor_pin: analog13
- #control: pid --PLA
- #pid_Kp: 33.827
- #pid_Ki: 2.301
- #pid_Kd: 124.313
- #control: pid --PETG
- # pid_kp = 31.981
- # pid_ki = 2.111
- # pid_kd = 121.126
- #control: pid --ABS/ASA
- # pid_kp = 34.906
- # pid_ki = 2.327
- # pid_kd = 130.899
- #control: pid --PC 285C MAX
- # pid_kp = 32.407
- # pid_ki = 2.182
- # pid_kd = 120.310
- min_extrude_temp: 10
- min_temp: 5
- max_temp: 300
- [heater_bed]
- heater_pin: ar8
- sensor_type: EPCOS 100K B57560G104F
- sensor_pin: analog14
- #control: pid PLA/PET
- # control = pid
- # pid_kp = 73.992
- # pid_ki = 2.099
- # pid_kd = 652.053
- #control: pid ABS/ASA/PC
- # control = pid
- # pid_kp = 75.456
- # pid_ki = 2.079
- # pid_kd = 684.767
- min_temp: 5
- max_temp: 140
- [fan]
- pin: ar9
- max_power: 1.0
- [mcu]
- serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AB0K51AK-if00-port0
- #pin_map: arduino
- # Arduino aliases for atmega2560/1280 (Arduino mega) boards
- [board_pins arduino-mega]
- 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
- [printer]
- kinematics: cartesian
- max_velocity: 300
- #max_x_velocity:300
- #max_y_velocity:200
- max_accel: 1500
- #max_x_accel: 3000
- #Max_y_accel: 1500
- #scale_xy_accel: true
- square_corner_velocity: 5
- max_z_velocity: 10
- max_z_accel: 100
- [bltouch]
- sensor_pin: ^ar19
- control_pin: ar11
- stow_on_each_sample: False
- probe_with_touch_mode: True
- x_offset: -35.5
- y_offset: -19.5
- #z_offset: 0
- speed: 4.0
- samples: 2
- sample_retract_dist: 3.0
- [safe_z_home]
- home_xy_position: 177,155
- speed: 80.0
- z_hop: 10.0
- z_hop_speed: 5.0
- [bed_mesh]
- speed: 60
- horizontal_move_z: 15
- mesh_min: 10, 10
- mesh_max: 272, 274
- probe_count: 5,5
- mesh_pps: 2,3
- algorithm: bicubic
- bicubic_tension: 0.2
- fade_start: 1
- fade_end: 10
- move_check_distance: 3
- split_delta_z: .025
- [filament_switch_sensor e0_sensor]
- switch_pin: ar2
- pause_on_runout: True
- runout_gcode:
- PAUSE_PARK
- [pause_resume]
- [respond]
- default_type: echo
- [save_variables]
- filename: ~/klipper_config/variables.cfg ; variable storage file
- ; MAX_AGE is checked against the stored variable
- ; SAVE=1 can be used to force saving the mesh (restarts klipper, so
- ; only for manual usage)
- ; FORCE_LEVEL=1 forces a mesh probe even if MAX_AGE is not reached
- [gcode_macro LEVEL_BED_ADVANCED]
- description: Levels the bed if the last leveling was MAX_AGE runs ago. Force leveling by setting FORCE
- variable_save_at_end: 0
- gcode:
- {% set max_age = params.MAX_AGE|default(10)|int %}
- {% set force_level = params.FORCE|default(0)|int %}
- {% set save = params.SAVE|default(0)|int %}
- ; load level_age from stored variables
- {% set svv = printer.save_variables.variables %}
- {% if "level_age" not in svv %} ; first run
- SAVE_VARIABLE VARIABLE=level_age VALUE={max_age}
- {% set level_age = 1 %}
- {% else %} ; load level_age and increment
- {% set level_age = svv.level_age %}
- SAVE_VARIABLE VARIABLE=level_age VALUE={level_age|int + 1}
- {% endif %}
- {action_respond_info("Bed mesh age is " + level_age|string) + "."}
- ; Level eventually
- {% if force_level or (level_age >= max_age|int) %}
- {action_respond_info("Bed mesh exceeded max age. Leveling...")}
- ; homing if not homed yet
- {% if 'xy' not in printer.toolhead.homed_axes %}
- G28
- {% endif %}
- BED_MESH_CALIBRATE
- {% if save %}
- SAVE_VARIABLE VARIABLE=level_age VALUE=1 ; reset counter
- SAVE_CONFIG
- {% else %}
- SET_GCODE_VARIABLE MACRO=LEVEL_BED_ADVANCED VARIABLE=save_at_end VALUE=1
- {% endif %}
- {% else %}
- {action_respond_info("Loading old bed mesh.")}
- BED_MESH_PROFILE LOAD=default
- {% endif %}
- # runs SAVE_CONFIG if the g-code variable was set in start gcode
- [gcode_macro SAVE_IF_SET]
- gcode:
- {% if printer["gcode_macro LEVEL_BED_ADVANCED"].save_at_end == 1 %}
- {action_respond_info("Saving was requested - saving and restarting now.")}
- SAVE_VARIABLE VARIABLE=level_age VALUE=1
- SAVE_CONFIG
- {% endif %}
- [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]
- description: Cancel the actual running print
- rename_existing: CANCEL_PRINT_BASE
- gcode:
- TURN_OFF_HEATERS
- CANCEL_PRINT_BASE
- # https://github.com/Desuuuu/klipper-macros
- # If you want to use these macros, follow the instructions from the repository
- # and uncomment the following lines.
- #[save_variables]
- #filename: ~/variables.cfg
- #
- #[delayed_gcode macros_initialize]
- #initial_duration: 1
- #gcode:
- # INITIALIZE_VARIABLE VARIABLE=park_x VALUE=20
- # INITIALIZE_VARIABLE VARIABLE=park_y VALUE=290
- # INITIALIZE_VARIABLE VARIABLE=bowden_len VALUE=400
- #
- #[include macros/*.cfg]
- #*# <---------------------- SAVE_CONFIG ---------------------->
- #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
- #*#
- #*# [bltouch]
- #*# z_offset = 0.549
- #*#
- #*# [extruder]
- #*# control = pid
- #*# pid_kp = 31.981
- #*# pid_ki = 2.111
- #*# pid_kd = 121.126
- #*#
- #*# [heater_bed]
- #*# control = pid
- #*# pid_kp = 73.992
- #*# pid_ki = 2.099
- #*# pid_kd = 652.053
- #*#
- #*# [bed_mesh Cold]
- #*# version = 1
- #*# points =
- #*# -0.125000, -0.131250, -0.100000, -0.051250, 0.086250
- #*# -0.101250, -0.140000, -0.141250, -0.096250, 0.021250
- #*# -0.038750, -0.096250, -0.122500, -0.113750, -0.022500
- #*# 0.007500, -0.087500, -0.132500, -0.152500, -0.078750
- #*# 0.078750, -0.026250, -0.091250, -0.108750, -0.070000
- #*# tension = 0.2
- #*# min_x = 10.0
- #*# algo = bicubic
- #*# y_count = 5
- #*# mesh_y_pps = 3
- #*# min_y = 10.0
- #*# x_count = 5
- #*# max_y = 274.0
- #*# mesh_x_pps = 2
- #*# max_x = 272.0
- #*#
- #*# [bed_mesh default]
- #*# version = 1
- #*# points =
- #*# -0.203750, -0.116250, -0.032500, 0.021250, 0.081250
- #*# -0.062500, -0.038750, 0.001250, 0.016250, 0.052500
- #*# 0.038750, 0.003750, -0.007500, -0.020000, -0.005000
- #*# 0.026250, -0.030000, -0.087500, -0.142500, -0.137500
- #*# -0.025000, -0.106250, -0.175000, -0.258750, -0.286250
- #*# tension = 0.2
- #*# min_x = 10.0
- #*# algo = bicubic
- #*# y_count = 5
- #*# mesh_y_pps = 3
- #*# min_y = 10.0
- #*# x_count = 5
- #*# max_y = 274.0
- #*# mesh_x_pps = 2
- #*# max_x = 272.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement