Skip to content

Commit

Permalink
Added optional Mesh-Fade, and No-Stealth-Option for BTT Octopus Steppers
Browse files Browse the repository at this point in the history
  • Loading branch information
OXERY committed Jan 5, 2022
1 parent 80822a6 commit 4771b06
Show file tree
Hide file tree
Showing 7 changed files with 290 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
# 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.

## Prusa MK3S + MMU BigTreeTech OctoPus V1(.1) TMC2209 UART config

## *** THINGS TO CHANGE/CHECK: ***
## MCU paths [mcu] section
## Thermistor types [extruder] and [heater_bed] sections - See 'sensor types' list at end of file
## Z Endstop Switch location [safe_z_home] section
## Homing end position [gcode_macro G32] section
## Z Endstop Switch offset for Z0 [stepper_z] section
## Probe points [quad_gantry_level] section
## Min & Max gantry corner postions [quad_gantry_level] section
## PID tune [extruder] and [heater_bed] sections
## Fine tune E steps [extruder] section
[include pins.cfg] # BTT Octopus Pinmap

#####################################################################
# Board Temp sensors
#####################################################################
[temperature_sensor Octopus]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100

#####################################################################
# Printer Type
#####################################################################
[printer]
kinematics: cartesian
max_velocity: 160
#Normal Accel
max_accel: 4500
max_accel_to_decel: 2250
#For Resonance Test
#max_accel: 10000
#max_accel_to_decel: 10000
max_z_velocity: 10
max_z_accel: 200

#####################################################################
# X/Y Stepper Settings
#####################################################################
[stepper_x]
## Motor 0
rotation_distance: 32 #16T Pulley, 2mm Belt Pitch
microsteps: 16
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 0
position_max: 250
homing_speed: 35
homing_retract_dist: 0

[tmc2209 stepper_x]
sense_resistor: 0.110
stealthchop_threshold: 0 # disable stealthChop
interpolate: True
run_current: .65
driver_SGTHRS: 110 #113


[stepper_y]
## Motor 1
rotation_distance: 32 #16T Pulley, 2mm Belt Pitch
microsteps: 16
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
endstop_pin: tmc2209_stepper_y:virtual_endstop
position_endstop: -4
position_max: 210
position_min: -4
homing_speed: 40
homing_retract_dist: 0

[tmc2209 stepper_y]
sense_resistor: 0.110
stealthchop_threshold: 0 # disable stealthChop
interpolate: True
run_current: .65
driver_SGTHRS: 112

#####################################################################
# Z Stepper Settings
#####################################################################
[stepper_z]
## Motor 2
rotation_distance: 8 # Rotation Distance for TR8x8 = 8, TR8x4 = 4, TR8x2 = 2
microsteps: 16
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
endstop_pin: probe:z_virtual_endstop
position_max: 210
position_min: -2
homing_speed: 13.333

[tmc2209 stepper_z]
sense_resistor: 0.110
stealthchop_threshold: 0 # disable stealthChop
interpolate: True
run_current: .33033

[stepper_z1]
## Motor 3
rotation_distance: 8 # Rotation Distance for TR8x8 = 8, TR8x4 = 4, TR8x2 = 2
microsteps: 16
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree

[tmc2209 stepper_z1]
sense_resistor: 0.110
stealthchop_threshold: 0 # disable stealthChop
interpolate: True
run_current: .33033

#####################################################################
# Extruder
#####################################################################
[extruder]
sensor_pin: e_sensor_pin

[tmc2209 extruder]
sense_resistor: 0.110
stealthchop_threshold: 0 # disable stealthChop
interpolate: False
run_current: .50

#####################################################################
# Bed Heater
#####################################################################
[heater_bed]
heater_pin: heater_bed_heating_pin
sensor_type: EPCOS 100K B57560G104F
sensor_pin: heater_bed_sensor_pin
min_temp: 0
max_temp: 125

#####################################################################
# Z_Tilt adjusy X Gantry
#####################################################################
[z_tilt]
z_positions:
-37,105
289,105
points:
0,102
208,102
speed: 80
horizontal_move_z: 5
retries: 3
retry_tolerance: 0.01

#####################################################################
# Fan Control
#####################################################################
[heater_fan hotend_fan]
pin: fan_part_cooling_pin
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
fan_speed: 1.0 ## If you are experiencing back flow, you can reduce fan_speed
#tachometer_poll_interval: 0.0015

[controller_fan Controller_fan]
pin: fan_controller_board_pin
max_power: 1.0
fan_speed: 0.5 # full cooling not required
kick_start_time: 0.250
idle_timeout: 120
idle_speed: 0.3 # slow down when idling
#heater: extruder, heater_bed

