|
# printer.cfg for ET4000+ board in EasyThreeD X3 |
|
# Original file is https://github.com/makerbase-mks/Klipper-for-MKS-Boards/blob/main/MKS%20Robin%20Lite%20V1.1/generic-mks-robin-lite-v1.cfg |
|
|
|
# This file contains common pin mappings for MKS Robin Lite V1.1 |
|
# boards. To use this config, the firmware should be compiled for the |
|
# STM32F103RCT6. When running "make menuconfig", enable "extra low-level |
|
# configuration setup", select the 28KiB bootloader, and serial (on |
|
# USART1 PA10/PA9) communication. |
|
|
|
# Note that the "make flash" command does not work with MKS Robin |
|
# boards. After running "make", run the following command: |
|
# ./scripts/update_mks_robin.py out/klipper.bin out/mksLite.bin |
|
# Copy the file out/mksLite.bin to an SD card and then restart the |
|
# printer with that SD card. |
|
|
|
# See docs/Config_Reference.md for a description of parameters. |
|
# See klipper/config/sample-multi-mcu.cfg |
|
|
|
[mcu] |
|
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 |
|
restart_method: command |
|
|
|
[mcu uno] |
|
serial: /dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_7583033353835121B0A2-if00 |
|
|
|
[printer] |
|
kinematics: corexy |
|
max_velocity: 80 |
|
max_accel: 2000 |
|
max_z_velocity: 25 |
|
max_z_accel: 100 |
|
|
|
[virtual_sdcard] |
|
path: /home/pi/printer_data/gcodes |
|
|
|
[stepper_x] |
|
step_pin: PC6 |
|
dir_pin: !PB12 |
|
enable_pin: !PB10 |
|
microsteps: 16 |
|
rotation_distance: 40.0 |
|
endstop_pin: !PC13 |
|
position_min: -3 |
|
position_endstop: -3 |
|
position_max: 145 |
|
homing_speed: 30 |
|
|
|
[stepper_y] |
|
step_pin: PB11 |
|
dir_pin: !PB2 |
|
enable_pin: !PB10 |
|
microsteps: 16 |
|
rotation_distance: 40.0 |
|
endstop_pin: !PC0 |
|
position_min: -63 |
|
position_endstop: -63 |
|
position_max: 150 |
|
homing_speed: 30 |
|
|
|
[safe_z_home] |
|
home_xy_position: 0.0,0.0 |
|
speed: 50.0 |
|
z_hop: 0 #move up 10mm |
|
z_hop_speed: 5 |
|
|
|
[stepper_z] |
|
step_pin: PB1 |
|
dir_pin: !PC5 |
|
enable_pin: !PB10 |
|
microsteps: 16 |
|
rotation_distance: 2 |
|
#rotation_distance: 8 # for 8mm lead |
|
endstop_pin: !PC12 #Zmin, Zmax use PB9 |
|
#position_endstop: 0.0 |
|
position_max: 227 |
|
|
|
[extruder] |
|
step_pin: uno:PD2 |
|
dir_pin: uno:PD5 |
|
enable_pin: !uno:PB0 |
|
microsteps: 16 |
|
gear_ratio: 210:100 |
|
rotation_distance: 23.132 |
|
full_steps_per_rotation: 2048 |
|
nozzle_diameter: 0.400 |
|
filament_diameter: 1.750 |
|
heater_pin: PC9 |
|
sensor_type: EPCOS 100K B57560G104F |
|
sensor_pin: PA0 |
|
control: pid |
|
pid_Kp: 20.375 |
|
pid_Ki: 0.844 |
|
pid_Kd: 123.016 |
|
min_temp: 0 |
|
max_temp: 250 |
|
|
|
# [heater_bed] |
|
# heater_pin: PC8 |
|
# sensor_type: EPCOS 100K B57560G104F |
|
# sensor_pin: PA1 |
|
# control: pid |
|
# pid_Kp: 325.10 |
|
# pid_Ki: 63.35 |
|
# pid_Kd: 417.10 |
|
# min_temp: 0 |
|
# max_temp: 130 |
|
|
|
[fan] |
|
pin: PA8 |
|
|
|
[pause_resume] |
|
|
|
[gcode_macro CANCEL_PRINT] |
|
rename_existing: BASE_CANCEL_PRINT |
|
gcode: |
|
TURN_OFF_HEATERS |
|
CLEAR_PAUSE |
|
SDCARD_RESET_FILE |
|
BASE_CANCEL_PRINT |
|
|
|
[gcode_macro PAUSE] |
|
rename_existing: BASE_PAUSE |
|
# change this if you need more or less extrusion |
|
variable_extrude: 1.0 |
|
gcode: |
|
##### read E from pause macro ##### |
|
{% set E = printer["gcode_macro PAUSE"].extrude|float %} |
|
##### set park positon for x and y ##### |
|
# default is your max posion from your printer.cfg |
|
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} |
|
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} |
|
##### calculate save lift position ##### |
|
{% set max_z = printer.toolhead.axis_maximum.z|float %} |
|
{% set act_z = printer.toolhead.position.z|float %} |
|
{% if act_z < (max_z - 2.0) %} |
|
{% set z_safe = 2.0 %} |
|
{% else %} |
|
{% set z_safe = max_z - act_z %} |
|
{% endif %} |
|
##### end of definitions ##### |
|
SAVE_GCODE_STATE NAME=PAUSE_state |
|
BASE_PAUSE |
|
G91 |
|
G1 E-{E} F2100 |
|
G1 Z{z_safe} F900 |
|
G90 |
|
G1 X{x_park} Y{y_park} F6000 |
|
|
|
[gcode_macro RESUME] |
|
rename_existing: BASE_RESUME |
|
gcode: |
|
##### read E from pause macro ##### |
|
{% set E = printer["gcode_macro PAUSE"].extrude|float %} |
|
##### end of definitions ##### |
|
G91 |
|
G1 E{E} F2100 |
|
RESTORE_GCODE_STATE NAME=PAUSE_state |
|
BASE_RESUME |
|
|
|
[display_status] |
|
######################################## |
|
# EXP1 (display) pins |
|
######################################## |
|
|
|
###################################################################### |
|
# Beeper |
|
# M300 : Play tone. Beeper support, as commonly found on usual LCD |
|
# displays (i.e. RepRapDiscount 2004 Smart Controller, RepRapDiscount |
|
# 12864 Full Graphic). This defines a custom I/O pin and a custom |
|
# GCODE macro. Usage: |
|
# M300 [P<ms>] [S<Hz>] |
|
# P is the tone duration, S the tone frequency. |
|
# The frequency won't be pitch perfect. |
|
|
|
[output_pin BEEPER_pin] |
|
pin: PD2 |
|
# Beeper pin. This parameter must be provided. |
|
pwm: True |
|
# A piezo beeper needs a PWM signal, a DC buzzer doesn't. |
|
value: 0 |
|
# Silent at power on, set to 1 if active low. |
|
shutdown_value: 0 |
|
# Disable at emergency shutdown (no PWM would be available anyway). |
|
cycle_time: 0.001 |
|
# Default PWM frequency : 0.001 = 1ms will give a tone of 1kHz |
|
# Although not pitch perfect. |
|
|
|
[gcode_macro M300] |
|
gcode: |
|
# Use a default 1kHz tone if S is omitted. |
|
{% set S = params.S|default(1000)|int %} |
|
# Use a 10ms duration is P is omitted. |
|
{% set P = params.P|default(100)|int %} |
|
SET_PIN PIN=BEEPER_pin VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 } |
|
G4 P{P} |
|
SET_PIN PIN=BEEPER_pin VALUE=0 |
|
|
|
|
|
|
|
[board_pins] |
|
aliases: |
|
# EXP1 header |
|
EXP1_2=<5V>, EXP1_4=<RST>, EXP1_6=PB4, EXP1_8=PB5, EXP1_10=PB15,EXP1_12=<3V3>,EXP1_14=PD2, |
|
EXP1_1=PC3, EXP1_3=PC2, EXP1_5=PB3, EXP1_7=PC1, EXP1_9=PB13,EXP1_11=<GND>,EXP1_13=PA11, |
|
# Pins PB14, EXP1_10, EXP1_9 are also MISO, MOSI, SCK of bus "ssp2" |
|
|
|
# See the MKS Lcd Config path file for definitions of common LCD displays. |
|
|
|
#[include mks_robin_lite_lcd_12864.cfg] |
|
#[include mks_robin_lite_mini_12864.cfg] |
|
|
|
#*# <---------------------- SAVE_CONFIG ----------------------> |
|
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. |
|
#*# |
|
#*# [stepper_z] |
|
#*# position_endstop = 0.010 |