# This file contains common configurations and pin mappings # for the Flsun Q5 using the MKS Robin Nano board. # To use this config, the firmware should be compiled for the # STM32F103. When running "make menuconfig", enable "extra low-level # configuration setup", select the 28KiB bootloader, and serial (on # USART1 PA10/PA9) communication. # Note that the "make flash" command does not work with MKS Robin # boards. After running "make", run the following command: # ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano.bin # Copy the file out/Robin_nano.bin to an SD card and then restart the # printer with that SD card. # See docs/Config_Reference.md for a description of parameters. [mcu] serial: /dev/ttyAMA0 restart_method: command [printer] kinematics: delta max_velocity: 250 max_accel: 3000 max_z_velocity: 100 delta_radius: 107.5 print_radius: 100 minimum_z_position=-5 [stepper_a] step_pin: PE3 dir_pin: PE2 enable_pin: !PE4 microsteps: 16 rotation_distance: 40 endstop_pin: PA15 homing_speed: 20 homing_retract_dist: 5 homing_retract_speed: 10 second_homing_speed: 2 position_endstop: 220 arm_length: 215 angle: 210 [stepper_b] step_pin: PE0 dir_pin: PB9 enable_pin: !PE1 microsteps: 16 rotation_distance: 40 endstop_pin: PA12 angle: 330 [stepper_c] step_pin: PB5 dir_pin: PB4 enable_pin: !PB8 microsteps: 16 rotation_distance: 40 endstop_pin: PC4 angle: 90 [tmc2208 stepper_a] uart_pin: PC7 run_current: 1.0 hold_current: 0.5 interpolate: True stealthchop_threshold: 160 [tmc2208 stepper_b] uart_pin: PA3 run_current: 1.0 hold_current: 0.5 interpolate: True stealthchop_threshold: 160 [tmc2208 stepper_c] uart_pin: PC13 run_current: 1.0 hold_current: 0.5 interpolate: True stealthchop_threshold: 160 [static_digital_output display_reset] pins: !PC6, !PD13 [probe] pin: !PA11 x_offset: -2.7571 y_offset: -2.0751 z_offset: 20.26 speed: 5.0 samples: 5 samples_result: average sample_retract_dist: 3 samples_tolerance: 0.02 samples_tolerance_retries: 5 [delta_calibrate] radius: 95 horizontal_move_z: 25 Speed: 10 [extruder] step_pin: PD6 dir_pin: !PD3 enable_pin: !PB3 microsteps: 16 rotation_distance: 22.94595 gear_ratio: 66:22 nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PC3 sensor_type: EPCOS 100K B57560G104F sensor_pin: PC1 control: pid pid_kp: 14.529 pid_ki: 0.557 pid_kd: 94.802 min_temp: 0 max_temp: 255 max_extrude_only_distance: 110.0 [heater_bed] heater_pin: PA0 sensor_type: EPCOS 100K B57560G104F sensor_pin: PC0 control: pid pid_Kp: 325.10 pid_Ki: 63.35 pid_Kd: 417.10 min_temp: 0 max_temp: 130 [fan] pin: PB1 #[mcu rpi] #serial: /tmp/klipper_host_mcu #[adxl345] #cs_pin: rpi:None #[resonance_tester] #accel_chip: adxl345 #probe_points: # 0,0,20 # an example [endstop_phase] #[bed_mesh] #speed: 50 #horizontal_move_z: 25 #mesh_radius: 90 #mesh_origin: 0,0 #round_probe_count: 5 #fade_start: 1.0 #fade_end: 10.0 #split_delta_z: .025 #move_check_distance: 5.0 #mesh_pps: 2,2 #algorithm: lagrange [gcode_arcs] resolution: 1.0 # An arc will be split into segments. Each segment's length will # equal the resolution in mm set above. Lower values will produce a # finer arc, but also more work for your machine. Arcs smaller than # the configured value will become straight lines. The default is # 1mm. [gcode_macro START_PRINT] gcode: {% set BED_TEMP = params.BED_TEMP|default(80)|float %} {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(240)|float %} ;STARTGCODE M117 Initializing ; G90 ; use absolute coordinates M83 ; extruder relative mode M107 G28 ;Home M140 S{BED_TEMP} ; set bed temp M190 S{BED_TEMP} ; wait for bed temp M104 S{EXTRUDER_TEMP} ; set extruder temp M109 S{EXTRUDER_TEMP} ; wait for extruder temp G92 E0 G1 X-98 Y0 Z0.2 F4000 ; move to arc start G3 X0 Y-98 I98 Z0.2 E40 F400 ; lay arc stripe 90deg G0 Z1 G92 E0.0 [gcode_macro END_PRINT] gcode: M107 M104 S0 M140 S0 G92 E1 G1 E-1 F300 G28 X0 Y0 ;M84 M18 S180 ;disable motors after 180s [gcode_macro UNLOAD_FILAMENT] gcode: # Home the printer G28 # Set target extruder temperature (wait only when heating) M109 S220 # Put the E axis into relative mode M83 # Push forward G1 E15 F150 # Unload filament G1 E-600 F1800 # put the E axis into absolute mode M82 # Disable steppers M84 [gcode_macro LOAD_FILAMENT] gcode: # Home the printer G28 # Set target extruder temperature (wait only when heating) M109 S220 # Put the E axis into relative mode M83 # Fast load G1 E550 F1800 # Slow purge G1 E50 F150 # Retract G1 E-8 F1800 # put the E axis into absolute mode M82 # Disable steppers M84 [gcode_macro PURGE_MORE] gcode: # Set target extruder temperature (wait only when heating) M109 S220 # Put the E axis into relative mode M83 # Slow purge G1 E50 F150 # Retract G1 E-8 F1800 # put the E axis into absolute mode M82 [gcode_macro m900] gcode: {% set K = params.K|default(0)|float %} SET_PRESSURE_ADVANCE ADVANCE={K} [pause_resume] [display_status] [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 [virtual_sdcard] path: ~/gcode_files