# This file contains common pin mappings for ELEGOO # boards. To use this config, the firmware should be compiled for the # stm32f407. When running "make menuconfig", select the 48KiB # bootloader, and enable "Serial for communication" and select the "on USART1 PA10/PA9" # See docs/Config_Reference.md for a description of parameters. [include plr.cfg] [mcu] # The hardware use USART1 PA10/PA9 connect to RK3328 serial: /dev/ttyS0 restart_method: command [stepper_x] step_pin:PC14 dir_pin:PC13 enable_pin:!PC15 microsteps: 16 rotation_distance: 40 full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper endstop_pin:PC0 position_min: -4 position_endstop:-4 position_max: 235 homing_speed:50 homing_retract_dist:5 homing_positive_dir:false step_pulse_duration:0.000002 [stepper_y] step_pin:PB4 dir_pin:PB3 enable_pin:!PB5 microsteps:16 rotation_distance: 40 full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper endstop_pin:PB8 position_min: 0 position_endstop:0 position_max:235 homing_speed:50 homing_retract_dist:5 homing_positive_dir:false step_pulse_duration:0.000002 [stepper_z] step_pin:PC10 dir_pin:!PA15 enable_pin: !PC11 microsteps: 16 rotation_distance: 8 full_steps_per_rotation: 200 endstop_pin:probe:z_virtual_endstop ## PB12 for Z-max; endstop have'!' is NO ## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) ## (+) value = endstop above Z0, (-) value = endstop below ## Increasing position_endstop brings nozzle closer to the bed ## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config #position_endstop:-5 position_max: 268 position_min: -5 homing_speed: 8 second_homing_speed: 3 [extruder] step_pin:PA5 dir_pin:!PA6 enable_pin:!PA4 microsteps:16 rotation_distance: 31.4 #Bondtech 5mm Drive Gears gear_ratio: 52:10 full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree nozzle_diameter: 0.400 filament_diameter: 1.750 min_temp: 0 max_temp: 330 heater_pin: PA7 sensor_type:NTC 100K MGB18-104F39050L32 sensor_pin: PA1 max_power: 1 control :pid pid_kp : 26.213 pid_ki : 1.304 pid_kd : 131.721 pressure_advance: 0.022 pressure_advance_smooth_time: 0.02 instantaneous_corner_velocity: 10.000 max_extrude_only_distance: 150 max_extrude_only_velocity:5000 max_extrude_only_accel:2000 step_pulse_duration:0.000002 max_extrude_cross_section: 50 [heater_bed] heater_pin:PB10 sensor_type: NTC 100K MGB18-104F39050L32 sensor_pin: PA0 max_power: 1.0 control = watermark min_temp: 0 max_temp: 200 [verify_heater heater_bed] max_error: 120 check_gain_time:120 hysteresis: 10 heating_gain: 1 #fan for printed model FAN0 [fan] pin: PC9 #fan for hotend FAN1 [heater_fan fan1] pin: PA8 shutdown_speed: 1 [printer] kinematics:cartesian max_velocity: 500 max_accel: 5000 max_accel_to_decel: 4000 max_z_velocity: 20 max_z_accel: 300 square_corner_velocity: 5.0 [input_shaper] shaper_freq_x: 66.66 shaper_freq_y: 42.05 shaper_type_x: mzv shaper_type_y: ei #################################################################### # Homing and Gantry Adjustment Routines ##################################################################### [idle_timeout] timeout: 36000 [safe_z_home] home_xy_position: 141,98 speed: 100 z_hop: 10 z_hop_speed: 5 [gcode_macro G29] gcode: BED_MESH_CLEAR G28 BED_MESH_CALIBRATE G0 X117 Y126 Z5 F3000 G0 Z0 F300 ##################################################################### # Probe ##################################################################### [probe] pin:^PA11 x_offset: -24.25 y_offset: 20.45 z_offset: 0.0 speed: 10.0 samples: 2 samples_result: median sample_retract_dist: 3.0 samples_tolerance: 0.1 samples_tolerance_retries: 1 [bed_mesh] speed:120 horizontal_move_z:10 mesh_min:10,21 mesh_max:210,211 probe_count:11,11 algorithm:bicubic bicubic_tension:0.2 mesh_pps: 4, 4 fade_start: 1.0 fade_end: 10.0 ##################################################################### # LED Control ##################################################################### [output_pin caselight] pin: PB7 pwm: false shutdown_value:0 value:0.0 [output_pin caselight1] pin: PC7 pwm: false shutdown_value:0 value:0.0 [gcode_macro FLASHLIGHT_ON] description: Turn on Hotend LEDs gcode: SET_PIN PIN=caselight VALUE=1 [gcode_macro FLASHLIGHT_OFF] description: Turn off Hotend LEDs gcode: SET_PIN PIN=caselight VALUE=0 [gcode_macro MODLELIGHT_ON] description: Turn on Logo LEDs gcode: SET_PIN PIN=caselight1 VALUE=1 [gcode_macro MODLELIGHT_OFF] description: Turn off Logo LEDs gcode: SET_PIN PIN=caselight1 VALUE=0 [filament_switch_sensor fila] pause_on_runout: True runout_gcode: SET_FILAMENT_SENSOR SENSOR=fila ENABLE=1 event_delay: 3.0 pause_delay: 0.5 switch_pin: PA12 ######################################## # TMC UART configuration ######################################## [tmc2209 stepper_x] uart_pin: PB9 run_current: 0.8 hold_current: 0.5 interpolate: True stealthchop_threshold:99999 [tmc2209 stepper_y] uart_pin: PD2 run_current: 0.8 hold_current: 0.5 interpolate: True stealthchop_threshold:99999 [tmc2209 stepper_z] uart_pin: PC5 run_current: 0.8 hold_current: 0.5 interpolate: True stealthchop_threshold: 120 [tmc2209 extruder] uart_pin: PC4 run_current: 0.9 hold_current: 0.5 interpolate: True stealthchop_threshold: 400 [mcu rpi] serial: /tmp/klipper_host_mcu [adxl345] cs_pin: rpi:None spi_bus: spidev0.2 [resonance_tester] accel_chip: adxl345 probe_points: 100, 100, 20 # an example [force_move] enable_force_move : true [virtual_sdcard] path: ~/gcode_files [gcode_macro PRINT_START] gcode: SAVE_VARIABLE VARIABLE=was_interrupted VALUE=True G92 E0 BED_MESH_CLEAR G90 BED_MESH_PROFILE LOAD=default CLEAR_PAUSE M117 Printing [gcode_macro PRINT_END] gcode: SAVE_VARIABLE VARIABLE=was_interrupted VALUE=False RUN_SHELL_COMMAND CMD=clear_plr clear_last_file [pause_resume] [gcode_macro CANCEL_PRINT] rename_existing: BASE_CANCEL_PRINT gcode: PRINT_END SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} SDCARD_RESET_FILE M400 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-10.0 F1200 ; retract filament G91 ; relative positioning TURN_OFF_HEATERS M107 ; turn off fan G1 Z2 F3000 ; move nozzle up 2mm G90 ; absolute positioning G0 X0 Y225 F3600 ; park nozzle at rear M84 [gcode_macro PAUSE] rename_existing: BASE_PAUSE gcode: M400 {% set z = params.Z|default(10)|int %} {% set e = params.E|default(2.5) %} SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE={z} SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target} SAVE_GCODE_STATE NAME=PAUSE M25 {% if (printer.gcode_move.position.z + z) < printer.toolhead.axis_maximum.z %} G91 M83 G1 E-{e} F2100 G1 Z{z} F900 {% else %} SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE=0 {% endif %} SAVE_GCODE_STATE NAME=PAUSEPARK G90 G1 X0 Y220 F6000 G1 E{e} F2100 SET_IDLE_TIMEOUT TIMEOUT=86400 [gcode_macro RESUME] rename_existing: BASE_RESUME variable_zhop: 0 variable_etemp: 0 gcode: {% set e = params.E|default(2.5)|int %} SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} G91 M83 G1 E-{e} F900 RESTORE_GCODE_STATE NAME=PAUSEPARK MOVE=1 MOVE_SPEED=100 {% if printer[printer.toolhead.extruder].temperature >= printer.configfile.settings.extruder.min_extrude_temp %} G1 Z{zhop * -1} F900 G1 E{e+0.5} F900 {% else %} G1 Z{zhop * -1} F900 {% endif %} M400 RESTORE_GCODE_STATE NAME=PAUSE MOVE=1 MOVE_SPEED=60 M24 [verify_heater extruder] max_error: 120 check_gain_time:120 hysteresis: 10 heating_gain: 2 [gcode_macro M109] rename_existing: M99109 gcode: #Parameters {% set s = params.S|float %} M104 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %} {% if s != 0 %} TEMPERATURE_WAIT SENSOR=extruder MINIMUM={s-4} MAXIMUM={s+20} {% endif %} [gcode_macro M190] rename_existing: M99190 gcode: {% set s = params.S|float %} {% if params.S is defined %} SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={params.S|int} TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s-4} MAXIMUM={s+10} {% endif %} [display_status] [gcode_macro M84] rename_existing:M84.1 gcode: SET_STEPPER_ENABLE STEPPER=stepper_x enable=0 SET_STEPPER_ENABLE STEPPER=stepper_y enable=0 SET_STEPPER_ENABLE STEPPER=stepper_z enable=0 SET_STEPPER_ENABLE STEPPER=extruder enable=0 SET_KINEMATIC_POSITION [delayed_gcode KINEMATIC_POSITION] initial_duration:0.2 gcode: SET_KINEMATIC_POSITION X=110 SET_KINEMATIC_POSITION Y=110 SET_KINEMATIC_POSITION Z=0 [gcode_macro M205] description: Sets square corner velocity. Usage: M205 [X] [Y] gcode: {% if 'X' in params or 'Y' in params %} SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY="{ (params.X|default(0)|float, params.Y|default(0)|float)|min}" {% else %} SET_VELOCITY_LIMIT {% endif %} [gcode_macro M203] description: Sets maximum velocity. Usage: M203 [X] [Y] gcode: {% if 'X' in params or 'Y' in params %} {% set velocity = (params.X|default(params.Y)|float, params.Y|default(params.X)|float)|min %} SET_VELOCITY_LIMIT VELOCITY="{velocity}" {% else %} SET_VELOCITY_LIMIT {% endif %} [gcode_arcs] #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [bed_mesh default] #*# version = 1 #*# points = #*# -0.171250, -0.132500, -0.090000, -0.045000, -0.005000, 0.023750, 0.043750, 0.043750, 0.043750, 0.028750, 0.021250 #*# -0.240000, -0.163750, -0.111250, -0.067500, -0.023750, 0.000000, 0.017500, 0.020000, 0.023750, 0.017500, -0.026250 #*# -0.242500, -0.195000, -0.150000, -0.111250, -0.077500, -0.050000, -0.041250, -0.035000, -0.040000, -0.041250, -0.041250 #*# -0.241250, -0.156250, -0.115000, -0.076250, -0.028750, -0.003750, 0.013750, 0.025000, 0.008750, 0.006250, -0.033750 #*# -0.260000, -0.215000, -0.173750, -0.128750, -0.085000, -0.051250, -0.043750, -0.041250, -0.057500, -0.061250, -0.055000 #*# -0.257500, -0.173750, -0.135000, -0.096250, -0.043750, -0.011250, -0.001250, -0.003750, -0.017500, -0.032500, -0.066250 #*# -0.272500, -0.217500, -0.185000, -0.141250, -0.093750, -0.071250, -0.057500, -0.048750, -0.066250, -0.082500, -0.078750 #*# -0.278750, -0.180000, -0.146250, -0.113750, -0.071250, -0.045000, -0.033750, -0.021250, -0.038750, -0.048750, -0.082500 #*# -0.341250, -0.258750, -0.208750, -0.170000, -0.132500, -0.101250, -0.087500, -0.077500, -0.078750, -0.086250, -0.077500 #*# -0.361250, -0.227500, -0.181250, -0.150000, -0.110000, -0.088750, -0.073750, -0.058750, -0.065000, -0.072500, -0.113750 #*# -0.381250, -0.277500, -0.235000, -0.202500, -0.165000, -0.135000, -0.117500, -0.100000, -0.096250, -0.105000, -0.113750 #*# tension = 0.2 #*# min_x = 10.0 #*# algo = bicubic #*# y_count = 11 #*# mesh_y_pps = 4 #*# min_y = 21.0 #*# x_count = 11 #*# max_y = 211.0 #*# mesh_x_pps = 4 #*# max_x = 210.0