Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This file contains common pin mappings for the BigTreeTech OctoPus V1.
- # To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader"
- # Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference
- # after running "make", copy the generated "klipper/out/klipper.bin" file to a
- # file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card.
- # See docs/Config_Reference.md for a description of parameters.
- [stepper_x]
- step_pin: PF13
- dir_pin: PF12
- enable_pin: !PF14
- microsteps: 16
- rotation_distance: 32
- endstop_pin: ^!PG6
- position_endstop: 230
- position_max: 235
- homing_speed: 70
- [tmc2209 stepper_x]
- uart_pin: PC4
- run_current: 0.8
- stealthchop_threshold: 0
- interpolate: false
- sense_resistor: 0.110
- #diag_pin: PG6 # Set to MCU pin connected to TMC DIAG pin
- #driver_SGTHRS: 42 # 255 is most sensitive value, 0 is least sensitive
- [stepper_y]
- step_pin: PG0
- dir_pin: !PG1
- enable_pin: !PF15
- microsteps: 16
- rotation_distance: 40
- endstop_pin: ^!PG9
- position_endstop: -15
- position_min: -15
- position_max: 220
- homing_speed: 50
- [tmc2209 stepper_y]
- uart_pin: PD11
- run_current: 0.8
- stealthchop_threshold: 0
- interpolate: false
- sense_resistor: 0.110
- #diag_pin: PG9 # Set to MCU pin connected to TMC DIAG pin
- #driver_SGTHRS: 55 # 255 is most sensitive value, 0 is least sensitive
- [stepper_z]
- step_pin: PF11
- dir_pin: PG3
- enable_pin: !PG5
- microsteps: 16
- rotation_distance: 32
- endstop_pin: probe:z_virtual_endstop
- #position_endstop: 0
- position_max: 200
- position_min: -3
- homing_speed: 8
- second_homing_speed: 1
- [tmc2209 stepper_z]
- uart_pin: PC6
- interpolate: false
- run_current: 0.8
- sense_resistor: 0.110
- stealthchop_threshold: 0
- [extruder]
- step_pin: PG4
- dir_pin: PC1
- enable_pin: !PA0
- heater_pin: PA2 # HE0
- sensor_pin: PF4
- microsteps: 32
- rotation_distance: 35.9
- full_steps_per_rotation: 200
- gear_ratio: 4:1
- nozzle_diameter: 0.400
- filament_diameter: 1.750
- sensor_type: EPCOS 100K B57560G104F
- #control: pid
- #pid_Kp: 22.2
- #pid_Ki: 1.08
- #pid_Kd: 114
- min_temp: 0
- max_temp: 290
- max_extrude_cross_section: 6.0
- [tmc2209 extruder]
- uart_pin: PC7
- interpolate: false
- run_current: 0.5
- sense_resistor: 0.110
- stealthchop_threshold: 0
- [extruder_stepper belted_extruder]
- extruder:
- step_pin = PF9
- dir_pin = PF10
- enable_pin = !PG2
- microsteps: 32
- rotation_distance: 35.9
- full_steps_per_rotation: 200
- gear_ratio: 4:1
- [tmc2209 extruder]
- uart_pin: PF2
- interpolate: false
- run_current: 0.5
- sense_resistor: 0.110
- stealthchop_threshold: 0
- #[extruder2]
- #step_pin: PC13
- #dir_pin: PF0
- #enable_pin: !PF1
- #heater_pin: PB10 # HE2
- #sensor_pin: PF6
- #...
- #[extruder3]
- #step_pin: PE2
- #dir_pin: PE3
- #enable_pin: !PD4
- #heater_pin: PB11 # HE3
- #sensor_pin: PF7
- #...
- #[extruder4]
- #step_pin: PE6
- #dir_pin: PA14
- #enable_pin: !PE0
- #...
- [heater_bed]
- ## SSR Pin - HE1
- ## Thermistor - TB
- ## Uncomment the following line if using the default SSR wiring from the docs site
- heater_pin: PA1
- ## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases
- #heater_pin: PA1
- ## Validate the following thermistor type to make sure it is correct
- ## See https://www.klipper3d.org/Config_Reference.html#common-thermistors for additional options
- sensor_type: EPCOS 100K B57560G104F
- sensor_pin: PF3
- ## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 .
- max_power: 0.6
- min_temp: 0
- max_temp: 110
- #control: pid
- #pid_kp: 58.437
- #pid_ki: 2.347
- #pid_kd: 363.769
- [fan]
- ## Print Cooling Fan - CNC_FAN0
- pin: PA8
- kick_start_time: 0.5
- ## Depending on your fan, you may need to increase this value
- ## if your fan will not start. Can change cycle_time (increase)
- ## if your fan is not able to slow down effectively
- off_below: 0.10
- [heater_fan hotend_fan]
- ## Hotend Fan - CNC_FAN1
- pin: PE5
- max_power: 1.0
- kick_start_time: 1.0
- heater: extruder
- heater_temp: 50.0
- ## If you are experiencing back flow, you can reduce fan_speed
- #fan_speed: 1.0
- [heater_fan controller_fan]
- ## Controller fan - CNC_FAN2
- pin: PD12
- kick_start_time: 0.5
- heater: heater_bed
- heater_temp: 45.0
- [heater_fan pi_fan]
- pin: PD13
- kick_start_time: 0.5
- heater: heater_bed
- heater_temp: 45.0
- #[heater_fan fan4]
- #pin: PD14 # FAN4
- #[heater_fan fan5]
- #pin: PD15 # FAN5
- [temperature_sensor raspberry_pi]
- sensor_type: temperature_host
- min_temp: 10
- max_temp: 100
- [temperature_sensor mcu_temp]
- sensor_type: temperature_mcu
- [mcu]
- serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_2B000D00105053424E363620-if00
- [printer]
- kinematics: corexz
- max_velocity: 200
- max_accel: 10000
- max_accel_to_decel: 10000
- max_z_velocity: 50
- max_z_accel: 1000
- square_corner_velocity: 4.0
- ########################################
- # EXP1 / EXP2 (display) pins
- ########################################
- [board_pins]
- aliases:
- # EXP1 header
- EXP1_1=PE8, EXP1_2=PE7,
- EXP1_3=PE9, EXP1_4=PE10,
- EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side
- EXP1_7=PE14, EXP1_8=PE15,
- EXP1_9=<GND>, EXP1_10=<5V>,
- # EXP2 header
- EXP2_1=PA6, EXP2_2=PA5,
- EXP2_3=PB1, EXP2_4=PA4,
- EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side
- EXP2_7=PC15, EXP2_8=<RST>,
- EXP2_9=<GND>, EXP2_10=<5V>
- # See the sample-lcd.cfg file for definitions of common LCD displays.
- ######################################################################
- # "RepRapDiscount 128x64 Full Graphic Smart Controller" type 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
- [include kiauh_macros.cfg]
- [pause_resume]
- [display_status]
- [virtual_sdcard]
- path: ~/gcode_files
- [probe]
- ## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO.
- pin: ~PG15
- #--------------------------------------------------------------------
- x_offset: 0
- y_offset: 25.0
- #z_offset: 10
- speed: 10.0
- samples: 3
- samples_result: median
- sample_retract_dist: 3.0
- samples_tolerance: 0.05
- samples_tolerance_retries: 3
- [bed_mesh]
- speed: 150
- horizontal_move_z: 10
- mesh_min: 25,35.0
- mesh_max: 225.0,195
- probe_count: 6,6
- algorithm: bicubic
- fade_start: 1
- fade_end: 10
- fade_target: 0
- [safe_z_home]
- home_xy_position: 117.5,92.5 # Change coordinates to the center of your print bed
- speed: 160
- z_hop: 10 # Move up 10mm
- z_hop_speed: 10
- [screws_tilt_adjust]
- screw1: 30, 0
- screw1_name: front left screw
- screw2: 200, 0
- screw2_name: front right screw
- screw3: 200, 175
- screw3_name: rear right screw
- screw4: 30, 175
- screw4_name: rear left screw
- screw_thread: CW-M4
- [z_tilt]
- z_positions:
- 10,117
- 220,117
- points:
- 60,117
- 180,117
- speed: 60
- horizontal_move_z: 5
- retries: 5
- retry_tolerance: 0.2
- [mcu rpi]
- serial: /tmp/klipper_host_mcu
- [adxl345]
- cs_pin: rpi:None
- [resonance_tester]
- accel_chip: adxl345
- probe_points:
- 100, 100, 20 # an example
- [input_shaper]
- shaper_freq_x: 42
- shaper_type_x: mzv
- shaper_freq_y: 34.8
- shaper_type_y: mzv
- [gcode_macro T0]
- gcode:
- # Deactivate stepper in my_extruder_stepper
- SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder MOTION_QUEUE=
- # Activate stepper in extruder
- SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder
- [gcode_macro T1]
- gcode:
- SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
- # Activate stepper in my_extruder_stepper
- SYNC_EXTRUDER_MOTION EXTRUDER=belted_extruder MOTION_QUEUE=extruder
- [gcode_macro ACTIVATE_EXTRUDER]
- description: Replaces built-in macro for a X-in, 1-out extruder configuration SuperSlicer fix
- rename_existing: ACTIVATE_EXTRUDER_BASE
- gcode:
- {% if 'EXTRUDER' in params %}
- {% set ext = params.EXTRUDER|default(EXTRUDER) %}
- {% if ext == "extruder"%}
- {action_respond_info("Switching to extruder.")}
- T0
- {% elif ext == "belted_extruder" %}
- {action_respond_info("Switching to belted_extruder.")}
- T1
- {% else %}
- {action_respond_info("EXTRUDER value being passed.")}
- ACTIVATE_EXTRUDER_BASE EXTRUDER={ext}
- {% endif %}
- {% endif %}
- [delayed_gcode activate_default_extruder]
- initial_duration: 1
- gcode:
- ACTIVATE_EXTRUDER EXTRUDER=extruder
- [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 BED_MESH_CALIBRATE]
- rename_existing: BED_MESH_CALIBRATE_BASE
- ; gcode parameters
- variable_parameter_AREA_START : 0,0
- variable_parameter_AREA_END : 0,0
- ; the clearance between print area and probe area
- variable_mesh_area_offset : 5.0
- ; number of sample per probe point
- variable_probe_samples : 3
- ; minimum probe count
- variable_min_probe_count : 3
- ; scale up the probe count, should be 1.0 ~ < variable_max_probe_count/variable_min_probe_count
- variable_probe_count_scale_factor : 1.0
- gcode:
- {% if params.AREA_START and params.AREA_END %}
- {% set bedMeshConfig = printer["configfile"].config["bed_mesh"] %}
- {% set safe_min_x = bedMeshConfig.mesh_min.split(",")[0]|float %}
- {% set safe_min_y = bedMeshConfig.mesh_min.split(",")[1]|float %}
- {% set safe_max_x = bedMeshConfig.mesh_max.split(",")[0]|float %}
- {% set safe_max_y = bedMeshConfig.mesh_max.split(",")[1]|float %}
- {% set area_min_x = params.AREA_START.split(",")[0]|float %}
- {% set area_min_y = params.AREA_START.split(",")[1]|float %}
- {% set area_max_x = params.AREA_END.split(",")[0]|float %}
- {% set area_max_y = params.AREA_END.split(",")[1]|float %}
- {% set meshPointX = bedMeshConfig.probe_count.split(",")[0]|int %}
- {% set meshPointY = bedMeshConfig.probe_count.split(",")[1]|int %}
- {% set meshMaxPointX = meshPointX %}
- {% set meshMaxPointY = meshPointY %}
- {% if (area_min_x < area_max_x) and (area_min_y < area_max_y) %}
- {% if area_min_x - mesh_area_offset >= safe_min_x %}
- {% set area_min_x = area_min_x - mesh_area_offset %}
- {% else %}
- {% set area_min_x = safe_min_x %}
- {% endif %}
- {% if area_min_y - mesh_area_offset >= safe_min_y %}
- {% set area_min_y = area_min_y - mesh_area_offset %}
- {% else %}
- {% set area_min_y = safe_min_y %}
- {% endif %}
- {% if area_max_x + mesh_area_offset <= safe_max_x %}
- {% set area_max_x = area_max_x + mesh_area_offset %}
- {% else %}
- {% set area_max_x = safe_max_x %}
- {% endif %}
- {% if area_max_y + mesh_area_offset <= safe_max_y %}
- {% set area_max_y = area_max_y + mesh_area_offset %}
- {% else %}
- {% set area_max_y = safe_max_y %}
- {% endif %}
- {% set meshPointX = (meshPointX * (area_max_x - area_min_x) / (safe_max_x - safe_min_x) * probe_count_scale_factor)|round(0)|int %}
- {% if meshPointX < min_probe_count %}
- {% set meshPointX = min_probe_count %}
- {% endif %}
- {% if meshPointX > meshMaxPointX %}
- {% set meshPointX = meshMaxPointX %}
- {% endif %}
- {% set meshPointY = (meshPointY * (area_max_y -area_min_y ) / (safe_max_y - safe_min_y) * probe_count_scale_factor )|round(0)|int %}
- {% if meshPointY < min_probe_count %}
- {% set meshPointY = min_probe_count %}
- {% endif %}
- {% if meshPointY > meshMaxPointY %}
- {% set meshPointY = meshMaxPointY %}
- {% endif %}
- BED_MESH_CALIBRATE_BASE mesh_min={area_min_x},{area_min_y} mesh_max={area_max_x},{area_max_y} probe_count={meshPointX},{meshPointY} samples={probe_samples|int}
- {% else %}
- BED_MESH_CALIBRATE_BASE
- {% endif %}
- {% else %}
- BED_MESH_CALIBRATE_BASE
- {% endif %}
- #*# <---------------------- SAVE_CONFIG ---------------------->
- #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
- #*#
- #*# [extruder]
- #*# control = pid
- #*# pid_kp = 20.051
- #*# pid_ki = 0.704
- #*# pid_kd = 142.866
- #*#
- #*# [probe]
- #*# z_offset = 5.175
- #*#
- #*# [heater_bed]
- #*# control = pid
- #*# pid_kp = 45.536
- #*# pid_ki = 0.827
- #*# pid_kd = 626.685
- #*#
- #*# [bed_mesh default]
- #*# version = 1
- #*# points =
- #*# -0.425000, -0.395000, -0.375000
- #*# -0.455000, -0.435000, -0.405000
- #*# -0.465000, -0.445000, -0.435000
- #*# tension = 0.2
- #*# min_x = 96.05
- #*# algo = lagrange
- #*# y_count = 3
- #*# mesh_y_pps = 2
- #*# min_y = 81.04
- #*# x_count = 3
- #*# max_y = 118.94
- #*# mesh_x_pps = 2
- #*# max_x = 133.94
Advertisement
Add Comment
Please, Sign In to add comment