# Part Cooling Fan
[fan]
pin: fan_toolhead_cooling_pin
max_power: 1.0

######################################################################
# Mini 12864Panel v2.1 (with neopixel backlight leds)
#
######################################################################
[output_pin BEEPER_pin]
pin: EXP1_1
pwm: True
value: 0
shutdown_value:0
cycle_time: 0.001
scale: 1000

[display]
# mini12864 LCD Display
lcd_type: uc1701
cs_pin: EXP1_3
a0_pin: EXP1_4
rst_pin: EXP1_5
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2
contrast: 63
spi_software_miso_pin: EXP2_1
spi_software_mosi_pin: EXP2_6
spi_software_sclk_pin: EXP2_2

[neopixel display]
# To control Neopixel RGB in mini12864 display
pin: EXP1_6
chain_count: 3
#initial_RED: 0.2
#initial_GREEN: 1
#initial_BLUE: 0.001
color_order: RGB

# Set RGB values on boot up for each Neopixel.
# Index 1 = display, Index 2 and 3 = Knob
[delayed_gcode setdisplayneopixel]
initial_duration: 1
gcode:
SET_LED LED=display RED=1 GREEN=0 BLUE=0 INDEX=1 TRANSMIT=0
SET_LED LED=display RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0
SET_LED LED=display RED=1 GREEN=0.49 BLUE=0.83 INDEX=3

#####################################################################
# ADXL On SPI port Octopus
#####################################################################
[resonance_tester]
accel_chip: adxl345
probe_points:
102,102,20 # Override this in printer.cfg to be the center of your bed.

[adxl345]
spi_bus: spi3 #a
cs_pin: adxl345_cs_pin
42 changes: 42 additions & 0 deletions Klipper_cfg/Prusa_Universal_Config_Revised/Macros/mesh_fade.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#####################################################################
# Mesh
#####################################################################
[bed_mesh]
speed: 150.0
mesh_min: 24, 1
mesh_max: 231,212
move_check_distance: 3.0
split_delta_z: .025
# Odd number of probe points per dimension (3x3, 5x5, 7x7) is better as then the area near the center screw is probed
#probe_count: 7,7
#probe_count: 5,5
probe_count: 3,3
mesh_pps: 2,2 #Only 2 interpolations per point
algorithm: bicubic
#relative_reference_index: 24 # 7x7
#relative_reference_index: 12 # 5x5
relative_reference_index: 4 # 3x3
fade_start: 1.0
fade_end: 10.0

# Avoid magnets
faulty_region_1_min: 100.583, 187.376
faulty_region_1_max: 122.083, 229.376
faulty_region_2_min: 125.672, -18.124
faulty_region_2_max: 147.172, 23.876
faulty_region_3_min: 192.261, 5.126
faulty_region_3_max: 234.261, 26.626
faulty_region_4_min: 114.422, 39.876
faulty_region_4_max: 135.922, 81.876
faulty_region_5_min: 21.422, 87.126
faulty_region_5_max: 42.922, 129.126
faulty_region_6_min: 54.172, 97.376
faulty_region_6_max: 96.172, 118.876
faulty_region_7_min: 154.172, 97.376
faulty_region_7_max: 196.172, 118.876
faulty_region_8_min: 205.136, 87.126
faulty_region_8_max: 226.636, 129.126
faulty_region_9_min: 114.422, 134.376
faulty_region_9_max: 135.922, 176.376
faulty_region_10_min: 176.177, 191.394
faulty_region_10_max: 218.177, 212.894
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ default_type: command
[include Macros/tram_z.cfg] # Tramming of the Z axis to the top
#[include Macros/tasmotaswitch.cfg] # Tasmota Power switch control with Idle timeout
[include Macros/mesh.cfg] # Mesh config including ignoring faulty regions due magnets
#[include Macros/mesh_fade.cfg] # Mesh config as above, but with fade enabled - fading mesh results over height of the print
#[include Macros/mesh_old.cfg] # Mesh config classic way as i am not convinced of the new method
[include Macros/homing.cfg] # Homing routine
[include Macros/print_time.cfg] # Statistics about total print time and save the to file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ default_type: command
[include Macros/tram_z.cfg] # Tramming of the Z axis to the top
#[include Macros/tasmotaswitch.cfg] # Tasmota Power switch control with Idle timeout
[include Macros/mesh.cfg] # Mesh config including ignoring faulty regions due magnets
#[include Macros/mesh_fade.cfg] # Mesh config as above, but with fade enabled - fading mesh results over height of the print
#[include Macros/mesh_old.cfg] # Mesh config classic way as i am not convinced of the new method
[include Macros/homing.cfg] # Homing routine
[include Macros/print_time.cfg] # Statistics about total print time and save the to file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ default_type: command
###################
# Octopus without MMU
###################
[include Boards/Octopus_MMU/printer_octopus_mmu.cfg] # BTT Octopus without MMU
[include Boards/Octopus_MMU/printer_octopus_mmu.cfg] # BTT Octopus
#[include Boards/Octopus_MMU/printer_octopus_mmu_no_stealth.cfg] # BTT Octopus - Stealthchop disabled, more precise steppers, but a bit louder

