- # This file contains common pin mappings for MKS Robin Nano V3
- # boards. To use this config, the firmware should be compiled for the
- # stm32f407. When running "make menuconfig", select the 48KiB
- # bootloader, and enable "USB for communication".
- # The "make flash" command does not work on the MKS Robin. Instead,
- # after running "make", copy the generated "out/klipper.bin" file to a
- # file named "Robin_nano_v3.bin" on an SD card and then restart the
- # MKS Robin with that SD card.
- # See docs/Config_Reference.md for a description of parameters.
- [stepper_x]
- step_pin: PE3
- dir_pin: !PE2
- enable_pin: !PE4
- microsteps: 16
- rotation_distance: 40
- endstop_pin: !PA15
- position_endstop: 300
- position_min: 0
- position_max: 300
- homing_speed: 50
- [stepper_y]
- step_pin: PE0
- dir_pin: !PB9
- enable_pin: !PE1
- microsteps: 16
- rotation_distance: 40
- endstop_pin: !PD2
- position_endstop: 0
- position_max: 300
- homing_speed: 50
- [stepper_z]
- step_pin: PB5
- dir_pin: PB4
- enable_pin: !PB8
- microsteps: 16
- rotation_distance: 8
- endstop_pin: probe:z_virtual_endstop
- #position_endstop: 0.5
- position_max: 200
- [extruder]
- step_pin: PD6
- dir_pin: !PD3
- enable_pin: !PB3
- microsteps: 16
- rotation_distance: 7.711
- nozzle_diameter: 0.400
- filament_diameter: 1.750
- heater_pin: PE5
- sensor_type: ATC Semitec 104GT-2
- sensor_pin: PC1
- control: pid
- pid_Kp: 15.523
- pid_Ki: 0.556
- pid_Kd: 106.527
- min_temp: 0
- max_temp: 280
- #[extruder1]
- #step_pin: PD15
- #dir_pin: !PA1
- #enable_pin: !PA3
- #heater_pin: PB0
- #sensor_pin: PA2
- #...
- [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: PC14 # fan1
- #pin: PB1 # fan2
- [mcu]
- serial:/dev/serial/by-id/usb-Klipper_stm32f407xx_340022000451373431373036-if00
- #/dev/serial/by-id/usb-Klipper_stm32f407xx_000000000000000000000000-if00
- ## AUTOLEV ###########################
- [bltouch]
- sensor_pin: !PC8
- control_pin: PA8
- pin_move_time: .680
- #stow_on_each_sample: True
- #Pin_up_reports_not_triggered: True
- #set_output_mode:
- x_offset: -15
- y_offset: 30
- z_offset: 2.405
- ########################################
- # EXP1 / EXP2 (display) pins
- ########################################
- [safe_z_home]
- home_xy_position: 150,150 # Change coordinates to the center of your print bed
- speed: 50
- z_hop: 10 # Move up 10mm
- z_hop_speed: 5
- #[screws_tilt_adjust]
- #screw1: 33,72
- #screw1_name: Front left screw
- #screw2: 272,72
- #screw2_name: Front right screw
- #screw3: 272,300
- #screw3_name: Rear right screw
- #screw4: 33,300
- #screw4_name: rear left screw
- #speed: 80
- #horizontal_move_z: 5
- #screw_thread: CW-M4
- #[z_tilt]
- #z_positions: #Nozzle positions over leadscrews
- # 15,110
- # 260,110#
- #points:
- # 15,110
- # 260,110
- #speed:120
- #horizontal_move_z: 10
- #retries: 4
- #retry_tolerance: 0.01
- [bed_mesh]
- speed: 100
- horizontal_move_z: 10
- mesh_min: 50,50
- mesh_max: 230,230
- probe_count: 5,5
- mesh_pps: 2,2
- algorithm: bicubic
- bicubic_tension: 0.2
- fade_start: 1
- fade_end: 60
- fade_target: 0
- ###############
- [board_pins]
- aliases:
- # EXP1 header
- EXP1_1=PC5, EXP1_3=PD13, EXP1_5=PE14, EXP1_7=PD11, EXP1_9=<GND>,
- EXP1_2=PE13, EXP1_4=PC6, EXP1_6=PE15, EXP1_8=PD10, EXP1_10=<5V>,
- # EXP2 header
- EXP2_1=PA6, EXP2_3=PE8, EXP2_5=PE11, EXP2_7=PE12, EXP2_9=<GND>,
- EXP2_2=PA5, EXP2_4=PE10, EXP2_6=PA7, EXP2_8=<RST>, EXP2_10=<3.3v>
- # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp1"
- # See the MKS Lcd Config path file for definitions of common LCD displays.
- ######################################
- [static_digital_output reset_display]
- pins: !PC6, !PD13
- ######################################
- [printer]
- kinematics: corexy
- max_velocity: 250
- max_accel: 4500
- max_accel_to_decel: 4500
- max_z_velocity: 25
- max_z_accel: 100
- square_corner_velocity: 5.0
- ######################################
- ## IMPUT SHAPPER ####################
- [input_shaper]
- shaper_freq_x: 47.34
- shaper_freq_y: 62.11
- shaper_type: mzv
- ######################################
- [virtual_sdcard]
- path: ~/gcode_files
- ######################################
- [display_status]
- [pause_resume]
- ######################################
- [idle_timeout]
- gcode:
- TURN_OFF_HEATERS
- M84
- timeout: 1800
- # Idle time (in seconds) to wait before running the above G-Code
- # commands. The default is 600 seconds.
- ######################################
- # Support for gcode arc (G2/G3) commands.
- [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.
- ######################################
- ## GCODES ###########################
- [gcode_macro PAUSE]
- rename_existing: BASE_PAUSE
- default_parameter_X: 5 #edit to your park position
- default_parameter_Y: 5 #edit to your park position
- default_parameter_Z: 10 #edit to your park position
- default_parameter_E: 8.2 #edit to your retract length
- gcode:
- SAVE_GCODE_STATE NAME=PAUSE_state
- BASE_PAUSE
- G91
- G1 E-{E} F2100
- G1 Z{Z}
- G90
- G1 X{X} Y{Y} F6000
- [gcode_macro RESUME]
- rename_existing: BASE_RESUME
- default_parameter_E: 8.2 #edit to your retract length
- gcode:
- G91
- G1 E{E} F2100
- G90
- RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
- BASE_RESUME
- [gcode_macro CANCEL_PRINT]
- rename_existing: BASE_CANCEL_PRINT
- gcode:
- TURN_OFF_HEATERS
- CLEAR_PAUSE
- SDCARD_RESET_FILE
- BASE_CANCEL_PRINT
- ######################################
- [gcode_macro START_PRINT]
- gcode:
- {% set BED_TEMP = params.BED_TEMP|default(80)|float %}
- {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(250)|float %}
- # Start bed heating
- M140 S{BED_TEMP}
- # Use absolute coordinates
- G90
- # Reset the G-Code Z offset (adjust Z offset if needed)
- SET_GCODE_OFFSET Z=-2.405
- # Home the printer
- G28
- # Move the nozzle near the bed
- G1 Z10 F3000
- # Move the nozzle very close to the bed
- #G1 Z0.15 F300
- # Wait for bed to reach temperature
- M190 S{BED_TEMP}
- #M140 S{BED_TEMP}
- # Set and wait for nozzle to reach temperature
- M109 S{EXTRUDER_TEMP}
- G92 E0
- G1 Z2.0 F3000
- G1 X10 Y20 Z0.2 F5000
- G1 X10 Y200 Z0.2 F1500 E15
- G1 X10.3 Y200 Z0.28 F5000
- G1 X10.3 Y20 Z0.28 F1500 E30
- G92 E0
- G1 Z2.0 F3000
- M82