refactor: improve printer.cfg
This commit is contained in:
parent
ce8b0fbc13
commit
d819d7e11f
|
|
@ -8,7 +8,6 @@ simulavr_cfg="/usr/src/simulavr.config"
|
|||
|
||||
printer_cfg="https://raw.githubusercontent.com/th33xitus/klipper-printer-simulavr-docker/master/example-configs/printer.cfg"
|
||||
moonraker_conf="https://raw.githubusercontent.com/th33xitus/klipper-printer-simulavr-docker/master/example-configs/moonraker.conf"
|
||||
atmega_cfg="https://raw.githubusercontent.com/th33xitus/klipper-printer-simulavr-docker/master/example-configs/atmega644p.cfg"
|
||||
|
||||
cd ~ || exit 1
|
||||
[ ! -d ~/klipper_config ] && mkdir klipper_config
|
||||
|
|
@ -78,7 +77,6 @@ download_configs(){
|
|||
cd ~/klipper_config || exit 1
|
||||
[ ! -f ~/klipper_config/printer.cfg ] && curl -O $printer_cfg
|
||||
[ ! -f ~/klipper_config/moonraker.conf ] && curl -O $moonraker_conf
|
||||
[ ! -f ~/klipper_config/atmega644p.cfg ] && curl -O $atmega_cfg
|
||||
cd ~ || exit 1
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,110 +0,0 @@
|
|||
# This file contains example pin mappings for testing with the
|
||||
# "simulavr" program. To use this config, compile the firmware for an
|
||||
# AVR atmega644p, enable "low-level configuration options", and enable
|
||||
# "simulavr software emulation". Further details are in
|
||||
# docs/Debugging.md.
|
||||
|
||||
# See docs/Config_Reference.md for a description of parameters.
|
||||
|
||||
# AVR atmega644p Pins:
|
||||
# PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7
|
||||
# PB0, PB1, PB2, PB3, PB4, PB5, PB6, PB7
|
||||
# PC0, PC1, PC2, PC3, PC4, PC5, PC6, PC7
|
||||
# PD0, PD1, PD2, PD3, PD4, PD5, PD6, PD7
|
||||
|
||||
[stepper_x]
|
||||
# Pins: PA5, PA4, PA1
|
||||
step_pin: PA5
|
||||
dir_pin: PA4
|
||||
enable_pin: PA1
|
||||
microsteps: 16
|
||||
rotation_distance: 40
|
||||
endstop_pin: ^PB0
|
||||
position_min: -0.25
|
||||
position_endstop: 0
|
||||
position_max: 200
|
||||
|
||||
[stepper_y]
|
||||
# Pins: PA3, PA2
|
||||
step_pin: PA3
|
||||
dir_pin: PA2
|
||||
enable_pin: PA1
|
||||
microsteps: 16
|
||||
rotation_distance: 40
|
||||
endstop_pin: ^PB1
|
||||
position_min: -0.25
|
||||
position_endstop: 0
|
||||
position_max: 200
|
||||
|
||||
[stepper_z]
|
||||
# Pins: PC7, PC6
|
||||
step_pin: PC7
|
||||
dir_pin: PC6
|
||||
enable_pin: PA1
|
||||
microsteps: 16
|
||||
rotation_distance: 8
|
||||
endstop_pin: ^PB2
|
||||
position_min: 0.1
|
||||
position_endstop: 0.5
|
||||
position_max: 200
|
||||
|
||||
[extruder]
|
||||
# Pins: PC3, PC2
|
||||
step_pin: PC3
|
||||
dir_pin: PC2
|
||||
enable_pin: PA1
|
||||
microsteps: 16
|
||||
rotation_distance: 33.500
|
||||
nozzle_diameter: 0.500
|
||||
filament_diameter: 3.500
|
||||
heater_pin: PB4
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
sensor_pin: PA7
|
||||
control: pid
|
||||
pid_Kp: 22.2
|
||||
pid_Ki: 1.08
|
||||
pid_Kd: 114
|
||||
min_temp: 0
|
||||
min_extrude_temp: 0
|
||||
max_temp: 210
|
||||
|
||||
[extruder1]
|
||||
# Pins: PD3, PD2
|
||||
step_pin: PD3
|
||||
dir_pin: PD2
|
||||
enable_pin: PA1
|
||||
microsteps: 16
|
||||
rotation_distance: 33.500
|
||||
nozzle_diameter: 0.500
|
||||
filament_diameter: 3.500
|
||||
shared_heater: extruder
|
||||
|
||||
[extruder2]
|
||||
# Pins: PD3, PD2
|
||||
step_pin: PD4
|
||||
dir_pin: PD5
|
||||
enable_pin: PA1
|
||||
microsteps: 16
|
||||
rotation_distance: 33.500
|
||||
nozzle_diameter: 0.500
|
||||
filament_diameter: 3.500
|
||||
shared_heater: extruder
|
||||
|
||||
[extruder3]
|
||||
# Pins: PD3, PD2
|
||||
step_pin: PD6
|
||||
dir_pin: PD7
|
||||
enable_pin: PA1
|
||||
microsteps: 16
|
||||
rotation_distance: 33.500
|
||||
nozzle_diameter: 0.500
|
||||
filament_diameter: 3.500
|
||||
shared_heater: extruder
|
||||
|
||||
[heater_bed]
|
||||
heater_pin: PB3
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
sensor_pin: PA0
|
||||
control: watermark
|
||||
min_temp: 0
|
||||
max_temp: 110
|
||||
|
|
@ -1,16 +1,60 @@
|
|||
[include atmega644p.cfg]
|
||||
# This file contains example pin mappings for testing with the
|
||||
# "simulavr" program. To use this config, compile the firmware for an
|
||||
# AVR atmega644p, enable "low-level configuration options", and enable
|
||||
# "simulavr software emulation". Further details are in
|
||||
# docs/Debugging.md.
|
||||
|
||||
# See docs/Config_Reference.md for a description of parameters.
|
||||
|
||||
# AVR atmega644p Pins:
|
||||
# PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7
|
||||
# PB0, PB1, PB2, PB3, PB4, PB5, PB6, PB7
|
||||
# PC0, PC1, PC2, PC3, PC4, PC5, PC6, PC7
|
||||
# PD0, PD1, PD2, PD3, PD4, PD5, PD6, PD7
|
||||
|
||||
############################################
|
||||
### DO NOT CHANGE PIN ASSIGNMENTS !!! ###
|
||||
############################################
|
||||
[stepper_x]
|
||||
step_pin: PD7
|
||||
dir_pin: !PC5
|
||||
enable_pin: !PD6
|
||||
endstop_pin: ^PC2
|
||||
|
||||
[stepper_y]
|
||||
step_pin: PC6
|
||||
dir_pin: !PC7
|
||||
enable_pin: !PD6
|
||||
endstop_pin: ^PC3
|
||||
|
||||
[stepper_z]
|
||||
step_pin: PB3
|
||||
dir_pin: PB2
|
||||
enable_pin: !PA5
|
||||
endstop_pin: ^PC4
|
||||
|
||||
[extruder]
|
||||
step_pin: PB1
|
||||
dir_pin: !PB0
|
||||
enable_pin: !PD6
|
||||
heater_pin: PD5
|
||||
sensor_pin: PA7
|
||||
|
||||
[heater_bed]
|
||||
heater_pin: PD4
|
||||
sensor_pin: PA6
|
||||
|
||||
############################################
|
||||
### ADDITIONAL CONFIGURATIONS ###
|
||||
############################################
|
||||
[respond]
|
||||
[pause_resume]
|
||||
[display_status]
|
||||
|
||||
[mcu]
|
||||
serial: /tmp/pseudoserial
|
||||
restart_method: arduino
|
||||
|
||||
[virtual_sdcard]
|
||||
path: ~/gcode_files
|
||||
|
||||
[pause_resume]
|
||||
|
||||
[display_status]
|
||||
|
||||
[printer]
|
||||
kinematics: cartesian
|
||||
max_velocity: 300
|
||||
|
|
@ -18,73 +62,140 @@ max_accel: 3000
|
|||
max_z_velocity: 5
|
||||
max_z_accel: 100
|
||||
|
||||
[virtual_sdcard]
|
||||
path: ~/gcode_files
|
||||
|
||||
[firmware_retraction]
|
||||
retract_length: 0.5
|
||||
retract_speed: 75
|
||||
unretract_speed: 75
|
||||
unretract_extra_length: 0
|
||||
|
||||
[stepper_x]
|
||||
microsteps: 16
|
||||
rotation_distance: 40
|
||||
position_endstop: 0
|
||||
position_max: 235
|
||||
homing_speed: 50
|
||||
homing_retract_dist: 0
|
||||
|
||||
[stepper_y]
|
||||
microsteps: 16
|
||||
rotation_distance: 40
|
||||
position_endstop: 0
|
||||
position_max: 235
|
||||
homing_speed: 50
|
||||
homing_retract_dist: 0
|
||||
|
||||
[stepper_z]
|
||||
microsteps: 16
|
||||
rotation_distance: 8
|
||||
position_endstop: 0.0
|
||||
position_max: 250
|
||||
homing_retract_dist: 0
|
||||
|
||||
[extruder]
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
control: watermark
|
||||
microsteps: 16
|
||||
rotation_distance: 33.683
|
||||
nozzle_diameter: 0.400
|
||||
filament_diameter: 1.750
|
||||
min_temp: 0
|
||||
max_temp: 250
|
||||
min_extrude_temp: 50
|
||||
max_extrude_only_distance: 100.0
|
||||
pressure_advance: 0.1
|
||||
pressure_advance_smooth_time: 0.01
|
||||
[extruder1]
|
||||
pressure_advance: 0.2
|
||||
pressure_advance_smooth_time: 0.02
|
||||
[extruder2]
|
||||
pressure_advance: 0.3
|
||||
pressure_advance_smooth_time: 0.03
|
||||
[extruder3]
|
||||
pressure_advance: 0.4
|
||||
pressure_advance_smooth_time: 0.04
|
||||
|
||||
# [fan]
|
||||
# pin: PB4
|
||||
[heater_bed]
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
control: watermark
|
||||
min_temp: 0
|
||||
max_temp: 130
|
||||
|
||||
# [heater_fan nozzle_fan]
|
||||
# pin: PB5
|
||||
# off_below: 0.0
|
||||
# shutdown_speed: 1.0
|
||||
# max_power: 1.0
|
||||
[fan]
|
||||
pin: PB4
|
||||
|
||||
# [controller_fan mcu_fan]
|
||||
# pin: PB6
|
||||
# off_below: 0.2
|
||||
# shutdown_speed: 1.0
|
||||
# max_power: 1.0
|
||||
[heater_fan heater_fan]
|
||||
pin: PB5
|
||||
off_below: 0.0
|
||||
shutdown_speed: 1.0
|
||||
max_power: 1.0
|
||||
|
||||
### MACROS ###
|
||||
[controller_fan controller_fan]
|
||||
pin: PB6
|
||||
off_below: 0.2
|
||||
shutdown_speed: 1.0
|
||||
max_power: 1.0
|
||||
|
||||
[filament_motion_sensor runout_sensor]
|
||||
switch_pin: PC1
|
||||
detection_length: 1.0
|
||||
extruder: extruder
|
||||
pause_on_runout: FALSE
|
||||
runout_gcode:
|
||||
M117 Runout GCode
|
||||
insert_gcode:
|
||||
M117 Insert GCode
|
||||
|
||||
[output_pin output_pin]
|
||||
pin: PC0
|
||||
pwm: false
|
||||
shutdown_value: 0
|
||||
value: 1
|
||||
|
||||
############################################
|
||||
### MACROS ###
|
||||
############################################
|
||||
[gcode_macro START_PRINT]
|
||||
gcode:
|
||||
M140 S{ params.T_BED }
|
||||
M104 S{ params.T_EXTRUDER }
|
||||
M83 ; set relative extrusion mode
|
||||
G90 ; set absolute coordinates
|
||||
G28
|
||||
M117 START_PRINT called with {rawparams}
|
||||
G28
|
||||
|
||||
[gcode_macro END_PRINT]
|
||||
gcode:
|
||||
M107
|
||||
M84
|
||||
TURN_OFF_HEATERS
|
||||
|
||||
[gcode_macro PAUSE]
|
||||
description: Pause the actual running print
|
||||
rename_existing: PAUSE_BASE
|
||||
gcode:
|
||||
PAUSE_BASE
|
||||
M117 Paused @ X{printer.gcode_move.position.x} Y{printer.gcode_move.position.y} Z{printer.gcode_move.position.z}
|
||||
|
||||
[gcode_macro RESUME]
|
||||
description: Resume the actual running print
|
||||
rename_existing: RESUME_BASE
|
||||
gcode:
|
||||
RESUME_BASE
|
||||
M117 END_PRINT called with {rawparams}
|
||||
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
description: Cancel the actual running print
|
||||
rename_existing: CANCEL_PRINT_BASE
|
||||
gcode:
|
||||
M107
|
||||
M84
|
||||
TURN_OFF_HEATERS
|
||||
CANCEL_PRINT_BASE
|
||||
M117 CANCEL_PRINT called with {rawparams}
|
||||
CANCEL_PRINT_BASE
|
||||
|
||||
[gcode_macro PAUSE]
|
||||
rename_existing: PAUSE_BASE
|
||||
gcode:
|
||||
M117 PAUSE called with {rawparams}
|
||||
PAUSE_BASE
|
||||
|
||||
[gcode_macro RESUME]
|
||||
rename_existing: RESUME_BASE
|
||||
gcode:
|
||||
M117 RESUME called with {rawparams}
|
||||
RESUME_BASE
|
||||
|
||||
[gcode_macro M117]
|
||||
rename_existing: M117.1
|
||||
gcode:
|
||||
M117.1 {rawparams}
|
||||
{action_respond_info(rawparams)}
|
||||
|
||||
[gcode_macro M104]
|
||||
rename_existing: M104.1
|
||||
gcode:
|
||||
M117 M104 called with {rawparams}
|
||||
|
||||
[gcode_macro M109]
|
||||
rename_existing: M109.1
|
||||
gcode:
|
||||
M117 M109 called with {rawparams}
|
||||
|
||||
[gcode_macro M140]
|
||||
rename_existing: M140.1
|
||||
gcode:
|
||||
M117 M140 called with {rawparams}
|
||||
|
||||
[gcode_macro M190]
|
||||
rename_existing: M190.1
|
||||
gcode:
|
||||
M117 M190 called with {rawparams}
|
||||
Loading…
Reference in New Issue