#Klipper config for Bluer with Direct Drive - New Macros #16/06/2021 , Jhonas Barchechen [mcu] serial: /dev/ttyUSB0 restart_method: command # [mcu rpi] # serial: /tmp/klipper_host_mcu # [adxl345] # cs_pin: rpi:None # [resonance_tester] # accel_chip: adxl345 # probe_points: # 125,125,20 # an example [input_shaper] shaper_type_y = 2hump_ei shaper_freq_y = 51.4 shaper_type_x = ei shaper_freq_x = 76.6 [pause_resume] [display_status] [virtual_sdcard] path: ~/gcode_files [printer] kinematics = cartesian max_velocity = 200 max_accel = 3000 max_z_velocity = 10 max_z_accel = 100 [stepper_x] step_pin = PE3 dir_pin = PE2 enable_pin = !PE4 microsteps = 16 rotation_distance = 40 endstop_pin = !PA15 position_endstop = 0 position_max = 225 homing_speed = 50 [stepper_y] step_pin = PE0 dir_pin = PB9 enable_pin = !PE1 microsteps = 16 rotation_distance = 40 endstop_pin = !PA12 position_endstop = 0 position_max = 232 homing_speed = 50 [stepper_z] step_pin = PB5 dir_pin = PB4 enable_pin = !PB8 microsteps = 16 rotation_distance = 8 position_max = 280 position_min = -2 endstop_pin = probe:z_virtual_endstop [stepper_z1] step_pin = PA6 dir_pin = PA1 enable_pin = !PA3 microsteps = 16 rotation_distance = 8 [extruder] step_pin = PD6 dir_pin = PD3 enable_pin = !PB3 microsteps = 16 rotation_distance = 7.71 nozzle_diameter = 0.400 filament_diameter = 1.750 heater_pin = PC3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PC1 control = pid pid_kp = 18.285 pid_ki = 0.903 pid_kd = 92.567 min_temp = 0 max_temp = 250 max_extrude_only_distance: 1000 pressure_advance = 0 [heater_bed] heater_pin = PA0 sensor_type = EPCOS 100K B57560G104F sensor_pin = PC0 control = pid pid_Kp = 16.87 pid_Ki = 1.50 pid_Kd = 126.89 min_temp = 0 max_temp = 120 [fan] pin = PB1 [bltouch] sensor_pin = ^PA11 control_pin = PA8 x_offset = 3.9 y_offset = -51.2 z_offset = 2.42 pin_move_time = 0.6 speed = 10 stow_on_each_sample = FALSE samples: 2 [bed_mesh] speed = 120 horizontal_move_z = 5 mesh_min = 10,10 mesh_max = 220,179 probe_count = 5,5 algorithm = bicubic [safe_z_home] home_xy_position = 117.5,117.5 speed = 100 z_hop = 10 z_hop_speed = 5 [screws_tilt_adjust] screw1: 1.30,24.20 screw1_name: Front Left screw2: 166.30,24.20 screw2_name: Front Right screw3: 166.30,210.5 screw3_name: Rear Right screw4: 1.30,210.5 screw4_name: Rear Left horizontal_move_z: 10. speed: 80 screw_thread: CW-M4 [z_tilt] z_positions:20,117.5 220,117.5 points: 20,117.5 220,117.5 horizontal_move_z: 10 retries: 10 retry_tolerance: 0.02 [temperature_sensor mcu] sensor_type: temperature_mcu [temperature_sensor pi] sensor_type: temperature_host [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 [gcode_macro G29] gcode: G28 BED_MESH_CALIBRATE BED_MESH_PROFILE SAVE=p1 G1 X0 Y0 Z5 F4000 #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [heater_bed] #*# #*# [bltouch] #*# #*# [bed_mesh default] #*# version = 1 #*# points = #*# 0.323750, 0.117500, -0.020000, -0.211250, -0.426250 #*# 0.225000, 0.046250, -0.022500, -0.190000, -0.346250 #*# 0.107500, -0.022500, -0.010000, -0.115000, -0.230000 #*# 0.000000, -0.068750, -0.012500, -0.066250, -0.115000 #*# -0.096250, -0.087500, 0.013750, 0.011250, 0.010000 #*# tension = 0.2 #*# min_x = 10.0 #*# algo = bicubic #*# y_count = 5 #*# mesh_y_pps = 2 #*# min_y = 10.0 #*# x_count = 5 #*# max_y = 179.0 #*# mesh_x_pps = 2 #*# max_x = 220.0