Skip to content

Instantly share code, notes, and snippets.

@lenne0815
Created January 12, 2020 12:47
Show Gist options
  • Save lenne0815/77463bf478016d33b25ecd602a3fe75c to your computer and use it in GitHub Desktop.
Save lenne0815/77463bf478016d33b25ecd602a3fe75c to your computer and use it in GitHub Desktop.
Simplicity
######################################################################
# Start Print and End Print
######################################################################
[gcode_macro START_PRINT]
gcode:
G90
G92 E0
G1 X35.0 Y0.0 Z0.1 E1.0 F5000.0 ; intro line start
G1 X35.0 Y0.0 Z0.1 E4.0 F1000.0 ; start extruding
G1 X60.0 Y0.0 Z0.2 E15 F1000.0 ; middle
G1 X100.0 Y0.0 Z0.1 E25 F1000.0 ; intro line finish
[gcode_macro END_PRINT]
gcode:
G91 ; relative movements
G1 Z5 F5000 ; lift nozzle
G90 ; back to absolute
G0 X0 Y10 F10000
M107 ; turn fan off
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
[firmware_retraction]
retract_length: 0.8
retract_speed: 60
unretract_extra_length: 0.05
unretract_speed: 60
[stepper_x]
step_pin: ar17
dir_pin: !ar16
enable_pin: !ar48
step_distance: .0125
endstop_pin: tmc5160_stepper_x:virtual_endstop
position_min: -65
position_max: 475
position_endstop: -65
homing_speed: 120
homing_retract_dist: 0
homing_positive_dir: false
[tmc5160 stepper_x]
cs_pin: ar31
spi_speed: 1000000
spi_software_sclk_pin: ar52
spi_software_mosi_pin: ar51
spi_software_miso_pin: ar50
diag1_pin: ^!ar37
microsteps: 16
interpolate: True
run_current: 1.3
hold_current: 0.8
sense_resistor: 0.075
stealthchop_threshold: 0
driver_IHOLDDELAY: 6
driver_TPOWERDOWN: 128
driver_SGT: 4
[stepper_x1]
step_pin: ar26
dir_pin: !ar25
enable_pin: !ar27
step_distance: .0125
endstop_pin: tmc5160_stepper_x1:virtual_endstop
[tmc5160 stepper_x1]
cs_pin: ar15
spi_speed: 1000000
spi_software_sclk_pin: ar52
spi_software_mosi_pin: ar51
spi_software_miso_pin: ar50
diag1_pin: ^!ar36
microsteps: 16
interpolate: True
run_current: 1.3
hold_current: 0.8
sense_resistor: 0.075
stealthchop_threshold: 0
driver_IHOLDDELAY: 6
driver_TPOWERDOWN: 128
driver_SGT: 4
[stepper_y]
step_pin: ar54
dir_pin: !ar47
enable_pin: !ar55
step_distance: .0125
endstop_pin: tmc5160_stepper_y:virtual_endstop
position_endstop: 0
homing_retract_dist: 0
homing_speed: 80
position_max: 490
homing_positive_dir: false
[tmc5160 stepper_y]
cs_pin: ar20
spi_speed: 1000000
spi_software_sclk_pin: ar52
spi_software_mosi_pin: ar51
spi_software_miso_pin: ar50
diag1_pin: ^!ar34
microsteps: 16
interpolate: True
run_current: 1.3
hold_current: 0.8
sense_resistor: 0.075
stealthchop_threshold: 0
driver_IHOLDDELAY: 6
driver_TPOWERDOWN: 128
driver_SGT: 4
[homing_override]
axes: x,y,z
set_position_x:450
set_position_y:450
set_position_z:450
gcode:
INIT_TMC STEPPER=stepper_y
INIT_TMC STEPPER=stepper_x
INIT_TMC STEPPER=stepper_x1
G91
SET_TMC_CURRENT STEPPER=stepper_y CURRENT=0.44 HOLDCURRENT=0.44
SET_TMC_CURRENT STEPPER=stepper_x CURRENT=0.4 HOLDCURRENT=0.4
SET_TMC_CURRENT STEPPER=stepper_x1 CURRENT=0.4 HOLDCURRENT=0.4
M204 S200
G28 Y0
G0 Y60
G28 X10
M204 S2000
SET_TMC_CURRENT STEPPER=stepper_y CURRENT=1.3 HOLDCURRENT=0.8
SET_TMC_CURRENT STEPPER=stepper_x CURRENT=1.3 HOLDCURRENT=0.8
SET_TMC_CURRENT STEPPER=stepper_x1 CURRENT=1.3 HOLDCURRENT=0.8
G28 Z0
G0 Z5
G90
G0 X-20 Y30 F30000
[stepper_z]
step_pin: ar57
dir_pin: !ar56
enable_pin: !ar62
step_distance: .001
endstop_pin: ^ar33
position_endstop: 0.0
position_max: 500
position_min: -1
[stepper_z1]
step_pin: ar29
dir_pin: !ar28
enable_pin: !ar39
step_distance: .001
endstop_pin: ^ar32
[extruder]
step_pin: ar23
dir_pin: !ar22
enable_pin: !ar24
step_distance: .00250
nozzle_diameter: 0.6
filament_diameter: 1.7500
pressure_advance: 0.02
## pressure_advance_lookahead_time: 0.010
heater_pin: ar2
max_power: 1
sensor_type: NTC 100K beta 3950
sensor_pin: analog15
#control: pid
#pid_Kp: 26.301
#pid_Ki: 1.538
#pid_Kd: 112.435
min_temp: 0
max_temp: 260
max_extrude_cross_section: 11
max_extrude_only_distance: 100
[heater_bed]
heater_pin: ar6
sensor_type: NTC 100K beta 3950
sensor_pin: analog11
#control: pid
#pid_Kp: 47.100
#pid_Ki: 1.236
#pid_Kd: 448.630
min_temp: 0
max_temp: 110
[fan]
pin: ar7
[output_pin my_fan]
pin: ar8
shutdown_value:0
[mcu]
serial: /dev/ttyACM0
baud: 250000
pin_map: arduino
[printer]
kinematics: cartesian
max_velocity: 250
max_accel: 2500
max_z_velocity: 70
max_z_accel: 50
[probe]
pin: !ar35
x_offset: 35.0
y_offset: 0.0
z_offset: 17.6
# The distance (in mm) between the bed and the nozzle when the probe
# triggers. This parameter must be provided.
speed: 4.0
# Speed (in mm/s) of the Z axis when probing. The default is 5mm/s.
#activate_gcode:
#deactivate_gcode:
# Mesh Bed Leveling. One may define a [bed_mesh] config section
# to enable move transformations that offset the z axis based
# on a mesh generated from probed points. Note that bed_mesh
# and bed_tilt are incompatible, both cannot be defined.
[bed_mesh]
speed: 150
# The speed (in mm/s) of non-probing moves during the
# calibration. The default is 50.
horizontal_move_z: 23
# The height (in mm) that the head should be commanded to move to
# just prior to starting a probe operation. The default is 5.
min_point: -20,0
# An X,Y point defining the minimum coordinate to probe on
# the bed. Note that this refers to the nozzle position,
# and take care that you do not define a point that will move
# the probe off of the bed. This parameter must be provided.
max_point:455,465
# An X,Y point defining the maximum coordinate to probe on
# the bed. Follow the same precautions as listed in min_point.
# Also note that this does not necessarily define the last point
# probed, only the maximum coordinate. This parameter must be provided.
probe_count: 7,7
# A comma separated pair of integer values (X,Y) defining the number
# of points to probe along each axis. A single value is also valid,
# in which case that value will be for both axes. Default is 3,3
# which probes a 3x3 grid.
fade_start: 1.0
# The z-axis position in which to start phasing z-adjustment out.
# Default is 1.0.
fade_end: 10
# The z-axis position in which phase out is complete. If this
# value is less than or equal to fade_start then phasing out
# is disabled. Default is 10.0.
split_delta_z: .025
# The amount of Z difference (in mm) along a move that will
# trigger a split. Default is .025.
move_check_distance: 5.0
# The distance (in mm) along a move to check for split_delta_z.
# This is also the minimum length that a move can be split. Default
# is 5.0.
mesh_pps: 2,2
# A comma separated pair of integers (X,Y) defining the number of
# points per segment to interpolate in the mesh along each axis. A
# "segment" can be defined as the space between each probed
# point. The user may enter a single value which will be applied
# to both axes. Default is 2,2.
algorithm: bicubic
# The interpolation algorithm to use. May be either "lagrange"
# or "bicubic". This option will not affect 3x3 grids, which
# are forced to use lagrange sampling. Default is lagrange.
bicubic_tension: .5
# When using the bicubic algorithm the tension parameter above
# may be applied to change the amount of slope interpolated.
# Larger numbers will increase the amount of slope, which
# results in more curvature in the mesh. Default is .2.
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# points =
#*# 0.542000, 0.547000, 0.508000, 0.485000, 0.490000, 0.482000, 0.421000
#*# 0.641000, 0.610000, 0.550000, 0.601000, 0.633000, 0.634000, 0.532000
#*# 0.664000, 0.663000, 0.596000, 0.617000, 0.668000, 0.689000, 0.610000
#*# 0.645000, 0.639000, 0.588000, 0.621000, 0.676000, 0.715000, 0.653000
#*# 0.608000, 0.595000, 0.535000, 0.575000, 0.623000, 0.643000, 0.573000
#*# 0.590000, 0.566000, 0.511000, 0.538000, 0.576000, 0.591000, 0.508000
#*# 0.507000, 0.458000, 0.426000, 0.446000, 0.458000, 0.436000, 0.427000
#*# x_count = 7
#*# y_count = 7
#*# min_x = -20.0
#*# max_x = 454.96
#*# min_y = 0.0
#*# max_y = 465.0
#*# x_offset = 35.0
#*# y_offset = 0.0
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.5
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 60.904
#*# pid_ki = 1.493
#*# pid_kd = 621.218
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 27.624
#*# pid_ki = 2.046
#*# pid_kd = 93.230
#*#
#*# [bed_mesh lenne]
#*# points =
#*# 0.542000, 0.547000, 0.508000, 0.485000, 0.490000, 0.482000, 0.421000
#*# 0.641000, 0.610000, 0.550000, 0.601000, 0.633000, 0.634000, 0.532000
#*# 0.664000, 0.663000, 0.596000, 0.617000, 0.668000, 0.689000, 0.610000
#*# 0.645000, 0.639000, 0.588000, 0.621000, 0.676000, 0.715000, 0.653000
#*# 0.608000, 0.595000, 0.535000, 0.575000, 0.623000, 0.643000, 0.573000
#*# 0.590000, 0.566000, 0.511000, 0.538000, 0.576000, 0.591000, 0.508000
#*# 0.507000, 0.458000, 0.426000, 0.446000, 0.458000, 0.436000, 0.427000
#*# x_count = 7
#*# y_count = 7
#*# min_x = -20.0
#*# max_x = 454.96
#*# min_y = 0.0
#*# max_y = 465.0
#*# x_offset = 35.0
#*# y_offset = 0.0
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment