Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Desuuuu 2021-04-06 00:08:05 +02:00
commit 10bceefbf9
No known key found for this signature in database
GPG Key ID: 85943F4B2C2CE0DC
218 changed files with 33381 additions and 3021 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
patreon: koconnor

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Directions
url: https://www.klipper3d.org/Contact.html
about: Have a question? Need help? Start here.
- name: Klipper Forum
url: https://community.klipper3d.org/
about: Klipper community Discourse server.
- name: Klipper Chat
url: https://discord.klipper3d.org/
about: Klipper community Discord chat server.

6
.github/ISSUE_TEMPLATE/custom.md vendored Normal file
View File

@ -0,0 +1,6 @@
---
name: Create a Klipper github issue
about: Working on improving Klipper? Provide an update on your work here.
---
<!-- Do not open this ticket without first following the directions at:
https://www.klipper3d.org/Contact.html -->

View File

@ -0,0 +1,39 @@
# Enable the github stale issue bot tracker
name: "Add comment to issues marked invalid"
on:
issues:
types: [labeled]
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
if (context.payload.label.name != "invalid")
return;
msg = "Unfortunately, it appears the directions at"
+ " https://www.klipper3d.org/Contact.html"
+ " were not followed for this issue.\n"
+ "\n"
+ "We use github to share the results of work done to"
+ " improve Klipper. We don't use github for requests."
+ " (In particular, we don't use github for feature"
+ " requests, to answer questions, nor to help diagnose"
+ " problems with a printer.)"
+ "\n"
+ "In the future, please follow the directions at:"
+ " https://www.klipper3d.org/Contact.html\n"
+ "This ticket will be automatically closed.\n"
+ "\n"
+ "Best regards,\n"
+ "~ Your friendly GitIssueBot\n"
+ "\n"
+ "PS: I'm just an automated script, not a human being.";
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: msg
})

View File

@ -2,7 +2,7 @@
name: "Close stale issues"
on:
schedule:
- cron: "0 0 * * *"
- cron: '0 0 * * *'
jobs:
stale:
runs-on: ubuntu-latest
@ -29,3 +29,14 @@ jobs:
exempt-issue-labels: 'enhancement,bug'
days-before-stale: 21
days-before-close: 7
invalid:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: invalid
stale-pr-label: invalid
days-before-stale: -1
days-before-close: 2
remove-stale-when-updated: false

View File

@ -8,46 +8,46 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar3
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
[stepper_y]
step_pin: ar60
dir_pin: !ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar14
endstop_pin: ^PJ1
position_endstop: 0
position_max: 200
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar18
endstop_pin: ^PD3
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.500
filament_diameter: 3.500
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -56,16 +56,15 @@ min_temp: 0
max_temp: 210
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 110
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: cartesian

View File

@ -8,48 +8,48 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar3
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar14
endstop_pin: ^PJ1
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar18
endstop_pin: ^PD3
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -58,19 +58,18 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: corexy

View File

@ -7,48 +7,48 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar3
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar14
endstop_pin: ^PJ1
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar18
endstop_pin: ^PD3
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -57,19 +57,18 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: corexz

View File

@ -7,43 +7,43 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_a]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar2
endstop_pin: ^PE4
homing_speed: 50
position_endstop: 297.05
arm_length: 333.0
[stepper_b]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar15
endstop_pin: ^PJ0
[stepper_c]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar19
endstop_pin: ^PD2
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -52,16 +52,15 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 130
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: delta

View File

@ -7,44 +7,44 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_bed]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
gear_ratio: 80:16
[stepper_arm]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar14
endstop_pin: ^PJ1
position_endstop: 300
position_max: 300
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar18
endstop_pin: ^PD3
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -53,19 +53,18 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: polar

View File

@ -7,44 +7,44 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_a]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
gear_ratio: 107.000:16, 60:16
endstop_pin: ^ar2
endstop_pin: ^PE4
homing_speed: 50
position_endstop: 252
upper_arm_length: 170.000
lower_arm_length: 320.000
[stepper_b]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
gear_ratio: 107.000:16, 60:16
endstop_pin: ^ar15
endstop_pin: ^PJ0
[stepper_c]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
gear_ratio: 107.000:16, 60:16
endstop_pin: ^ar19
endstop_pin: ^PD2
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -53,16 +53,15 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 130
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: rotary_delta

View File

@ -11,9 +11,9 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_a]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
anchor_x: 0
@ -21,9 +21,9 @@ anchor_y: -2000
anchor_z: -100
[stepper_b]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
anchor_x: 2000
@ -31,9 +31,9 @@ anchor_y: 1000
anchor_z: -100
[stepper_c]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 40
anchor_x: -2000
@ -41,9 +41,9 @@ anchor_y: 1000
anchor_z: -100
[stepper_d]
step_pin: ar36
dir_pin: ar34
enable_pin: !ar30
step_pin: PC1
dir_pin: PC3
enable_pin: !PC7
microsteps: 16
rotation_distance: 40
anchor_x: 0
@ -51,16 +51,16 @@ anchor_y: 0
anchor_z: 3000
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -69,16 +69,15 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 130
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: winch

View File

@ -94,8 +94,15 @@ pin: PE6 # FAN1
#[heater_fan fan2]
#pin: PC8 # FAN2
[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
[temperature_sensor k_therm]
sensor_type: MAX31855
sensor_pin: PH9
spi_bus: spi2b
[mcu]
baud: 250000
restart_method: command
serial: dev/serial0
# setup for PA9, PA10 USART1_tx / rx directly connected to the RPI GPIO TX / RX pins

View File

@ -1,8 +1,8 @@
# This file contains common pin mappings for the BIGTREETECH SKR E3
# DIP. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PC13".
# STM32F103 with a "28KiB bootloader" and USB communication. Also,
# select "Enable extra low-level configuration options" and configure
# "GPIO pins to set at micro-controller startup" to "!PC13".
# The "make flash" command does not work on the SKR E3 DIP. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a

View File

@ -1,8 +1,8 @@
# This file contains common pin mappings for the BIGTREETECH SKR mini
# E3. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PC13".
# STM32F103 with a "28KiB bootloader" and USB communication. Also,
# select "Enable extra low-level configuration options" and configure
# "GPIO pins to set at micro-controller startup" to "!PC13".
# The "make flash" command does not work on the SKR mini E3. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a

View File

@ -1,8 +1,8 @@
# This file contains common pin mappings for the BIGTREETECH SKR mini
# E3 v1.2. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PC13".
# STM32F103 with a "28KiB bootloader" and USB communication. Also,
# select "Enable extra low-level configuration options" and configure
# "GPIO pins to set at micro-controller startup" to "!PC13".
# The "make flash" command does not work on the SKR mini E3. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a

View File

@ -1,8 +1,8 @@
# This file contains common pin mappings for the BIGTREETECH SKR mini
# E3 v2.0. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PA14".
# STM32F103 with a "28KiB bootloader" and USB communication. Also,
# select "Enable extra low-level configuration options" and configure
# "GPIO pins to set at micro-controller startup" to "!PA14".
# The "make flash" command does not work on the SKR mini E3. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a

View File

@ -1,8 +1,8 @@
# This file contains common pin mappings for the BIGTREETECH SKR mini
# MZ v1.0. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PA14".
# STM32F103 with a "28KiB bootloader" and USB communication. Also,
# select "Enable extra low-level configuration options" and configure
# "GPIO pins to set at micro-controller startup" to "!PA14".
# The "make flash" command does not work on the SKR mini MZ. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a

View File

@ -1,6 +1,6 @@
# This file contains common pin mappings for the BIGTREETECH SKR
# MINI. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader".
# STM32F103 with a "28KiB bootloader" and USB communication.
# The "make flash" command does not work on the SKR mini. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a

View File

@ -11,46 +11,46 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: P8_13
dir_pin: P8_12
enable_pin: !P9_14
step_pin: gpio0_23
dir_pin: gpio1_12
enable_pin: !gpio1_18
microsteps: 16
rotation_distance: 40
endstop_pin: ^P8_8
endstop_pin: ^gpio2_3
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: P8_15
dir_pin: P8_14
enable_pin: !P9_14
step_pin: gpio1_15
dir_pin: gpio0_26
enable_pin: !gpio1_18
microsteps: 16
rotation_distance: 40
endstop_pin: ^P8_10
endstop_pin: ^gpio2_4
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: P8_19
dir_pin: P8_18
enable_pin: !P9_14
step_pin: gpio0_22
dir_pin: gpio2_1
enable_pin: !gpio1_18
microsteps: 16
rotation_distance: 8
endstop_pin: ^P9_13
endstop_pin: ^gpio0_31
position_endstop: 0
position_max: 200
[extruder]
step_pin: P9_16
dir_pin: P9_12
enable_pin: !P9_14
step_pin: gpio1_19
dir_pin: gpio1_28
enable_pin: !gpio1_18
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: P9_15
heater_pin: gpio1_16
sensor_type: EPCOS 100K B57560G104F
pullup_resistor: 2000
sensor_pin: host:analog5
@ -62,7 +62,7 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: P8_11
heater_pin: gpio1_13
sensor_type: EPCOS 100K B57560G104F
pullup_resistor: 2000
sensor_pin: host:analog4
@ -71,11 +71,10 @@ min_temp: 0
max_temp: 130
[fan]
pin: P9_41
pin: gpio0_20
[mcu]
serial: /dev/rpmsg_pru30
pin_map: beaglebone
[mcu host]
serial: /tmp/klipper_host_mcu
@ -88,6 +87,6 @@ max_z_velocity: 5
max_z_accel: 100
[output_pin machine_enable]
pin: P9_23
pin: gpio1_17
value: 1
shutdown_value: 0

View File

@ -1,11 +1,11 @@
# This file contains pin mappings for the Creality "v4.2.7" board. To
# use this config, during "make menuconfig" select the STM32F103 with
# a "28KiB bootloader" and with "Use USB for communication" disabled.
# a "28KiB bootloader" and serial (on USART1 PA10/PA9) communication.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select the
# USART3 serial port, which is broken out on the 10 pin IDC cable used
# for the LCD module as follows:
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and

View File

@ -1,7 +1,7 @@
# This file contains common pin mappings for the Fysetc Cheetah v1.1
# board. To use this config, the firmware should be compiled for the
# STM32F103 with "No bootloader" and with "Use USB for communication"
# disabled.
# STM32F103 with "No bootloader" and serial (on USART1 PA10/PA9)
# communication.
# The "make flash" command does not work on the Cheetah. Instead,
# after running "make", run the following command to flash the board:

View File

@ -1,7 +1,7 @@
# This file contains common pin mappings for the Fysetc Cheetah v1.2b
# board. To use this config, the firmware should be compiled for the
# STM32F103 with "No bootloader" and with "Use USB for communication"
# disabled.
# STM32F103 with "No bootloader" and serial (on USART1 PA10/PA9)
# communication.
# The "make flash" command does not work on the Cheetah. Instead,
# after running "make", run the following command to flash the board:

View File

@ -5,49 +5,49 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar25
dir_pin: ar23
enable_pin: !ar27
step_pin: PA3
dir_pin: PA1
enable_pin: !PA5
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar22
endstop_pin: ^PA0
position_endstop: 0
position_max: 200
homing_speed: 30
[stepper_y]
step_pin: ar31
dir_pin: ar33
enable_pin: !ar29
step_pin: PC6
dir_pin: PC4
enable_pin: !PA7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar26
endstop_pin: ^PA4
position_endstop: 0
position_max: 200
homing_speed: 30
[stepper_z]
step_pin: ar37
dir_pin: !ar39
enable_pin: !ar35
step_pin: PC0
dir_pin: !PG2
enable_pin: !PC2
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar30
endstop_pin: ^PC7
position_endstop: 0
position_max: 200
position_min: 0.0
[extruder]
step_pin: ar43
dir_pin: ar45
enable_pin: !ar41
step_pin: PL6
dir_pin: PL4
enable_pin: !PG0
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.4
filament_diameter: 1.750
heater_pin: ar2
heater_pin: PE4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog8
sensor_pin: PK0
min_temp: 0
max_temp: 250
control: pid
@ -56,9 +56,9 @@ pid_ki: 1.774
pid_kd: 125.159
[heater_bed]
heater_pin: ar4
heater_pin: PG5
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog10
sensor_pin: PK2
min_temp: 0
max_temp: 120
control: pid
@ -67,11 +67,10 @@ pid_ki: 2.898
pid_kd: 342.787
[fan]
pin: ar7
pin: PH4
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
@ -82,11 +81,11 @@ max_z_accel: 500
[display]
lcd_type: hd44780
rs_pin: ar20
e_pin: ar17
d4_pin: ar16
d5_pin: ar21
d6_pin: ar5
d7_pin: ar6
encoder_pins: ^ar42, ^ar40
click_pin: ^!ar19
rs_pin: PD1
e_pin: PH0
d4_pin: PH1
d5_pin: PD0
d6_pin: PE3
d7_pin: PH3
encoder_pins: ^PL7, ^PG1
click_pin: ^!PD2

View File

@ -1,8 +1,8 @@
# This file contains common pin mappings for MKS Robin E3 boards. To
# use this config, the firmware should be compiled for the STM32F103.
# When running "make menuconfig", enable "extra low-level
# configuration setup", select the 20KiB bootloader, disable "USB for
# communication", and select USART1 for the "Serial Port".
# configuration setup", select the 20KiB 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:

View File

@ -1,8 +1,8 @@
# This file contains common pin mappings for MKS Robin Nano (v1.2.004)
# boards. To use this config, the firmware should be compiled for the
# STM32F103. When running "make menuconfig", enable "extra low-level
# configuration setup", select the 28KiB bootloader, disable "USB for
# communication", and select USART3 for the "Serial Port".
# configuration setup", select the 28KiB bootloader, and serial (on
# USART3 PB11/PB10) communication.
# Note that the "make flash" command does not work with MKS Robin
# boards. After running "make", run the following command:

View File

@ -0,0 +1,112 @@
# This file contains common pin mappings for MKS Robin Nano V2
# boards. To use this config, the firmware should be compiled for the
# STM32F103. When running "make menuconfig", enable "extra low-level
# configuration setup", select the 28KiB bootloader, and serial (on
# USART3 PB11/PB10) 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/Robin_nano35.bin
# Copy the file out/Robin_nano35.bin to an SD card and then restart the
# printer with that SD card.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PE3
dir_pin: !PE2
enable_pin: !PE4
microsteps: 16
rotation_distance: 40
endstop_pin: PA15
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_y]
step_pin: PE0
dir_pin: !PB9
enable_pin: !PE1
microsteps: 16
rotation_distance: 40
endstop_pin: !PA12
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_z]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
microsteps: 16
rotation_distance: 8
endstop_pin: !PA11
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC3
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC1
control: pid
pid_Kp: 14.669
pid_Ki: 0.572
pid_Kd: 94.068
min_temp: 0
max_temp: 250
#[extruder1]
#step_pin: PD15
#dir_pin: !PA1
#enable_pin: !PA3
#heater_pin: PB0
#sensor_pin: PC2
#...
[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
pid_Kp: 325.10
pid_Ki: 63.35
pid_Kd: 417.10
min_temp: 0
max_temp: 130
[fan]
pin: PB1
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 250
max_accel: 4500
max_z_velocity: 25
max_z_accel: 100
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_2=PE13, EXP1_4=PC6, EXP1_6=PE15, EXP1_8=PD10, EXP1_10=<5V>,
EXP1_1=PC5, EXP1_3=PD13, EXP1_5=PE14, EXP1_7=PD11, EXP1_9=<GND>,
# EXP2 header
EXP2_2=PA5, EXP2_4=PE0, EXP2_6=PE10, EXP2_8=<RST>, EXP2_10=<3.3v>,
EXP2_1=PA6, EXP2_3=PE8, EXP2_5=PE11, EXP2_7=PE12, EXP2_9=<GND>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp1"
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@ -0,0 +1,110 @@
# This file contains common pin mappings for MKS Robin Nano V3
# boards. To use this config, the firmware should be compiled for the
# stm32f407. When running "make menuconfig", select the 48KiB
# bootloader, and enable "USB for communication".
# The "make flash" command does not work on the MKS Robin. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "Robin_nano_v3.bin" on an SD card and then restart the
# MKS Robin with that SD card.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PE3
dir_pin: !PE2
enable_pin: !PE4
microsteps: 16
rotation_distance: 40
endstop_pin: PA15
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_y]
step_pin: PE0
dir_pin: !PB9
enable_pin: !PE1
microsteps: 16
rotation_distance: 40
endstop_pin: !PD2
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_z]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
microsteps: 16
rotation_distance: 8
endstop_pin: !PC8
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PE5
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC1
control: pid
pid_Kp: 14.669
pid_Ki: 0.572
pid_Kd: 94.068
min_temp: 0
max_temp: 250
#[extruder1]
#step_pin: PD15
#dir_pin: !PA1
#enable_pin: !PA3
#heater_pin: PB0
#sensor_pin: PA2
#...
[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
pid_Kp: 325.10
pid_Ki: 63.35
pid_Kd: 417.10
min_temp: 0
max_temp: 130
[fan]
pin: PC14 # fan1
#pin: PB1 # fan2
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_000000000000000000000000-if00
[printer]
kinematics: cartesian
max_velocity: 250
max_accel: 4500
max_z_velocity: 25
max_z_accel: 100
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PC5, EXP1_3=PD13, EXP1_5=PE14, EXP1_7=PD11, EXP1_9=<GND>,
EXP1_2=PE13, EXP1_4=PC6, EXP1_6=PE15, EXP1_8=PD10, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_3=PE8, EXP2_5=PE11, EXP2_7=PE12, EXP2_9=<GND>,
EXP2_2=PA5, EXP2_4=PE10, EXP2_6=PA7, EXP2_8=<RST>, EXP2_10=<3.3v>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp1"
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@ -0,0 +1,143 @@
# This file contains common pin mappings for MKS RUMBA32 boards. To use
# this config, the firmware should be compiled for the STMicroelectronics STM32,
# Processor model STM32F446, Clock Reference 12 MHz crystal.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PA0
dir_pin: PC15
enable_pin: !PC11
microsteps: 16
rotation_distance: 40
endstop_pin: ^PB12
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: PE5
dir_pin: !PE6
enable_pin: !PE3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PB15
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: PE1
dir_pin: PE2
enable_pin: !PB7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PD9
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: PB5
dir_pin: PB6
enable_pin: !PC12
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC6
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
#[extruder1]
#step_pin: PD6
#dir_pin: PD7
#enable_pin: !PD4
#heater_pin: PC7
#sensor_pin: PC3
#...
#[extruder2]
#step_pin: PD2
#dir_pin: PD3
#enable_pin: !PD0
#heater_pin: PC8
#sensor_pin: PC2
#...
[heater_bed]
heater_pin: PA1
sensor_type: NTC 100K beta 3950
sensor_pin: PC0
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PC9
#[heater_fan fan1]
#pin: PA8
[mcu]
serial: /dev/ttyACM0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PE8, EXP1_3=PE9, EXP1_5=PE12, EXP1_7=PE14, EXP1_9=<GND>,
EXP1_2=PE7, EXP1_4=PE10, EXP1_6=PE13, EXP1_8=PE15, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_3=PB2, EXP2_5=PB1, EXP2_7=PB0, EXP2_9=<GND>,
EXP2_2=PA5, EXP2_4=PA2, EXP2_6=PA7, EXP2_8=<RST>, EXP2_10=PC5
# See the sample-lcd.cfg file for definitions of common LCD displays.
########################################
# TMC2209 configuration
########################################
#[tmc2209 stepper_x]
#uart_pin: PC14
##tx_pin: PA3
#run_current: 0.800
#hold_current: 0.800
#diag_pin:
#[tmc2209 stepper_y]
#uart_pin: PE4
##tx_pin: PA4
#run_current: 0.800
#hold_current: 0.800
#diag_pin:
#[tmc2209 stepper_z]
#uart_pin: PE0
##tx_pin: PD13
#run_current: 0.800
#hold_current: 0.800
#diag_pin:
#[tmc2209 extruder]
#uart_pin: PC13
##tx_pin: PD14
#run_current: 0.600
#diag_pin:

View File

@ -4,55 +4,55 @@
# See docs/Config_Reference.md for a description of parameters.
# Temp sensor pins: analog0..analog4
# Mosfet Pins: ar7 (Heatbed), ar8, ar9, ar11, ar12, ar13
# Temp sensor pins: PA16..PA6
# Mosfet Pins: PC23 (Heatbed), PC22, PC21, PD7, PD8, PB27
[stepper_x]
step_pin: ar24
dir_pin: ar23
enable_pin: ar26
step_pin: PA15
dir_pin: PA14
enable_pin: PD1
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar28
#endstop_pin: ^ar34
endstop_pin: ^PD3
#endstop_pin: ^PC2
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: ar17
dir_pin: !ar16
enable_pin: ar22
step_pin: PA12
dir_pin: !PA13
enable_pin: PB26
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar30
#endstop_pin: ^ar36
endstop_pin: ^PD9
#endstop_pin: ^PC4
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: ar2
dir_pin: ar3
enable_pin: ar15
step_pin: PB25
dir_pin: PC28
enable_pin: PD5
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar32
#endstop_pin: ^ar38
endstop_pin: ^PD10
#endstop_pin: ^PC6
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: analog7
dir_pin: analog6
enable_pin: analog8
step_pin: PA2
dir_pin: PA3
enable_pin: PB17
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar13
heater_pin: PB27
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog0
sensor_pin: PA16
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -61,32 +61,31 @@ min_temp: 0
max_temp: 250
#[extruder1]
#step_pin: analog10
#dir_pin: analog9
#enable_pin: analog11
#step_pin: PB19
#dir_pin: PB18
#enable_pin: PB20
#[extruder2]
#step_pin: ar51
#dir_pin: ar53
#enable_pin: ar49
#step_pin: PC12
#dir_pin: PB14
#enable_pin: PC14
[heater_bed]
heater_pin: ar7
heater_pin: PC23
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog1
sensor_pin: PA24
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: ar9
pin: PC21
#[heater_fan nozzle_cooling_fan]
#pin: ar8
#pin: PC22
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: cartesian
@ -98,18 +97,18 @@ max_z_accel: 100
# "RepRapDiscount 2004 Smart Controller" type displays
#[display]
#lcd_type: hd44780
#rs_pin: ar42
#e_pin: ar43
#d4_pin: ar44
#d5_pin: ar45
#d6_pin: ar46
#d7_pin: ar47
#encoder_pins: ^ar52, ^ar50
#click_pin: ^!ar48
#rs_pin: PA19
#e_pin: PA20
#d4_pin: PC19
#d5_pin: PC18
#d6_pin: PC17
#d7_pin: PC16
#encoder_pins: ^PB21, ^PC13
#click_pin: ^!PC15
# "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays
#[display]
#lcd_type: st7920
#cs_pin: ar42
#sclk_pin: ar44
#sid_pin: ar43
#cs_pin: PA19
#sclk_pin: PC19
#sid_pin: PA20

View File

@ -1,55 +1,55 @@
# This file contains common pin mappings for RAMPS (v1.3 and later)
# boards. RAMPS boards typically use a firmware compiled for the AVR
# atmega2560 (though other AVR chips are also possible).
# atmega2560 (though the atmega1280 is also possible).
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar3
#endstop_pin: ^ar2
endstop_pin: ^PE5
#endstop_pin: ^PE4
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: !ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar14
#endstop_pin: ^ar15
endstop_pin: ^PJ1
#endstop_pin: ^PJ0
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar18
#endstop_pin: ^ar19
endstop_pin: ^PD3
#endstop_pin: ^PD2
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -58,27 +58,26 @@ min_temp: 0
max_temp: 250
#[extruder1]
#step_pin: ar36
#dir_pin: ar34
#enable_pin: !ar30
#heater_pin: ar9
#sensor_pin: analog15
#step_pin: PC1
#dir_pin: PC3
#enable_pin: !PC7
#heater_pin: PH6
#sensor_pin: PK7
#...
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: cartesian
@ -91,12 +90,12 @@ max_z_accel: 100
[board_pins]
aliases:
# Common EXP1 header found on many "all-in-one" ramps clones
EXP1_1=ar37, EXP1_3=ar17, EXP1_5=ar23, EXP1_7=ar27, EXP1_9=<GND>,
EXP1_2=ar35, EXP1_4=ar16, EXP1_6=ar25, EXP1_8=ar29, EXP1_10=<5V>,
EXP1_1=PC0, EXP1_3=PH0, EXP1_5=PA1, EXP1_7=PA5, EXP1_9=<GND>,
EXP1_2=PC2, EXP1_4=PH1, EXP1_6=PA3, EXP1_8=PA7, EXP1_10=<5V>,
# EXP2 header
EXP2_1=ar50, EXP2_3=ar31, EXP2_5=ar33, EXP2_7=ar49, EXP2_9=<GND>,
EXP2_2=ar52, EXP2_4=ar53, EXP2_6=ar51, EXP2_8=ar41, EXP2_10=<RST>
EXP2_1=PB3, EXP2_3=PC6, EXP2_5=PC4, EXP2_7=PL0, EXP2_9=<GND>,
EXP2_2=PB1, EXP2_4=PB0, EXP2_6=PB2, EXP2_8=PG0, EXP2_10=<RST>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi"
# Note, some boards wire: EXP2_8=<RST>, EXP2_10=ar41
# Note, some boards wire: EXP2_8=<RST>, EXP2_10=PG0
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@ -15,7 +15,6 @@
[mcu]
serial: /dev/rpmsg_pru30
pin_map: beaglebone
[mcu host]
serial: /tmp/klipper_host_mcu
@ -33,34 +32,34 @@ stepper_e_microstep_mode: 16
stepper_e_current: 0.5
[stepper_x]
step_pin: P8_17
dir_pin: P8_26
step_pin: gpio0_27
dir_pin: gpio1_29
enable_pin: replicape:stepper_x_enable
microsteps: 16
rotation_distance: 40
endstop_pin: ^P9_25
endstop_pin: ^gpio3_21
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: P8_12
dir_pin: P8_19
step_pin: gpio1_12
dir_pin: gpio0_22
enable_pin: replicape:stepper_y_enable
microsteps: 16
rotation_distance: 40
endstop_pin: ^P9_23
endstop_pin: ^gpio1_17
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: P8_13
dir_pin: P8_14
step_pin: gpio0_23
dir_pin: gpio0_26
enable_pin: replicape:stepper_z_enable
microsteps: 16
rotation_distance: 8
endstop_pin: ^P9_13
endstop_pin: ^gpio0_31
position_endstop: 0
position_max: 200
@ -72,8 +71,8 @@ max_z_velocity: 25
max_z_accel: 30
[extruder]
step_pin: P9_12
dir_pin: P8_15
step_pin: gpio1_28
dir_pin: gpio1_15
enable_pin: replicape:stepper_e_enable
microsteps: 16
rotation_distance: 33.500
@ -101,7 +100,7 @@ max_temp: 130
pin: replicape:power_fan0
# The alternative servo pins channels on the endstops x2 and y2 can be used
# via the special relicape pins servo0 (P9_14) and servo1 (P9_16).
# via the special relicape pins servo0 (gpio1_18) and servo1 (gpio1_19).
#[servo servo_x2]
#pin: replicape:servo0
# PWM output pin controlling the servo. This parameter must be
@ -116,16 +115,16 @@ pin: replicape:power_fan0
[board_pins]
aliases:
# step/dir pins
X_DIR=P8_26, X_STEP=P8_17, Y_DIR=P8_19, Y_STEP=P8_12, Z_DIR=P8_14, Z_STEP=P8_13,
E_DIR=P8_15, E_STEP=P9_12, H_DIR=P8_16, H_STEP=P8_11,
X_DIR=gpio1_29, X_STEP=gpio0_27, Y_DIR=gpio0_22, Y_STEP=gpio1_12, Z_DIR=gpio0_26, Z_STEP=gpio0_23,
E_DIR=gpio1_15, E_STEP=gpio1_28, H_DIR=gpio1_14, H_STEP=gpio1_13,
# stepper fault pins
FAULT_X=P8_10, FAULT_Y=P8_9, FAULT_Z=P9_24, FAULT_E=P8_18, FAULT_H=P8_8,
FAULT_X=gpio2_4, FAULT_Y=gpio2_5, FAULT_Z=gpio0_15, FAULT_E=gpio2_1, FAULT_H=gpio2_3,
# endstops
STOP_X1=P9_25, STOP_X2=P9_11, STOP_Y1=P9_23, STOP_Y2=P9_28, STOP_Z1=P9_13, STOP_Z2=P9_18,
STOP_X1=gpio3_21, STOP_X2=gpio0_30, STOP_Y1=gpio1_17, STOP_Y2=gpio3_17, STOP_Z1=gpio0_31, STOP_Z2=gpio0_4,
# enable steppers (all on one pin)
STEPPER_ENABLE=P9_41,
STEPPER_ENABLE=gpio0_20,
# servos
SERVO_0=P9_14, SERVO_1=P9_16,
SERVO_0=gpio1_18, SERVO_1=gpio1_19,
[board_pins host]
mcu: host

View File

@ -4,51 +4,51 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar17
dir_pin: ar16
enable_pin: !ar48
step_pin: PH0
dir_pin: PH1
enable_pin: !PL1
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar37
#endstop_pin: ^ar36
endstop_pin: ^PC0
#endstop_pin: ^PC1
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: ar54
dir_pin: !ar47
enable_pin: !ar55
step_pin: PF0
dir_pin: !PL2
enable_pin: !PF1
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar35
#endstop_pin: ^ar34
endstop_pin: ^PC2
#endstop_pin: ^PC3
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: ar57
dir_pin: ar56
enable_pin: !ar62
step_pin: PF3
dir_pin: PF2
enable_pin: !PK0
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar33
#endstop_pin: ^ar32
endstop_pin: ^PC4
#endstop_pin: ^PC5
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: ar23
dir_pin: ar22
enable_pin: !ar24
step_pin: PA1
dir_pin: PA0
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar2
heater_pin: PE4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog15
sensor_pin: PK7
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -57,38 +57,37 @@ min_temp: 0
max_temp: 250
#[extruder1]
#step_pin: ar26
#dir_pin: ar25
#enable_pin: !ar27
#heater_pin: ar3
#sensor_pin: analog14
#step_pin: PA4
#dir_pin: PA3
#enable_pin: !PA5
#heater_pin: PE5
#sensor_pin: PK6
#...
#[extruder2]
#step_pin: ar29
#dir_pin: ar28
#enable_pin: !ar39
#heater_pin: ar6
#sensor_pin: analog13
#step_pin: PA7
#dir_pin: PA6
#enable_pin: !PG2
#heater_pin: PH3
#sensor_pin: PK5
#...
[heater_bed]
heater_pin: ar9
heater_pin: PH6
sensor_type: NTC 100K beta 3950
sensor_pin: analog11
sensor_pin: PK3
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: ar7
pin: PH4
#[heater_fan fan1]
#pin: ar8
#pin: PH5
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: cartesian
@ -100,20 +99,20 @@ max_z_accel: 100
# "RepRapDiscount 2004 Smart Controller" type displays
#[display]
#lcd_type: hd44780
#rs_pin: ar19
#e_pin: ar42
#d4_pin: ar18
#d5_pin: ar38
#d6_pin: ar41
#d7_pin: ar40
#encoder_pins: ^ar11, ^ar12
#click_pin: ^!ar43
#rs_pin: PD2
#e_pin: PL7
#d4_pin: PD3
#d5_pin: PD7
#d6_pin: PG0
#d7_pin: PG1
#encoder_pins: ^PB5, ^PB6
#click_pin: ^!PL6
# "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays
#[display]
#lcd_type: st7920
#cs_pin: ar19
#sclk_pin: ar18
#sid_pin: ar42
#encoder_pins: ^ar11, ^ar12
#click_pin: ^!ar43
#cs_pin: PD2
#sclk_pin: PD3
#sid_pin: PL7
#encoder_pins: ^PB5, ^PB6
#click_pin: ^!PL6

View File

@ -8,52 +8,52 @@
[stepper_x]
# Pins: PA5, PA4, PA1
step_pin: ar29
dir_pin: ar28
enable_pin: ar25
step_pin: PA5
dir_pin: PA4
enable_pin: PA1
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar0
endstop_pin: ^PB0
position_min: -0.25
position_endstop: 0
position_max: 200
[stepper_y]
# Pins: PA3, PA2
step_pin: ar27
dir_pin: ar26
enable_pin: ar25
step_pin: PA3
dir_pin: PA2
enable_pin: PA1
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar1
endstop_pin: ^PB1
position_min: -0.25
position_endstop: 0
position_max: 200
[stepper_z]
# Pins: PC7, PC6
step_pin: ar23
dir_pin: ar22
enable_pin: ar25
step_pin: PC7
dir_pin: PC6
enable_pin: PA1
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar2
endstop_pin: ^PB2
position_min: 0.1
position_endstop: 0.5
position_max: 200
[extruder]
# Pins: PC3, PC2
step_pin: ar19
dir_pin: ar18
enable_pin: ar25
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: ar4
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog7
sensor_pin: PA7
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -63,19 +63,18 @@ min_extrude_temp: 0
max_temp: 210
[heater_bed]
heater_pin: ar3
heater_pin: PB3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog0
sensor_pin: PA0
control: watermark
min_temp: 0
max_temp: 110
[fan]
pin: ar14
pin: PD6
[mcu]
serial: /tmp/pseudoserial
pin_map: arduino
[printer]
kinematics: cartesian

View File

@ -5,49 +5,49 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar25
dir_pin: !ar23
enable_pin: !ar27
step_pin: PA3
dir_pin: !PA1
enable_pin: !PA5
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar22
endstop_pin: ^!PA0
position_endstop: 0
position_max: 230
homing_speed: 50.0
[stepper_y]
step_pin: ar32
dir_pin: ar33
enable_pin: !ar31
step_pin: PC5
dir_pin: PC4
enable_pin: !PC6
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar26
endstop_pin: ^!PA4
position_endstop: 225
position_max: 225
homing_speed: 50.0
[stepper_z]
step_pin: ar35
dir_pin: !ar36
enable_pin: !ar34
step_pin: PC2
dir_pin: !PC1
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar29
endstop_pin: ^!PA7
position_endstop: 215
position_max: 215
homing_speed: 20.0
[extruder]
step_pin: ar42
dir_pin: ar43
enable_pin: !ar37
step_pin: PL7
dir_pin: PL6
enable_pin: !PC0
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 2.850
heater_pin: ar2
heater_pin: PE4
sensor_type: PT100 INA826
sensor_pin: analog8
sensor_pin: PK0
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -57,16 +57,16 @@ max_temp: 275
# Dual extruder support.
#[extruder1]
#step_pin: ar49
#dir_pin: ar47
#enable_pin: !ar48
#step_pin: PL0
#dir_pin: PL2
#enable_pin: !PL1
#microsteps: 16
#rotation_distance: 33.500
#nozzle_diameter: 0.400
#filament_diameter: 2.850
#heater_pin: ar3
#heater_pin: PE5
#sensor_type: PT100 INA826
#sensor_pin: analog9
#sensor_pin: PK1
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
@ -75,19 +75,18 @@ max_temp: 275
#max_temp: 275
[heater_bed]
heater_pin: ar4
heater_pin: PG5
sensor_type: PT100 INA826
sensor_pin: analog10
sensor_pin: PK2
control: watermark
min_temp: 0
max_temp: 100
[fan]
pin: ar7
pin: PH4
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: cartesian
@ -97,12 +96,12 @@ max_z_velocity: 25
max_z_accel: 30
[output_pin case_light]
pin: ar8
pin: PH5
static_value: 1.0
# Motor current settings.
[output_pin stepper_xy_current]
pin: ar44
pin: PL5
pwm: True
scale: 1.5
# Max power setting.
@ -112,7 +111,7 @@ static_value: 1.200
# Power adjustment setting.
[output_pin stepper_z_current]
pin: ar45
pin: PL4
pwm: True
scale: 1.5
cycle_time: .000030
@ -120,7 +119,7 @@ hardware_pwm: True
static_value: 1.200
[output_pin stepper_e_current]
pin: ar46
pin: PL3
pwm: True
scale: 1.5
cycle_time: .000030

View File

@ -30,14 +30,12 @@
# Mcu for X/Y/E steppers
serial: /dev/serial/by-id/**INSERT_YOUR_ARDUINO_DEFINITION_HERE**
# Obtain definition by "ls -l /dev/serial/by-id/"
pin_map: arduino
restart_method: arduino
[mcu z]
# Mcu for Z steppers
serial: /dev/serial/by-id/**INSERT_YOUR_ARDUINO_DEFINITION_HERE**
# Obtain definition by "ls -l /dev/serial/by-id/"
pin_map: arduino
restart_method: arduino
[printer]
@ -49,14 +47,14 @@ max_z_accel: 350
[stepper_x]
# B Stepper
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
# X on mcu_xye
microsteps: 16
rotation_distance: 40
# 80 steps per mm - 1.8 deg - 1/16 microstepping
endstop_pin: ^ar2
endstop_pin: ^PE4
# X_MAX on mcu_xye
position_min: 0
position_endstop: 250
@ -66,14 +64,14 @@ homing_retract_dist: 5
[stepper_y]
# A Stepper
step_pin: ar60
dir_pin: !ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
# Y on mcu_xye
microsteps: 16
rotation_distance: 40
# 80 steps per mm - 1.8 deg - 1/16 microstepping
endstop_pin: ^ar15
endstop_pin: ^PJ0
# Y_MAX on mcu_xye
position_min: 0
position_endstop: 250
@ -83,14 +81,14 @@ homing_retract_dist: 5
[stepper_z]
# Z0 Stepper - Front Left
step_pin: z:ar54
dir_pin: !z:ar55
enable_pin: !z:ar38
step_pin: z:PF0
dir_pin: !z:PF1
enable_pin: !z:PD7
# X on mcu_z
microsteps: 16
rotation_distance: 8
# 400 steps per mm - 1.8 deg - 1/16 microstepping
endstop_pin: ^!z:ar18
endstop_pin: ^!z:PD3
# Z_MIN on mcu_z
position_endstop: -0.2
# Offset (in mm) for nozzle to bed off z switch
@ -103,9 +101,9 @@ homing_retract_dist: 3.0
[stepper_z1]
# Z1 Stepper - Rear Left
step_pin: z:ar60
dir_pin: z:ar61
enable_pin: !z:ar56
step_pin: z:PF6
dir_pin: z:PF7
enable_pin: !z:PF2
# Y on mcu_z
microsteps: 16
rotation_distance: 8
@ -113,9 +111,9 @@ rotation_distance: 8
[stepper_z2]
# Z2 Stepper - Rear Right
step_pin: z:ar46
dir_pin: !z:ar48
enable_pin: !z:ar62
step_pin: z:PL3
dir_pin: !z:PL1
enable_pin: !z:PK0
# Z on mcu_z
microsteps: 16
rotation_distance: 8
@ -123,18 +121,18 @@ rotation_distance: 8
[stepper_z3]
# Z3 Stepper - Front Right
step_pin: z:ar26
dir_pin: z:ar28
enable_pin: !z:ar24
step_pin: z:PA4
dir_pin: z:PA6
enable_pin: !z:PA2
# E0 on mcu_z
microsteps: 16
rotation_distance: 8
# 400 steps per mm - 1.8 deg - 1/16 microstepping
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
# E0 on mcu_xye
microsteps: 16
rotation_distance: 5.76576
@ -143,11 +141,11 @@ nozzle_diameter: 0.400
filament_diameter: 1.750
max_extrude_only_distance: 780.0
# This is set high to allow the load/unload filament macros to run
heater_pin: ar10
heater_pin: PB4
# D10 on mcu_xye
max_power: 1.0
sensor_type: NTC 100K beta 3950
sensor_pin: analog13
sensor_pin: PK5
# T0 on mcu_xye
smooth_time: 3.0
control: pid
@ -160,7 +158,7 @@ max_temp: 270
[probe]
# Inductive Probe
pin: ^z:ar19
pin: ^z:PD2
# Z_MAX on mcu_z
x_offset: 0.0
y_offset: 25.0
@ -173,13 +171,13 @@ sample_retract_dist: 6.0
[fan]
# Print cooling fan
pin: ar9
pin: PH6
# D9 on mcu_xye
kick_start_time: 0.500
[heater_fan hotend_fan]
# Hotend fan
pin: z:ar9
pin: z:PH6
# D9 on mcu_z
kick_start_time: 0.500
heater: extruder
@ -187,7 +185,7 @@ heater_temp: 50.0
[heater_fan controller_fan]
# Controller fan
pin: z:ar10
pin: z:PB4
# D10 on mcu_z
kick_start_time: 0.500
heater: heater_bed
@ -195,17 +193,17 @@ heater_temp: 45.0
[heater_fan exhaust_fan]
# Exhaust fan
pin: z:ar8
pin: z:PH5
# D8 on mcu_z
kick_start_time: 0.500
heater: heater_bed
heater_temp: 60.0
[heater_bed]
heater_pin: z:ar11
heater_pin: z:PB5
# D11 (servo) on mcu_z
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: z:analog15
sensor_pin: z:PK7
# T2 on mcu_z
smooth_time: 3.0
max_power: 0.75
@ -247,14 +245,14 @@ horizontal_move_z: 6
[display]
# RepRapDiscount 128x64 Full Graphic Smart Controller
lcd_type: st7920
cs_pin: z:ar16
sclk_pin: z:ar23
sid_pin: z:ar17
cs_pin: z:PH1
sclk_pin: z:PA1
sid_pin: z:PH0
# LCD connector on mcu_z
menu_timeout: 40
encoder_pins: ^z:ar33, ^z:ar31
click_pin: ^!z:ar35
kill_pin: ^!z:ar41
encoder_pins: ^z:PC4, ^z:PC6
click_pin: ^!z:PC2
kill_pin: ^!z:PG0
### Macros ###

View File

@ -26,12 +26,12 @@
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 32
endstop_pin: ^ar3
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
homing_speed: 50
@ -39,25 +39,25 @@ homing_speed: 50
# The stepper_y section is used to describe the Y axis as well as the
# stepper controlling the X-Y movement.
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 32
endstop_pin: ^ar14
endstop_pin: ^PJ1
position_endstop: 0
position_max: 200
homing_speed: 50
## Configuration with Z Endstop, without Probe tool like BLTOUCH or others.
#[stepper_z]
#step_pin: ar46
#dir_pin: ar48
#enable_pin: !ar62
#step_pin: PL3
#dir_pin: PL1
#enable_pin: !PK0
#microsteps: 16
#rotation_distance: 8
## I used Z_MAX_ENDSTOP
#endstop_pin: ^ar19
#endstop_pin: ^PD2
## More about z-calibration is here https://vk.com/topic-107680682_34101598
#position_endstop: 235
#position_max: 235
@ -66,9 +66,9 @@ homing_speed: 50
## Configuration for Bltouch probe tool.
## Read more about BLTOUCH here https://www.klipper3d.org/BLTouch.html
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
position_min: -3
@ -78,16 +78,16 @@ endstop_pin: probe:z_virtual_endstop
## Configuration with PID Calibration.
## Read more here https://www.klipper3d.org/Config_checks.html
[extruder]
step_pin: ar26
dir_pin: !ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: !PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 13.5744
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
min_temp: 0
max_temp: 250
control: pid
@ -98,9 +98,9 @@ pid_kd: 151.598
## Configuration with PID Calibration.
## Read more here https://www.klipper3d.org/Config_checks.html
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
min_temp: 0
max_temp: 130
control: pid
@ -109,11 +109,10 @@ pid_ki: 1.822
pid_kd: 741.600
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: corexy
@ -123,8 +122,8 @@ max_z_velocity: 25
max_z_accel: 30
[bltouch]
sensor_pin: ^ar18
control_pin: ar7
sensor_pin: ^PD3
control_pin: PH4
x_offset: 39
y_offset: 11
z_offset: 0.9

View File

@ -4,50 +4,50 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar25
dir_pin: !ar23
enable_pin: !ar27
step_pin: PA3
dir_pin: !PA1
enable_pin: !PA5
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar22
endstop_pin: ^!PA0
position_min: -5
position_endstop: -5
position_max: 310
homing_speed: 30.0
[stepper_y]
step_pin: ar32
dir_pin: !ar33
enable_pin: !ar31
step_pin: PC5
dir_pin: !PC4
enable_pin: !PC6
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar26
endstop_pin: ^!PA4
position_endstop: 0
position_max: 310
homing_speed: 30.0
[stepper_z]
step_pin: ar35
dir_pin: ar36
enable_pin: !ar34
step_pin: PC2
dir_pin: PC1
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
endstop_pin: ^!ar29
endstop_pin: ^!PA7
position_endstop: 0.0
position_max: 400
homing_speed: 5.0
[extruder]
step_pin: ar42
dir_pin: ar43
enable_pin: !ar37
step_pin: PL7
dir_pin: PL6
enable_pin: !PC0
microsteps: 16
rotation_distance: 34.557
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar2
heater_pin: PE4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog8
sensor_pin: PK0
control: pid
pid_Kp: 15.717
pid_Ki: 0.569
@ -56,9 +56,9 @@ min_temp: 0
max_temp: 245
[heater_bed]
heater_pin: ar4
heater_pin: PG5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog10
sensor_pin: PK2
control: pid
pid_Kp: 74.883
pid_Ki: 1.809
@ -75,7 +75,6 @@ check_gain_time: 120
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
@ -85,7 +84,7 @@ max_z_velocity: 10
max_z_accel: 60
[output_pin stepper_xy_current]
pin: ar44
pin: PL5
pwm: True
scale: 2.0
cycle_time: .000030
@ -93,7 +92,7 @@ hardware_pwm: True
static_value: 1.3
[output_pin stepper_z_current]
pin: ar45
pin: PL4
pwm: True
scale: 2.0
cycle_time: .000030
@ -101,7 +100,7 @@ hardware_pwm: True
static_value: 1.3
[output_pin stepper_e_current]
pin: ar46
pin: PL3
pwm: True
scale: 2.0
cycle_time: .000030
@ -110,15 +109,15 @@ static_value: 1.25
[display]
lcd_type: st7920
cs_pin: ar20
sclk_pin: ar14
sid_pin: ar15
encoder_pins: ^ar41, ^ar40
click_pin: ^!ar19
cs_pin: PD1
sclk_pin: PJ1
sid_pin: PJ0
encoder_pins: ^PG0, ^PG1
click_pin: ^!PD2
# The filament runout sensor (on pin ar24) is not currently supported
# The filament runout sensor (on pin PA2) is not currently supported
# in Klipper.
[output_pin case_light]
pin: ar7
pin: PH4
value: 1

View File

@ -1,9 +1,9 @@
# This file contains common pin mappings for the Alfawise U30 printer.
# To use this config, the firmware should be compiled for the
# STM32F103. When running "make menuconfig", enable "extra low-level
# configuration setup", select the 64KiB bootloader, disable "USB for
# communication", and set "GPIO pins to set at micro-controller
# startup" to "!PC4,!PD12".
# configuration setup", select the 64KiB bootloader, serial (on USART1
# PA10/PA9) communication, and set "GPIO pins to set at
# micro-controller startup" to "!PC4,!PD12".
# The "make flash" command does not work on the Alfawise U30. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a

View File

@ -4,51 +4,51 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar3
endstop_pin: ^!PE5
position_min: -2
position_endstop: -2
position_max: 205
homing_speed: 60.0
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar14
endstop_pin: ^!PJ1
position_endstop: 0
position_max: 215
homing_speed: 60.0
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^!ar18
endstop_pin: ^!PD3
position_endstop: 0.5
position_max: 305
homing_speed: 8.0
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.133
nozzle_diameter: 0.400
filament_diameter: 1.750
max_extrude_only_distance: 2000
heater_pin: ar10
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_kp: 27.725
pid_ki: 1.224
@ -57,9 +57,9 @@ min_temp: 0
max_temp: 300
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: pid
pid_kp: 73.735
pid_ki: 1.437
@ -68,12 +68,11 @@ min_temp: 0
max_temp: 110
[fan]
pin: ar9
pin: PH6
kick_start_time: 1.0
[mcu]
serial: /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0
pin_map: arduino
[printer]
kinematics: cartesian
@ -83,23 +82,23 @@ max_z_velocity: 40
max_z_accel: 60
[heater_fan extruder_fan]
pin: ar44
pin: PL5
[heater_fan stepstick_fan]
pin: ar7
pin: PH4
kick_start_time: 1.0
[display]
lcd_type: st7920
cs_pin: ar16
sclk_pin: ar23
sid_pin: ar17
encoder_pins: ^ar31, ^ar33
click_pin: ^!ar35
kill_pin: ^!ar41
cs_pin: PH1
sclk_pin: PA1
sid_pin: PH0
encoder_pins: ^PC6, ^PC4
click_pin: ^!PC2
kill_pin: ^!PG0
[filament_switch_sensor e0_sensor]
switch_pin: ar19
switch_pin: PD2
[gcode_macro START_PRINT]
gcode:

View File

@ -7,58 +7,58 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar3
endstop_pin: ^!PE5
position_min: -5
position_endstop: -5
position_max: 210
homing_speed: 30.0
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar42
endstop_pin: ^!PL7
position_endstop: 0
position_max: 210
homing_speed: 30.0
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^!ar18
endstop_pin: ^!PD3
position_endstop: 0.0
position_max: 205
homing_speed: 5.0
[stepper_z1]
step_pin: ar36
dir_pin: ar34
enable_pin: !ar30
step_pin: PC1
dir_pin: PC3
enable_pin: !PC7
microsteps: 16
rotation_distance: 8
endstop_pin: ^!ar43
endstop_pin: ^!PL6
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 34.557
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 15.717
pid_Ki: 0.569
@ -67,12 +67,12 @@ min_temp: 0
max_temp: 245
[heater_fan extruder_fan]
pin: ar44
pin: PL5
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: pid
pid_Kp: 74.883
pid_Ki: 1.809
@ -81,11 +81,10 @@ min_temp: 0
max_temp: 110
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
@ -95,4 +94,4 @@ max_z_velocity: 10
max_z_accel: 60
[heater_fan stepstick_fan]
pin: ar7
pin: PH4

View File

@ -8,12 +8,12 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_a]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar2
endstop_pin: ^PE4
homing_speed: 60
# The next parameter needs to be adjusted for
# your printer. You may want to start with 280
@ -23,32 +23,32 @@ position_endstop: 273.0
arm_length: 229.4
[stepper_b]
step_pin: ar60
dir_pin: !ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar15
endstop_pin: ^PJ0
[stepper_c]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar19
endstop_pin: ^PD2
[extruder]
step_pin: ar26
dir_pin: !ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: !PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 35.165
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 25.349
pid_Ki: 1.216
@ -58,23 +58,22 @@ min_temp: 0
max_temp: 275
#[heater_bed]
#heater_pin: ar8
#heater_pin: PH5
#sensor_type: EPCOS 100K B57560G104F
#sensor_pin: analog14
#sensor_pin: PK6
#control: watermark
#min_temp: 0
#max_temp: 130
[fan]
pin: ar9
pin: PH6
kick_start_time: 0.200
[heater_fan extruder_cooler_fan]
pin: ar44
pin: PL5
[mcu]
serial: /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0
pin_map: arduino
[printer]
kinematics: delta
@ -102,12 +101,12 @@ timeout: 360
# "RepRapDiscount 2004 Smart Controller" type displays
[display]
lcd_type: hd44780
rs_pin: ar16
e_pin: ar17
d4_pin: ar23
d5_pin: ar25
d6_pin: ar27
d7_pin: ar29
encoder_pins: ^ar31, ^ar33
click_pin: ^!ar35
kill_pin: ^!ar41
rs_pin: PH1
e_pin: PH0
d4_pin: PA1
d5_pin: PA3
d6_pin: PA5
d7_pin: PA7
encoder_pins: ^PC6, ^PC4
click_pin: ^!PC2
kill_pin: ^!PG0

View File

@ -8,12 +8,12 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_a]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar2
endstop_pin: ^PE4
homing_speed: 60
# The next parameter needs to be adjusted for
# your printer. You may want to start with 280
@ -23,32 +23,32 @@ position_endstop: 295.6
arm_length: 269.0
[stepper_b]
step_pin: ar60
dir_pin: !ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar15
endstop_pin: ^PJ0
[stepper_c]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar19
endstop_pin: ^PD2
[extruder]
step_pin: ar26
dir_pin: !ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: !PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.333
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 25.349
pid_Ki: 1.216
@ -58,9 +58,9 @@ min_temp: 0
max_temp: 275
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: pid
pid_kp: 73.517
pid_ki: 1.132
@ -69,21 +69,20 @@ min_temp: 0
max_temp: 130
[fan]
pin: ar9
pin: PH6
kick_start_time: 0.200
[heater_fan extruder_cooler_fan]
pin: ar44
pin: PL5
# if you want to use your probe for DELTA_CALIBRATE you will need that
#[probe]
#pin: ^ar18
#pin: ^PD3
#z_offset: 15.9
#samples: 3
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: delta
@ -105,12 +104,12 @@ radius: 115
# "RepRapDiscount 2004 Smart Controller" type displays
[display]
lcd_type: hd44780
rs_pin: ar16
e_pin: ar17
d4_pin: ar23
d5_pin: ar25
d6_pin: ar27
d7_pin: ar29
encoder_pins: ^ar31, ^ar33
click_pin: ^!ar35
kill_pin: ^!ar41
rs_pin: PH1
e_pin: PH0
d4_pin: PA1
d5_pin: PA3
d6_pin: PA5
d7_pin: PA7
encoder_pins: ^PC6, ^PC4
click_pin: ^!PC2
kill_pin: ^!PG0

View File

@ -4,48 +4,48 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar3
endstop_pin: ^PE5
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar14
endstop_pin: ^PJ1
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar18
endstop_pin: ^PD3
position_endstop: 0
position_max: 400
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.683
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -54,9 +54,9 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog14
sensor_pin: PK6
control: pid
pid_Kp: 690.34
pid_Ki: 111.47
@ -65,11 +65,10 @@ min_temp: 0
max_temp: 130
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
@ -80,8 +79,8 @@ max_z_accel: 100
[display]
lcd_type: st7920
cs_pin: ar16
sclk_pin: ar23
sid_pin: ar17
encoder_pins: ^ar33, ^ar31
click_pin: ^!ar35
cs_pin: PH1
sclk_pin: PA1
sid_pin: PH0
encoder_pins: ^PC4, ^PC6
click_pin: ^!PC2

View File

@ -1,7 +1,7 @@
# This file contains pin mappings for the stock 2020 Creality CR6-SE.
# To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and with "Use USB for
# communication" disabled.
# To use this config, during "make menuconfig" select the STM32F103
# with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.
# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware

View File

@ -1,12 +1,12 @@
# This file contains pin mappings for the stock 2020 Creality Ender 3
# V2. To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and with "Use USB for
# communication" disabled.
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select the
# USART3 serial port, which is broken out on the 10 pin IDC cable used
# for the LCD module as follows:
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and

View File

@ -0,0 +1,150 @@
# This file contains pin mappings for the stock 2020 Creality Ender 3
# MAX. To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.
# Because this printer has factory wiring, mounts, and firmware for
# a BLTouch, but does not ship with one at this time, default values
# for the sensor have been specified, but disabled, in anticipation of
# future revisions or user modification. User should take care to
# customize the offsets, particularly z-offset, for their specific unit.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
position_endstop: 0.0 # disable to use BLTouch
endstop_pin: ^PA7 # disable to use BLTouch
#endstop_pin: probe:z_virtual_endstop # enable to use BLTouch
#position_min: -5 # enable to use BLTouch
position_max: 340
# [safe_z_home] # enable for BLTouch
# home_xy_position: 150, 150
# speed: 100
# z_hop: 10
# z_hop_speed: 5
# [bltouch] # enable for BLTouch - fast-mode
# sensor_pin: ^PB1
# control_pin: PB0
# pin_up_touch_mode_reports_triggered: True
# probe_with_touch_mode: True
# x_offset: 50 # modify as needed for bltouch location
# y_offset: -6 # modify as needed for bltouch location
# z_offset: 0.0 # modify as needed for bltouch or run PROBE_CALIBRATE
# speed: 10
# samples: 3
# sample_retract_dist: 5.0 # Can be set lower, example 2.5 depending on height of bltouch from bed
# lift_speed: 40
# samples_tolerance_retries: 3
# speed: 10
# samples: 2
# [bed_mesh] # enable for BLTouch
# speed: 300
# mesh_min: 50, 0
# mesh_max: 290, 290
# algorithm: bicubic
# probe_count: 7,7 # 49 points due to large bed size
# horizontal_move_z: 5
# [gcode_macro G29] # If moving from marlin to klipper uncomment to mimic G29
# gcode:
# BED_MESH_CALIBRATE
# G1 X0 Y0 Z10 F4000
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 31.901 # Calibrate - see https://github.com/KevinOConnor/klipper/blob/master/docs/Rotation_Distance.md
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
pressure_advance: 0.0 # Calibrate - see https://github.com/KevinOConnor/klipper/blob/master/docs/Pressure_Advance.md
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PA0
[filament_switch_sensor e0_sensor]
switch_pin: PA4
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 # Run ls /dev/serial/by-id/* for micro-controller name
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[display]
lcd_type: st7920
cs_pin: PB12
sclk_pin: PB13
sid_pin: PB15
encoder_pins: ^PD2, ^PD3
click_pin: ^!PC0

View File

@ -1,12 +1,12 @@
# This file contains pin mappings for the stock 2020 Creality Ender 3
# Pro with the 32-bit Creality 4.2.2 board. To use this config, during
# "make menuconfig" select the STM32F103 with a "28KiB bootloader" and
# with "Use USB for communication" disabled.
# serial (on USART1 PA10/PA9) communication.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select the
# USART3 serial port, which is broken out on the 10 pin IDC cable used
# for the LCD module as follows:
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and

View File

@ -95,6 +95,9 @@ pin: PH6
[mcu]
serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK06VNAB-if00-port0
[filament_switch_sensor filament_sensor]
switch_pin:PE4
[printer]
kinematics: cartesian
max_velocity: 300

View File

@ -1,7 +1,7 @@
# This file contains pin mappings for the stock 2020 Creality Ender 6.
# To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and with "Use USB for
# communication" disabled.
# To use this config, during "make menuconfig" select the STM32F103
# with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.
# Because this printer has factory wiring, mounts, and firmware for
# a BLTouch, but does not ship with one at this time, default values
@ -10,9 +10,9 @@
# customize the offsets, particularly z-offset, for their specific unit.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select the
# USART3 serial port, which is broken out on the 10 pin IDC cable used
# for the LCD module as follows:
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and
@ -65,15 +65,15 @@ position_max: 400
# [bltouch] # enable for BLTouch
# sensor_pin: ^PB1
# control_pin: PB0
# x_offset: 20.7
# y_offset: 7
# x_offset: -20.7
# y_offset: -7
# z_offset: 2.4
# speed: 3.0
# [bed_mesh] # enable for BLTouch
# speed: 100
# mesh_min: 10, 10
# mesh_max: 250, 250
# mesh_max: 239, 239
# algorithm: bicubic
# probe_count: 5,5

View File

@ -0,0 +1,111 @@
# This file contains common configurations and pin mappings
# for the Flsun Q5 using the MKS Robin Nano board.
# To use this config, the firmware should be compiled for the
# STM32F103. When running "make menuconfig", enable "extra low-level
# configuration setup", select the 28KiB bootloader, and serial (on
# USART3 PB11/PB10) 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/Robin_nano.bin
# Copy the file out/Robin_nano.bin to an SD card and then restart the
# printer with that SD card.
# See docs/Config_Reference.md for a description of parameters.
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: delta
max_velocity: 250
max_accel: 3000
max_z_velocity: 100
delta_radius: 107.5
print_radius: 100
[stepper_a]
step_pin: PE3
dir_pin: PE2
enable_pin: !PE4
microsteps: 16
rotation_distance: 40
endstop_pin: PA15
homing_speed: 20
homing_retract_dist: 5
homing_retract_speed: 10
second_homing_speed: 2
position_endstop: 220
arm_length: 215
angle: 210
[stepper_b]
step_pin: PE0
dir_pin: PB9
enable_pin: !PE1
microsteps: 16
rotation_distance: 40
endstop_pin: PA12
angle: 330
[stepper_c]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
microsteps: 16
rotation_distance: 40
endstop_pin: PC4
angle: 90
[probe]
pin: !PA11
x_offset: 0
y_offset: 0
z_offset: 20.26
speed: 5.0
samples: 5
samples_result: average
sample_retract_dist: 3
samples_tolerance: 0.02
samples_tolerance_retries: 5
[delta_calibrate]
radius: 95
horizontal_move_z: 25
Speed: 10
[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
microsteps: 16
rotation_distance: 22.17
gear_ratio: 66:22
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
control: pid
pid_kp: 14.529
pid_ki: 0.557
pid_kd: 94.802
min_temp: 0
max_temp: 250
max_extrude_only_distance: 110.0
[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
pid_Kp: 325.10
pid_Ki: 63.35
pid_Kd: 417.10
min_temp: 0
max_temp: 130
[fan]
pin: PB1

View File

@ -0,0 +1,189 @@
# This file contains pin mappings for the stock Hiprecy Leo (based on Fysetc F6 board) with stock TMC2130 SPI drivers.
# The Self-levelling plate sensor is PINDA probe type
################################################################################
# CAUTION: The Touchscreen is a DWIN T5UID1 and cannot be used with Klipper!!! #
# You will lose all the display functionalities!!! #
################################################################################
# To use this config, the firmware should be compiled for the AVR atmega2560 (16MHz).
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: tmc2130_stepper_x:virtual_endstop
homing_retract_dist: 0
homing_speed: 50
position_endstop: 0
position_max: 220
[stepper_y]
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: tmc2130_stepper_y:virtual_endstop
homing_retract_dist: 0
homing_speed: 50
position_endstop: 0
position_max: 230
[stepper_z]
step_pin: PL6
dir_pin: !PL1
enable_pin: !PF4
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_min: -2
position_max: 260
[extruder]
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 23.133 ### Based on default 415 steps/mm. See https://github.com/KevinOConnor/klipper/blob/master/docs/Rotation_Distance.md for fine tuning
gear_ratio: 50:17
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PE3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK4
max_extrude_only_distance: 400
control: pid
pid_Kp: 22
pid_Ki: 1.08
pid_Kd: 114
min_extrude_temp: 180
min_temp: 0
max_temp: 260
[heater_bed]
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK7
control: pid
pid_kp: 69.584
pid_ki: 1.393
pid_kd: 868.925
min_temp: 0
max_temp: 130
########################################
# Probe configuration
########################################
[probe]
pin: PB6 # Z endstop pin
x_offset: 35
y_offset: 2
z_offset: 0.5
samples: 2
speed: 5
########################################
# Bed Mesh example
########################################
[bed_mesh]
mesh_min: 40,40
mesh_max: 185,230
probe_count: 4,4
speed: 100
fade_end: 0.0
algorithm: bicubic
###############################################
# Homing Override example for sensorless homing
###############################################
# Temporarily reduces stepper X and Y current for sensorless homing
# then resets the current to the previous value (default value)
[homing_override]
gcode:
G90
G1 Z5
SET_TMC_CURRENT STEPPER=stepper_x CURRENT=0.500 HOLDCURRENT=0.250
G28 X ;Zero X
SET_TMC_CURRENT STEPPER=stepper_x CURRENT=0.600 HOLDCURRENT=0.300
G1 X10 ;Move X 10mm away from the stop so we can home multiple times in a row (needs a bit of space to trigger reliably again)
SET_TMC_CURRENT STEPPER=stepper_y CURRENT=0.500 HOLDCURRENT=0.250
G28 Y ;Zero Y
SET_TMC_CURRENT STEPPER=stepper_y CURRENT=0.700 HOLDCURRENT=0.350
G1 Y10 ;Move Y 10mm away from the stop so we can home multiple times in a row (needs a bit of space to trigger reliably again)
G28 Z
G1 X20 Y5
set_position_z: 0
#fan for printed model FAN0
[fan]
pin: PL5
#fan for hotend FAN1
[heater_fan e0_fan]
pin: PL4
heater: extruder
max_power: 1.0
shutdown_speed: 0
cycle_time: 0.010
kick_start_time: 0.100
heater_temp: 50.0
fan_speed: 1.0
#fan for control board FAN2
[heater_fan board_fan]
pin: PL3
#Prevents communication issues with SPI drivers
[static_digital_output disable_sdcard]
pins: PB0
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 8
max_z_accel: 100
########################################
# TMC2130 SPI configuration
########################################
[tmc2130 stepper_x]
cs_pin: PG4
diag1_pin: ^!PK1
run_current: 0.600
hold_current: 0.300
stealthchop_threshold: 250
driver_SGT: 3
[tmc2130 stepper_y]
cs_pin: PG2
diag1_pin: ^!PJ1
run_current: 0.700
hold_current: 0.350
stealthchop_threshold: 250
driver_SGT: 3
[tmc2130 stepper_z]
cs_pin: PJ7
run_current: 0.800
hold_current: 0.400
stealthchop_threshold: 250
[tmc2130 extruder]
cs_pin: PL2
diag1_pin: PE4
run_current: 0.600
hold_current: 0.300
stealthchop_threshold: 250

View File

@ -5,34 +5,34 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar3
endstop_pin: ^!PE5
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar14
endstop_pin: ^!PJ1
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^!ar35
endstop_pin: ^!PC2
# Uncomment for BLTouch
# endstop_pin: probe:z_virtual_endstop
position_endstop: 0.5
@ -55,8 +55,8 @@ position_max: 250
# According this follow mapping :
# https://arduiblog.com/2020/06/22/installation-dun-bltouch-sur-lalfawise-u30-pro/
# & see "Branchement" paragraph & picture
# sensor_pin: ^ar35
# control_pin: ar7
# sensor_pin: ^PC2
# control_pin: PH4
# If you use this fang : https://www.thingiverse.com/thing:3603067
# you can use this follow values for x & y offset
# x_offset: -28
@ -70,16 +70,16 @@ position_max: 250
# probe_count: 4,3
[extruder]
step_pin: ar26
dir_pin: !ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: !PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 34.5576
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -88,22 +88,21 @@ min_temp: 0
max_temp: 250
[filament_switch_sensor filament_sensor]
switch_pin: ^!ar2
switch_pin: ^!PE4
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian

View File

@ -5,43 +5,43 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_a]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 32
endstop_pin: ^ar2
endstop_pin: ^PE4
homing_speed: 100
position_endstop: 319.5
arm_length: 217.0
[stepper_b]
step_pin: ar60
dir_pin: !ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 32
endstop_pin: ^ar15
endstop_pin: ^PJ0
[stepper_c]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 32
endstop_pin: ^ar19
endstop_pin: ^PD2
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 20.067
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -51,11 +51,10 @@ max_temp: 250
max_extrude_only_distance: 100.0
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: delta
@ -68,16 +67,16 @@ delta_radius: 95
radius: 80
#[probe]
#pin: ^!ar18
#pin: ^!PD3
[display]
lcd_type: hd44780
rs_pin: ar16
e_pin: ar17
d4_pin: ar23
d5_pin: ar25
d6_pin: ar27
d7_pin: ar29
encoder_pins: ^ar31, ^ar33
click_pin: ^!ar35
kill_pin: ^!ar41
rs_pin: PH1
e_pin: PH0
d4_pin: PA1
d5_pin: PA3
d6_pin: PA5
d7_pin: PA7
encoder_pins: ^PC6, ^PC4
click_pin: ^!PC2
kill_pin: ^!PG0

View File

@ -1,7 +1,6 @@
# This file contains common pin mappings for the 2017 Monoprice
# Mini Delta. To use this config, the firmware should be compiled for the
# STM32F070 microcontroller with an 8MHz crystal and USB for communication
# (instead of serial).
# STM32F070 microcontroller with an 8MHz crystal and USB for communication.
#
# IMPORTANT: Use of Kipper with a Monoprice Mini Delta requires a power supply
# with a _minimum_ 120 W (i.e. 10 A) capacity! The stock power supply will not

View File

@ -1,7 +1,6 @@
# This file contains common pin mappings for the 2019 Monoprice
# Select Mini v2. To use this config, the firmware should be compiled for the
# STM32F070 microcontroller with an 8MHz crystal and USB for communication
# (instead of serial).
# STM32F070 microcontroller with an 8MHz crystal and USB for communication.
#
# Use the following settings in make menuconfig:
#

View File

@ -0,0 +1,152 @@
# This file contains pin mappings for the Robo3D R2 ROBOmainboard 2.1.5.
# To use this config, the firmware should be compiled for the AVR atmega2560.
#
# See docs/Config_Reference.md for a description of parameters.
#
# The filament runout sensor is gpio21 on the RPi host. Host MCU setup is
# documented in docs/RPi_microcontroller.md.
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PE5
position_endstop: 0
position_max: 195
homing_speed: 120
[stepper_y]
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^PJ1
position_endstop: 195
position_min: 0
position_max: 195
homing_speed: 120
[stepper_z]
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 4
# Required if not using probe for the virtual endstop
# endstop_pin: ^PD3
# position_endstop: 250 # Will need ajustment
endstop_pin: probe:z_virtual_endstop
homing_speed: 10.0
position_max: 250
position_min: -10
[extruder]
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 21
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK5
min_temp: 0
max_temp: 290
control: pid
pid_kp: 27.740
pid_ki: 1.581
pid_kd: 121.707
# Not enabled in stock R2 config or supported by Robo3D
#[extruder1]
#step_pin: PC1
#dir_pin: PC3
#enable_pin: !PC7
#heater_pin: PH6
#sensor_type: EPCOS 100K B57560G104F
#sensor_pin: PK7
[probe]
pin: ^PD2
x_offset: 2
y_offset: 30
z_offset: 1 # Safe value. Adjust for your nozzle offset.
sample_retract_dist: 1.0
# Below are very conservative settings, as the IR probe has repeatability
# issues depending on visual characteristics of the build surface.
# Polycarbonate build surfaces (e.g. BuildTak) work best with the IR sensor.
# Persistent repeatablity issues are usually due to excessive ambient light.
# Try darkening the room or otherwise preventing light from interfering with
# the IR sensor on the extruder.
samples: 3
samples_tolerance: 0.2
samples_tolerance_retries: 5
[safe_z_home]
home_xy_position: 100, 70
speed: 150
z_hop: 10
z_hop_speed: 5
[bed_mesh]
speed: 200
horizontal_move_z: 5
mesh_min: 5, 30
mesh_max: 190, 195
probe_count: 4, 4
fade_start: 1
fade_end: 5
# Configured in Marlin as sensor 12:
# 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
# (calibrated for Makibox hot bed)
[thermistor NTCS0603E3104FXT]
temperature1: 25
resistance1: 100000
temperature2: 50
resistance2: 29536
temperature3: 125
resistance3: 1908
[heater_bed]
heater_pin: PH5
sensor_type: NTCS0603E3104FXT
sensor_pin: PK6
control: pid
pid_kp: 72.263
pid_ki: 1.606
pid_kd: 812.963
min_temp: 0
max_temp: 125
[fan]
pin: PH4
[controller_fan board]
pin: PE3
[output_pin caselight]
pin: PH3
pwm: False
value: 1
[mcu]
serial: /dev/ttyACM0
# Uncomment the below if the host MCU is configured.
#[mcu host]
#serial: /tmp/klipper_host_mcu
#
# [filament_switch_sensor sensor0]
# switch_pin: ^!host:gpio21
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 20
max_z_accel: 100

View File

@ -5,48 +5,48 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar3
endstop_pin: ^PE5
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar14
endstop_pin: ^PJ1
position_endstop: 0
position_max: 255
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar18
endstop_pin: ^PD3
position_endstop: 0
position_max: 300
[extruder]
step_pin: ar26
dir_pin: !ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: !PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 7.680
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 31.147
pid_Ki: 2.076
@ -55,9 +55,9 @@ min_temp: 0
max_temp: 265
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: pid
pid_Kp: 72.174
pid_Ki: 1.816
@ -66,15 +66,14 @@ min_temp: 0
max_temp: 110
[filament_switch_sensor my_sensor]
switch_pin: ar2
switch_pin: PE4
pause_on_runout: True
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
@ -85,8 +84,8 @@ max_z_accel: 100
[display]
lcd_type: st7920
cs_pin: ar16
sclk_pin: ar23
sid_pin: ar17
encoder_pins: ^ar33, ^ar31
click_pin: ^!ar35
cs_pin: PH1
sclk_pin: PA1
sid_pin: PH0
encoder_pins: ^PC4, ^PC6
click_pin: ^!PC2

View File

@ -1,53 +1,53 @@
# This file contains pin mappings for the SUNLU S8 v1.01 (circa 2020), which
# is a modified RAMPS v1.3 board. To use this config, the firmware should be
# compiled for the AVR atmega2560. The following pins are available for
# expansion (e.g. ABL): ^ar19 (Z+ endstop), ar4, ar5, ar6, ar11
# expansion (e.g. ABL): ^PD2 (Z+ endstop), PG5, PE3, PH3, PB5
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar3
endstop_pin: ^!PE5
position_endstop: 0
position_max: 310
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: !ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar14
endstop_pin: ^!PJ1
position_endstop: 0
position_max: 310
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^!ar18
endstop_pin: ^!PD3
position_endstop: 0.5
position_max: 400
[extruder]
step_pin: ar26
dir_pin: !ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: !PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.280
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_kp: 25.588
pid_ki: 1.496
@ -57,12 +57,12 @@ max_temp: 250
[filament_switch_sensor runout]
pause_on_runout: True
switch_pin: ^ar2
switch_pin: ^PE4
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: pid
pid_kp: 74.786
pid_ki: 0.766
@ -77,14 +77,13 @@ max_temp: 110
check_gain_time: 240
[fan]
pin: ar9
pin: PH6
[heater_fan fan1]
pin: ar7
pin: PH4
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
@ -95,11 +94,11 @@ max_z_accel: 100
[display]
lcd_type: st7920
cs_pin: ar16
sclk_pin: ar23
sid_pin: ar17
encoder_pins: ^ar33, ^ar31
click_pin: ^!ar35
cs_pin: PH1
sclk_pin: PA1
sid_pin: PH0
encoder_pins: ^PC4, ^PC6
click_pin: ^!PC2
[output_pin beeper]
pin: ar37
pin: PC0

View File

@ -8,33 +8,33 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: !ar3
endstop_pin: !PE5
position_endstop: -13
position_min: -13
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: !ar14
endstop_pin: !PJ1
position_endstop: -3
position_min: -3
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
position_max: 250
@ -42,24 +42,24 @@ endstop_pin: probe:z_virtual_endstop
position_min: -2
[stepper_z1]
step_pin: ar36
dir_pin: ar34
enable_pin: !ar30
step_pin: PC1
dir_pin: PC3
enable_pin: !PC7
microsteps: 16
rotation_distance: 8
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
gear_ratio: 50:17
rotation_distance: 22.598
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 18.547
pid_Ki: 0.788
@ -68,9 +68,9 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: pid
pid_Kp: 38.824
pid_Ki: 0.539
@ -79,14 +79,13 @@ min_temp: 0
max_temp: 70
[heater_fan my_nozzle_fan]
pin: ar7
pin: PH4
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
@ -97,15 +96,15 @@ max_z_accel: 100
[display]
lcd_type: uc1701
cs_pin: ar25
a0_pin: ar27
encoder_pins: ^!ar31, ^!ar33
click_pin: ^!ar35
kill_pin: ar64
cs_pin: PA3
a0_pin: PA5
encoder_pins: ^!PC6, ^!PC4
click_pin: ^!PC2
kill_pin: PK2
[bltouch]
sensor_pin: ar18
control_pin: ar11
sensor_pin: PD3
control_pin: PB5
x_offset: 0
y_offset: 18
z_offset: 1.64

View File

@ -8,58 +8,58 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar3
endstop_pin: ^!PE5
position_endstop: -2
position_max: 220
position_min: -2
homing_speed: 25.0
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar14
endstop_pin: ^!PJ1
position_endstop: 0
position_max: 220
homing_speed: 25.0
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^!ar18
endstop_pin: ^!PD3
position_endstop: 0
position_max: 200
# Enable for dual-z addon
#[stepper_z1]
#step_pin: ar36
#dir_pin: ar34
#enable_pin: !ar30
#step_pin: PC1
#dir_pin: PC3
#enable_pin: !PC7
#microsteps: 16
#rotation_distance: 8
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 7.904
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: ar10
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.5
pid_Ki: 1.78
@ -68,19 +68,18 @@ min_temp: 0
max_temp: 220
[heater_bed]
heater_pin: ar8
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 110
[fan]
pin: ar9
pin: PH6
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
pin_map: arduino
[printer]
kinematics: cartesian
@ -90,13 +89,13 @@ max_z_velocity: 50
max_z_accel: 100
[heater_fan nozzle_fan]
pin: ar7
pin: PH4
[display]
lcd_type: uc1701
cs_pin: ar25
a0_pin: ar27
encoder_pins: ^!ar31, ^!ar33
click_pin: ^!ar35
kill_pin: !ar41
cs_pin: PA3
a0_pin: PA5
encoder_pins: ^!PC6, ^!PC4
click_pin: ^!PC2
kill_pin: !PG0
menu_reverse_navigation: true

View File

@ -1,15 +1,15 @@
# This is a Klipper configuration for TronXY X5SA, with
# CXY-V6 motherboard.
# This is a Klipper configuration for TronXY X5SA, with CXY-V6
# motherboard.
# === FLASHING WITH STOCK BOOTLOADER ===
# You should make firmware for STM32F103 with bootloader offset
# at 0x8008800 (Chitu v6 Bootloader). Uncheck USB, and leave default
# serial settings.
#
# Use "./scripts/update_chitu.py ./out/klipper.bin ./out/update.cbd" after make to generate update.cbd.
# Put `update.cbd` onto SD card, and reboot the printer.
# It will be automatically installed, and you will be able to update it this way.
# at 0x8008800 (Chitu v6 Bootloader) and serial (on USART1 PA10/PA9)
# communication.
# Use "./scripts/update_chitu.py ./out/klipper.bin ./out/update.cbd"
# after make to generate update.cbd. Put `update.cbd` onto SD card,
# and reboot the printer. It will be automatically installed, and you
# will be able to update it this way.
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

View File

@ -5,8 +5,7 @@
# When running "make menuconfig" you have to:
# - enable "extra low-level configuration setup",
# - select the 28KiB bootloader,
# - disable "USB for communication"
# - select USART3 for the "Serial Port"
# - select serial (on USART3 PB11/PB10) communication
# - set "GPIO pins to set at micro-controller startup" to "!PC6,!PD13"
# Note that the "make flash" command does not work with the Sapphire

View File

@ -2,9 +2,8 @@
# Pro printer from 2020. To use this config, the firmware should be
# compiled for the STM32F103. When running "make menuconfig", enable
# "extra low-level configuration setup", select the 28KiB bootloader,
# disable "USB for communication", select USART3 for the "Serial
# Port", and set "GPIO pins to set at micro-controller startup" to
# "!PC6,!PD13".
# serial (on USART3 PB11/PB10) communication, and set "GPIO pins to
# set at micro-controller startup" to "!PC6,!PD13".
# Note that the "make flash" command does not work with the Sapphire
# Pro. After running "make", run the following command:

View File

@ -7,52 +7,52 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar3
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: !ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar14
endstop_pin: ^PJ1
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar63
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK1
microsteps: 16
rotation_distance: 8
endstop_pin: ^ar18
endstop_pin: ^PD3
position_endstop: 0.5
# Set position_max to 200 if you have the original Z-axis setup.
position_max: 250
[extruder]
step_pin: ar26
step_pin: PA4
# Remove the "!" from dir_pin if you have an original extruder
dir_pin: !ar28
enable_pin: !ar24
dir_pin: !PA6
enable_pin: !PA2
# You will have to calculate your own rotation_distance.
# This is for the belted extruder https://www.thingiverse.com/thing:339928
microsteps: 16
rotation_distance: 4.266
nozzle_diameter: 0.400
filament_diameter: 2.85
heater_pin: ar10
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 21.503
pid_Ki: 1.103
@ -61,9 +61,9 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar9
heater_pin: PH6
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog14
sensor_pin: PK6
control: pid
pid_Kp: 75.283
pid_Ki: 0.588
@ -72,12 +72,11 @@ min_temp: 0
max_temp: 130
[fan]
pin: ar8
pin: PH5
kick_start_time: 0.500
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
@ -89,11 +88,11 @@ max_z_accel: 100
# The LCD is untested - "RepRapDiscount 2004 Smart Controller" displays
#[display]
#lcd_type: hd44780
#rs_pin: ar27
#e_pin: ar29
#d4_pin: ar37
#d5_pin: ar35
#d6_pin: ar33
#d7_pin: ar31
#encoder_pins: ^ar16, ^ar17
#click_pin: ^!ar23
#rs_pin: PA5
#e_pin: PA7
#d4_pin: PC0
#d5_pin: PC2
#d6_pin: PC4
#d7_pin: PC6
#encoder_pins: ^PH1, ^PH0
#click_pin: ^!PA1

View File

@ -5,31 +5,31 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar61
dir_pin: !ar62
enable_pin: !ar60
step_pin: PF7
dir_pin: !PK0
enable_pin: !PF6
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar54
endstop_pin: ^!PF0
position_endstop: 0
position_max: 295
homing_speed: 30.0
[stepper_y]
step_pin: ar64
dir_pin: ar65
enable_pin: !ar2
step_pin: PK2
dir_pin: PK3
enable_pin: !PE4
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar24
endstop_pin: ^!PA2
position_endstop: 0
position_max: 290
homing_speed: 30.0
[stepper_z]
step_pin: ar67
dir_pin: ar69
enable_pin: !ar66
step_pin: PK5
dir_pin: PK7
enable_pin: !PK4
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
@ -37,16 +37,16 @@ position_max: 370
position_min: -0.99
[extruder]
step_pin: ar58
dir_pin: ar59
enable_pin: !ar57
step_pin: PF4
dir_pin: PF5
enable_pin: !PF3
microsteps: 16
rotation_distance: 31.936
nozzle_diameter: 0.4
filament_diameter: 1.75
heater_pin: ar4
heater_pin: PG5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog1
sensor_pin: PF1
control: pid
pid_Kp: 33.41
pid_Ki: 1.47
@ -55,9 +55,9 @@ min_temp: 0
max_temp: 315
[heater_bed]
heater_pin: ar3
heater_pin: PE5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
sensor_pin: PK6
control: pid
pid_Kp: 64.095903
pid_Ki: 1.649830
@ -66,10 +66,10 @@ min_temp: 0
max_temp: 120
[fan]
pin: ar5
pin: PE3
[probe]
pin: !ar6
pin: !PH3
x_offset: 27
y_offset: 3
z_offset: 1.4
@ -80,7 +80,6 @@ samples_result: average
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian

View File

@ -7,48 +7,48 @@
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: ar22
dir_pin: !ar23
enable_pin: !ar57
step_pin: PA0
dir_pin: !PA1
enable_pin: !PF3
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar19
endstop_pin: ^!PD2
position_endstop: 120
position_max: 120
homing_speed: 30.0
[stepper_y]
step_pin: ar25
dir_pin: ar26
enable_pin: !ar24
step_pin: PA3
dir_pin: PA4
enable_pin: !PA2
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar18
endstop_pin: ^!PD3
position_endstop: 0
position_max: 135
homing_speed: 30.0
[stepper_z]
step_pin: ar29
dir_pin: ar39
enable_pin: !ar28
step_pin: PA7
dir_pin: PG2
enable_pin: !PA6
microsteps: 16
rotation_distance: 8
endstop_pin: ^!ar38
endstop_pin: ^!PD7
position_endstop: 0.5
position_max: 100
[extruder]
step_pin: ar55
dir_pin: !ar56
enable_pin: !ar54
step_pin: PF1
dir_pin: !PF2
enable_pin: !PF0
microsteps: 16
rotation_distance: 34.043
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar4
heater_pin: PG5
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: analog13
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -57,11 +57,10 @@ min_temp: 1
max_temp: 265
[fan]
pin: ar12
pin: PB6
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
pin_map: arduino
[printer]
kinematics: cartesian
@ -72,9 +71,9 @@ max_z_accel: 100
[display]
lcd_type: uc1701
cs_pin: ar41
a0_pin: ar40
rst_pin: ar27
click_pin: ^!ar5
encoder_pins: ^ar3, ^ar2
kill_pin: ar64
cs_pin: PG0
a0_pin: PG1
rst_pin: PA5
click_pin: ^!PE3
encoder_pins: ^PE5, ^PE4
kill_pin: PK2

128
config/sample-aliases.cfg Normal file
View File

@ -0,0 +1,128 @@
# This file contains common board aliases for Arduino (and similar)
# boards.
# See docs/Config_Reference.md for a description of parameters.
# Arduino aliases for atmega168/328/328p boards
[board_pins arduino-standard]
aliases:
ar0=PD0, ar1=PD1, ar2=PD2, ar3=PD3, ar4=PD4,
ar5=PD5, ar6=PD6, ar7=PD7, ar8=PB0, ar9=PB1,
ar10=PB2, ar11=PB3, ar12=PB4, ar13=PB5, ar14=PC0,
ar15=PC1, ar16=PC2, ar17=PC3, ar18=PC4, ar19=PC5,
analog0=PC0, analog1=PC1, analog2=PC2, analog3=PC3, analog4=PC4,
analog5=PC5, analog6=PE0, analog7=PE1
# Arduino aliases for atmega2560/1280 (Arduino mega) boards
[board_pins arduino-mega]
aliases:
ar0=PE0, ar1=PE1, ar2=PE4, ar3=PE5, ar4=PG5,
ar5=PE3, ar6=PH3, ar7=PH4, ar8=PH5, ar9=PH6,
ar10=PB4, ar11=PB5, ar12=PB6, ar13=PB7, ar14=PJ1,
ar15=PJ0, ar16=PH1, ar17=PH0, ar18=PD3, ar19=PD2,
ar20=PD1, ar21=PD0, ar22=PA0, ar23=PA1, ar24=PA2,
ar25=PA3, ar26=PA4, ar27=PA5, ar28=PA6, ar29=PA7,
ar30=PC7, ar31=PC6, ar32=PC5, ar33=PC4, ar34=PC3,
ar35=PC2, ar36=PC1, ar37=PC0, ar38=PD7, ar39=PG2,
ar40=PG1, ar41=PG0, ar42=PL7, ar43=PL6, ar44=PL5,
ar45=PL4, ar46=PL3, ar47=PL2, ar48=PL1, ar49=PL0,
ar50=PB3, ar51=PB2, ar52=PB1, ar53=PB0, ar54=PF0,
ar55=PF1, ar56=PF2, ar57=PF3, ar58=PF4, ar59=PF5,
ar60=PF6, ar61=PF7, ar62=PK0, ar63=PK1, ar64=PK2,
ar65=PK3, ar66=PK4, ar67=PK5, ar68=PK6, ar69=PK7,
analog0=PF0, analog1=PF1, analog2=PF2, analog3=PF3, analog4=PF4,
analog5=PF5, analog6=PF6, analog7=PF7, analog8=PK0, analog9=PK1,
analog10=PK2, analog11=PK3, analog12=PK4, analog13=PK5, analog14=PK6,
analog15=PK7,
# Marlin adds these additional aliases
ml70=PG4, ml71=PG3, ml72=PJ2, ml73=PJ3, ml74=PJ7,
ml75=PJ4, ml76=PJ5, ml77=PJ6, ml78=PE2, ml79=PE6,
ml80=PE7, ml81=PD4, ml82=PD5, ml83=PD6, ml84=PH2,
ml85=PH7
# Aliases for atmega644p (Sanguino boards)
[board_pins sanguino]
aliases:
ar0=PB0, ar1=PB1, ar2=PB2, ar3=PB3, ar4=PB4,
ar5=PB5, ar6=PB6, ar7=PB7, ar8=PD0, ar9=PD1,
ar10=PD2, ar11=PD3, ar12=PD4, ar13=PD5, ar14=PD6,
ar15=PD7, ar16=PC0, ar17=PC1, ar18=PC2, ar19=PC3,
ar20=PC4, ar21=PC5, ar22=PC6, ar23=PC7, ar24=PA0,
ar25=PA1, ar26=PA2, ar27=PA3, ar28=PA4, ar29=PA5,
ar30=PA6, ar31=PA7,
analog0=PA0, analog1=PA1, analog2=PA2, analog3=PA3, analog4=PA4,
analog5=PA5, analog6=PA6, analog7=PA7
# Aliases for atsam3x8e (Arduino Due boards)
[board_pins arduino-due]
aliases:
ar0=PA8, ar1=PA9, ar2=PB25, ar3=PC28, ar4=PA29,
ar5=PC25, ar6=PC24, ar7=PC23, ar8=PC22, ar9=PC21,
ar10=PA28, ar11=PD7, ar12=PD8, ar13=PB27, ar14=PD4,
ar15=PD5, ar16=PA13, ar17=PA12, ar18=PA11, ar19=PA10,
ar20=PB12, ar21=PB13, ar22=PB26, ar23=PA14, ar24=PA15,
ar25=PD0, ar26=PD1, ar27=PD2, ar28=PD3, ar29=PD6,
ar30=PD9, ar31=PA7, ar32=PD10, ar33=PC1, ar34=PC2,
ar35=PC3, ar36=PC4, ar37=PC5, ar38=PC6, ar39=PC7,
ar40=PC8, ar41=PC9, ar42=PA19, ar43=PA20, ar44=PC19,
ar45=PC18, ar46=PC17, ar47=PC16, ar48=PC15, ar49=PC14,
ar50=PC13, ar51=PC12, ar52=PB21, ar53=PB14, ar54=PA16,
ar55=PA24, ar56=PA23, ar57=PA22, ar58=PA6, ar59=PA4,
ar60=PA3, ar61=PA2, ar62=PB17, ar63=PB18, ar64=PB19,
ar65=PB20, ar66=PB15, ar67=PB16, ar68=PA1, ar69=PA0,
ar70=PA17, ar71=PA18, ar72=PC30, ar73=PA21, ar74=PA25,
ar75=PA26, ar76=PA27, ar77=PA28, ar78=PB23,
analog0=PA16, analog1=PA24, analog2=PA23, analog3=PA22, analog4=PA6,
analog5=PA4, analog6=PA3, analog7=PA2, analog8=PB17, analog9=PB18,
analog10=PB19, analog11=PB20
# Aliases for Adafruit GrandCentral boards (samd51)
[board_pins adafruit-grandcentral]
aliases:
ar0=PB25, ar1=PB24, ar2=PC18, ar3=PC19, ar4=PC20,
ar5=PC21, ar6=PD20, ar7=PD21, ar8=PB18, ar9=PB2,
ar10=PB22, ar11=PB23, ar12=PB0, ar13=PB1, ar14=PB16,
ar15=PB17, ar16=PC22, ar17=PC23, ar18=PB12, ar19=PB13,
ar20=PB20, ar21=PB21, ar22=PD12, ar23=PA15, ar24=PC17,
ar25=PC16, ar26=PA12, ar27=PA13, ar28=PA14, ar29=PB19,
ar30=PA23, ar31=PA22, ar32=PA21, ar33=PA20, ar34=PA19,
ar35=PA18, ar36=PA17, ar37=PA16, ar38=PB15, ar39=PB14,
ar40=PC13, ar41=PC12, ar42=PC15, ar43=PC14, ar44=PC11,
ar45=PC10, ar46=PC6, ar47=PC7, ar48=PC4, ar49=PC5,
ar50=PD11, ar51=PD8, ar52=PD9, ar53=PD10, ar54=PA2,
ar55=PA5, ar56=PB3, ar57=PC0, ar58=PC1, ar59=PC2,
ar60=PC3, ar61=PB4, ar62=PB5, ar63=PB6, ar64=PB7,
ar65=PB8, ar66=PB9, ar67=PA4, ar68=PA6, ar69=PA7,
analog0=PA2, analog1=PA5, analog2=PB3, analog3=PC0, analog4=PC1,
analog5=PC2, analog6=PC3, analog7=PB4, analog8=PB5, analog9=PB6,
analog10=PB7, analog11=PB8, analog12=PB9, analog13=PA4, analog14=PA6,
analog15=PA7
# Aliases for Beaglebone boards
[board_pins beaglebone]
aliases:
P8_3=gpio1_6, P8_4=gpio1_7, P8_5=gpio1_2,
P8_6=gpio1_3, P8_7=gpio2_2, P8_8=gpio2_3,
P8_9=gpio2_5, P8_10=gpio2_4, P8_11=gpio1_13,
P8_12=gpio1_12, P8_13=gpio0_23, P8_14=gpio0_26,
P8_15=gpio1_15, P8_16=gpio1_14, P8_17=gpio0_27,
P8_18=gpio2_1, P8_19=gpio0_22, P8_20=gpio1_31,
P8_21=gpio1_30, P8_22=gpio1_5, P8_23=gpio1_4,
P8_24=gpio1_1, P8_25=gpio1_0, P8_26=gpio1_29,
P8_27=gpio2_22, P8_28=gpio2_24, P8_29=gpio2_23,
P8_30=gpio2_25, P8_31=gpio0_10, P8_32=gpio0_11,
P8_33=gpio0_9, P8_34=gpio2_17, P8_35=gpio0_8,
P8_36=gpio2_16, P8_37=gpio2_14, P8_38=gpio2_15,
P8_39=gpio2_12, P8_40=gpio2_13, P8_41=gpio2_10,
P8_42=gpio2_11, P8_43=gpio2_8, P8_44=gpio2_9,
P8_45=gpio2_6, P8_46=gpio2_7, P9_11=gpio0_30,
P9_12=gpio1_28, P9_13=gpio0_31, P9_14=gpio1_18,
P9_15=gpio1_16, P9_16=gpio1_19, P9_17=gpio0_5,
P9_18=gpio0_4, P9_19=gpio0_13, P9_20=gpio0_12,
P9_21=gpio0_3, P9_22=gpio0_2, P9_23=gpio1_17,
P9_24=gpio0_15, P9_25=gpio3_21, P9_26=gpio0_14,
P9_27=gpio3_19, P9_28=gpio3_17, P9_29=gpio3_15,
P9_30=gpio3_16, P9_31=gpio3_14, P9_41=gpio0_20,
P9_42=gpio3_20, P9_43=gpio0_7, P9_44=gpio3_18,
P9_33=AIN4, P9_35=AIN6, P9_36=AIN5, P9_37=AIN2,
P9_38=AIN3, P9_39=AIN0, P9_40=AIN1

View File

@ -117,7 +117,7 @@ gcode:
RESTORE_GCODE_STATE NAME=M600_state
######################################################################
# BME280 Environmental Sensor
# BMP280/BME280/BME680 Environmental Sensor
######################################################################
# The macro below assumes you have a BME280 sensor_type defined in one

View File

@ -9,61 +9,58 @@
# are connected to the main micro-controller.
[mcu]
serial: /dev/serial/by-path/platform-3f980000.usb-usb-0:1.2:1.0-port0
pin_map: arduino
# The "zboard" micro-controller will be used to control the Z axis.
[mcu zboard]
serial: /dev/serial/by-path/platform-3f980000.usb-usb-0:1.3:1.0-port0
pin_map: arduino
# The "auxboard" micro-controller will be used to control the heaters.
[mcu auxboard]
serial: /dev/serial/by-path/platform-3f980000.usb-usb-0:1.4:1.0-port0
pin_map: arduino
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar3
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: !ar61
enable_pin: !ar56
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^ar14
endstop_pin: ^PJ1
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: zboard:ar46
dir_pin: zboard:ar48
enable_pin: !zboard:ar62
step_pin: zboard:PL3
dir_pin: zboard:PL1
enable_pin: !zboard:PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^zboard:ar18
endstop_pin: ^zboard:PD3
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: auxboard:ar26
dir_pin: auxboard:ar28
enable_pin: !auxboard:ar24
step_pin: auxboard:PA4
dir_pin: auxboard:PA6
enable_pin: !auxboard:PA2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: auxboard:ar10
heater_pin: auxboard:PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: auxboard:analog13
sensor_pin: auxboard:PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@ -72,15 +69,15 @@ min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: auxboard:ar8
heater_pin: auxboard:PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: auxboard:analog14
sensor_pin: auxboard:PK6
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: auxboard:ar9
pin: auxboard:PH6
[printer]
kinematics: cartesian

View File

@ -399,17 +399,20 @@ reported in the two "uptime" response messages. The total number of
commands per second is then `100000 * mcu_frequency / clock_diff`.
Note that this test may saturate the USB/CPU capacity of a Raspberry
Pi. The benchmarks below are with console.py running on a desktop
class machine with the device connected via a high-speed hub.
Pi. If running on a Raspberry Pi, Beaglebone, or similar host computer
then increase the delay (eg, `DELAY {clock + 20*freq} get_uptime`).
Where applicable, the benchmarks below are with console.py running on
a desktop class machine with the device connected via a high-speed
hub.
| MCU | Rate | Build | Build compiler |
| ------------------- | ---- | -------- | ------------------- |
| pru (shared memory) | 5K | b161a69e | pru-gcc (GCC) 8.0.0 20170530 (experimental) |
| stm32f042 (CAN) | 18K | c105adc8 | arm-none-eabi-gcc (GNU Tools 7-2018-q3-update) 7.3.1 |
| atmega2560 (serial) | 23K | b161a69e | avr-gcc (GCC) 4.8.1 |
| sam3x8e (serial) | 23K | b161a69e | arm-none-eabi-gcc (Fedora 7.1.0-5.fc27) 7.1.0 |
| at90usb1286 (USB) | 75K | 01d2183f | avr-gcc (GCC) 5.4.0 |
| samd21 (USB) | 223K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 |
| pru (shared memory) | 260K | c5968a08 | pru-gcc (GCC) 8.0.0 20170530 (experimental) |
| stm32f103 (USB) | 355K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 |
| sam3x8e (USB) | 418K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 |
| lpc1768 (USB) | 534K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 |

74
docs/CANBUS.md Normal file
View File

@ -0,0 +1,74 @@
This document describes Klipper's CAN bus support.
# Device Hardware
Klipper currently only supports CAN on stm32 chips. In addition, the
micro-controller chip must support CAN and it must be on a board that
has a CAN transceiver.
To compile for CAN, run "make menuconfig", unselect "Use USB for
communication (instead of serial)" and then select "Use CAN for
communication (instead of serial)". Finally, compile the
micro-controller code and flash it to the target board.
# Host Hardware
In order to use a CAN bus, it is necessary to have a host adapter.
There are currently two common options:
1. Use a [Waveshare Raspberry Pi CAN
hat](https://www.waveshare.com/rs485-can-hat.htm) or one of its
many clones.
2. Use a USB CAN adapter (for example
[https://hacker-gadgets.com/product/cantact-usb-can-adapter/](https://hacker-gadgets.com/product/cantact-usb-can-adapter/)). There
are many different USB to CAN adapters available - when choosing
one, we recommend verifying it can run the [candlelight
firmware](https://github.com/candle-usb/candleLight_fw). (Unfortunately,
we've found some USB adapters run defective firmware and are locked
down, so verify before purchasing.)
It is also necessary to configure the host operating system to use the
adapter. This is typically done by creating a new file named
`/etc/network/interfaces.d/can0` with the following contents:
```
auto can0
iface can0 can static
bitrate 500000
up ifconfig $IFACE txqueuelen 128
```
Note that the "Raspberry Pi CAN hat" also requires [changes to
config.txt](https://www.waveshare.com/wiki/RS485_CAN_HAT).
# Finding the canbus_uuid for new micro-controllers
Each micro-controller on the CAN bus is assigned a unique id based on
the factory chip identifier encoded into each micro-controller. To
find each micro-controller device id, make sure the hardware is
powered and wired correctly, and then run:
```
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
```
If uninitialized CAN devices are detected the above command will
report lines like the following:
```
Found canbus_uuid=11aa22bb33cc
```
Each device will have a unique identifier. In the above example,
`11aa22bb33cc` is the micro-controller's "canbus_uuid".
Note that the `canbus_query.py` tool will only report uninitialized
devices - if Klipper (or a similar tool) configures the device then it
will no longer appear in the list.
# Configuring Klipper
Update the Klipper [mcu configuration](Config_Reference.md#mcu) to use
the CAN bus to communicate with the device - for example:
```
[mcu my_can_mcu]
canbus_uuid: 11aa22bb33cc
```

67
docs/CANBUS_protocol.md Normal file
View File

@ -0,0 +1,67 @@
This document describes the protocol Klipper uses to communicate over
[CAN bus](https://en.wikipedia.org/wiki/CAN_bus). See
[CANBUS.md](CANBUS.md) for information on configuring Klipper with CAN
bus.
# Micro-controller id assignment
Klipper uses only CAN 2.0A standard size CAN bus packets, which are
limited to 8 data bytes and an 11-bit CAN bus identifier. In order to
support efficient communication, each micro-controller is assigned at
run-time a unique 1-byte CAN bus nodeid (`canbus_nodeid`) for general
Klipper command and response traffic. Klipper command messages going
from host to micro-controller use the CAN bus id of `canbus_nodeid *
2 + 256`, while Klipper response messages from micro-controller to
host use `canbus_nodeid * 2 + 256 + 1`.
Each micro-controller has a factory assigned unique chip identifier
that is used during id assignment. This identifier can exceed the
length of one CAN packet, so a hash function is used to generate a
unique 6-byte id (`canbus_uuid`) from the factory id.
# Admin messages
Admin messages are used for id assignment. Admin messages sent from
host to micro-controller use the CAN bus id `0x3f0` and messages sent
from micro-controller to host use the CAN bus id `0x3f1`. All
micro-controllers listen to messages on id `0x3f0`; that id can be
thought of as a "broadcast address".
## CMD_QUERY_UNASSIGNED message
This command queries all micro-controllers that have not yet been
assigned a `canbus_nodeid`. Unassigned micro-controllers will respond
with a RESP_NEED_NODEID response message.
The CMD_QUERY_UNASSIGNED message format is:
`<1-byte message_id = 0x00>`
## CMD_SET_NODEID message
This command assigns a `canbus_nodeid` to the micro-controller with a
given `canbus_uuid`.
The CMD_SET_NODEID message format is:
`<1-byte message_id = 0x01><6-byte canbus_uuid><1-byte canbus_nodeid>`
## RESP_NEED_NODEID message
The RESP_NEED_NODEID message format is:
`<1-byte message_id = 0x20><6-byte canbus_uuid>`
# Data Packets
A micro-controller that has been assigned a nodeid via the
CMD_SET_NODEID command can send and receive data packets.
The packet data in messages using the node's receive CAN bus id
(`canbus_nodeid * 2 + 256`) are simply appended to a buffer, and when
a complete [mcu protocol message](Protocol.md) is found its contents
are parsed and processed. The data is treated as a byte stream - there
is no requirement for the start of a Klipper message block to align
with the start of a CAN bus packet.
Similarly, mcu protocol message responses are sent from
micro-controller to host by copying the message data into one or more
packets with the node's transmit CAN bus id (`canbus_nodeid * 2 +
256 + 1`).

View File

@ -6,9 +6,7 @@ this document.
## Creating a new issue
Please see the [contact page](Contact.md) for information on creating
an issue. In particular, **we need the klippy.log file** attached to
bug reports. Also, be sure to read the [FAQ](FAQ.md) to see if a
similar issue has already been raised.
an issue.
## Submitting a pull request

View File

@ -129,6 +129,10 @@ The following are common printer attributes:
This is also available on "heater_fan", "fan_generic", and
"controller_fan" config sections (eg,
`printer["fan_generic my_fan"].speed`).
- `printer.fan.rpm`: The measured fan speed in rotations per minute if
the fan has a tachometer_pin defined. This is also available on
"heater_fan", "fan_generic", and "controller_fan" config sections
(eg, `printer["fan_generic my_fan"].rpm`).
- `printer.gcode_move.gcode_position`: The current position of the
toolhead relative to the current G-Code origin. That is, positions
that one might directly send to a `G1` command. It is possible to
@ -214,6 +218,8 @@ The following are common printer attributes:
as "triggered" during the last QUERY_PROBE command. Note, due to the
order of template expansion (see above), the QUERY_PROBE command
must be run prior to the macro containing this reference.
- `printer.probe.last_z_result`: Returns the Z result value of the last
PROBE command.
- `printer.configfile.settings.<section>.<option>`: Returns the given
config file setting (or default value) during the last software
start or restart. (Any settings changed at run-time will not be
@ -258,14 +264,15 @@ The following are common printer attributes:
the config file if a `SET_RETRACTION` command alters them.
- `printer["bme280 <sensor_name>"].temperature`,
`printer["bme280 <sensor_name>"].humidity`,
`printer["bme280 <sensor_name>"].pressure`: The last read values
`printer["bme280 <sensor_name>"].pressure`,
`printer["bme280 <sensor_name>"].gas`: The last read values
from the sensor.
- `printer["htu21d <sensor_name>"].temperature`,
`printer["htu21d <sensor_name>"].humidity`: The last read values
from the sensor.
- `printer["lm75 <sensor_name>"].temperature`: The last read
temperature from the sensor.
- `printer["rpi_temperature <sensor_name>"].temperature`: The last read
- `printer["temperature_host <sensor_name>"].temperature`: The last read
temperature from the sensor.
- `printer["temperature_sensor <config_name>"].temperature`: The last read
temperature from the sensor.

View File

@ -6,6 +6,40 @@ All dates in this document are approximate.
# Changes
20210325: Support for the `pin_map` config option is deprecated. Use
the [sample-aliases.cfg](../config/sample-aliases.cfg) file to
translate to the actual micro-controller pin names. The `pin_map`
config option will be removed in the near future.
20210313: Klipper's support for micro-controllers that communicate
with CAN bus has changed. If using CAN bus then all micro-controllers
must be reflashed and the [Klipper configuration must be
updated](CANBUS.md).
20210310: The TMC2660 default for driver_SFILT has been changed from 1
to 0.
20210227: TMC stepper motor drivers in UART or SPI mode are now
queried once per second whenever they are enabled - if the driver can
not be contacted or if the driver reports an error, then Klipper will
transition to a shutdown state.
20210219: The `rpi_temperature` module has been renamed to
`temperature_host`. Replace any occurrences of `sensor_type:
rpi_temperature` with `sensor_type: temperature_host`. The path to
the temperature file may be specified in the `sensor_path` config
variable. The `rpi_temperature` name is deprecated and will be
removed in the near future.
20210201: The `TEST_RESONANCES` command will now disable input shaping
if it was previously enabled (and re-enable it after the test). In order
to override this behavior and keep the input shaping enabled, one can
pass an additional parameter `INPUT_SHAPING=1` to the command.
20210201: The `ACCELEROMETER_MEASURE` command will now append the name
of the accelerometer chip to the output file name if the chip was given
a name in the corresponding adxl345 section of the printer.cfg.
20201222: The `step_distance` setting in the stepper config sections
is deprecated. It is advised to update the config to use the
[`rotation_distance`](Rotation_Distance.md) setting. Support for

View File

@ -13,11 +13,6 @@ Klipper and choosing an initial config file.
Many config options require the name of a micro-controller pin.
Klipper uses the hardware names for these pins - for example `PA4`.
For AVR micro-controllers one may also use an Arduino alias (such as
"ar29" or "analog3"). In order to use Arduino names, the `pin_map`
variable in the `[mcu]` section must be present and have a value of
`arduino`.
Pin names may be preceded by `!` to indicate that a reverse polarity
should be used (eg, trigger on low instead of high).
@ -39,12 +34,16 @@ Configuration of the primary micro-controller.
serial:
# The serial port to connect to the MCU. If unsure (or if it
# changes) see the "Where's my serial port?" section of the FAQ.
# This parameter must be provided.
# This parameter must be provided when using a serial port.
#baud: 250000
# The baud rate to use. The default is 250000.
#pin_map:
# This option may be used to enable Arduino pin name aliases. The
# default is to not enable the aliases.
#canbus_uuid:
# If using a device connected to a CAN bus then this sets the unique
# chip identifier to connect to. This value must be provided when using
# CAN bus for communication.
#canbus_interface:
# If using a device connected to a CAN bus then this sets the CAN
# network interface to use. The default is 'can0'.
#restart_method:
# This controls the mechanism the host will use to reset the
# micro-controller. The choices are 'arduino', 'cheetah', 'rpi_usb',
@ -2032,18 +2031,18 @@ sensor_pin:
# name in the above list.
```
## bme280 temperature sensor
## BMP280/BME280/BME680 temperature sensor
BME280 two wire interface (I2C) environmental sensor. Note that this
sensor is not intended for use with extruders and heater beds, but
rather for monitoring ambient temperature (C), pressure (hPa), and
relative humidity. See
[sample-macros.cfg](../config/sample-macros.cfg) for a gcode_macro
BMP280/BME280/BME680 two wire interface (I2C) environmental sensors.
Note that thoose sensors aee not intended for use with extruders and
heater beds, but rather for monitoring ambient temperature (C),
pressure (hPa), relative humidity and in case of the BME680 gas level.
See [sample-macros.cfg](../config/sample-macros.cfg) for a gcode_macro
that may be used to report pressure and humidity in addition to
temperature.
```
sensor_type: bme280
sensor_type: BME280
#i2c_address:
# Default is 118 (0x76). Some BME280 sensors have an address of 119
# (0x77).
@ -2145,12 +2144,33 @@ sensor_type: temperature_mcu
# micro-controller specification.
```
## RPi temperature sensor
## Host temperature sensor
CPU temperature from the Raspberry Pi running the host software.
Temperature from the machine (eg Raspberry Pi) running the host software.
```
sensor_type: rpi_temperature
sensor_type: temperature_host
#sensor_path:
# The path to temperature system file. The default is
# "/sys/class/thermal/thermal_zone0/temp" which is the temperature
# system file on a Raspberry Pi computer.
```
## DS18B20 temperature sensor
DS18B20 is a 1-wire (w1) digital temperature sensor. Note that this sensor is not intended for use with extruders and heater beds, but rather for monitoring ambient temperature (C). These sensors have range up to 125 C, so are usable for e.g. chamber temperature monitoring. They can also function as simple fan/heater controllers. DS18B20 sensors are only supported on the "host mcu", e.g. the Raspberry Pi. The w1-gpio Linux kernel module must be installed.
```
sensor_type: DS18B20
serial_no:
# Each 1-wire device has a unique serial number used to identify the device,
# usually in the format 28-031674b175ff. This parameter must be provided.
# Attached 1-wire devices can be listed using the following Linux command:
# ls /sys/bus/w1/devices/
#ds18_report_time:
# Interval in seconds between readings. Default is 3.0, with a minimum of 1.0
#sensor_mcu:
# The micro-controller to read from. Must be the host_mcu
```
# Fans
@ -2205,6 +2225,19 @@ pin:
# input speed which reliably drives the fan without stalls. Set
# off_below to the duty cycle corresponding to this value (for
# example, 12% -> 0.12) or slightly higher.
#tachometer_pin:
# Tachometer input pin for monitoring fan speed. A pullup is generally
# required. This parameter is optional.
#tachometer_ppr: 2
# When tachometer_pin is specified, this is the number of pulses per
# revolution of the tachometer signal. For a BLDC fan this is
# normally half the number of poles. The default is 2.
#tachometer_poll_interval: 0.0015
# When tachometer_pin is specified, this is the polling period of the
# tachometer pin, in seconds. The default is 0.0015, which is fast
# enough for fans below 10000 RPM at 2 PPR. This must be smaller than
# 30/(tachometer_ppr*rpm), with some margin, where rpm is the
# maximum speed (in RPM) of the fan.
```
## [heater_fan]
@ -2223,6 +2256,9 @@ a shutdown_speed equal to max_power.
#hardware_pwm:
#kick_start_time:
#off_below:
#tachometer_pin:
#tachometer_ppr:
#tachometer_poll_interval:
# See the "fan" section for a description of the above parameters.
#heater: extruder
# Name of the config section defining the heater that this fan is
@ -2256,6 +2292,9 @@ watched component.
#hardware_pwm:
#kick_start_time:
#off_below:
#tachometer_pin:
#tachometer_ppr:
#tachometer_poll_interval:
# See the "fan" section for a description of the above parameters.
#fan_speed: 1.0
# The fan speed (expressed as a value from 0.0 to 1.0) that the fan
@ -2296,6 +2335,9 @@ additional information.
#hardware_pwm:
#kick_start_time:
#off_below:
#tachometer_pin:
#tachometer_ppr:
#tachometer_poll_interval:
# See the "fan" section for a description of the above parameters.
#sensor_type:
#sensor_pin:
@ -2341,6 +2383,9 @@ with the SET_FAN_SPEED
#hardware_pwm:
#kick_start_time:
#off_below:
#tachometer_pin:
#tachometer_ppr:
#tachometer_poll_interval:
# See the "fan" section for a description of the above parameters.
```
@ -2484,6 +2529,13 @@ pin:
#shutdown_value:
# The value to set the pin to on an MCU shutdown event. The default
# is 0 (for low voltage).
#maximum_mcu_duration:
# The maximum duration a non-shutdown value may be driven by the MCU
# without an acknowledge from the host.
# If host can not keep up with an update, the MCU will shutdown
# and set all pins to their respective shutdown values.
# Default: 0 (disabled)
# Usual values are around 5 seconds.
#cycle_time: 0.100
# The amount of time (in seconds) per PWM cycle. It is recommended
# this be 10 milliseconds or greater when using software based PWM.
@ -2539,6 +2591,10 @@ pins:
# TMC stepper driver configuration
Configuration of Trinamic stepper motor drivers in UART/SPI mode.
Additional information is in the [TMC Drivers guide](TMC_Drivers.md)
and in the [command reference](G-Codes.md#tmc-stepper-drivers).
## [tmc2130]
Configure a TMC2130 stepper motor driver via SPI bus. To use this
@ -2559,6 +2615,12 @@ cs_pin:
#spi_software_miso_pin:
# See the "common SPI settings" section for a description of the
# above parameters.
#chain_position:
#chain_length:
# These parameters configure an SPI daisy chain. The two parameters
# define the stepper position in the chain and the total chain length.
# Position 1 corresponds to the stepper that connects to the MOSI signal.
# The default is to not use an SPI daisy chain.
#interpolate: True
# If true, enable step interpolation (the driver will internally
# step at a rate of 256 micro-steps). The default is True.
@ -2595,13 +2657,13 @@ run_current:
#diag0_pin:
#diag1_pin:
# The micro-controller pin attached to one of the DIAG lines of the
# TMC2130 chip. Only a single diag pin should be specified.
# Setting this creates a "tmc2130_stepper_x:virtual_endstop" virtual
# pin which may be used as the stepper's endstop_pin. Doing this
# enables "sensorless homing". (Be sure to also set driver_SGT to an
# TMC2130 chip. Only a single diag pin should be specified. The pin
# is "active low" and is thus normally prefaced with "^!". Setting
# this creates a "tmc2130_stepper_x:virtual_endstop" virtual pin
# which may be used as the stepper's endstop_pin. Doing this enables
# "sensorless homing". (Be sure to also set driver_SGT to an
# appropriate sensitivity value.) The default is to not enable
# sensorless homing. See docs/Sensorless_Homing.md for details on
# how to configure this.
# sensorless homing.
```
## [tmc2208]
@ -2704,11 +2766,12 @@ run_current:
# above list.
#diag_pin:
# The micro-controller pin attached to the DIAG line of the TMC2209
# chip. Setting this creates a "tmc2209_stepper_x:virtual_endstop"
# virtual pin which may be used as the stepper's endstop_pin. Doing
# this enables "sensorless homing". (Be sure to also set
# driver_SGTHRS to an appropriate sensitivity value.) The default is
# to not enable sensorless homing.
# chip. The pin is normally prefaced with "^" to enable a pullup.
# Setting this creates a "tmc2209_stepper_x:virtual_endstop" virtual
# pin which may be used as the stepper's endstop_pin. Doing this
# enables "sensorless homing". (Be sure to also set driver_SGTHRS to
# an appropriate sensitivity value.) The default is to not enable
# sensorless homing.
```
## [tmc2660]
@ -2765,7 +2828,7 @@ run_current:
#driver_SEMAX: 0
#driver_SEUP: 0
#driver_SEMIN: 0
#driver_SFILT: 1
#driver_SFILT: 0
#driver_SGT: 0
#driver_SLPH: 0
#driver_SLPL: 0
@ -2801,6 +2864,12 @@ cs_pin:
#spi_software_miso_pin:
# See the "common SPI settings" section for a description of the
# above parameters.
#chain_position:
#chain_length:
# These parameters configure an SPI daisy chain. The two parameters
# define the stepper position in the chain and the total chain length.
# Position 1 corresponds to the stepper that connects to the MOSI signal.
# The default is to not use an SPI daisy chain.
#interpolate: True
# If true, enable step interpolation (the driver will internally
# step at a rate of 256 micro-steps). The default is True.
@ -2855,13 +2924,13 @@ run_current:
#diag0_pin:
#diag1_pin:
# The micro-controller pin attached to one of the DIAG lines of the
# TMC5160 chip. Only a single diag pin should be specified.
# Setting this creates a "tmc5160_stepper_x:virtual_endstop" virtual
# pin which may be used as the stepper's endstop_pin. Doing this
# enables "sensorless homing". (Be sure to also set driver_SGT to an
# TMC5160 chip. Only a single diag pin should be specified. The pin
# is "active low" and is thus normally prefaced with "^!". Setting
# this creates a "tmc5160_stepper_x:virtual_endstop" virtual pin
# which may be used as the stepper's endstop_pin. Doing this enables
# "sensorless homing". (Be sure to also set driver_SGT to an
# appropriate sensitivity value.) The default is to not enable
# sensorless homing. See docs/Sensorless_Homing.md for details on
# how to configure this.
# sensorless homing.
```
# Run-time stepper motor current configuration
@ -3022,9 +3091,15 @@ lcd_type:
# The type of LCD chip in use. This may be "hd44780" (which is used
# in "RepRapDiscount 2004 Smart Controller" type displays), "st7920"
# (which is used in "RepRapDiscount 12864 Full Graphic Smart
# Controller" type displays), "uc1701" (which is used in "MKS Mini
# 12864" type displays), "ssd1306", or "sh1106". This parameter must
# be provided.
# Controller" type displays), "emulated_st7920" (which emulate a ST7920
# display but won't work properly with the "st7920" display driver),
# "uc1701" (which is used in "MKS Mini 12864" type displays),
# "ssd1306", or "sh1106". This parameter must be provided.
#hd44780_protocol_init: True
# Perform 8-bit/4-bit protocol initialization on an hd44780 display.
# This is necessary on real hd44780 devices. However, one may
# need to disable this on some "clone" devices. The default
# is True.
#rs_pin:
#e_pin:
#d4_pin:
@ -3042,6 +3117,17 @@ lcd_type:
#sid_pin:
# The pins connected to an st7920 type lcd. These parameters must be
# provided when using an st7920 display.
#en_pin:
#spi_speed:
#spi_software_sclk_pin:
#spi_software_mosi_pin:
#spi_software_miso_pin:
# The pins connected to an emulated_st7920 type lcd. The en_pin corresponds
# to the cs_pin of the st7920 type lcd, spi_software_sclk_pin corresponds
# to sclk_pin and spi_software_mosi_pin corresponds to sid_pin. The
# spi_software_miso_pin needs to be set to an unused pin of the printer
# mainboard as the st7920 as no MISO pin but the software spi implementation
# requires this pin to be configured. The default spi_speed is 1MHz.
#cs_pin:
#a0_pin:
#rst_pin:
@ -3377,6 +3463,34 @@ information.
# provided.
```
## [filament_motion_sensor]
Filament Motion Sensor. Support for filament insert and runout
detection using an encoder that toggles the output pin during filament
movement through the sensor.
See the [command reference](G-Codes.md#filament-sensor) for more
information.
```
[filament_motion_sensor my_sensor]
detection_length: 7.0
# The minimum length of filament pulled through the sensor to trigger
# a state change on the switch_pin
# Default is 7 mm.
extruder:
# The name of the extruder section this sensor is associated with.
# This parameter must be provided.
switch_pin:
#pause_on_runout:
#runout_gcode:
#insert_gcode:
#event_delay:
#pause_delay:
# See the "filament_switch_sensor" section for a description of the
# above parameters.
```
## [tsl1401cl_filament_width_sensor]
TSLl401CL Based Filament Width Sensor. See the
@ -3547,8 +3661,9 @@ example.
revision:
# The replicape hardware revision. Currently only revision "B3" is
# supported. This parameter must be provided.
#enable_pin: !P9_41
# The replicape global enable pin. The default is !P9_41.
#enable_pin: !gpio0_20
# The replicape global enable pin. The default is !gpio0_20 (aka
# P9_41).
host_mcu:
# The name of the mcu config section that communicates with the
# Klipper "linux process" mcu instance. This parameter must be
@ -3642,3 +3757,37 @@ I2C bus.
# On some micro-controllers changing this value has no effect. The
# default is 100000.
```
# Other Custom Modules
## [palette2]
Palette 2 multimaterial support - provides a tighter integration
supporting Palette 2 devices in connected mode.
This modules also requires `[virtual_sdcard]` and `[pause_resume]`
for full functionality.
If you use this module, do not use the Palette 2 plugin for
Octoprint as they will conflict, and 1 will fail to initialize
properly likely aborting your print.
If you use Octoprint and stream gcode over the serial port instead of
printing from virtual_sd, then remo **M1** and **M0** from *Pausing commands*
in *Settings > Serial Connection > Firmware & protocol* will prevent
the need to start print on the Palette 2 and unpausing in Octoprint
for your print to begin.
```
[palette2]
serial:
# The serial port to connect to the Palette 2.
#baud: 250000
# The baud rate to use. The default is 250000.
#feedrate_splice: 0.8
# The feedrate to use when splicing, default is 0.8
#feedrate_normal: 1.0
# The feedrate to use after splicing, default is 1.0
#auto_load_speed: 2
# Extrude feedrate when autoloading, default is 2 (mm/s)
```

View File

@ -1,57 +1,161 @@
This page provides information on how to contact the Klipper
developers.
This document provides contact information for Klipper.
Issue reporting
===============
1. [Community Forum](#community-forum)
2. [Discord Chat](#discord-chat)
3. [I have a question about Klipper](#i-have-a-question-about-klipper)
4. [I have a feature request](#i-have-a-feature-request)
5. [Help! It doesn't work!](#help-it-doesnt-work)
6. [I have diagnosed a defect in the Klipper software](#i-have-diagnosed-a-defect-in-the-klipper-software)
7. [I am making changes that I'd like to include in Klipper](#i-am-making-changes-that-id-like-to-include-in-klipper)
It is very important to attach the Klipper log file to all
reports. The log file has been engineered to answer common questions
the Klipper developers have about the software and its environment
(software version, hardware type, configuration, event timing, and
hundreds of other questions). **The developers need the Klipper log
file to provide any meaningful assistance**; only this log file
provides the necessary information.
# Community Forum
On a problem report the first step is to **issue an M112 command** in
the OctoPrint terminal window immediately after the undesirable event
occurs. This causes Klipper to go into a "shutdown state" and it will
cause additional debugging information to be written to the log file.
There is a [Klipper Community Discourse
server](https://community.klipper3d.org) for discussions on Klipper.
Issue requests are submitted through Github. **All Github issues must
include the full /tmp/klippy.log log file from the session that
produced the event being reported.** An "scp" and/or "sftp" utility is
needed to acquire this log file. The "scp" utility comes standard with
Linux and MacOS desktops. There are freely available scp utilities for
other desktops (eg, WinSCP).
# Discord Chat
Use the scp utility to copy the `/tmp/klippy.log` file from the
Raspberry Pi to your desktop. It is a good idea to compress the
klippy.log file before posting it (eg, using zip or gzip). Open a new
issue at https://github.com/KevinOConnor/klipper/issues , provide a
description of the problem, and **attach the `klippy.log` file to the
issue**: ![attach-issue](img/attach-issue.png)
There is a Discord server dedicated to Klipper at:
[https://discord.klipper3d.org](https://discord.klipper3d.org).
Mailing list
============
This server is run by a community of Klipper enthusiasts dedicated to
discussions on Klipper. It allows users to chat with other users in
real-time.
There is a mailing list for general discussions on Klipper. In order
to send an email to the list, one must first subscribe:
https://www.freelists.org/list/klipper . Once subscribed, emails may
be sent to `klipper@freelists.org`.
# I have a question about Klipper
Archives of the mailing list are available at:
https://www.freelists.org/archive/klipper/
Many questions we receive are already answered in the [Klipper
documentation](Overview.md). Please be sure to to read the
documentation and follow the directions provided there.
IRC
===
It is also possible to search for similar questions in the [Klipper
Community Forum](#community-forum).
One may join the #klipper channel on freenode.net (
irc://chat.freenode.net:6667 ).
If you are interested in sharing your knowledge and experience with
other Klipper users then you can join the [Klipper Community
Forum](#community-forum) or [Klipper Discord
Chat](#discord-chat). Both are communities where Klipper users can
discuss Klipper with other users.
To communicate in this IRC channel one will need an IRC
client. Configure it to connect to chat.freenode.net on port 6667 and
join the #klipper channel (`/join #klipper`).
Many questions we receive are general 3d-printing questions that are
not specific to Klipper. If you have a general question or are
experiencing general printing problems, then you will likely get a
better response by asking in a general 3d-printing forum or a forum
dedicated to your printer hardware.
If asking a question on IRC, be sure to ask the question and then stay
connected to the channel to receive responses. Due to timezone
differences, it may take several hours before receiving a response.
Do not open a Klipper github issue to ask a question.
# I have a feature request
All new features require someone interested and able to implement that
feature. If you are interested in helping to implement or test a new
feature, you can search for ongoing developments in the [Klipper
Community Forum](#community-forum). There is also [Klipper Discord
Chat](#discord-chat) for discussions between collaborators.
Do not open a Klipper github issue to request a feature.
# Help! It doesn't work!
Unfortunately, we receive many more requests for help than we could
possibly answer. Most problem reports we see are eventually tracked
down to:
1. Subtle errors in the hardware, or
2. Not following all the steps described in the Klipper documentation.
If you are experiencing problems we recommend you carefully read the
[Klipper documentation](Overview.md) and double check that all steps
were followed.
If you are experiencing a printing problem, then we recommend
carefully inspecting the printer hardware (all joints, wires, screws,
etc.) and verify nothing is abnormal. We find most printing problems
are not related to the Klipper software. If you do find a problem with
the printer hardware then you will likely get a better response by
searching in a general 3d-printing forum or in a forum dedicated to
your printer hardware.
It is also possible to search for similar issues in the [Klipper
Community Forum](#community-forum).
If you are interested in sharing your knowledge and experience with
other Klipper users then you can join the [Klipper Community
Forum](#community-forum) or [Klipper Discord
Chat](#discord-chat). Both are communities where Klipper users can
discuss Klipper with other users.
Do not open a Klipper github issue to request help.
# I have diagnosed a defect in the Klipper software
Klipper is an open-source project and we appreciate when collaborators
diagnose errors in the software.
There is important information that will be needed in order to fix a
bug. Please follow these steps:
1. Be sure the bug is in the Klipper software. If you are thinking
"there is a problem, I can't figure out why, and therefore it is a
Klipper bug", then **do not** open a github issue. In that case,
someone interested and able will need to first research and
diagnose the root cause of the problem. If you would like to share
the results of your research or check if other users are
experiencing similar issues then you can search the [Klipper
Community Forum](#community-forum).
2. Make sure you are running unmodified code from
[https://github.com/KevinOConnor/klipper](https://github.com/KevinOConnor/klipper).
If the code has been modified or is obtained from another source,
then you will need to reproduce the problem on the unmodified code
from
[https://github.com/KevinOConnor/klipper](https://github.com/KevinOConnor/klipper)
prior to reporting an issue.
3. If possible, run an `M112` command in the OctoPrint terminal window
immediately after the undesirable event occurs. This causes Klipper
to go into a "shutdown state" and it will cause additional
debugging information to be written to the log file.
4. Obtain the Klipper log file from the event. The log file has been
engineered to answer common questions the Klipper developers have
about the software and its environment (software version, hardware
type, configuration, event timing, and hundreds of other
questions).
1. The Klipper log file is located in `/tmp/klippy.log` on the
Klipper "host" computer (the Raspberry Pi).
2. An "scp" or "sftp" utility is needed to copy this log file to
your desktop computer. The "scp" utility comes standard with
Linux and MacOS desktops. There are freely available scp
utilities for other desktops (eg, WinSCP). If using a graphical
scp utility that can not directly copy `/tmp/klippy.log` then
repeatedly click on `..` or `parent folder` until you get to the
root directory, click on the `tmp` folder, and then select the
`klippy.log` file.
3. Copy the log file to your desktop so that it can be attached to
an issue report.
4. Do not modify the log file in any way; do not provide a snippet
of the log. Only the full unmodified log file provides the
necessary information.
5. If the log file is very large (eg, greater than 2MB) then one
may need to compress the log with zip or gzip.
5. Open a new github issue at
[https://github.com/KevinOConnor/klipper/issues](https://github.com/KevinOConnor/klipper/issues)
and provide a clear description of the problem. The Klipper
developers need to understand what steps were taken, what the
desired outcome was, and what outcome actually occurred. The
Klipper log file **must be attached** to that ticket:
![attach-issue](img/attach-issue.png)
# I am making changes that I'd like to include in Klipper
Klipper is open-source software and we appreciate new contributions.
New contributions (for both code and documentation) are submitted via
Github Pull Requests. See the [CONTRIBUTING document](CONTRIBUTING.md)
for important information.
There are several [documents for
developers](Overview.md#developer-documentation). If you have
questions on the code then you can also ask in the [Klipper Community
Forum](#community-forum) or on the [Klipper Community
Discord](#discord-chat). If you would like to provide an update on
your current progress then you can open a Github issue with the
location of your code, an overview of the changes, and a description
of its current status.

View File

@ -123,12 +123,15 @@ possible to manually send these MCU commands (functions marked with
the DECL_COMMAND() macro in the Klipper source code). To do so, run:
```
~/klippy-env/bin/python ./klippy/console.py /tmp/pseudoserial 250000
~/klippy-env/bin/python ./klippy/console.py /tmp/pseudoserial
```
See the "HELP" command within the tool for more information on its
functionality.
Some command-line options are available. For more information run:
`~/klippy-env/bin/python ./klippy/console.py --help`
Generating load graphs
======================

94
docs/Example_Configs.md Normal file
View File

@ -0,0 +1,94 @@
This document contains guidelines for contributing an example Klipper
configuration.
The example Klipper configs are located in the [config
directory](../config/).
# Guidelines
1. Select the appropriate config filename prefix.
1. The `printer` prefix is used for stock printers sold by a
mainstream manufacturer.
2. The `generic` prefix is used for a 3d printer board that may be
used in many different types of printers.
3. The `kit` prefix is for 3d printers that are assembled according
to a widely used specification. These "kit" printers are
generally distinct from normal "printers" in that they are not
sold by a manufacturer.
4. The `sample` prefix is used for config "snippets" that one may
copy-and-paste into the main config file.
5. The `example` prefix is used to describe printer kinematics.
This type of config is typically only added along with code for
a new type of printer kinematics.
2. Use the appropriate filename suffix. The `printer` config files
must end in a year followed by `.cfg` (eg, `-2019.cfg`). In this
case, the year is an approximate year the given printer was
sold. All example configuration files must end in `.cfg`.
3. Klipper must be able to start `printer`, `generic`, and `kit`
example config file without error. These config files should be
added to the
[test/klippy/printers.test](../test/klippy/printers.test)
regression test case. Add new config files to that test case in the
appropriate section and in alphabetical order within that section.
4. The example configuration should be for the "stock" configuration
of the printer. (There are too many "customized" configurations to
track in the main Klipper repository.) Similarly, we only add
example config files for printers, kits, and boards that have
mainstream popularity (eg, there should be at least a 100 of them
in active use).
5. Only specify those devices present on the given printer or board.
Do not specify settings specific to your particular setup.
1. For `generic` config files, only those devices on the mainboard
should be described. For example, it would not make sense to add
a display config section to a "generic" config as there is no
way to know if the board will be attached to that type of
display. If the board has a specific hardware port to facilitate
an optional peripheral (eg, a bltouch port) then one can add a
"commented out" config section for the given device.
2. Do not specify `pressure_advance` in an example config, as that
value is specific to the filament, not the printer hardware.
Similarly, do not specify `max_extrude_only_velocity` nor
`max_extrude_only_accel` settings.
3. Do not specify a config section containing a host path or host
hardware. For example, do not specify `[virtual_sdcard]` nor
`[temperature_host]` config sections.
4. Only define macros that utilize functionality specific to the
given printer or to define g-codes that are commonly emitted by
slicers configured for the given printer.
6. Where possible, it is best to use the same wording, phrasing,
indentation, and section ordering as the existing config files.
1. The top of each config file should list the type of
micro-controller the user should select during "make
menuconfig". It should also have a reference to
"docs/Config_Reference.md".
2. Do not copy the field documentation into the example config
files. (Doing so creates a maintenance burden as an update to
the documentation would then require changing it in many
places.)
3. Example config files should not contain a "SAVE_CONFIG" section.
If necessary, copy the relevant fields from the SAVE_CONFIG
section to the appropriate section in the main config area.
4. Use `field: value` syntax instead of `field=value`.
5. When adding an extruder `rotation_distance` it is preferable to
specify a `gear_ratio` if the extruder has a gearing mechanism.
We expect the rotation_distance in the example configs to
correlate with the circumference of the hobbed gear in the
extruder - it is normally in the range of 20 to 35mm. When
specifying a `gear_ratio` it is preferable to specify the actual
gears on the mechanism (eg, prefer `gear_ratio: 80:20` over
`gear_ratio: 4:1`).
6. Avoid defining field values that are set to their default
value. For example, one should not specify `min_extrude_temp:
170` as that is already the default value.
7. Where possible, lines should not exceed 80 columns.
7. Do not use any deprecated features in the example config file. The
`step_distance` and `pin_map` parameters are deprecated and should
not be in any example config file.
8. Do not disable a default safety system in an example config file.
For example, a config should not specify a custom
`max_extrude_cross_section`. Do not enable debugging features. For
example there should not be a `force_move` config section.
Example config files are submitted by creating a github "pull
request". Please also follow the directions in the [contributing
document](CONTRIBUTING.md).

View File

@ -333,22 +333,17 @@ details.
### How do I convert a Marlin pin number to a Klipper pin name?
Short answer: In some cases one can use Klipper's `pin_map: arduino`
feature. Otherwise, for "digital" pins, one method is to search for
the requested pin in Marlin's fastio header files. The Atmega2560 and
Atmega1280 chips use
[fastio_1280.h](https://github.com/MarlinFirmware/Marlin/blob/1.1.9/Marlin/fastio_1280.h),
while the Atmega644p and Atmega1284p chips use
[fastio_644.h](https://github.com/MarlinFirmware/Marlin/blob/1.1.9/Marlin/fastio_644.h).
For example, if you are looking to translate Marlin's digital pin
number 23 on an atmega2560 then one could find the following line in
Marlin's fastio_1280.h file:
```
#define DIO23_PIN PINA1
```
The `DIO23` indicates the line is for Marlin's pin 23 and the `PINA1`
indicates the pin uses the hardware name of `PA1`. Klipper uses the
hardware names (eg, `PA1`).
Short answer: A mapping is available in the
[sample-aliases.cfg](../config/sample-aliases.cfg) file. Use that file
as a guide to finding the actual micro-controller pin names. (It is
also possible to copy the relevant
[board_pins](Config_Reference.md#board_pins) config section into your
config file and use the aliases in your config, but it is preferable
to translate and use the actual micro-controller pin names.) Note that
the sample-aliases.cfg file uses pin names that start with the prefix
"ar" instead of "D" (eg, Arduino pin `D23` is Klipper alias `ar23`)
and the prefix "analog" instead of "A" (eg, Arduino pin `A14` is
Klipper alias `analog14`).
Long answer: Klipper uses the standard pin names defined by the
micro-controller. On the Atmega chips these hardware pins have names
@ -362,22 +357,8 @@ In particular the Arduino pin numbers frequently don't translate to
the same hardware names. For example, `D21` is `PD0` on one common
Arduino board, but is `PC7` on another common Arduino board.
In order to support 3d printers based on real Arduino boards, Klipper
supports the Arduino pin aliases. This feature is enabled by adding
`pin_map: arduino` to the [mcu] section of the config file. When these
aliases are enabled, Klipper understands pin names that start with the
prefix "ar" (eg, Arduino pin `D23` is Klipper alias `ar23`) and the
prefix "analog" (eg, Arduino pin `A14` is Klipper alias `analog14`).
Klipper does not use the Arduino names directly because we feel a name
like D7 is too easily confused with the hardware name PD7.
Marlin primarily follows the Arduino pin numbering scheme. However,
Marlin supports a few chips that Arduino does not support and in some
cases it supports pins that Arduino boards do not expose. In these
cases, Marlin chose their own pin numbering scheme. Klipper does not
support these custom pin numbers - check Marlin's fastio headers (see
above) to translate these pin numbers to their standard hardware
names.
To avoid this confusion, the core Klipper code uses the standard pin
names defined by the micro-controller.
### Do I have to wire my device to a specific type of micro-controller pin?
@ -394,8 +375,7 @@ similar devices to any general purpose IO pin. However, fans and
output_pin devices may be optionally configured to use `hardware_pwm:
True`, in which case the micro-controller must support hardware PWM on
the pin (otherwise, Klipper will report a "Not a valid PWM pin"
error). Note that hardware PWM is currently only supported on the avr,
atsam, samd21, and linux micro-controllers.
error).
IRQ pins (or Interrupt pins): Klipper does not use hardware interrupts
on IO pins, so it is never necessary to wire a device to one of these

View File

@ -474,7 +474,7 @@ enabled:
carriage. It is typically invoked from the activate_gcode and
deactivate_gcode fields in a multiple extruder configuration.
## TMC2130, TMC2660, TMC2208, TMC2209 and TMC5160
## TMC stepper drivers
The following commands are available when any of the
[tmcXXXX config sections](Config_Reference.md#tmc-stepper-driver-configuration)
@ -486,14 +486,14 @@ are enabled:
turned off then back on.
- `SET_TMC_CURRENT STEPPER=<name> CURRENT=<amps> HOLDCURRENT=<amps>`:
This will adjust the run and hold currents of the TMC driver.
HOLDCURRENT is applicable only to the tmc2130, tmc2208, tmc2209 and tmc5160.
- `SET_TMC_FIELD STEPPER=<name> FIELD=<field> VALUE=<value>`: This will
alter the value of the specified register field of the TMC driver.
This command is intended for low-level diagnostics and debugging only because
changing the fields during run-time can lead to undesired and potentially
dangerous behavior of your printer. Permanent changes should be made using
the printer configuration file instead. No sanity checks are performed for the
given values.
(HOLDCURRENT is not applicable to tmc2660 drivers.)
- `SET_TMC_FIELD STEPPER=<name> FIELD=<field> VALUE=<value>`: This
will alter the value of the specified register field of the TMC
driver. This command is intended for low-level diagnostics and
debugging only because changing the fields during run-time can lead
to undesired and potentially dangerous behavior of your printer.
Permanent changes should be made using the printer configuration
file instead. No sanity checks are performed for the given values.
## Endstop adjustments by stepper phase
@ -574,7 +574,7 @@ enabled:
## Filament Sensor
The following command is available when the
[filament_switch_sensor config section](Config_Reference.md#filament_switch_sensor)
[filament_switch_sensor or filament_motion_sensor config section](Config_Reference.md#filament_switch_sensor)
is enabled.
- `QUERY_FILAMENT_SENSOR SENSOR=<sensor_name>`: Queries the current
status of the filament sensor. The data displayed on the terminal
@ -688,9 +688,9 @@ The following command is available when a
[temperature_fan config section](Config_Reference.md#temperature_fan)
is enabled:
- `SET_TEMPERATURE_FAN_TARGET temperature_fan=<temperature_fan_name>
[target=<target_temperature>]`: Sets the target temperature for a
[target=<target_temperature>] [min_speed=<min_speed>] [max_speed=<max_speed>]`: Sets the target temperature for a
temperature_fan. If a target is not supplied, it is set to the
specified temperature in the config file.
specified temperature in the config file. If speeds are not supplied, no change is applied.
## Adxl345 Accelerometer Commands
@ -704,10 +704,13 @@ The following commands are available when an
the first time, it starts the measurements, next execution stops
them. If RATE is not specified, then the default value is used
(either from `printer.cfg` or `3200` default value). The results of
measurements are written to a file named `/tmp/adxl345-<name>.csv`
where `<name>` is the optional NAME parameter. If NAME is not
specified it defaults to the current time in "YYYYMMDD_HHMMSS"
format.
measurements are written to a file named
`/tmp/adxl345-<chip>-<name>.csv` where `<chip>` is the name of the
accelerometer chip (`my_chip_name` from `[adxl345 my_chip_name]`) and
`<name>` is the optional NAME parameter. If NAME is not specified it
defaults to the current time in "YYYYMMDD_HHMMSS" format. If the
accelerometer does not have a name in its config section (simply
`[adxl345]`) <chip> part of the name is not generated.
- `ACCELEROMETER_QUERY [CHIP=<config_name>] [RATE=<value>]`: queries
accelerometer for the current value. If CHIP is not specified it
defaults to "default". If RATE is not specified, the default value
@ -725,12 +728,15 @@ is enabled (also see the
all enabled accelerometer chips.
- `TEST_RESONANCES AXIS=<axis> OUTPUT=<resonances,raw_data>
[NAME=<name>] [FREQ_START=<min_freq>] [FREQ_END=<max_freq>]
[HZ_PER_SEC=<hz_per_sec>]`: Runs the resonance test in all
configured probe points for the requested axis (X or Y) and measures
the acceleration using the accelerometer chips configured for the
respective axis. `OUTPUT` parameter is a comma-separated list of
which outputs will be written. If `raw_data` is requested, then the
raw accelerometer data is written into a file or a series of files
[HZ_PER_SEC=<hz_per_sec>] [INPUT_SHAPING=[<0:1>]]`: Runs the resonance
test in all configured probe points for the requested axis (X or Y)
and measures the acceleration using the accelerometer chips configured
for the respective axis. If `INPUT_SHAPING=0` or not set (default),
disables input shaping for the resonance testing, because it is not valid
to run the resonance testing with the input shaper enabled.
`OUTPUT` parameter is a comma-separated list of which outputs will be
written. If `raw_data` is requested, then the raw accelerometer data
is written into a file or a series of files
`/tmp/raw_data_<axis>_[<point>_]<name>.csv` with (`<point>_` part of
the name generated only if more than 1 probe point is configured).
If `resonances` is specified, the frequency response is calculated
@ -754,3 +760,27 @@ is enabled (also see the
defaults to the current time in "YYYYMMDD_HHMMSS" format. Note that
the suggested input shaper parameters can be persisted in the config
by issuing `SAVE_CONFIG` command.
## Palette 2 Commands
The following command is available when the
[palette2 config section](Config_Reference.md#palette2)
is enabled:
- `PALETTE_CONNECT`: This command initializes the connection with
the Palette 2.
- `PALETTE_DISCONNECT`: This command disconnects from the Palette 2.
- `PALETTE_CLEAR`: This command instructs the Palette 2 to clear all of the
input and output paths of filament.
- `PALETTE_CUT`: This command instructs the Palette 2 to cut the filament
currently loaded in the splice core.
- `PALETTE_SMART_LOAD`: This command start the smart load sequence on the
Palette 2. Filament is loaded automatically by extruding it the distance
calibrated on the device for the printer, and instructs the Palette 2
once the loading has been completed. This command is the same as pressing
**Smart Load** directly on the Palette 2 screen after the filament load
is complete.
Palette prints work by embedding special OCodes (Omega Codes)
in the GCode file:
- `O1`...`O32`: These codes are read from the GCode stream and processed
by this module and passed to the Palette 2 device.

View File

@ -8,6 +8,12 @@ Note that using ADXL345 requires some soldering and crimping. ADXL345 can be
connected to a Raspberry Pi directly, or to an SPI interface of an MCU
board (it needs to be reasonably fast).
When sourcing ADLX345, be aware that there is a variety of different PCB
board designs and different clones of them. Make sure that the board supports
SPI mode (small number of boards appear to be hard-configured for I2C by
pulling SDO to GND), and, if it is going to be connected to a 5V printer MCU,
that it has a voltage regulator and a level shifter.
Installation instructions
===========================
@ -51,6 +57,12 @@ Note that on a bed slinger printer one must design 2 mounts: one for the
toolhead and one for the bed, and run the measurements twice. See the
corresponding [section](#bed-slinger-printers) for more details.
**Attention:** make sure the accelerometer and any screws that hold it in
place do not touch any metal parts of the printer. Basically, the mount must
be designed such as to ensure the electrical isolation of the accelerometer
from the printer frame. Failing to ensure that can create a ground loop in
the system that may damage the electronics.
## Software installation
Note that resonance measurements and shaper auto-calibration require additional
@ -101,11 +113,14 @@ Measuring the resonances
Now you can test a connection.
- For "non bed-slingers" (e.g. one accelerometer), in Octoprint, enter `ACCELEROMETER_QUERY`
- For "bed-slingers" (e.g. more than one accelerometer), enter `ACCELEROMETER_QUERY CHIP=adxl345_x` where `adxl345_x` is the name of the chip as-entered (see: [bed-slinger](#bed-slinger-printers)).
- For "non bed-slingers" (e.g. one accelerometer), in Octoprint,
enter `ACCELEROMETER_QUERY`
- For "bed-slingers" (e.g. more than one accelerometer), enter
`ACCELEROMETER_QUERY CHIP=<chip>` where `<chip>` is the name of the chip
as-entered, e.g. `CHIP=bed` (see: [bed-slinger](#bed-slinger-printers))
for all installed accelerometer chips.
In Octoprint, run `ACCELEROMETER_QUERY`. You
should see the current measurements from the accelerometer, including the
You should see the current measurements from the accelerometer, including the
free-fall acceleration, e.g.
```
Recv: // adxl345 values (x, y, z): 470.719200, 941.438400, 9728.196800
@ -118,7 +133,9 @@ the schematics, no wire is broken or loose, etc.), and soldering quality.
Next, try running `MEASURE_AXES_NOISE` in Octoprint, you should get some
baseline numbers for the noise of accelerometer on the axes (should be
somewhere in the range of ~1-100).
somewhere in the range of ~1-100). Too high axes noise (e.g. 1000 and more)
can be indicative of the sensor issues, problems with its power, or too
noisy imbalanced fans on a 3D printer.
## Measuring the resonances
@ -126,22 +143,19 @@ Now you can run some real-life tests. In `printer.cfg` add or replace the
following values:
```
[printer]
max_accel: 7000
max_accel_to_decel: 7000
max_accel: 10000
max_accel_to_decel: 10000
```
(after you are done with the measurements, revert these values to their old,
or the newly suggested values). Also, if you have enabled input shaper already,
you will need to disable it prior to this test as follows:
```
SET_INPUT_SHAPER SHAPER_FREQ_X=0 SHAPER_FREQ_Y=0
```
as it is not valid to run the resonance testing with the input shaper enabled.
or the newly suggested values).
Run the following command:
```
TEST_RESONANCES AXIS=X
```
Note that it will create vibrations on X axis.
Note that it will create vibrations on X axis. It will also disable input
shaping if it was enabled previously, as it is not valid to run the resonance
testing with the input shaper enabled.
**Attention!** Be sure to observe the printer for the first time, to make sure
the vibrations do not become too violent (`M112` command can be used to abort
@ -173,12 +187,17 @@ recommended for your setup. For example:
![Resonances](img/calibrate-y.png)
```
Fitted shaper 'zv' frequency = 37.0 Hz (vibrations = 29.1%, smoothing ~= 0.115)
Fitted shaper 'mzv' frequency = 35.4 Hz (vibrations = 15.9%, smoothing ~= 0.163)
Fitted shaper 'ei' frequency = 42.0 Hz (vibrations = 15.1%, smoothing ~= 0.183)
Fitted shaper '2hump_ei' frequency = 45.6 Hz (vibrations = 9.7%, smoothing ~= 0.260)
Fitted shaper '3hump_ei' frequency = 59.0 Hz (vibrations = 7.5%, smoothing ~= 0.235)
Recommended shaper is 3hump_ei @ 59.0 Hz
Fitted shaper 'zv' frequency = 34.4 Hz (vibrations = 4.0%, smoothing ~= 0.132)
To avoid too much smoothing with 'zv', suggested max_accel <= 4500 mm/sec^2
Fitted shaper 'mzv' frequency = 34.6 Hz (vibrations = 0.0%, smoothing ~= 0.170)
To avoid too much smoothing with 'mzv', suggested max_accel <= 3500 mm/sec^2
Fitted shaper 'ei' frequency = 41.4 Hz (vibrations = 0.0%, smoothing ~= 0.188)
To avoid too much smoothing with 'ei', suggested max_accel <= 3200 mm/sec^2
Fitted shaper '2hump_ei' frequency = 51.8 Hz (vibrations = 0.0%, smoothing ~= 0.201)
To avoid too much smoothing with '2hump_ei', suggested max_accel <= 3000 mm/sec^2
Fitted shaper '3hump_ei' frequency = 61.8 Hz (vibrations = 0.0%, smoothing ~= 0.215)
To avoid too much smoothing with '3hump_ei', suggested max_accel <= 2800 mm/sec^2
Recommended shaper is mzv @ 34.6 Hz
```
The suggested configuration can be added to `[input_shaper]` section of
@ -187,8 +206,11 @@ The suggested configuration can be added to `[input_shaper]` section of
[input_shaper]
shaper_freq_x: ...
shaper_type_x: ...
shaper_freq_y: 59.0
shaper_type_y: 3hump_ei
shaper_freq_y: 34.6
shaper_type_y: mzv
[printer]
max_accel: 3000 # should not exceed the estimated max_accel for X and Y axes
```
or you can choose some other configuration yourself based on the generated
charts: peaks in the power spectral density on the charts correspond to
@ -211,17 +233,18 @@ must be connected to different boards (say, to an RPi and printer MCU board), or
to two different physical SPI interfaces on the same board (rarely available).
Then they can be configured in the following manner:
```
[adxl345 adxl345_x]
# Assuming adxl345_x is connected to an RPi
[adxl345 hotend]
# Assuming `hotend` chip is connected to an RPi
cs_pin: rpi:None
[adxl345 adxl345_y]
# Assuming adxl345_y is connected to a printer MCU board
[adxl345 bed]
# Assuming `bed` chip is connected to a printer MCU board
cs_pin: ... # Printer board SPI chip select (CS) pin
[resonance_tester]
accel_chip_x: adxl345 adxl345_x
accel_chip_y: adxl345 adxl345_y
# Assuming the typical setup of the bed slinger printer
accel_chip_x: adxl345 hotend
accel_chip_y: adxl345 bed
probe_points: ...
```
@ -243,12 +266,17 @@ Let's consider the following results from the automatic tuning:
![Resonances](img/calibrate-x.png)
```
Fitted shaper 'zv' frequency = 62.2 Hz (vibrations = 36.9%, smoothing ~= 0.046)
Fitted shaper 'mzv' frequency = 35.6 Hz (vibrations = 18.1%, smoothing ~= 0.161)
Fitted shaper 'ei' frequency = 54.6 Hz (vibrations = 19.3%, smoothing ~= 0.108)
Fitted shaper '2hump_ei' frequency = 46.2 Hz (vibrations = 9.2%, smoothing ~= 0.253)
Fitted shaper '3hump_ei' frequency = 50.0 Hz (vibrations = 7.2%, smoothing ~= 0.328)
Recommended shaper is 2hump_ei @ 46.2 Hz
Fitted shaper 'zv' frequency = 57.8 Hz (vibrations = 20.3%, smoothing ~= 0.053)
To avoid too much smoothing with 'zv', suggested max_accel <= 13000 mm/sec^2
Fitted shaper 'mzv' frequency = 34.8 Hz (vibrations = 3.6%, smoothing ~= 0.168)
To avoid too much smoothing with 'mzv', suggested max_accel <= 3600 mm/sec^2
Fitted shaper 'ei' frequency = 48.8 Hz (vibrations = 4.9%, smoothing ~= 0.135)
To avoid too much smoothing with 'ei', suggested max_accel <= 4400 mm/sec^2
Fitted shaper '2hump_ei' frequency = 45.2 Hz (vibrations = 0.1%, smoothing ~= 0.264)
To avoid too much smoothing with '2hump_ei', suggested max_accel <= 2200 mm/sec^2
Fitted shaper '3hump_ei' frequency = 48.0 Hz (vibrations = 0.0%, smoothing ~= 0.356)
To avoid too much smoothing with '3hump_ei', suggested max_accel <= 1500 mm/sec^2
Recommended shaper is 2hump_ei @ 45.2 Hz
```
Note that the reported `smoothing` values are some abstract projected values.
These values can be used to compare different configurations: the higher the
@ -268,25 +296,33 @@ which limits the smoothing to 0.2 score. Now you can get the following result:
![Resonances](img/calibrate-x-max-smoothing.png)
```
Fitted shaper 'zv' frequency = 55.2 Hz (vibrations = 34.2%, smoothing ~= 0.057)
Fitted shaper 'mzv' frequency = 33.8 Hz (vibrations = 17.4%, smoothing ~= 0.178)
Fitted shaper 'ei' frequency = 47.4 Hz (vibrations = 17.6%, smoothing ~= 0.143)
Fitted shaper '2hump_ei' frequency = 52.0 Hz (vibrations = 11.9%, smoothing ~= 0.200)
Fitted shaper '3hump_ei' frequency = 75.0 Hz (vibrations = 9.7%, smoothing ~= 0.146)
Recommended shaper is 3hump_ei @ 75.0 Hz
Fitted shaper 'zv' frequency = 55.4 Hz (vibrations = 19.7%, smoothing ~= 0.057)
To avoid too much smoothing with 'zv', suggested max_accel <= 12000 mm/sec^2
Fitted shaper 'mzv' frequency = 34.6 Hz (vibrations = 3.6%, smoothing ~= 0.170)
To avoid too much smoothing with 'mzv', suggested max_accel <= 3500 mm/sec^2
Fitted shaper 'ei' frequency = 48.2 Hz (vibrations = 4.8%, smoothing ~= 0.139)
To avoid too much smoothing with 'ei', suggested max_accel <= 4300 mm/sec^2
Fitted shaper '2hump_ei' frequency = 52.0 Hz (vibrations = 2.7%, smoothing ~= 0.200)
To avoid too much smoothing with '2hump_ei', suggested max_accel <= 3000 mm/sec^2
Fitted shaper '3hump_ei' frequency = 72.6 Hz (vibrations = 1.4%, smoothing ~= 0.155)
To avoid too much smoothing with '3hump_ei', suggested max_accel <= 3900 mm/sec^2
Recommended shaper is 3hump_ei @ 72.6 Hz
```
If you compare to the previously suggested parameters, the vibrations are a bit
larger, but the smoothing is significantly smaller than previously.
larger, but the smoothing is significantly smaller than previously, allowing
larger maximum acceleration.
When deciding which `max_smoothing` parameter to choose, you can use a
trial-and-error approach. Try a few different values and see which results
you get. Note however that if you request the script to find a configuration
for your printer with an unrealistically small smoothing, it will be unable
to find a reasonable configuration. The suggested parameters will have a poor
performance in this case and you can get too much remaining ringing as a result.
So, always double-check the projected remaining vibrations and make sure they
are not too high.
you get. Note that the actual smoothing produced by the input shaper depends,
primarily, on the lowest resonance frequency of the printer: the higher
the frequency of the lowest resonance - the smaller the smoothing. Therefore,
if you request the script to find a configuration of the input shaper with the
unrealistically small smoothing, it will be at the expense of increased ringing
at the lowest resonance frequencies (which are, typically, also more prominently
visible in prints). So, always double-check the projected remaining vibrations
reported by the script and make sure they are not too high.
Note that if you chose a good `max_smoothing` value for both of your axes, you
can store it in the `printer.cfg` as
@ -304,14 +340,27 @@ using `SHAPER_CALIBRATE` Klipper command in the future, it will use the stored
Since the input shaper can create some smoothing in parts, especially at high
accelerations, you will still need to choose the `max_accel` value that
does not create too much smoothing in the printed parts. Follow
does not create too much smoothing in the printed parts. A calibration script
provides an estimate for `max_accel` parameter that should not create too much
smoothing. Note that the `max_accel` as displayed by the calibration script is
only a theoretical maximum at which the respective shaper is still able to work
without producing too much smoothing. It is by no means a recommendation to set
this acceleration for printing. The maximum acceleration your printer is able to
sustain depends on its mechanical properties and the maximum torque of the used
stepper motors. Therefore, it is suggested to set `max_accel` in `[printer]`
section that does not exceed the estimated values for X and Y axes, likely with
some conservative safety margin.
Alternatively, follow
[this](Resonance_Compensation.md#selecting-max_accel) part of
the input shaper tuning guide and print the test model.
the input shaper tuning guide and print the test model to choose `max_accel`
parameter experimentally.
The same notice applies to the input shaper
[auto-calibration](#input-shaper-auto-calibration) with
`SHAPER_CALIBRATE` command: it is still necessary to choose the right
`max_accel` value after the auto-calibration.
`max_accel` value after the auto-calibration, and the suggested acceleration
limits will not be applied automatically.
If you are doing a shaper re-calibration and the reported smoothing for the
suggested shaper configuration is almost the same as what you got during the
@ -334,15 +383,24 @@ frequencies for each input shaper, as well as which input shaper is
recommended for your setup, on Octoprint console. For example:
```
Fitted shaper 'zv' frequency = 56.7 Hz (vibrations = 23.2%)
Fitted shaper 'mzv' frequency = 52.9 Hz (vibrations = 10.9%)
Fitted shaper 'ei' frequency = 62.0 Hz (vibrations = 8.9%)
Fitted shaper '2hump_ei' frequency = 59.0 Hz (vibrations = 4.9%)
Fitted shaper '3hump_ei' frequency = 65.0 Hz (vibrations = 3.3%)
Recommended shaper_type_y = 2hump_ei, shaper_freq_y = 59.0 Hz
Calculating the best input shaper parameters for y axis
Fitted shaper 'zv' frequency = 39.0 Hz (vibrations = 13.2%, smoothing ~= 0.105)
To avoid too much smoothing with 'zv', suggested max_accel <= 5900 mm/sec^2
Fitted shaper 'mzv' frequency = 36.8 Hz (vibrations = 1.7%, smoothing ~= 0.150)
To avoid too much smoothing with 'mzv', suggested max_accel <= 4000 mm/sec^2
Fitted shaper 'ei' frequency = 36.6 Hz (vibrations = 2.2%, smoothing ~= 0.240)
To avoid too much smoothing with 'ei', suggested max_accel <= 2500 mm/sec^2
Fitted shaper '2hump_ei' frequency = 48.0 Hz (vibrations = 0.0%, smoothing ~= 0.234)
To avoid too much smoothing with '2hump_ei', suggested max_accel <= 2500 mm/sec^2
Fitted shaper '3hump_ei' frequency = 59.0 Hz (vibrations = 0.0%, smoothing ~= 0.235)
To avoid too much smoothing with '3hump_ei', suggested max_accel <= 2500 mm/sec^2
Recommended shaper_type_y = mzv, shaper_freq_y = 36.8 Hz
```
If you agree with the suggested parameters, you can execute `SAVE_CONFIG`
now to save them and restart the Klipper.
now to save them and restart the Klipper. Note that this will not update
`max_accel` value in `[printer]` section. You should update it manually
following the considerations in [Selecting max_accel](#selecting-max_accel)
section.
If your printer is a bed slinger printer, you can specify which axis

View File

@ -42,10 +42,12 @@ communication with the Klipper developers.
- [Slicers](Slicers.md): Configure "slicer" software for Klipper.
- [Command Templates](Command_Templates.md): G-Code macros and
conditional evaluation.
- [Sensorless homing](Sensorless_Homing.md): Configuring tmc2130
sensorless homing.
- [TMC Drivers](TMC_Drivers.md): Using Trinamic stepper motor drivers
with Klipper.
- [Skew correction](skew_correction.md): Adjustments for axes not
perfectly square.
- [PWM tools](Using_PWM_Tools.md): Guide on how to use PWM controlled
tools such as lasers or spindles.
- [G-Codes](G-Codes.md): Information on commands supported by Klipper.
# Developer Documentation
@ -60,6 +62,8 @@ communication with the Klipper developers.
control API.
- [MCU commands](MCU_Commands.md): A description of low-level commands
implemented in the micro-controller software.
- [CAN bus protocol](CANBUS_protocol.md): Klipper CAN bus message
format.
- [Debugging](Debugging.md): Information on how to test and debug
Klipper.
- [Benchmarks](Benchmarks.md): Information on the Klipper benchmark
@ -70,13 +74,16 @@ communication with the Klipper developers.
# Device Specific Documents
- [Example configs](Example_Configs.md): Information on adding an
example config file to Klipper.
- [SDCard Updates](SDCard_Updates.md): Flash a micro-controller by
copying a binary to an sdcard in the micro-controller.
- [Raspberry Pi as Micro-controller](RPi_microcontroller.md): Details
for controlling devices wired to the GPIO pins of a Raspberry Pi.
- [Beaglebone](beaglebone.md): Details for running Klipper on the
Beaglebone PRU.
- [Bootloaders](Bootloaders.md): Developer information on
micro-controller flashing.
- [stm32f0](stm32f0_CAN.md): Information on the STM32F0 micro-controller
port.
- [CAN bus](CANBUS.md): Information on using CAN bus with Klipper.
- [TSL1401CL filament width sensor](TSL1401CL_Filament_Width_Sensor.md)
- [Hall filament width sensor](HallFilamentWidthSensor.md)

View File

@ -77,10 +77,11 @@ Although this tuning exercise directly improves the quality of
corners, it's worth remembering that a good pressure advance
configuration also reduces ooze throughout the print.
At the completion of this test, update the extruder's pressure_advance
setting in the configuration file and issue a RESTART command. The
RESTART command will clear the test state and return the acceleration
and cornering speeds to their normal values.
At the completion of this test, set
`pressure_advance = <calculated_value>` in the `[extruder]` section of
the configuration file and issue a RESTART command. The RESTART
command will clear the test state and return the acceleration and
cornering speeds to their normal values.
Important Notes
===============
@ -92,8 +93,8 @@ Important Notes
pressure advance on each printer and with each spool of filament.
* Printing temperature and extrusion rates can impact pressure
advance. Be sure to tune the extruder
[E steps](http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide#E_steps)
advance. Be sure to tune the
[extruder rotation_distance](Rotation_Distance.md#calibrating-rotation_distance-on-extruders)
and
[nozzle temperature](http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide#Nozzle_Temperature)
prior to tuning pressure advance.

149
docs/SDCard_Updates.md Normal file
View File

@ -0,0 +1,149 @@
Many of today's popular controller boards ship with a bootloader capable of
updating firmware via SD Card. While this is convenient in many
circumstances, these bootloaders typically provide no other way to update
firmware. This can be a nuisance if your board is mounted in a location
that is difficult to access or if you need to update firmware often.
After Klipper has been initially flashed to a controller it is possible to
transfer new firmware to the SD Card and initiate the flashing procedure
via ssh.
Typical Upgrade Procedure
=========================
The procedure for updating MCU firmware using the SD Card is similar to that
of other methods. Instead of using `make flash` it is necessary to run a
helper script, `flash-sdcard.sh`. Updating a BigTreeTech SKR 1.3 might look
like the following:
```
sudo service klipper stop
cd ~/klipper
git pull
make clean
make menuconfig
make
./scripts/flash-sdcard.sh /dev/ttyACM0 btt-skr-v1.3
sudo service klipper start
```
It is up to the user to determine the device location and board name.
If a user needs to flash multiple boards, `flash-sdcard.sh` (or
`make flash` if appropriate) should be run for each board prior to
restarting the Klipper service.
Supported boards can be listed with the following command:
```
./scripts/flash-sdcard.sh -l
```
If you do not see your board listed it may be necessary to add a new
board definition as [described below](#board-definitions).
Advanced Usage
==============
The above commands assume that your MCU connects at the default baud rate
of 250000 and the firmware is located at `~/klipper/out/klipper.bin`. The
`flash-sdcard.sh` script provides options for changing these defaults.
All options can be viewed by the help screen:
```
./scripts/flash-sdcard.sh -h
SD Card upload utility for Klipper
usage: flash_sdcard.sh [-h] [-l] [-b <baud>] [-f <firmware>]
<device> <board>
positional arguments:
<device> device serial port
<board> board type
optional arguments:
-h show this message
-l list available boards
-b <baud> serial baud rate (default is 250000)
-f <firmware> path to klipper.bin
```
If your board is flashed with firmware that connects at a custom baud
rate it is possible to upgrade by specifying the `-b` option:
```
./scripts/flash-sdcard.sh -b 115200 /dev/ttyAMA0 btt-skr-v1.3
```
If you wish to flash a build of Klipper located somewhere other than
the default location it can be done by specifying the `-f` option:
```
./scripts/flash-sdcard.sh -f ~/downloads/klipper.bin /dev/ttyAMA0 btt-skr-v1.3
```
Note that when upgrading a MKS Robin E3 it is not necessary to manually run
`update_mks_robin.py` and supply the resulting binary to `flash-sdcard.sh`.
This procedure is automated during the upload process.
Caveats
=======
- As mentioned in the introduction, this method only works for upgrading
firmware. The initial flashing procedure must be done manually per the
instructions that apply to your controller board.
- While it is possible to flash a build that changes the Serial Baud or
connection interface (ie: from USB to UART), verification will always
fail as the script will be unable to reconnect to the MCU to verify
the current version.
- Only boards that use SPI for SD Card communication are supported.
Boards that use SDIO, such as the Flymaker Flyboard and MKS Robin Nano
V1/V2, will not work.
Board Definitions
=================
Most common boards should be available, however it is possible to add a new
board definition if necessary. Board definitions are located in
`~/klipper/scripts/spi_flash/board_defs.py`. The definitions are stored
in dictionary, for example:
```python
BOARD_DEFS = {
'generic-lpc1768': {
'mcu': "lpc1768",
'spi_bus': "ssp1",
"cs_pin": "P0.6"
},
...<further definitions>
}
```
The following fields may be specified:
- `mcu`: The mcu type. This can be retrevied after configuring the build
via `make menuconfig` by running `cat .config | grep CONFIG_MCU`. This
field is required.
- `spi_bus`: The SPI bus connected to the SD Card. This should be retreived
from the board's schematic. This field is required.
- `cs_pin`: The Chip Select Pin connected to the SD Card. This should be
retreived from the board schematic. This field is required.
- `firmware_path`: The path on the SD Card where firmware should be
transferred. The default is `firmware.bin`.
- `current_firmware_path` The path on the SD Card where the renamed firmware
file is located after a successful flash. The default is `firmware.cur`.
If software SPI is required the `spi_bus` field should be set to `swspi`
and the following additional field should be specified:
- `spi_pins`: This should be 3 comma separated pins that are connected to
the SD Card in the format of `miso,mosi,sclk`.
It should be exceedingly rare that Software SPI is necessary, typically only
boards with design errors will require it. The `btt-skr-pro` board definition
provides an example.
Prior to creating a new board definition one should check to see if an
existing board definition meets the criteria necessary for the new board.
If this is the case, a `BOARD_ALIAS` may be specified. For example, the
following alias may be added to specify `my-new-board` as an alias for
`generic-lpc1768`:
```python
BOARD_ALIASES = {
...<previous aliases>,
'my-new-board': BOARD_DEFS['generic-lpc1768'],
}
```
If you need a new board definition and you are uncomfortable with the
procedure outlined above it is recommended that you request one in
the [Klipper Community Discord](Contact.md#discord).

View File

@ -1,114 +0,0 @@
# Sensorless Homing
Sensorless homing allows to home an axis without the need for a physical limit switch. Instead, the carriage on the axis is moved into the mechanical limit making the stepper motor lose steps. The stepper driver senses the lost steps and indicates this to the controlling MCU (Klipper) by toggling a pin. This information can be used by Klipper as end stop for the axis.
This guide covers the setup of sensorless homing for the X axis of your (cartesian) printer. However, it works the same with all other axes (that require an end stop). You should configure and tune it for one axis at a time.
## Prerequisites
A few prerequisites are needed to use sensorless homing:
1. StallGuard capable TMCxxxx stepper driver
2. SPI / UART interface of the TMCxxxx wired to MCU (stand-alone mode does not work)
3. DIAG1/DIAG pin of TMCxxxx connected to the MCU
## Limitations
Be sure that your mechanical components are able to handle the load of the carriage bumping into the limit of the axis repeatedly. Especially spindles (on the Z axis) might generate a lot of force. Homing a Z axis by bumping the nozzle into the printing surface might not be a good idea.
Further, sensorless homing might not be accurate enough for you printer. While homing X and Y axes on a cartesian machine can work well, homing the Z axis is generally not accurate enough and results in inconsistent first layer height. Homing a delta printer sensorless is not advisable due to missing accuracy.
Further, the stall detection of the stepper driver is dependant on the mechanical load on the motor, the motor current and the motor temperature (coil resistance).
Sensorless homing works best at medium motor speeds. For very slow speeds (less than 10 RPM) the motor does not generate significant back EMF and the TMC cannot reliably detect motor stalls. Further, at very high speeds, the back EMF of the motor approaches the supply voltage of the motor, so the TMC cannot detect stalls anymore. It is advised to have a look in the datasheet of your specific TMCs. There you can also find more details on limitations of this setup.
## Configuration
To enable sensorless homing add a section to configure the TMC stepper driver to your `printer.cfg`.
In this guide we'll be using a TMC2130. The configuration however is simailar to the other TMCs with StallGuard:
```
[tmc2130 stepper_x]
cs_pin: # chip select pin of the SPI interface
microsteps: # number of microsteps per full step of the motor
run_current: # value in amps
diag1_pin: ! # pin on the MCU where DIAG1 is connected (active low)
driver_SGT: # tuning value for sensorless homing
```
The above snippet configures a TMC2130 for the stepper on the X axis. Make sure to fill in the missing values based on your configuration.
The `driver_SGT` value describes the threshhold when the driver reports a stall. Values have to be in between -64 (most sensitive) and 64 (least sensitive). On some TMCs like the TMC2209 this value doesn't exist in this form as the hehavior is different to the TMC2130. In the case of the TMC2209 the threshold is defined by the `driver_SGTHRS` value in the config and go from 0 (least sensitive) to 255 (most sensitive). Have a look at the datasheet of your specific TMC to avoid mistakes.
If you have a CoreXY machine, you can configure one stepper driver for X and the other for Y homing as you would on a cartesian printer. Be aware that Klipper needs both `DIAG1` pins connected to the MCU. It is not sufficient to use only one signal from one of the stepper drivers (as it is possible on e.g. Marlin).
The `diag1_pin` of the TMC2130 is configured as open-collector pin. This means, the stepper driver pulls the pin low to indicate a stalled motor (active low) and the pin must be inverted by adding a `!` in front of the pin name. Further, you need a pull-up resistor on the connection. If your PCB has no external pull-up, you can enable the internal pull-up of your MCU by adding a `^` in front of the pin name. The resulting line might look like this:
```
diag1_pin: ^!PA1 # DIAG1 connected to PA1, internal pull-up is enabled, signal is active low
```
By configuring the `diag1_pin`, Klipper allows you to use a special virtual end stop for the axis. You can use this instead of a physical end stop pin by changing the `endstop_pin` of the corresponding axis:
```
[stepper_x]
...
endstop_pin: tmc2130_stepper_x:virtual_endstop # use the virtual end stop generated by the [tmc2130 stepper_x] section of this config file
...
homing_retract_dist: 0
...
```
The name of the virtual end stop pin is derived from the name of the TMC2130 section. The `homing_retract_dist` setting should be set to zero to disable the second homing move as a second pass is not needed, and attempts to do so are error prone.
The TMC2130 and TMC5160 have both a `diag0_pin` and `diag1_pin` in most known hardware the `diag1_pin` is appropriate. In order for klipper to correctly configure the driver for sensorless homing, the correct configuration property name `diag0_pin` or `diag1_pin` must be used. Which is used is determined by which driver pin is connected to the MCU pin.
ATTENTION: This guide only mentions the mandatory parameters and the ones needed to set up sensorless homing. There are many other options to configure on a TMC2130, make sure to take a look at [config reference](Config_Reference.md#tmc2130) for all the available options.
## Testing of SPI/UART communication
Now that the stepper driver is configured, let's make sure that Klipper can communicate with the TMC2130 by sending the following extended G-Code command to the printer:
```
DUMP_TMC stepper=stepper_x
```
This command tells Klipper to read a few registers via SPI from the TMC2130. If everything works correctly, the output should look similar to this (in OctoPrint terminal tab):
```
Send: DUMP_TMC stepper=stepper_x
Recv: // GCONF: 00000004
Recv: // GSTAT: 00000001
Recv: // IOIN: 11000078
Recv: // TSTEP: 000fffff
Recv: // XDIRECT: 00000000
Recv: // MSCNT: 00000010
Recv: // MSCURACT: 00f60018
Recv: // CHOPCONF: 15008384
Recv: // DRV_STATUS: 800d0000
Recv: // PWM_SCALE: 00000000
Recv: // LOST_STEPS: 00000000
```
The actual register values might differ based the configuration of your TMC2130. If the register values are all `ffffffff` or look otherwise bogus (for example, `LOST_STEPS` should be always `00000000` here) make sure that the SPI is wired and configured correctly.
## Homing and Tuning
Let's try the first sensorless homing now. It will likely not work as intended. There are three possible outcomes of this experiment:
1. The axis stops moving before hitting the mechanical limit or does not move at all
2. The axis homes correctly (which is unlikely at this point)
3. The axis bumps into the mechanical limit and keeps moving while making horrible noise
If the third outcome happens to you, disable the stepper (by cutting the power or issuing a `M112` emergency stop).
Ok, now that you know what can happen, let's try it out. Put the carriage somewhere in the middle of the X axis. Home the X axis by sending the following G-Code command to Klipper and observe the outcome:
```
G28 X
```
If the axis stopped early (first outcome), the stepper driver detected a motor stall even though there was none. To trigger stall detection at a higher load, increase the value of `driver_SGT` (for example from 0 to 5). The values can be any interger between `-64` and `63`. The higher the value, the later it triggers stall detection.
If your axis did not stop (third outcome), the stepper driver was not able to detect the stall, because the load on the motor still seemed reasonable to the driver. To trigger stall detection at a lighter load, decrease the value of `driver_SGT`.
Even if your axis homed correctly, it might be worth to try a few different values for `driver_SGT`. If you think that it bumps too hard into the mechanical limit, try to decrease the value by 1 or 2.
At this point, your axis should be able to home based on the stall detection of the TMC2130. Congratulations! You can now proceed with the next axis of your printer.

450
docs/TMC_Drivers.md Normal file
View File

@ -0,0 +1,450 @@
This document provides information on using Trinamic stepper motor
drivers in SPI/UART mode on Klipper.
Klipper can also use Trinamic drivers in their "standalone mode".
However, when the drivers are in this mode, no special Klipper
configuration is needed and the advanced Klipper features discussed in
this document are not available.
In addition to this document, be sure to review the [TMC driver config
reference](Config_Reference.md#tmc-stepper-driver-configuration).
# Enabling "Stealthchop" mode
By default, Klipper places the TMC drivers in "spreadcycle" mode. If
the driver supports "stealthchop" then it can be enabled by adding
`stealthchop_threshold: 999999` to the TMC config section.
It is recommended to always use "spreadcycle" mode (by not specifying
`stealthchop_threshold`) or to always use "stealthchop" mode (by
setting `stealthchop_threshold` to 999999). Unfortunately, the drivers
often produce poor and confusing results if the mode changes while the
motor is at a non-zero velocity.
# Sensorless Homing
Sensorless homing allows to home an axis without the need for a
physical limit switch. Instead, the carriage on the axis is moved into
the mechanical limit making the stepper motor lose steps. The stepper
driver senses the lost steps and indicates this to the controlling MCU
(Klipper) by toggling a pin. This information can be used by Klipper
as end stop for the axis.
This guide covers the setup of sensorless homing for the X axis of
your (cartesian) printer. However, it works the same with all other
axes (that require an end stop). You should configure and tune it for
one axis at a time.
## Limitations
Be sure that your mechanical components are able to handle the load of
the carriage bumping into the limit of the axis repeatedly. Especially
leadscrews might generate a lot of force. Homing a Z axis by bumping
the nozzle into the printing surface might not be a good idea. For
best results, verify that the axis carriage will make a firm contact
with the axis limit.
Further, sensorless homing might not be accurate enough for your
printer. While homing X and Y axes on a cartesian machine can work
well, homing the Z axis is generally not accurate enough and may
result in an inconsistent first layer height. Homing a delta printer
sensorless is not advisable due to missing accuracy.
Further, the stall detection of the stepper driver is dependent on the
mechanical load on the motor, the motor current and the motor
temperature (coil resistance).
Sensorless homing works best at medium motor speeds. For very slow
speeds (less than 10 RPM) the motor does not generate significant back
EMF and the TMC cannot reliably detect motor stalls. Further, at very
high speeds, the back EMF of the motor approaches the supply voltage
of the motor, so the TMC cannot detect stalls anymore. It is advised
to have a look in the datasheet of your specific TMCs. There you can
also find more details on limitations of this setup.
## Prerequisites
A few prerequisites are needed to use sensorless homing:
1. A StallGuard capable TMC stepper driver (tmc2130, tmc2209, tmc2660,
or tmc5160).
2. SPI / UART interface of the TMC driver wired to micro-controller
(stand-alone mode does not work).
3. The appropriate "DIAG" or "SG_TST" pin of TMC driver connected to
the micro-controller.
4. The steps in the [config checks](Config_checks.md) document must be
run to confirm the stepper motors are configured and working
properly.
## Tuning
The procedure described here has six major steps:
1. Choose a homing speed.
2. Configure the `printer.cfg` file to enable sensorless homing.
3. Find the stallguard setting with highest sensitivity that
successfully homes.
4. Find the stallguard setting with lowest sensitivity that
successfully homes with a single touch.
5. Update the `printer.cfg` with the desired stallguard setting.
6. Create or update `printer.cfg` macros to home consistently.
### Choose homing speed
The homing speed is an important choice when performing sensorless
homing. It's desirable to use a slow homing speed so that the carriage
does not exert excessive force on the frame when making contact with
the end of the rail. However, the TMC drivers can't reliably detect a
stall at very slow speeds.
A good starting point for the homing speed is for the stepper motor to
make a full rotation every two seconds. For many axes this will be the
`rotation_distance` divided by two. For example:
```
[stepper_x]
rotation_distance: 40
homing_speed: 20
...
```
### Configure printer.cfg for sensorless homing
The `homing_retract_dist` setting must be set to zero in the
`stepper_x` config section to disable the second homing move. The
second homing attempt does not add value when using sensorless homing,
it will not work reliably, and it will confuse the tuning process.
Be sure that a `hold_current` setting is not specified in the TMC
driver section of the config. (If a hold_current is set then after
contact is made, the motor stops while the carriage is pressed against
the end of the rail, and reducing the current while in that position
may cause the carriage to move - that results in poor performance and
will confuse the tuning process.)
It is necessary to configure the sensorless homing pins and to
configure initial "stallguard" settings. A tmc2209 example
configuration for an X axis might look like:
```
[tmc2209 stepper_x]
diag_pin: ^PA1 # Set to MCU pin connected to TMC DIAG pin
driver_SGTHRS: 255 # 255 is most sensitive value, 0 is least sensitive
...
[stepper_x]
endstop_pin: tmc2209_stepper_x:virtual_endstop
homing_retract_dist: 0
...
```
An example tmc2130 or tmc5160 config might look like:
```
[tmc2130 stepper_x]
diag1_pin: ^!PA1 # Pin connected to TMC DIAG1 pin (or use diag0_pin / DIAG0 pin)
driver_SGT: -64 # -64 is most sensitive value, 63 is least sensitive
...
[stepper_x]
endstop_pin: tmc2130_stepper_x:virtual_endstop
homing_retract_dist: 0
...
```
An example tmc2660 config might look like:
```
[tmc2660 stepper_x]
driver_SGT: -64 # -64 is most sensitive value, 63 is least sensitive
...
[stepper_x]
endstop_pin: ^PA1 # Pin connected to TMC SG_TST pin
homing_retract_dist: 0
...
```
The examples above only show settings specific to sensorless
homing. See the [config
reference](Config_Reference.md#tmc-stepper-driver-configuration) for
all the available options.
### Find highest sensitivity that successfully homes
Place the carriage near the center of the rail. Use the SET_TMC_FIELD
command to set the highest sensitivity. For tmc2209:
```
SET_TMC_FIELD STEPPER=stepper_x FIELD=SGTHRS VALUE=255
```
For tmc2130, tmc5160, and tmc2660:
```
SET_TMC_FIELD STEPPER=stepper_x FIELD=sgt VALUE=-64
```
Then issue a `G28 X0` command and verify the axis does not move at
all. If the axis does move, then issue an `M112` to halt the printer -
something is not correct with the diag/sg_tst pin wiring or
configuration and it must be corrected before continuing.
Next, continually decrease the sensitivity of the `VALUE` setting and
run the `SET_TMC_FIELD` `G28 X0` commands again to find the highest
sensitivity that results in the carriage successfully moving all the
way to the endstop and halting. (For tmc2209 drivers this will be
decreasing SGTHRS, for other drivers it will be increasing sgt.) Be
sure to start each attempt with the carriage near the center of the
rail (if needed issue `M84` and then manually move the carriage to the
center). It should be possible to find the highest sensitivity that
homes reliably (settings with higher sensitivity result in small or no
movement). Note the found value as *maximum_sensitivity*. (If the
minimum possible sensitivity (SGTHRS=0 or sgt=63) is obtained without
any carriage movement then something is not correct with the
diag/sg_tst pin wiring or configuration and it must be corrected
before continuing.)
When searching for maximum_sensitivity, it may be convenient to jump
to different VALUE settings (so as to bisect the VALUE parameter). If
doing this then be prepared to issue an `M112` command to halt the
printer, as a setting with a very low sensitivity may cause the axis
to repeatedly "bang" into the end of the rail.
Be sure to wait a couple of seconds between each homing attempt. After
the TMC driver detects a stall it may take a little time for it to
clear its internal indicator and be capable of detecting another
stall.
During these tuning tests, if a `G28 X0` command does not move all the
way to the axis limit, then be careful with issuing any regular
movement commands (eg, `G1`). Klipper will not have a correct
understanding of the carriage position and a move command may cause
undesirable and confusing results.
### Find lowest sensitivity that homes with one touch
When homing with the found *maximum_sensitivity* value, the axis
should move to the end of the rail and stop with a "single touch" -
that is, there should not be a "clicking" or "banging" sound. (If
there is a banging or clicking sound at maximum_sensitivity then the
homing_speed may be too low, the driver current may be too low, or
sensorless homing may not be a good choice for the axis.)
The next step is to again continually move the carriage to a position
near the center of the rail, decrease the sensitivity, and run the
`SET_TMC_FIELD` `G28 X0` commands - the goal is now to find the lowest
sensitivity that still results in the carriage successfully homing
with a "single touch". That is, it does not "bang" or "click" when
contacting the end of the rail. Note the found value as
*minimum_sensitivity*.
### Update printer.cfg with sensitivity value
After finding *maximum_sensitivity* and *minimum_sensitivity*, use a
calculator to obtain the recommend sensitivity as
*minimum_sensitivity + (maximum_sensitivity - minimum_sensitivity)/3*.
The recommended sensitivity should be in the range between the minimum
and maximum, but slightly closer to the minimum. Round the final value
to the nearest integer value.
For tmc2209 set this in the config as `driver_SGTHRS`, for other TMC
drivers set this in the config as `driver_SGT`.
If the range between *maximum_sensitivity* and *minimum_sensitivity*
is small (eg, less than 5) then it may result in unstable homing. A
faster homing speed may increase the range and make the operation more
stable.
Note that if any change is made to driver current, homing speed, or a
notable change is made to the printer hardware, then it will be
necessary to run the tuning process again.
### Using Macros when Homing
After sensorless homing completes the carriage will be pressed against
the end of the rail and the stepper will exert a force on the frame
until the carriage is moved away. It is a good idea to create a macro
to home the axis and immediately move the carriage away from the end
of the rail. It is recommended to set the speed of this subsequent
move so that it lasts at least two seconds (eg, `G1 X40 F1200`) to
ensure the stall flag in the TMC driver is cleared after the move
completes.
It can also be useful to have that macro set the driver current before
homing and set a new current after the carriage has moved away. This
also allows a hold_current to be set during prints (a hold_current
is not recommended during sensorless homing).
An example macro might look something like:
<!-- {% raw %} -->
```
[gcode_macro SENSORLESS_HOME_X]
gcode:
{% set HOME_CUR = 0.700 %}
{% set driver_config = printer.configfile.settings['tmc2209 stepper_x'] %}
{% set RUN_CUR = driver_config.run_current %}
{% set HOLD_CUR = driver_config.hold_current %}
# Set current for sensorless homing
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CUR} HOLDCURRENT={HOME_CUR}
# Home
G28 X0
# Move away
G90
G1 X40 F1200
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CUR} HOLDCURRENT={HOLD_CUR}
```
<!-- {% endraw %} -->
The resulting macro can be called from a [homing_override config
section](Config_Reference.md#homing_override) or from a [START_PRINT
macro](Slicers.md#klipper-gcode_macro).
Note that if the driver current during homing is changed, then the
tuning process should be run again.
## Tips for sensorless homing on CoreXY
It is possible to use sensorless homing on the X and Y carriages of a
CoreXY printer. Klipper uses the `[stepper_x]` stepper to detect
stalls when homing the X carriage and uses the `[stepper_y]` stepper
to detect stalls when homing the Y carriage.
Use the tuning guide described above to find the appropriate "stall
sensitivity" for each carriage, but be aware of the following
restrictions:
1. When using sensorless homing on CoreXY, make sure there is no
`hold_current` in effect for either stepper during homing.
2. Make sure both the X and Y carriages are near the center of their
rails before each home attempt.
3. After tuning is complete, when homing both X and Y, use macros to
ensure that one axis is homed first, then move that carriage away
from the axis limit using a move that lasts at least two seconds,
and then start the homing of the other carriage. The move away from
the axis helps ensure the stall flag is cleared from both stepper
drivers before starting the next home attempt. It also avoids
homing one axis while the other is pressed against the axis limit
(which may skew the stall detection).
# Querying and diagnosing driver settings
The `[DUMP_TMC command](G-Codes.md#tmc-stepper-drivers) is a useful
tool when configuring and diagnosing the drivers. It will report all
fields configured by Klipper as well as all fields that can be queried
from the driver.
All of the reported fields are defined in the Trinamic datasheet for
each driver. These datasheets can be found on the [Trinamic
website](https://www.trinamic.com/). Obtain and review the Trinamic
datasheet for the driver to interpret the results of DUMP_TMC.
# Configuring driver_XXX settings
Klipper supports configuring many low-level driver fields using
`driver_XXX` settings. The [TMC driver config
reference](Config_Reference.md#tmc-stepper-driver-configuration) has
the full list of fields available for each type of driver.
In addition, almost all fields can be modified at run-time using the
[SET_TMC_FIELD command](G-Codes.md#tmc-stepper-drivers).
Each of these fields is defined in the Trinamic datasheet for each
driver. These datasheets can be found on the [Trinamic
website](https://www.trinamic.com/).
Note that the Trinamic datasheets sometime use wording that can
confuse a high-level setting (such as "hysteresis end") with a
low-level field value (eg, "HEND"). In Klipper, `driver_XXX` and
SET_TMC_FIELD always set the low-level field value that is actually
written to the driver. So, for example, if the Trinamic datasheet
states that a value of 3 must be written to the HEND field to obtain a
"hysteresis end" of 0, then set `driver_HEND=3` to obtain the
high-level value of 0.
# Common Questions
## Can I use stealthchop mode on an extruder with pressure advance?
Many people successfully use "stealthchop" mode with Klipper's
pressure advance. Klipper implements [smooth pressure
advance](Kinematics.md#pressure-advance) which does not introduce any
instantaneous velocity changes.
However, "stealthchop" mode may produce lower motor torque and/or
produce higher motor heat. It may or may not be an adequate mode for
your particular printer.
## I keep getting "Unable to read tmc uart 'stepper_x' register IFCNT" errors?
This occurs when Klipper is unable to communicate with a tmc2208 or
tmc2209 driver.
Make sure that the motor power is enabled, as the stepper motor driver
generally needs motor power before it can communicate with the
micro-controller.
Otherwise, this error is typically the result of incorrect UART pin
wiring or an incorrect Klipper configuration of the UART pin settings.
## I keep getting "Unable to write tmc spi 'stepper_x' register ..." errors?
This occurs when Klipper is unable to communicate with a tmc2130 or
tmc5160 driver.
Make sure that the motor power is enabled, as the stepper motor driver
generally needs motor power before it can communicate with the
micro-controller.
Otherwise, this error is typically the result of incorrect SPI wiring,
an incorrect Klipper configuration of the SPI settings, or an
incomplete configuration of devices on an SPI bus.
Note that if the driver is on a shared SPI bus with multiple devices
then be sure to fully configure every device on that shared SPI bus in
Klipper. If a device on a shared SPI bus is not configured, then it
may incorrectly respond to commands not intended for it and corrupt
the communication to the intended device. If there is a device on a
shared SPI bus that can not be configured in Klipper, then use a
[static_digital_output config
section](Config_Reference.md#static_digital_output) to set the CS pin
of the unused device high (so that it will not attempt to use the SPI
bus). The board's schematic is often a useful reference for finding
which devices are on an SPI bus and their associated pins.
## Why did I get a "TMC reports error: ..." error?
This type of error indicates the TMC driver detected a problem and has
disabled itself. That is, the driver stopped holding its position and
ignored movement commands. If Klipper detects that an active driver
has disabled itself, it will transition the printer into a "shutdown"
state.
Some common errors and tips for diagnosing them:
**TMC reports error: ... ot=1(OvertempError!)"**: This indicates the
motor driver disabled itself because it became too hot. Typical
solutions are to decrease the stepper motor current, increase cooling
on the stepper motor driver, and/or increase cooling on the stepper
motor.
**TMC reports error: ... ShortToGND** OR **LowSideShort**: This
indicates the driver has disabled itself because it detected very high
current passing through the driver. This may indicate a loose or
shorted wire to the stepper motor or within the stepper motor itself.
**TMC reports error: ... reset=1(Reset)** OR **CS_ACTUAL=0(Reset?)**
OR **SE=0(Reset?)**: This indicates that the driver has reset itself
mid-print. This may be due to voltage or wiring issues.
**TMC reports error: ... uv_cp=1(Undervoltage!)**: This indicates the
driver has detected a low-voltage event and has disabled itself. This
may be due to wiring or power supply issues.
It's also possible that a **TMC reports error** shutdown occurs due to
SPI errors that prevent communication with the driver (on tmc2130,
tmc5160, or tmc2660). If this occurs, it's common for the reported
driver status to show `00000000` or `ffffffff` - for example: `TMC
reports error: DRV_STATUS: ffffffff ...` OR `TMC reports error:
READRSP@RDSEL2: 00000000 ...`. Such a failure may be due to an SPI
wiring problem or may be due to a self-reset or failure of the TMC
driver.
## How do I tune spreadcycle/coolstep/etc. mode on my drivers?
The [Trinamic website](https://www.trinamic.com/) has guides on
configuring the drivers. These guides are often technical, low-level,
and may require specialized hardware. Regardless, they are the best
source of information.

67
docs/Using_PWM_Tools.md Normal file
View File

@ -0,0 +1,67 @@
This document describes how to setup a PWM-controlled laser or spindle
using `output_pin` and some macros.
## How does it work?
With re-purposing the printhead's fan pwm output, you can control
lasers or spindles.
This is useful if you use switchable print heads, for example
the E3D toolchanger or a DIY solution.
Usually, cam-tools such as LaserWeb can be configured to use `M3-M5`
commands, which stand for _spindle speed CW_ (`M3 S[0-255]`),
_spindle speed CCW_ (`M4 S[0-255]`) and _spindle stop_ (`M5`).
**Warning:** When driving a laser, keep all security precautions
that you can think of! Diode lasers are usually inverted.
This means, that when the MCU restarts, the laser will be
_fully on_ for the time it takes the MCU to start up again.
For good measure, it is recommended to _always_ wear appropriate
laser-goggles of the right wavelength if the laser is powered;
and to disconnect the laser when it is not needed.
Also, you should configure a safety timeout,
so that when your host or MCU encounters an error, the tool will stop.
For an example configuration, see `config/sample-pwm-tool-cfg`.
## Current Limitations
There is a limitation of how frequent PWM updates may occur.
While being very precise, a PWM update may only occur every 0.1 seconds,
rendering it almost useless for raster engraving.
However, there exists an [experimental branch](https://github.com/Cirromulus/klipper/tree/laser_tool) with its own tradeoffs.
In long term, it is planned to add this functionality to main-line klipper.
## Commands
`M3/M4 S<value>` : Set PWM duty-cycle. Values between 0 and 255.
`M5` : Stop PWM output to shutdown value.
## Laserweb Configuration
If you use Laserweb, a working configuration would be:
GCODE START:
M5 ; Disable Laser
G21 ; Set units to mm
G90 ; Absolute positioning
G0 Z0 F7000 ; Set Non-Cutting speed
GCODE END:
M5 ; Disable Laser
G91 ; relative
G0 Z+20 F4000 ;
G90 ; absolute
GCODE HOMING:
M5 ; Disable Laser
G28 ; Home all axis
TOOL ON:
M3 $INTENSITY
TOOL OFF:
M5 ; Disable Laser
LASER INTENSITY:
S

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1,2 +0,0 @@
<!-- Klipper do something undesirable? YOU MUST ATTACH THE KLIPPER LOG FILE.
See: https://github.com/KevinOConnor/klipper/blob/master/docs/Contact.md -->

View File

@ -1,142 +0,0 @@
This document describes how the STM32F0 port operates and how to work with
tiny CAN-enabled boards.
Required components
===================
#### MCP2515 module
![MCP2515](img/mcp2515.jpg)
or this
![CAN/RS485 hat](img/canhat.jpg)
#### St-link dongle
![st-link v2](img/stlinkv2-700x700.jpg)
Adding CAN bus to Raspberry Pi
==============================
(Based on Quick Guide https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=141052)
First of all, (only if you have small CAN module) its necessary to modify the CAN-module from ebay, because it has
only one VCC pin, but the MCP2515 needs to be powered from 3V3 and the TJA1050
CAN-transceiver needs to be powered from 5V. Powering both chips from 5V would
work, but then a level-shifter for the SPI would be needed. The Pi's GPIO pins
are NOT 5V tolerant. Cut a trace on the PCB and soldered a pin onto the trace
to deliver 5V only to the TJA1050. Be sure to cut the trace before the capacitor:
![VCC cut](img/mcp2515_vcc_cut.png)
Next connect the module:
| MCP2515 | Raspberry Pi |
| --- | --- |
| VCC | 1 (3V3) |
| TJA 1050 VCC | 2 (5V) |
| GND | 6 (GND) |
| CS | 24 (CE0) |
| MISO | 21 (MISO) |
| MOSI | 19 (MOSI) |
| SCK | 23 (SCK) |
| INT | 22 (GPIO25) |
Install can-utils:
> sudo apt-get install can-utils
To activate the driver for the MCP2515 you have to add a kernel overlay, to do
so edit the /boot/config.txt
> sudo nano /boot/config.txt
And add the following lines (set oscillator value according to crystal on your board):
```
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
dtoverlay=spi1-1cs
```
Now reboot, after the reboot try to setup the the can interface:
> sudo ip link set can0 up type can bitrate 500000
If no errors occurred, the can interface should be ready now.
To make the CAN-interface permanent, add the following lines to /etc/network/interfaces
```
auto can0
iface can0 can static
bitrate 500000
```
Communicating over CAN
======================
Use "Serial over CAN" emulator software to establish connection:
https://github.com/Delsian/CanSerial
Install st-link on Raspberry Pi
===============================
> sudo apt-get update
> sudo apt-get install cmake
> sudo apt-get install libusb-1.0-0-dev
> git clone https://github.com/texane/stlink stlink-repo
> cd stlink-repo
> make
> cd build/Release/
> sudo make install
Copy to /etc/udev/rules.d/49-stlinkv2.rules:
```
# stm32 discovery boards, with onboard st/linkv2
# ie, STM32L, STM32F4.
# STM32VL has st/linkv1, which is quite different
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", \
MODE:="0666", \
SYMLINK+="stlinkv2_%n"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
KERNEL!="sd*", KERNEL!="sg*", KERNEL!="tty*", SUBSYSTEM!="bsg", \
MODE:="0666", \
SYMLINK+="stlinkv2_%n"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
KERNEL=="sd*", MODE:="0666", \
SYMLINK+="stlinkv2_disk"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
KERNEL=="sg*", MODE:="0666", \
SYMLINK+="stlinkv2_raw_scsi"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
SUBSYSTEM=="bsg", MODE:="0666", \
SYMLINK+="stlinkv2_block_scsi"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
KERNEL=="tty*", MODE:="0666", \
SYMLINK+="stlinkv2_console"
# If you share your linux system with other users, or just don't like the
# idea of write permission for everybody, you can replace MODE:="0666" with
# OWNER:="yourusername" to create the device owned by you, or with
# GROUP:="somegroupname" and control access using standard unix groups.
```
Now "make flash" command can upload HEX into connected board
Pins allocation
===============
Configurations with CAN and Serial port uses different pins, and during enumeration
process firmware reports all possible pin names. But actually you can use only
existing pins, not involved in communication. Wrong pins will generate shutdown.

View File

@ -1,6 +1,6 @@
# Wrapper around C helper code
#
# Copyright (C) 2016-2020 Kevin O'Connor <kevin@koconnor.net>
# Copyright (C) 2016-2021 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import os, logging
@ -31,10 +31,14 @@ OTHER_FILES = [
defs_stepcompress = """
struct stepcompress *stepcompress_alloc(uint32_t oid);
void stepcompress_fill(struct stepcompress *sc, uint32_t max_error
, uint32_t invert_sdir, uint32_t queue_step_msgid
, uint32_t set_next_step_dir_msgid);
, uint32_t invert_sdir, int32_t queue_step_msgtag
, int32_t set_next_step_dir_msgtag);
void stepcompress_free(struct stepcompress *sc);
int stepcompress_reset(struct stepcompress *sc, uint64_t last_step_clock);
int stepcompress_set_last_position(struct stepcompress *sc
, int64_t last_position);
int64_t stepcompress_find_past_position(struct stepcompress *sc
, uint64_t clock);
int stepcompress_queue_msg(struct stepcompress *sc
, uint32_t *data, int len);
@ -141,7 +145,8 @@ defs_serialqueue = """
uint64_t notify_id;
};
struct serialqueue *serialqueue_alloc(int serial_fd, int write_only);
struct serialqueue *serialqueue_alloc(int serial_fd, char serial_fd_type
, int client_id);
void serialqueue_exit(struct serialqueue *sq);
void serialqueue_free(struct serialqueue *sq);
struct command_queue *serialqueue_alloc_commandqueue(void);
@ -199,16 +204,29 @@ def check_build_code(sources, target):
obj_times = get_mtimes([target])
return not obj_times or max(src_times) > min(obj_times)
# Check if the current gcc version supports a particular command-line option
def check_gcc_option(option):
cmd = "%s %s -S -o /dev/null -xc /dev/null > /dev/null 2>&1" % (
GCC_CMD, option)
res = os.system(cmd)
return res == 0
# Check if the current gcc version supports a particular command-line option
def do_build_code(cmd):
res = os.system(cmd)
if res:
msg = "Unable to build C code module (error=%s)" % (res,)
logging.error(msg)
raise Exception(msg)
FFI_main = None
FFI_lib = None
pyhelper_logging_callback = None
# Hepler invoked from C errorf() code to log errors
def logging_callback(msg):
logging.error(FFI_main.string(msg))
# Return the Foreign Function Interface api to the caller
def get_ffi():
global FFI_main, FFI_lib, pyhelper_logging_callback
@ -223,16 +241,14 @@ def get_ffi():
else:
cmd = "%s %s" % (GCC_CMD, COMPILE_ARGS)
logging.info("Building C code module %s", DEST_LIB)
os.system(cmd % (destlib, ' '.join(srcfiles)))
do_build_code(cmd % (destlib, ' '.join(srcfiles)))
FFI_main = cffi.FFI()
for d in defs_all:
FFI_main.cdef(d)
FFI_lib = FFI_main.dlopen(destlib)
# Setup error logging
def logging_callback(msg):
logging.error(FFI_main.string(msg))
pyhelper_logging_callback = FFI_main.callback(
"void func(const char *)", logging_callback)
pyhelper_logging_callback = FFI_main.callback("void func(const char *)",
logging_callback)
FFI_lib.set_python_logging_callback(pyhelper_logging_callback)
return FFI_main, FFI_lib
@ -254,7 +270,7 @@ def run_hub_ctrl(enable_power):
destlib = get_abs_files(hubdir, [HC_TARGET])[0]
if check_build_code(srcfiles, destlib):
logging.info("Building C code module %s", HC_TARGET)
os.system(HC_COMPILE_CMD % (destlib, ' '.join(srcfiles)))
do_build_code(HC_COMPILE_CMD % (destlib, ' '.join(srcfiles)))
os.system(HC_CMD % (hubdir, enable_power))

View File

@ -1,6 +1,6 @@
// Serial port command queuing
//
// Copyright (C) 2016-2020 Kevin O'Connor <kevin@koconnor.net>
// Copyright (C) 2016-2021 Kevin O'Connor <kevin@koconnor.net>
//
// This file may be distributed under the terms of the GNU GPLv3 license.
@ -13,6 +13,7 @@
// background thread is launched to do this work and minimize latency.
#include <fcntl.h> // fcntl
#include <linux/can.h> // // struct can_frame
#include <math.h> // ceil
#include <poll.h> // poll
#include <pthread.h> // pthread_mutex_lock
@ -123,24 +124,27 @@ pollreactor_update_timer(struct pollreactor *pr, int pos, double waketime)
// Internal code to invoke timer callbacks
static int
pollreactor_check_timers(struct pollreactor *pr, double eventtime)
pollreactor_check_timers(struct pollreactor *pr, double eventtime, int busy)
{
if (eventtime >= pr->next_timer) {
// Find and run pending timers
pr->next_timer = PR_NEVER;
int i;
for (i=0; i<pr->num_timers; i++) {
struct pollreactor_timer *timer = &pr->timers[i];
double t = timer->waketime;
if (eventtime >= t) {
busy = 1;
t = timer->callback(pr->callback_data, eventtime);
timer->waketime = t;
}
if (t < pr->next_timer)
pr->next_timer = t;
}
if (eventtime >= pr->next_timer)
return 0;
}
if (busy)
return 0;
// Calculate sleep duration
double timeout = ceil((pr->next_timer - eventtime) * 1000.);
return timeout < 1. ? 1 : (timeout > 1000. ? 1000 : (int)timeout);
}
@ -150,11 +154,14 @@ static void
pollreactor_run(struct pollreactor *pr)
{
double eventtime = get_monotonic();
int busy = 1;
while (! pr->must_exit) {
int timeout = pollreactor_check_timers(pr, eventtime);
int timeout = pollreactor_check_timers(pr, eventtime, busy);
busy = 0;
int ret = poll(pr->fds, pr->num_fds, timeout);
eventtime = get_monotonic();
if (ret > 0) {
busy = 1;
int i;
for (i=0; i<pr->num_fds; i++)
if (pr->fds[i].revents)
@ -348,7 +355,7 @@ message_queue_free(struct list_head *root)
struct serialqueue {
// Input reading
struct pollreactor pr;
int serial_fd;
int serial_fd, serial_fd_type, client_id;
int pipe_fds[2];
uint8_t input_buf[4096];
uint8_t need_sync;
@ -390,8 +397,13 @@ struct serialqueue {
#define SQPT_COMMAND 1
#define SQPT_NUM 2
#define SQT_UART 'u'
#define SQT_CAN 'c'
#define SQT_DEBUGFILE 'f'
#define MIN_RTO 0.025
#define MAX_RTO 5.000
#define MAX_PENDING_BLOCKS 12
#define MIN_REQTIME_DELTA 0.250
#define MIN_BACKGROUND_DELTA 0.005
#define IDLE_QUERY_TIME 1.0
@ -502,18 +514,21 @@ update_receive_seq(struct serialqueue *sq, double eventtime, uint64_t rseq)
}
// Process a well formed input message
static void
static int
handle_message(struct serialqueue *sq, double eventtime, int len)
{
// Calculate receive sequence number
uint64_t rseq = ((sq->receive_seq & ~MESSAGE_SEQ_MASK)
| (sq->input_buf[MESSAGE_POS_SEQ] & MESSAGE_SEQ_MASK));
if (rseq != sq->receive_seq) {
// New sequence number
if (rseq < sq->receive_seq)
rseq += MESSAGE_SEQ_MASK+1;
if (rseq != sq->receive_seq)
// New sequence number
if (rseq > sq->send_seq && sq->receive_seq != 1)
// An ack for a message not sent? Out of order message?
return -1;
update_receive_seq(sq, eventtime, rseq);
}
// Check for pending messages on notify_queue
int must_wake = 0;
@ -553,41 +568,62 @@ handle_message(struct serialqueue *sq, double eventtime, int len)
if (must_wake)
check_wake_receive(sq);
return 0;
}
// Callback for input activity on the serial fd
static void
input_event(struct serialqueue *sq, double eventtime)
{
if (sq->serial_fd_type == SQT_CAN) {
struct can_frame cf;
int ret = read(sq->serial_fd, &cf, sizeof(cf));
if (ret <= 0) {
report_errno("can read", ret);
pollreactor_do_exit(&sq->pr);
return;
}
if (cf.can_id != sq->client_id + 1)
return;
memcpy(&sq->input_buf[sq->input_pos], cf.data, cf.can_dlc);
sq->input_pos += cf.can_dlc;
} else {
int ret = read(sq->serial_fd, &sq->input_buf[sq->input_pos]
, sizeof(sq->input_buf) - sq->input_pos);
if (ret <= 0) {
if(ret < 0)
report_errno("read", ret);
else
errorf("Got EOF when reading from device");
pollreactor_do_exit(&sq->pr);
return;
}
sq->input_pos += ret;
}
for (;;) {
ret = check_message(&sq->need_sync, sq->input_buf, sq->input_pos);
if (!ret)
int len = check_message(&sq->need_sync, sq->input_buf, sq->input_pos);
if (!len)
// Need more data
return;
if (ret > 0) {
if (len > 0) {
// Received a valid message
pthread_mutex_lock(&sq->lock);
handle_message(sq, eventtime, ret);
sq->bytes_read += ret;
int ret = handle_message(sq, eventtime, len);
if (ret)
sq->bytes_invalid += len;
else
sq->bytes_read += len;
pthread_mutex_unlock(&sq->lock);
} else {
// Skip bad data at beginning of input
ret = -ret;
len = -len;
pthread_mutex_lock(&sq->lock);
sq->bytes_invalid += ret;
sq->bytes_invalid += len;
pthread_mutex_unlock(&sq->lock);
}
sq->input_pos -= ret;
sq->input_pos -= len;
if (sq->input_pos)
memmove(sq->input_buf, &sq->input_buf[ret], sq->input_pos);
memmove(sq->input_buf, &sq->input_buf[len], sq->input_pos);
}
}
@ -602,18 +638,46 @@ kick_event(struct serialqueue *sq, double eventtime)
pollreactor_update_timer(&sq->pr, SQPT_COMMAND, PR_NOW);
}
static void
do_write(struct serialqueue *sq, void *buf, int buflen)
{
if (sq->serial_fd_type != SQT_CAN) {
int ret = write(sq->serial_fd, buf, buflen);
if (ret < 0)
report_errno("write", ret);
return;
}
// Write to CAN fd
struct can_frame cf;
while (buflen) {
int size = buflen > 8 ? 8 : buflen;
cf.can_id = sq->client_id;
cf.can_dlc = size;
memcpy(cf.data, buf, size);
int ret = write(sq->serial_fd, &cf, sizeof(cf));
if (ret < 0) {
report_errno("can write", ret);
return;
}
buf += size;
buflen -= size;
}
}
// Callback timer for when a retransmit should be done
static double
retransmit_event(struct serialqueue *sq, double eventtime)
{
if (sq->serial_fd_type == SQT_UART) {
int ret = tcflush(sq->serial_fd, TCOFLUSH);
if (ret < 0)
report_errno("tcflush", ret);
}
pthread_mutex_lock(&sq->lock);
// Retransmit all pending messages
uint8_t buf[MESSAGE_MAX * MESSAGE_SEQ_MASK + 1];
uint8_t buf[MESSAGE_MAX * MAX_PENDING_BLOCKS + 1];
int buflen = 0, first_buflen = 0;
buf[buflen++] = MESSAGE_SYNC;
struct queue_message *qm;
@ -623,9 +687,7 @@ retransmit_event(struct serialqueue *sq, double eventtime)
if (!first_buflen)
first_buflen = qm->len + 1;
}
ret = write(sq->serial_fd, buf, buflen);
if (ret < 0)
report_errno("retransmit write", ret);
do_write(sq, buf, buflen);
sq->bytes_retransmit += buflen;
// Update rto
@ -651,13 +713,11 @@ retransmit_event(struct serialqueue *sq, double eventtime)
return waketime;
}
// Construct a block of data and send to the serial port
static void
build_and_send_command(struct serialqueue *sq, double eventtime)
// Construct a block of data to be sent to the serial port
static int
build_and_send_command(struct serialqueue *sq, uint8_t *buf, double eventtime)
{
struct queue_message *out = message_alloc();
out->len = MESSAGE_HEADER_SIZE;
int len = MESSAGE_HEADER_SIZE;
while (sq->ready_bytes) {
// Find highest priority message (message with lowest req_clock)
uint64_t min_clock = MAX_CLOCK;
@ -675,13 +735,13 @@ build_and_send_command(struct serialqueue *sq, double eventtime)
}
}
// Append message to outgoing command
if (out->len + qm->len > sizeof(out->msg) - MESSAGE_TRAILER_SIZE)
if (len + qm->len > MESSAGE_MAX - MESSAGE_TRAILER_SIZE)
break;
list_del(&qm->node);
if (list_empty(&cq->ready_queue) && list_empty(&cq->stalled_queue))
list_del(&cq->node);
memcpy(&out->msg[out->len], qm->msg, qm->len);
out->len += qm->len;
memcpy(&buf[len], qm->msg, qm->len);
len += qm->len;
sq->ready_bytes -= qm->len;
if (qm->notify_id) {
// Message requires notification - add to notify list
@ -693,23 +753,21 @@ build_and_send_command(struct serialqueue *sq, double eventtime)
}
// Fill header / trailer
out->len += MESSAGE_TRAILER_SIZE;
out->msg[MESSAGE_POS_LEN] = out->len;
out->msg[MESSAGE_POS_SEQ] = (MESSAGE_DEST
| (sq->send_seq & MESSAGE_SEQ_MASK));
uint16_t crc = crc16_ccitt(out->msg, out->len - MESSAGE_TRAILER_SIZE);
out->msg[out->len - MESSAGE_TRAILER_CRC] = crc >> 8;
out->msg[out->len - MESSAGE_TRAILER_CRC+1] = crc & 0xff;
out->msg[out->len - MESSAGE_TRAILER_SYNC] = MESSAGE_SYNC;
len += MESSAGE_TRAILER_SIZE;
buf[MESSAGE_POS_LEN] = len;
buf[MESSAGE_POS_SEQ] = MESSAGE_DEST | (sq->send_seq & MESSAGE_SEQ_MASK);
uint16_t crc = crc16_ccitt(buf, len - MESSAGE_TRAILER_SIZE);
buf[len - MESSAGE_TRAILER_CRC] = crc >> 8;
buf[len - MESSAGE_TRAILER_CRC+1] = crc & 0xff;
buf[len - MESSAGE_TRAILER_SYNC] = MESSAGE_SYNC;
// Send message
int ret = write(sq->serial_fd, out->msg, out->len);
if (ret < 0)
report_errno("write", ret);
sq->bytes_write += out->len;
// Store message block
if (eventtime > sq->idle_time)
sq->idle_time = eventtime;
sq->idle_time += out->len * sq->baud_adjust;
sq->idle_time += len * sq->baud_adjust;
struct queue_message *out = message_alloc();
memcpy(out->msg, buf, len);
out->len = len;
out->sent_time = eventtime;
out->receive_time = sq->idle_time;
if (list_empty(&sq->sent_queue))
@ -718,15 +776,16 @@ build_and_send_command(struct serialqueue *sq, double eventtime)
if (!sq->rtt_sample_seq)
sq->rtt_sample_seq = sq->send_seq;
sq->send_seq++;
sq->need_ack_bytes += out->len;
sq->need_ack_bytes += len;
list_add_tail(&out->node, &sq->sent_queue);
return len;
}
// Determine the time the next serial data should be sent
static double
check_send_command(struct serialqueue *sq, double eventtime)
{
if (sq->send_seq - sq->receive_seq >= MESSAGE_SEQ_MASK
if (sq->send_seq - sq->receive_seq >= MAX_PENDING_BLOCKS
&& sq->receive_seq != (uint64_t)-1)
// Need an ack before more messages can be sent
return PR_NEVER;
@ -801,12 +860,22 @@ static double
command_event(struct serialqueue *sq, double eventtime)
{
pthread_mutex_lock(&sq->lock);
uint8_t buf[MESSAGE_MAX * MAX_PENDING_BLOCKS];
int buflen = 0;
double waketime;
for (;;) {
waketime = check_send_command(sq, eventtime);
if (waketime != PR_NOW || buflen + MESSAGE_MAX > sizeof(buf)) {
if (buflen) {
// Write message blocks
do_write(sq, buf, buflen);
sq->bytes_write += buflen;
buflen = 0;
}
if (waketime != PR_NOW)
break;
build_and_send_command(sq, eventtime);
}
buflen += build_and_send_command(sq, &buf[buflen], eventtime);
}
pthread_mutex_unlock(&sq->lock);
return waketime;
@ -828,19 +897,22 @@ background_thread(void *data)
// Create a new 'struct serialqueue' object
struct serialqueue * __visible
serialqueue_alloc(int serial_fd, int write_only)
serialqueue_alloc(int serial_fd, char serial_fd_type, int client_id)
{
struct serialqueue *sq = malloc(sizeof(*sq));
memset(sq, 0, sizeof(*sq));
// Reactor setup
sq->serial_fd = serial_fd;
sq->serial_fd_type = serial_fd_type;
sq->client_id = client_id;
int ret = pipe(sq->pipe_fds);
if (ret)
goto fail;
// Reactor setup
pollreactor_setup(&sq->pr, SQPF_NUM, SQPT_NUM, sq);
pollreactor_add_fd(&sq->pr, SQPF_SERIAL, serial_fd, input_event
, write_only);
, serial_fd_type==SQT_DEBUGFILE);
pollreactor_add_fd(&sq->pr, SQPF_PIPE, sq->pipe_fds[0], kick_event, 0);
pollreactor_add_timer(&sq->pr, SQPT_RETRANSMIT, retransmit_event);
pollreactor_add_timer(&sq->pr, SQPT_COMMAND, command_event);
@ -850,7 +922,8 @@ serialqueue_alloc(int serial_fd, int write_only)
// Retransmit setup
sq->send_seq = 1;
if (write_only) {
if (serial_fd_type == SQT_DEBUGFILE) {
// Debug file output
sq->receive_seq = -1;
sq->rto = PR_NEVER;
} else {

Some files were not shown because too many files have changed in this diff Show More