###################
# MMU on SKR Mini 3 V2
Expand All @@ -131,7 +132,8 @@ default_type: command
###################
# Octopus with MMU
###################
#[include Boards/Octopus_MMU/printer_octopus_mmu.cfg] # BTT Octopus
#[include Boards/Octopus_MMU/printer_octopus_mmu.cfg] # BTT Octopus
#[include Boards/Octopus_MMU/printer_octopus_mmu_no_stealth.cfg] # BTT Octopus - Stealthchop disabled, more precise steppers, but a bit louder
#[include MMU/mmu2s.cfg] # MMU Part
#[include MMU/Boards/Octopus/mmu2s_board.cfg] # Octopus MMU Board Settings

Expand All @@ -156,6 +158,7 @@ default_type: command
[include Macros/tram_z.cfg] # Tramming of the Z axis to the top
#[include Macros/tasmotaswitch.cfg] # Tasmota Power switch control with Idle timeout
[include Macros/mesh.cfg] # Mesh config including ignoring faulty regions due magnets
#[include Macros/mesh_fade.cfg] # Mesh config as above, but with fade enabled - fading mesh results over height of the print
#[include Macros/mesh_old.cfg] # Mesh config classic way as i am not convinced of the new method
[include Macros/homing.cfg] # Homing routine
[include Macros/print_time.cfg] # Statistics about total print time and save the to file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ default_type: command
###################
# Octopus without MMU
###################
#[include Boards/Octopus_MMU/printer_octopus_mmu.cfg] # BTT Octopus without MMU
#[include Boards/Octopus_MMU/printer_octopus_mmu.cfg] # BTT Octopus
#[include Boards/Octopus_MMU/printer_octopus_mmu_no_stealth.cfg] # BTT Octopus - Stealthchop disabled, more precise steppers, but a bit louder

###################
# MMU on SKR Mini 3 V2
Expand All @@ -131,7 +132,8 @@ default_type: command
###################
# Octopus with MMU
###################
[include Boards/Octopus_MMU/printer_octopus_mmu.cfg] # BTT Octopus
[include Boards/Octopus_MMU/printer_octopus_mmu.cfg] # BTT Octopus
#[include Boards/Octopus_MMU/printer_octopus_mmu_no_stealth.cfg] # BTT Octopus - Stealthchop disabled, more precise steppers, but a bit louder
[include MMU/mmu2s.cfg] # MMU Part
[include MMU/Boards/Octopus/mmu2s_board.cfg] # Octopus MMU Board Settings

Expand All @@ -156,6 +158,7 @@ default_type: command
[include Macros/tram_z.cfg] # Tramming of the Z axis to the top
#[include Macros/tasmotaswitch.cfg] # Tasmota Power switch control with Idle timeout
[include Macros/mesh.cfg] # Mesh config including ignoring faulty regions due magnets
#[include Macros/mesh_fade.cfg] # Mesh config as above, but with fade enabled - fading mesh results over height of the print
#[include Macros/mesh_old.cfg] # Mesh config classic way as i am not convinced of the new method
[include Macros/homing.cfg] # Homing routine
[include Macros/print_time.cfg] # Statistics about total print time and save the to file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ default_type: command
[include Macros/display_menu.cfg] # Items show in the LCD menu
#[include Macros/tasmotaswitch.cfg] # Tasmota Power switch control with Idle timeout
[include Macros/mesh.cfg] # Mesh config including ignoring faulty regions due magnets
#[include Macros/mesh_fade.cfg] # Mesh config as above, but with fade enabled - fading mesh results over height of the print
#[include Macros/mesh_old.cfg] # Mesh config classic way as i am not convinced of the new method
[include Macros/homing.cfg] # Homing routine
[include Macros/print_time.cfg] # Statistics about total print time and save the to file
Expand Down

0 comments on commit 4771b06

Please sign in to comment.