Skip to content

Instantly share code, notes, and snippets.

@lhess
Last active August 3, 2021 01:33
Show Gist options
  • Save lhess/2b31fb44d55d110a10a269ce8a9aad60 to your computer and use it in GitHub Desktop.
Save lhess/2b31fb44d55d110a10a269ce8a9aad60 to your computer and use it in GitHub Desktop.
klipper triogorilla config i3 cartesian dual Z, BLTouch
# Prutscha i3
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
max_velocity: 200
max_accel: 1500
max_z_velocity: 10
max_z_accel: 200
square_corner_velocity: 5.0
[stepper_x]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_distance: 0.01
endstop_pin: ^ar3
position_min: 0
position_endstop: 0
position_max: 247
homing_speed: 70.0
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_distance: 0.01
endstop_pin: ^ar14
position_min: -4
position_endstop: -4
position_max: 225
homing_speed: 70.0
[stepper_z]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
step_distance: .0025
position_max: 245
homing_speed: 8.0
position_min: -2
endstop_pin: probe: z_virtual_endstop
[stepper_z1]
step_pin: ar36
dir_pin: !ar34
enable_pin: !ar30
step_distance: .0025
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
# BMG with 1.8 stepper
step_distance: .00239
nozzle_diameter: 0.600
filament_diameter: 1.750
max_extrude_cross_section: 50.0
max_extrude_only_distance: 100.0
max_extrude_only_velocity: 120.0
max_extrude_only_accel: 1250.0
pressure_advance: 0.100
pressure_advance_smooth_time: 0.040
heater_pin: ar10
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
control: pid
min_extrude_temp: 180
min_temp: 0
max_temp: 280
# e3d V6 Volcano with 40 watts heater
pid_Kp=30.932
pid_Ki=1.964
pid_Kd=121.796
[heater_fan extruder_fan]
pin: ar44
heater_temp: 50
[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control: pid
min_temp: 0
max_temp: 110
# Original Prusa MK52 12V heated bed
pid_Kp=57.289
pid_Ki=0.825
pid_Kd=994.674
[display]
lcd_type: hd44780
rs_pin: ar16
e_pin: ar17
d4_pin: ar23
d5_pin: ar25
d6_pin: ar27
d7_pin: ar29
encoder_pins: ^ar33, ^ar31
click_pin: ^!ar35
kill_pin: ^!ar41
[fan]
pin: ar9
[controller_fan stepper_fan]
pin: ar7
max_power: 0.8
shutdown_speed: 0
cycle_time: 0.010
hardware_pwm: False
kick_start_time: 0.100
idle_timeout: 60
idle_speed: 0.8
heater: extruder, heater_bed
[safe_z_home]
home_xy_position: 2,2
speed: 80
z_hop: 8
z_hop_speed: 20
[z_tilt]
z_positions:
0, 112
247, 112
points:
2, 112
210, 112
speed: 100
horizontal_move_z: 5
[bltouch]
sensor_pin: ar18
control_pin: ar11
stow_on_each_sample: False
samples: 2
speed: 5.0
sample_retract_dist: 3.0
samples_tolerance: 0.05
samples_tolerance_retries: 5
z_offset: 1.650
y_offset: 3.2
x_offset: 25.6
[bed_mesh]
speed: 100
horizontal_move_z: 5
mesh_min: 27.6,5.2
mesh_max: 230,210
probe_count: 5,5
fade_start: 2.0
fade_end: 12.0
move_check_distance: 5.0
split_delta_z: .025
mesh_pps: 2,2
#algorithm: bicubic
#bicubic_tension: .2
[force_move]
enable_force_move: True
[output_pin BEEPER_pin]
pin: PC0
pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.001
scale: 1000
[filament_switch_sensor filament_sensor]
switch_pin: ^!ar19
event_delay: 1.0
insert_gcode:
G4 P300
LOAD_FILAMENT
runout_gcode:
M600 X100 Y0 Z50
[pause_resume]
[gcode_macro PRUTSCHA_READY]
gcode:
M117 PRUTSCHA I3 Ready
[gcode_macro RESPOND]
default_parameter_MSG: ""
gcode: {printer.gcode.action_respond_info(MSG)}
[gcode_macro M300]
default_parameter_S=1000
default_parameter_P=100
gcode:
SET_PIN PIN=BEEPER_pin VALUE={S}
G4 P{P}
SET_PIN PIN=BEEPER_pin VALUE=0
[gcode_macro M600]
variable_extr_temp: 0
default_parameter_X: 100
default_parameter_Y: 10
default_parameter_Z: 10
gcode:
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
M220 S100
G1 E-1.1 F2700
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
G91
UNLOAD_FILAMENT
M117 Insert new filament
RESTORE_GCODE_STATE NAME=M600_state
#[gcode_macro RECOVER]
#gcode:
# M109 S{printer["gcode_macro M600"].extr_temp}
# RESUME
[gcode_macro PRUTSCHA_START_PRINT]
variable_value: 0
gcode:
SET_GCODE_VARIABLE MACRO=PRUTSCHA_START_PRINT VARIABLE=value VALUE=1
[gcode_macro PRUTSCHA_STOP_PRINT]
gcode:
SET_GCODE_VARIABLE MACRO=PRUTSCHA_START_PRINT VARIABLE=value VALUE=0
[idle_timeout]
gcode:
TURN_OFF_HEATERS
M84
PRUTSCHA_STOP_PRINT
[gcode_macro PRUTSCHA_STATE]
gcode:
RESPOND MSG="PrutschaState: { printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) }"
[gcode_macro LOAD_FILAMENT]
gcode:
{% if printer.extruder.temperature >= 190 %}
M220 S100
M300 S100 P20
RESPOND MSG="LOAD_FILAMET: Start loading sequence"
M117 Loading Filament...
M83
G92 E0.0
G1 E10 F600
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 0 %}
{% if 'z' in printer.toolhead.homed_axes %}
RESPOND MSG="LOAD_FILAMET: Z axsis is homed"
{% if printer.gcode.gcode_position.z < 50 %}
RESPOND MSG="LOAD_FILAMET: Z axsis was below 50, raising to 50"
G91
G1 Z{'%d' % (50 - printer.gcode.gcode_position.z)}
{% endif %}
{% else %}
RESPOND MSG="LOAD_FILAMET: Z axsis not homed, force raise move"
SET_KINEMATIC_POSITION X=5 Y=5 Z=5
G91
G1 Z30
M84
G92 E0.0
{% endif %}
{% else %}
RESPOND MSG="LOAD_FILAMET: Printer seems to print, no Z axis change"
SAVE_GCODE_STATE NAME=__filament__load
{% endif %}
G1 E30 F600
G1 E20 F750
G1 E100 F250
G92 E0.0
M400
RESPOND MSG="LOAD_FILAMET: Done"
M117 Load Complete!
M300 S1000 P20
M300 S0 P40
M300 S1000 P20
{% if printer["gcode_macro PRUTSCHA_START_PRINT"].value|default(0, true) == 1 %}
RESTORE_GCODE_STATE NAME=__filament__load
{% endif %}
{% else %}
RESPOND MSG="LOAD_FILAMET: Exstuder not preheated"
M117 ! Preheat extruder !
BEEP_ALERT
{% endif %}
[gcode_macro UNLOAD_FILAMENT]
gcode:
{% if printer.extruder.temperature >= 190 %}
SAVE_GCODE_STATE NAME=__filament__load
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
M117 Unloading Filament...
M220 S100
M300 S100 P20
M83
# Load
G92 E0.0
G1 E10 F300
G4 P500
# Unload
G92 E0.0
G1 E-20 F400
G1 E-20 F1000
G1 E-80 F2000
G92 E0.0
M400
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=1
M117 Remove Filament Now!
M300 S1000 P1000
RESTORE_GCODE_STATE NAME=__filament__load
{% else %}
M117 ! Preheat extruder !
BEEP_ALERT
{% endif %}
[gcode_macro BEEP_ALERT]
gcode:
M300 S500 P20
M300 S500 P20
M300 S500 P20
### menu ###
### menu filament ###
[menu __main __filament __load]
type: command
name: Load Filament
index: 1
gcode:
LOAD_FILAMENT
[menu __main __filament __unload]
type: command
name: Unload Filament
index: 2
gcode:
UNLOAD_FILAMENT
[menu __main __filament __loadf]
enable: False
type: command
name: Load Fil. fast
[menu __main __filament __loads]
enable: False
type: command
name: Load Fil. slow
[menu __main __filament __unloadf]
enable: False
type: command
name: Unload Fil.fast
[menu __main __filament __unloads]
enable: False
type: command
name: Unload Fil.slow
### menu temperature ###
[menu __main __temp __preheat_pet]
type: list
name: Preheat PETG
index: 4
[menu __main __temp __preheat_pet __all]
type: command
enable: {('extruder' in printer) and ('heater_bed' in printer)}
name: Preheat all
gcode:
M140 S90
M104 S240
[menu __main __temp __preheat_pet __hotend]
type: command
enable: {'extruder' in printer}
name: Preheat hotend
gcode: M104 S240
[menu __main __temp __preheat_pet __hotbed]
type: command
enable: {'heater_bed' in printer}
name: Preheat hotbed
gcode: M140 S90
[menu __main __temp __preheat_abs]
type: list
name: Preheat ABS
[menu __main __temp __preheat_abs __all]
type: command
enable: {('extruder' in printer) and ('heater_bed' in printer)}
name: Preheat all
gcode:
M140 S100
M104 S255
[menu __main __temp __preheat_abs __hotend]
type: command
enable: {'extruder' in printer}
name: Preheat hotend
gcode: M104 S255
[menu __main __temp __preheat_abs __hotbed]
type: command
enable: {'heater_bed' in printer}
name: Preheat hotbed
gcode: M140 S100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment