Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This file contains common pin mappings for the BIGTREETECH SKR mini
- # E3 v2.0. To use this config, the firmware should be compiled for the
- # STM32F103 with a "28KiB bootloader" and USB communication. Also,
- # select "Enable extra low-level configuration options" and configure
- # "GPIO pins to set at micro-controller startup" to "!PA14".
- # The "make flash" command does not work on the SKR mini E3. Instead,
- # after running "make", copy the generated "out/klipper.bin" file to a
- # file named "firmware.bin" on an SD card and then restart the SKR
- # mini E3 with that SD card.
- # See docs/Config_Reference.md for a description of parameters.
- [stepper_x]
- step_pin: PB13
- dir_pin: !PB12
- enable_pin: !PB14
- microsteps: 16
- rotation_distance: 40
- endstop_pin: ^PC0
- position_endstop: 350
- position_max: 350
- homing_speed: 100
- [tmc2209 stepper_x]
- uart_pin: PC11
- tx_pin: PC10
- uart_address: 0
- run_current: 0.580
- hold_current: 0.500
- stealthchop_threshold: 250
- [stepper_y]
- step_pin: PB10
- dir_pin: !PB2
- enable_pin: !PB11
- microsteps: 16
- rotation_distance: 40
- endstop_pin: ^PC1
- position_endstop: 350
- position_max: 350
- homing_speed: 100
- [tmc2209 stepper_y]
- uart_pin: PC11
- tx_pin: PC10
- uart_address: 2
- run_current: 0.580
- hold_current: 0.500
- stealthchop_threshold: 250
- [stepper_z]
- step_pin: PB0
- dir_pin: !PC5
- enable_pin: !PB1
- microsteps: 16
- rotation_distance: 4
- endstop_pin: probe:z_virtual_endstop
- position_max: 410
- position_min: -4
- homing_speed: 10.0
- [tmc2209 stepper_z]
- uart_pin: PC11
- tx_pin: PC10
- uart_address: 1
- run_current: 0.580
- hold_current: 0.500
- stealthchop_threshold: 5
- [bltouch]
- sensor_pin: ^PC2
- control_pin: PA1
- x_offset: -47.5
- y_offset: -10
- #z_offset: 2.70
- speed: 2.0
- samples: 2
- sample_retract_dist: 4.0
- probe_with_touch_mode: True
- [safe_z_home]
- home_xy_position: 180, 180
- speed: 100
- z_hop: 10
- z_hop_speed: 5
- [bed_mesh]
- speed: 100
- horizontal_move_z: 8
- mesh_min: 50, 10
- mesh_max: 275, 300
- probe_count: 4,4
- [extruder]
- step_pin: PB3
- dir_pin: !PB4
- enable_pin: !PD2
- microsteps: 16
- #rotation_distance: 21.775
- rotation_distance: 7.62125
- nozzle_diameter: 0.400
- filament_diameter: 1.750
- heater_pin: PC8
- sensor_type: EPCOS 100K B57560G104F
- ;sensor_type: ATC Semitec 104NT-4-R025H42G
- sensor_pin: PA0
- #control: pid
- ;pid_Kp: 22.2
- #pid_Kp: 21.527
- ;pid_Ki: 1.08
- #pid_Ki: 1.063
- ;pid_Kd: 114
- #pid_Kd: 108.982
- min_temp: 0
- max_temp: 300
- max_extrude_only_distance: 101
- [tmc2209 extruder]
- uart_pin: PC11
- tx_pin: PC10
- uart_address: 3
- run_current: 0.650
- hold_current: 0.500
- stealthchop_threshold: 5
- [heater_bed]
- heater_pin: PC9
- sensor_type: ATC Semitec 104GT-2
- sensor_pin: PC3
- #control: pid
- #pid_Kp: 690.34
- #pid_Ki: 111.47
- #pid_Kd: 1068.83
- min_temp: 0
- max_temp: 130
- [heater_fan nozzle_cooling_fan]
- pin: PC7
- [fan]
- pin: PC6
- [mcu]
- serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_39FFD8054246303721681857-if00
- ;serial: /dev/ttyACM0
- baud: 250000
- #[filament_switch_sensor filament_sensor]
- #switch_pin: PC15
- [filament_switch_sensor switch_sensor]
- switch_pin: PC15 # as shown in Figure 2, switch sensor IO is PA0
- pause_on_runout: True
- runout_gcode:
- M117 Filament switch runout
- insert_gcode:
- M117 Filament switch inserted
- [filament_motion_sensor encoder_sensor]
- switch_pin: PC12 # as shown in Figure 2, motion sensor IO is PC2
- detection_length: 2.88 # accuracy of motion sensor 2.88mm
- extruder: extruder
- pause_on_runout: True
- runout_gcode:
- M117 Filament encoder runout
- insert_gcode:
- M117 Filament encoder inserted
- [printer]
- kinematics: cartesian
- max_velocity: 300
- max_accel: 3000
- max_z_velocity: 5
- max_z_accel: 100
- [virtual_sdcard]
- path: ~/printer_data/gcodes
- [display_status]
- [pause_resume]
- [gcode_macro START_PRINT]
- gcode:
- {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
- {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
- # Start bed heating (but don't wait for it)
- M140 S{BED_TEMP}
- # Use absolute coordinates
- G90
- # Reset the G-Code Z offset (adjust Z offset if needed)
- SET_GCODE_OFFSET Z=0.0
- # Home the printer
- G28
- # Move the nozzle near the bed
- G1 Z5 F3000
- # Move the nozzle very close to the bed
- G1 Z0.15 F300
- # Wait for bed to reach temperature
- M190 S{BED_TEMP}
- # Set and wait for nozzle to reach temperature
- M109 S{EXTRUDER_TEMP}
- # Calibrate Bed Mesh
- #BED_MESH_CALIBRATE
- # Load Bed Mesh
- BED_MESH_PROFILE LOAD="default"
- # Turn Lights On
- POWER_ON_LIGHTS
- # Prime Nozzle
- PRIME_LINE
- [gcode_macro PRIME_LINE]
- gcode:
- G92 E0 ;Reset Extruder
- G1 Z2.0 F3000 ;Move Z Axis up
- G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
- G1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
- G1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
- G1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
- G92 E0 ;Reset Extruder
- G1 Z2.0 F3000 ;Move Z Axis up
- G1 E-1 F300 ; retract a little bit
- [gcode_macro END_PRINT]
- gcode:
- G91 ;Relative positioning
- G1 E-2 F2700 ;Retract a bit
- G1 E-2 Z0.2 F2400 ;Retract and raise Z
- G1 X5 Y5 F3000 ;Wipe out
- # Turn off bed, extruder, and fan
- M140 S0
- M104 S0
- M106 S0
- # Move nozzle away from print while retracting
- G91
- G1 X-2 Y-2 E-3 F300
- # Raise nozzle by 10mm
- G1 Z10 F3000
- G90
- # Disable steppers
- M84
- [gcode_macro POWER_ON_PRINTER]
- gcode:
- {action_call_remote_method(
- "set_device_power", device="printer_plug", state="on", force=True
- )}
- [gcode_macro POWER_OFF_PRINTER]
- gcode:
- {action_call_remote_method(
- "set_device_power", device="printer_plug", state="off", force=True
- )}
- [gcode_macro POWER_ON_LIGHTS]
- gcode:
- {action_call_remote_method(
- "set_device_power", device="lights_plug", state="on", force=True
- )}
- [gcode_macro POWER_OFF_LIGHTS]
- gcode:
- {action_call_remote_method(
- "set_device_power", device="lights_plug", state="off", force=True
- )}
- [gcode_macro PAUSE]
- rename_existing: BASE_PAUSE
- gcode:
- # Parameters
- {% set z = params.Z|default(10)|int %} ; z hop amount
- {% if printer['pause_resume'].is_paused|int == 0 %}
- SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE={z} ; set z hop variable for reference in resume macro
- SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target} ; set hotend temp variable for reference in resume macro
- SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=0 ; disable filament sensor
- SET_FILAMENT_SENSOR SENSOR=switch_sensor ENABLE=0 ; disable filament sensor
- SAVE_GCODE_STATE NAME=PAUSE ; save current print position for resume
- BASE_PAUSE ; pause print
- {% if (printer.gcode_move.position.z + z) < printer.toolhead.axis_maximum.z %} ; check that zhop doesn't exceed z max
- G91 ; relative positioning
- G1 Z{z} F900 ; raise Z up by z hop amount
- {% else %}
- { action_respond_info("Pause zhop exceeds maximum Z height.") } ; if z max is exceeded, show message and set zhop value for resume to 0
- SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE=0
- {% endif %}
- G90 ; absolute positioning
- G1 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+5} F6000 ; park toolhead at front center
- SAVE_GCODE_STATE NAME=PAUSEPARK ; save parked position in case toolhead is moved during the pause (otherwise the return zhop can error)
- M104 S0 ; turn off hotend
- SET_IDLE_TIMEOUT TIMEOUT=43200 ; set timeout to 12 hours
- {% endif %}
- [gcode_macro RESUME]
- rename_existing: BASE_RESUME
- variable_zhop: 0
- variable_etemp: 0
- gcode:
- # Parameters
- {% set e = params.E|default(2.5)|int %} ; hotend prime amount (in mm)
- {% if printer['pause_resume'].is_paused|int == 1 %}
- SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=1 ; enable filament sensor
- SET_FILAMENT_SENSOR SENSOR=switch_sensor ENABLE=1 ; enable filament sensor
- #INITIAL_RGB ; reset LCD color
- SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} ; set timeout back to configured value
- {% if etemp > 0 %}
- M109 S{etemp|int} ; wait for hotend to heat back up
- {% endif %}
- RESTORE_GCODE_STATE NAME=PAUSEPARK MOVE=1 MOVE_SPEED=100 ; go back to parked position in case toolhead was moved during pause (otherwise the return zhop can error)
- G91 ; relative positioning
- M83 ; relative extruder positioning
- {% if printer[printer.toolhead.extruder].temperature >= printer.configfile.settings.extruder.min_extrude_temp %}
- G1 Z{zhop * -1} E{e} F900 ; prime nozzle by E, lower Z back down
- {% else %}
- G1 Z{zhop * -1} F900 ; lower Z back down without priming (just in case we are testing the macro with cold hotend)
- {% endif %}
- RESTORE_GCODE_STATE NAME=PAUSE MOVE=1 MOVE_SPEED=60 ; restore position
- BASE_RESUME ; resume print
- {% endif %}
- [gcode_macro CANCEL_PRINT]
- rename_existing: BASE_CANCEL_PRINT
- gcode:
- SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} ; set timeout back to configured value
- CLEAR_PAUSE
- SDCARD_RESET_FILE
- PRINT_END
- BASE_CANCEL_PRINT
- [gcode_macro M600]
- gcode:
- #LCDRGB R=0 G=1 B=0 ; Turn LCD green
- PAUSE ; Pause
- [static_digital_output usb_pullup_enable]
- pins: !PA14
- [board_pins]
- aliases:
- # EXP1 header
- EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
- EXP1_2=PA15, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PB15, EXP1_10=<5V>
- # See the sample-lcd.cfg file for definitions of common LCD displays.
- #
- [display]
- lcd_type: st7920
- cs_pin: EXP1_7
- sclk_pin: EXP1_6
- sid_pin: EXP1_8
- encoder_pins: ^EXP1_5, ^EXP1_3
- click_pin: ^!EXP1_2
- [output_pin beeper]
- pin: EXP1_1
- [screws_tilt_adjust]
- screw1: 30, 50
- screw1_name: front left screw
- screw2: 325, 50
- screw2_name: front right screw
- screw3: 325, 310
- screw3_name: rear right screw
- screw4: 30, 310
- screw4_name: rear left screw
- horizontal_move_z: 10.
- speed: 50.
- screw_thread: CW-M3
- [delayed_gcode delayed_printer_off]
- initial_duration: 0.
- gcode:
- {% if printer.idle_timeout.state == "Idle" %}
- POWER_OFF_PRINTER
- {% endif %}
- [idle_timeout]
- gcode:
- M84
- TURN_OFF_HEATERS
- UPDATE_DELAYED_GCODE ID=delayed_printer_off DURATION=60
Advertisement
Add Comment
Please, Sign In to add comment