313 Commits

Author SHA1 Message Date
Kevin O'Connor
0d67d9c45d docs: Note the release of v0.12.0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-11-10 18:36:19 -05:00
Kevin O'Connor
0acf3035e8 docs: Update Features.md
Note additional features that have been added recently.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-11-10 18:35:59 -05:00
Pedro Lamas
9e765daeed bed_screws: Reset on move error
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2023-11-02 13:08:53 -04:00
Wayne Manion
233f50424c config: Update generic-bigtreetech-skr-pico-v1.0.cfg (#6376)
Add RP2040 internal temperature sensor

Signed-off-by: Wayne Manion <treowayne@gmail.com>
2023-11-02 13:03:01 -04:00
Kevin O'Connor
64a97431b5 docs: Update Contact.md to note other common ways to obtain Klipper log file
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-11-01 19:04:13 -04:00
Kevin O'Connor
03982f2c7e docs: Update the Contact document
Try to make it more clear that Discord is not Discourse, as the two
similarly sounding services are often confused by users unfamiliar
with them.

The Klipper Discourse and Klipper Discord are available for many
topics related to Klipper - reword some sections to make their use
more open.

Avoid referring to the Klipper github repo in this Contact document as
we no longer use Klipper github issues at all.

Remove the table of contents as it is largely redundant for the
document.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-11-01 19:04:13 -04:00
Kevin O'Connor
bee7ec720b config: Add new generic-bigtreetech-octopus-pro-v1.1.cfg config
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-30 14:29:43 -04:00
Kevin O'Connor
9b15293547 config: Clarify stepper enable comment in Octopus boards
Make sure the stepper enable_pin comment shows an inverted pin.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-30 14:29:43 -04:00
Kevin O'Connor
a629b87ae0 config: Split generic-bigtreetech-octopus.cfg into separate files
Use two different files for the Octopus Pro and Octopus (non-Pro).
The configs are the same in practice, but the difference in version
and naming can lead to confusion.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-30 14:29:43 -04:00
Kevin O'Connor
f7567a0db9 Revert "toolhead: Use dict for step generation flush times. (#6303)"
This reverts commit 6749985302.

A defect was found in the above commit (the input shaper code calls
note_step_generateion_scan_time() for many steppers, so the
input_shaper class can't be used as the index).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-21 15:46:08 -04:00
Viesturs Zariņš
6749985302 toolhead: Use dict for step generation flush times. (#6303)
Makes the API to extruder and input shaper more robust, avoiding the need to track the old delay.

Signed-off-by: Viesturs Zariņš <viesturz@gmail.com>
2023-10-19 13:28:16 -04:00
Tom Dunn
0c521b601d Config_checks: Missing ! in pin inversion example in Verify endstops
In the "Verify endstops" section there is an example of adding an
exclamation point to the pin definition to invert its logic.  I
believe the intention in the example is to keep the hardware pull-up
^ and follow it with ! to invert the pin logic, but the ! is missing.

Signed-off-by: Tom Dunn <thomas.dunn@gmail.com>
2023-10-19 13:13:57 -04:00
Aaron B. Haun
593486fadc docs: Fix a typo in serial bootloader entry docs
Signed-off-by: Aaron B. Haun <aaron@haun.guru>
2023-10-19 13:10:05 -04:00
Luke V
dd01e99c59 atsam: Add support for CAN on atsame70 (#6366)
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2023-10-19 13:01:59 -04:00
Alex Maclean
b1f597c550 atsam: Remove USB endpoint header (#6365)
The atsam USB hardware only requires that the ACM endpoint be endpoint
3.  As of commit 11828387 the atsam chips can therefore use the
default USB endpoints.

This will allow CAN bridge support for the SAME70 to function
(upstream host driver has hardcoded endpoints).

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
2023-10-12 21:02:26 -04:00
Aaron B. Haun
ecc9bbf52a docs: add info about requesting bootloaders
Signed-off-by: Aaron B. Haun <aaron@haun.guru>
2023-10-12 20:53:31 -04:00
Kevin O'Connor
5edc7fee7e config: Fix trailing space in printer-creality-ender5-2019.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-09 13:34:58 -04:00
ghostoverflow256
7eabf02f5b config: Update printer-creality-ender5-2019.cfg to add instructions for silent boards (#6326)
Recently tested on my ender 5 pro that came from creality with a v1.1.5 board. Works. Tested all endstops, motors, and heaters. 

Signed-off-by: Jake Aronleigh <jakestar98@outlook.com>
2023-10-09 13:28:49 -04:00
Kevin O'Connor
83ef0e135e stm32: Make sure to limit tx during usbfs startup
Wait for two tx packets before startup, and make sure one of those
packets is acked before sending a third tx packet.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-05 00:47:42 -04:00
Kevin O'Connor
447125faae serialqueue: Eventually time out if unable to write CANbus messages
Klipper logs an error on a failed CANbus write.  Unfortunately, if the
bus becomes permanently disabled (eg, due to a user removing power to
devices on the CANbus) then it can result in the logs filling with
error messages.

Permanently disable the low-level processing of messages if CANbus
writes continually fail for at least 10 seconds.  This avoids filling
the log with redundant messages.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-04 22:42:14 -04:00
Kevin O'Connor
043f18da26 stm32: Fix usbfs spurious USB packet transmit on startup
Commit cd8d57c2 added USB double buffering mode on transmits.
However, when enabling double buffering mode, the hardware seems to
always send at least two packets.  Spurious transmissions could cause
the Linux gs_usb driver to get confused, which could lead to the can0
device becoming unavailable on restarts.  Fix by waiting for two USB
packets to be available before enabling the endpoint.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-04 22:11:22 -04:00
Kevin O'Connor
615db729e7 stm32: Only enable one direction on usbfs double buffered end points
The bulk out endpoint should not be enabled in tx mode, and the bulk
in endpoint should not be enabled in rx mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-04 18:49:46 -04:00
Kevin O'Connor
6adff3954b usb_canbus: Prioritize local response sending over new host messages
Prioritize sending responses back to the host over transmitting new
messages from the host.  Otherwise, the gs_usb host usb
acknowledgments could saturate the usb bandwidth for extended periods.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:29:17 -04:00
Kevin O'Connor
78ae83c314 usb_canbus: Add a local queue for USB messages received from host
Read USB messages arriving from the host into a queue.  This makes it
less likely that USB "bulk out" packets will be NAK'ed on the USB bus,
which improves USB bus utilization.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:29:17 -04:00
Kevin O'Connor
5b204866c5 usb_canbus: Rename UsbCan.queue to UsbCan.canhw_queue
Rename the internal variable names.  This is in preparation for
support of a USB message queue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:29:17 -04:00
Kevin O'Connor
472fd32cab rp2040: Add support for double buffering on USB bulk tx packets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:28:13 -04:00
Kevin O'Connor
90427fe30e rp2040: Add support for double buffering on USB bulk rx packets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:28:13 -04:00
Kevin O'Connor
bdeec0f56d rp2040: Open code usb_read_packet() and usb_write_packet() in callers
Copy the code for these two functions to their respective callers.
This is in preparation for double buffer support.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:28:13 -04:00
Kevin O'Connor
83eecae028 rp2040: Add helper functions to usbserial.c
Add helper functions for manipulating the buffer memory and packet
control registers.  This is in preparation for double buffer support.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:28:13 -04:00
Kevin O'Connor
cd8d57c2c6 stm32: Add usbfs double buffer support for bulk tx messages
Implement the usbfs fast buffer switching mechanism on the "bulk in"
endpoint.  This can improve the overall USB throughput and bus
utilization.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:26:46 -04:00
Kevin O'Connor
b1361d9e5b stm32: Add usbfs double buffer support for bulk rx messages
Implement the usbfs fast buffer switching mechanism on the "bulk out"
endpoint.  This can improve the overall USB throughput and bus
utilization.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:26:46 -04:00
Kevin O'Connor
01ac5334e9 stm32: Update usbfs to support setting both buffers for each endpoint
The usbfs device supports two buffers for each endpoint - typically
one for rx and one for tx.  Add support for explicit handling of both
buffers.  This is in preparation for improved "double buffering"
support.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:26:46 -04:00
Kevin O'Connor
1e3ace2170 stm32: Improve usbfs epr register handling
Replace the set_stat_x_bits() functions with a single calc_epr_bits()
function.  This new function supports setting bits other than the stat
field in the epr register.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:26:46 -04:00
Kevin O'Connor
aa726cb7cb lib: Update to latest can2040 code
Add support for can2040_stop()
Add data_state_go_error() helper
Add new can2040_get_statistics() API function
Call report_note_discarding() after setting MS_DISCARD state
Convert report_is_rx_eof_pending() to report_is_not_in_tx()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:24:18 -04:00
Ikko Eltociear Ashimine
7bd32994d4 docs: fix typo in RPi_microcontroller.md
additionaly -> additionally

Signed-off-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
2023-09-29 13:58:29 -04:00
Dmitry Butyugin
a4cd0336bd idex_modes: Fixed the case when carriages home in the same direction (#6310)
Previous version of the code assumed that dual carriages home away
from each other, which is not true on some machines, which have the
second dual carriage homing on the first carriage. The new code
correctly identifies the relative order of the carriages now.

This fixes discrepancies between the documentation and the actual
implementation of the carriages kinematic ranges calculation.

Notes about dual_carriage homing and proximity checks changes

Fixed clearing of homing state after homing in certain modes

In case of multi-MCU homing it is possible that the carriage position
will end up outside of the allowed motion range due to latencies in data
transmission between MCUs. Selecting certain modes after homing could
result in home state clearing instead of blocking the motion of the
active carriage. This commit fixes this undesired behavior.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-09-29 13:46:42 -04:00
Kevin O'Connor
21b7842979 docs: Add Peopoly to Sponsors.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-09-26 16:51:38 -04:00
Kevin O'Connor
e9bf2d4c5c mcu: Enhance RetryAsyncCommand to handle low-level retransmits
The RetryAsyncCommand code needs to ensure that any response messages
are not from a previous (unrelated) query.  To do that it compares the
'#sent_time' from potential responses to ensure they are not from a
previous session.  However, if there are any low-level serial
retransmits then the low-level code sets the '#sent_time' to zero (to
indicate that the query send time is not strictly known).  That could
result in a valid response not being accepted by RetryAsyncCommand.

If a low-level connection is experiencing a small amount of periodic
retransmits it could result in multiple high-level retry attempts
failing to the point that there is a user-facing error.  This could
result in "Timeout on wait for 'tmcuart_response' response" errors.

Fix by accepting responses even if there is a low-level retransmit
once the code can confirm that there can be no previous query still in
progress.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-09-21 14:52:55 -04:00
DavidvtWout
8ef0f7d7e3 spi_temperature: Limit maximum temperature in MAX31865.calc_adc() to melting point of platinum (#6320)
Limit the maximum temperature in MAX31865.calc_adc() to the melting
point of platinum. Above this temperature the Callendar-Van Dusem
formula does not make sense. The default value for max_temp is
99999999.9 and at this temperature the result of this formula is
negative. This sets max_sample_value to 0 which causes the mcu
to shutdown.

Set max adc value to (1<<15)-1 .  This is needed because the max value of the adc register
of the MAX31865 is 0b1111 1111 1111 1110 which represents
32767 and not 32768.

Signed-off-by: David van 't Wout <github@yoctobyte.nl>
2023-09-10 18:51:14 -04:00
FrY Sennberg
2acfa28294 tmc2240: Adding UART interface support to tmc2240 (#6305)
Signed-off-by:  Christoph Frei <fryakatkop@gmail.com>
2023-09-10 14:41:59 -04:00
Bomberski
8f178b892a config: Add MKS Monster 8 generic config (#6336)
Signed-off-by: Allen Cox <Bomberski420@gmail.com>
2023-09-10 13:55:37 -04:00
JamesH1978
5f58fe7484 config: Add HC32F460 variant of Ender 2 Pro (#6334)
PR to add the newer version of the Ender 2 Pro with the CR-FDM-v2.5.54.170 motherboard with the HC3232F460 chip.

Confirmed as working with discord member NyftHeart and using configs from Steve Gotthardt, with his permission to use and submit.

Signed-off-by: James Hartley <james@hartleyns.com>
2023-09-10 13:52:33 -04:00
bigtreetech
5f990f93d5 Kconfig: Support Enable/Disable lis2dw on chips with small flash size
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
2023-08-21 14:26:46 -04:00
bigtreetech
073665cebb docs: Add how to configure LIS2DW instructions
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
2023-08-21 14:26:46 -04:00
bigtreetech
ec1dcf3bd2 lis2dw12: Add support for lis2dw12 accelerometer
lis2dw12 is an accelerometer from STMicroelectronics(https://www.st.com/resource/en/datasheet/lis2dw12.pdf)
With better performance than the ADXL345 according to the datasheet.

Signed-off-by: XM.Zhou from BigTreeTech zhouxm@biqu3d.com
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
2023-08-21 14:26:46 -04:00
Kevin O'Connor
c9aa7ac871 github: Fix regression due to update of actions/stale
Commit 594c0243 updated the workflows from actions/stale@v3 to
actions/stale@v8, but did not make the corresponding updates to the
config parameters.  This resulted in the closing of some PRs.  Update
the config parameters to avoid this regression.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-08-21 13:15:53 -04:00
locki-cz
01ed8096d8 spi_flash: Update board_defs.py (#6318)
Added alias for Octopus pro h723 v1.1 for sdcard update script.

Signed-off-by: David Bucek <bucek.david@gmail.com>
2023-08-15 14:11:51 -04:00
Wulfsta
261efdd86c config: Add 1LC example configuration and docs
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2023-08-13 15:32:27 -04:00
Falk Höppner
4292136b16 hc32f460: Add app address 0x10000
Required for the Anycubic Kobra 2.

Signed-off-by: Falk Höppner <falk@hoppner.se>
2023-08-13 15:30:00 -04:00
flatline-84
15c3824e9b config: Add config for printer Creality CR10s Pro V2 (#6300)
Created a base config for the Creality CR10s Pro v2 as described here: https://www.creality.com/products/cr-10s-pro-v2-3d-printer

This will allow users with this printer to more easily setup Klipper firmware.

Signed-off-by: Peter Kydas <peter@kydas.me>
2023-08-13 15:26:56 -04:00
FatalBulletHit
dd368c107c docs: Update RPi_microcontroller.md (pwm-2chan) (#6304)
Added a more detailed explanation for pwm-2chan.

Signed-off-by: Alfie Batthullt <FatalBulletHit@gmail.com>
2023-08-13 15:23:58 -04:00
Chris Lombardi
07792a02b4 scripts: Added stm32f070 to mcus supported by flash_usb.py
Verified with an Monoprice Mini Select v2 using katapult.

Signed-off-by: Chris Lombardi <clearchristx@gmail.com>
2023-08-13 14:14:55 -04:00
D4SK
aa8ba30f8a cartesian: fix x-axis being hardcoded for dual_carriage (#6313)
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
2023-08-11 21:21:46 -04:00
Thijs Triemstra
594c024355 github: update dependencies (#6293)
Signed-off-by: Thijs Triemstra <info@collab.nl>
2023-08-11 21:17:13 -04:00
Donna Whisnant
00b78c68cc docs: Update Config_Changes.md to reflect new SKR-3 flash-sdcard naming.
Signed-off-by: Donna Whisnant <dewhisna@dewtronics.com>
2023-08-11 20:00:36 -04:00
Donna Whisnant
20d87c73fe scripts: Support both H743 and H723 BTT SKR3 boards sdflash
Signed-off-by: Donna Whisnant <dewhisna@dewtronics.com>
2023-08-11 20:00:36 -04:00
Pedro Lamas
ed66982b8e heaters: adds temperature monitors
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2023-08-01 20:32:03 -04:00
Dmitry Butyugin
55d09771b1 idex_modes: A small fix for MOVE_SPEED param
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-08-01 20:26:19 -04:00
Michael Jäger
6f7c743615 temperature_combined: A class that can combine several other temperature sensors (#6230)
Signed-off-by: Michael Jäger <michael@mjaeger.eu>
2023-08-01 13:18:03 -04:00
Philippe Daouadi
039daecb4f axis_twist_compensation: Add X twist compensation module (#6149)
Implements AxisTwistCompensation, and Calibrater

Supports calibration of z-offsets caused by x gantry twist

Modify PrinterProbe._probe function to check if the probed z value should be adjusted
based on axis_twist_compensation's configuration

Add documentation for [axis_twist_compensation] module

Signed-off-by: Jeremy Tan <jeremytkw98@gmail.com>
2023-08-01 13:08:53 -04:00
Dmitry Butyugin
36be1cfc51 idex_modes: COPY and MIRROR mode implementation (#6297)
COPY and MIRROR mode implementation

Correctly apply input shaper params to new dual_carriage

Added SAVE_/RESTORE_IDEX_STATE commands

Documentation updates for the new IDEX modes

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-08-01 12:23:52 -04:00
Stefan Dej
ea330717cd screws_tilt_adjust: add max_deviation to report status
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2023-08-01 12:14:15 -04:00
JamesH1978
fee385dad8 docs: Update Config_checks.md (#6278)
I am endeavoring to rewrite some of the docs to be more front end agnostic to reflect the different front ends available since these docs were written. I am starting with this one, as it quite often used. 

Signed-off-by: James Hartley <james@hartleyns.com>
2023-07-30 14:26:20 -04:00
SkyKnight
e9534d6f92 webhooks: Add process id, user id and group id to the info endpoint. (#6284)
Signed-off-by: Gregoire Mbutilovich <skyknight_x@hotmail.com>
2023-07-28 12:48:14 -04:00
Martin Botka
ba4eed175d rp2040_flash: Fix the type when printing num_blocks (#6279)
image->num_blocks is of type unsigned size_t thus unsigned int
or unsigned long int.

%lu specifies a type of long unsigned int. Thus resulting in compiler warning about type mismatch on some systems.
Fix this by printing the value with length modified z.

Signed-off-by: Martin Botka <martin.botka@somainline.org>
2023-07-27 20:34:32 -04:00
Zarrsito
d725dfd309 screws_tilt_adjust: Added Support for M6 Screws (#6287)
Added support for M6 Screws

Signed-off-by: Sascha Petersen <Zarrsito@gmail.com>
2023-07-16 22:30:37 -04:00
Maël Kerbiriou
7e93af2574 scripts: modernize logextract.py (with opens, generators)
Signed-off-by: Maël Kerbiriou <m431kerbiriou@gmail.com>
2023-07-16 22:27:34 -04:00
Maël Kerbiriou
fbc5589097 scripts: logextract.py Python 3 compatibility
- Open log files in text mode,
- Normalize the encoding of tmcuart messages,
- Fix a bug where StatsStream.get_lines() would return None timestamps for lines
before the first Stats line. Timestamps are now back-propagated.

Signed-off-by: Maël Kerbiriou <m431kerbiriou@gmail.com>
2023-07-16 22:27:34 -04:00
Dmitry Butyugin
73d017aa89 motan: Added smoothing motan data analyzer
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-07-16 19:49:23 -04:00
Dmitry Butyugin
5fc5d95ca5 motan: Added pointwise 2-norm motan data analyzer
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-07-16 19:49:23 -04:00
Alex Maclean
366b0de1c8 samc21: Fix CAN RAM base address
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
2023-07-16 19:45:23 -04:00
JamesH1978
1c482581c3 config: Update Octopus Max EZ for wrong bltouch pins (#6283)
It has been discovered on the discord by the user Pizn that the blouch pins are swapped in this config and don't include the ^ pull on the sensor pin.

This has been tested and confirmed by the user.

Signed-off-by: James Hartley <james@hartleyns.com>
2023-07-16 19:42:03 -04:00
Aleksandr 'Aux' Ivanov
ffb5105b55 config: Updated bed mesh configuration for Creality Ender 3 S1 and S1 Pro (#6219)
Existing `mesh_min` values start probing too far away from the edge.

Additionally `mesh_max` Y value of 197 is out of bed movement range (197 + `bltouch.y_offset` = 237.5) and causes Y stepper to overhit, which can potentially damage the printer in the long run.

Signed-off-by: Aleksandr Ivanov <aux@hexmode.org>
2023-07-09 22:21:27 -04:00
Bart Meijer
6d48adf9ef atsamd: Add support for SAMD21J18 (Minitronics v2)
Adds a menu entry in menuconfig, allowing you to select the SAMD21J18 as mcu.

Signed-off-by: Bart Meijer <brupje@gmail.com>
2023-07-05 15:18:54 -04:00
Dennis Kühn
a96608add4 spi_flash: New Board Definition for BTT SKRat V1.0 (#6249)
Adds the new BTT SKRat V1.0 controller board to the board_defs for the flash-sdcard.sh tool.
The new board definition was tested by me without any errors.

Signed-off-by: Dennis Kuehn <denniskuehn@online.de>
2023-06-29 11:42:07 -04:00
JamesH1978
e62929fe2f config: Multiple config - change working for heater fan (#6274)
The reference to `my_nozzle_fan` in these configs could be confusing and misleading, leading users to think it is the parts/print cooling fan, changed to heatbreak_cooling_fan as used in other configs.

Signed-off-by: James Hartley <james@hartleyns.com>
2023-06-28 19:53:58 -04:00
JamesH1978
f163a37f5e docs: Update Config_Reference.md - heater_fan wording (#6273)
The reference to my_nozzle_fan is misleading and could cause people to skip over the [fan] definition and assume this is the parts/print cooling fan. Alias changed to reflect heatbreak_cooling_fan as used in most configs that have a controllable hotend fan.

Signed-off-by: James Hartley <james@hartleyns.com>
2023-06-28 19:52:40 -04:00
Adam
f4a3dfa53f docs: Update Measuring_Resonances.md (#6234)
Clarifying the ADXL345 on pi instructions. Previously, the instructions on installing the linux klipper instance were in a confusing place.

Signed-off-by: Adam Kramer <akramer@gmail.com>
2023-06-28 19:35:35 -04:00
Eric Callahan
b9247810b9 virtual_sdcard: reset file position and size to integer zero
This resolves an issue with API server clients that always
expect these values be be integers.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-06-23 20:33:42 -04:00
Eric Callahan
d32a833455 bed_mesh: fix fade regression
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-06-21 21:17:17 -04:00
Boris-Chengbiao Zhou
1374c701ab hc32f460: Disable JTAG/SWD on pins so they can be used for GPIO/serial
This change is required to sucessfully use PA13/PA14 for UART. Otherwise
they function as SWDIO/SWCLK.

Relevant excerpt from the reference manual (translated):
The initial state of PA13, PA14, PA15, PB3, and PB4 ports is that the
JTAG/SWD function is valid after reset. When configuring FSEL[5:0] to
select the function, you need to write 0 to the corresponding bit of the
register PSPCR to invalidate the JTAG/SWD function.

Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
2023-06-20 12:05:32 -04:00
Boris-Chengbiao Zhou
623ebf2fb1 hc32f460: Use correct USART for PH2/PB10 pins
This fixes serial communication when selecting the PH2/PB10 pins.

The chip datasheet (not reference manual) assigns pins to one of two
communication function groups (`Func_Grp1/2`). Pins in group 1 have
access to USART1/2 while group 2 has access to USART3/4. PH2/PB10 belong
to group 2 so we now correctly use USART3 for them.

Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
2023-06-20 12:05:32 -04:00
Kevin O'Connor
2ae3dd2f78 docs: Improve documentation of i2c_software_scl_pin/i2c_software_sda_pin
Reported by @rootiest

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-06-20 12:00:59 -04:00
Eric Callahan
9a77d8859b docs: note rri deprecation in config_changes
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-06-20 11:48:17 -04:00
Eric Callahan
8fe18f27a9 docs: update Bed Mesh documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-06-20 11:48:17 -04:00
Eric Callahan
1ad4c0fd6e bed_mesh: improve zero reference offset
The relative_reference_index will now refer to a coordinate that is
static and cannot be changed at runtime.  If new mesh parameters
are specifed and the reference lies outside of the mesh then the
reference location will be probed.

Additionally this introduces a 'zero_reference_position' option which
accepts a specific X/Y coordinate.  This may be used in place of the
relative_reference_index.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-06-20 11:48:17 -04:00
Eric Callahan
775092fc01 bed_mesh: generate new points before each calibration
When mesh parameters change the substituted indices need to be
updated, even when using the default point set.   Always generate
new points to perform this update rather than cache
the "orig_points".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-06-20 11:48:17 -04:00
Kevin O'Connor
0245073c55 serialhdl: Catch os.error on can.interface.Bus() call
It seems opening the canbus socket can sometimes throw an os.error (in
addition to can.CanError).  Catch that error to avoid Klipper
reporting an internal error.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-06-17 19:32:06 -04:00
JamesH1978
38e79dffb6 config: remove move_to_previous from Ender 3 S1 configs (#6245)
This PR is to remove `move_to_previous: true` from the ender 3 S1 and S1 plus configs. This is a confusing option, it is not really useful on these type of printers and can cause issue to the end user

Signed_off_by; James Hartley <james@hartleyns.com>
2023-06-16 17:32:13 -04:00
Luke V
9cb2656914 atsamd: Fixes for samc21 and compiler optimizations (#6198)
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2023-06-16 16:41:08 -04:00
Alex Voinea
5ee72d320c tmc: Configurable multistep_filt
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-06-16 16:38:42 -04:00
IronAegis90
6cbb6f144b config: Update printer-creality-cr10-smart-pro-2022.cfg (#6253)
Clarified the necessary steps for successfully flashing the firmware to the MCU.

Signed-off-by: Doug Whitlock <doug@thewhitlock.family>
2023-06-16 16:35:12 -04:00
Kevin O'Connor
6ce2bd61cc test: Add stm32f042 regression build test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-06-08 12:59:30 -04:00
Kevin O'Connor
15d302901f Kconfig: Support selecting optional features on chips with small flash size
Add a new HAVE_LIMITED_CODE_SIZE symbol that enables a menu to select
optional features.  This symbol is enabled on chips with small build
sizes.

Replace the HAVE_GPIO_BITBANGING with four new symbols:
WANT_GPIO_BITBANGING, WANT_DISPLAYS, WANT_SENSORS, WANT_SOFTWARE_SPI,
and WANT_SOFTWARE_I2C.  This allows users a little more flexibility
when selecting features they need.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-06-08 12:59:30 -04:00
BIGTREETECH
645a1b8364 i2c_software: Implementation of software i2c (#6141)
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
2023-06-07 20:55:46 -04:00
Steve Gotthardt
b389c70d5a hc32f460: update for HC32F460 - clock, flash add, serial (#6235)
Add clock speed selection

Add Flash App Address selection

Add alternate serial connection and remove company specific names

Signed-off-by: Steven Gotthardt <gotthardt@gmail.com>
2023-06-06 22:13:04 -04:00
Jason W. Thompson
3bbae611f9 config: Correct year in documentation for ender 3 v2 neo
The header documentation currently shows the year the Creality Ender 3 V2 Neo as being the 2020 model. This is likely a copy/paste error from the header of the original Creality Ender 3 V2 config. The year the Creality Ender 3 V2 Neo came out was in 2022 as indicated by the name of this config file. This patch fixes the copy/paste typo by updating the year in the header documentation from 2020 to 2022.

Signed-off-by: Jason W. Thompson <jason@jasonthompson.dev>
2023-06-06 22:09:16 -04:00
Dmitry Butyugin
a3c00d0bed input_shaper: Correctly initialize input shaper stepper_kinematics
If the stepper already executed some steps with the basic
stepper_kinematics, subsequent creation of a new one for input_shaper
would result in stepcompress errors unless position and time tracking
flags are also copied over.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-06-06 20:17:49 -04:00
Dmitry Butyugin
e15bad4844 input_shaper: Fixed tracking of step_generation_scan_time
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-06-06 20:17:49 -04:00
Dmitry Butyugin
345934bd68 idex_modes: Native input shaping support with dual carriages
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-06-06 20:17:49 -04:00
Dmitry Butyugin
98ed0a8168 test: Regression test for hybrid corexy input shaping with dual carriage
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-06-06 20:17:49 -04:00
Kevin O'Connor
90e1477d72 docs: Fix link in Sponsors.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-06-05 22:14:51 -04:00
Kevin O'Connor
a919594b66 docs: Update Sponsors.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-06-05 19:24:22 -04:00
Eric Callahan
0539e9f266 bme280: use consistent report time for BME680
Sample the BME680 every .8 seconds, matching that of the
BME280.  This resolves an issue where `get_report_time_delta()`
returns a value that doesn't match the actual delta.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-05-31 13:43:07 -04:00
Kevin O'Connor
ddf0994ba2 parsecandump: New utility to parse Klipper messages in a candump capture
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-05-30 20:18:41 -04:00
Kevin O'Connor
14ff50c94d docs: Add new CANBUS_Troubleshooting.md document
Add information on troubleshooting canbus connections.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-05-30 20:16:28 -04:00
Kevin O'Connor
23bbbaa21b Kconfig: Change default CANbus frequency to 1000000
Change the default CANbus frequency from 500000 to 1000000.  A higher
frequency allows for greater data transfer rates, lower latency of
messages, and should overall be more robust.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-05-30 20:08:06 -04:00
Kevin O'Connor
81e4636f42 docs: Update CANBUS.md
Recommend USB to CAN adapter and no longer recommend using the
waveshare rpi hat.

Recommend using allow-hotplug for all USB adapters.

Note bandwidth limitations when using USB to CAN bridge mode.

Note that a USB to CAN mcu is not a USB serial device.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-05-30 20:06:59 -04:00
Kevin O'Connor
5f0d252b40 docs: Minor update to Config_Changes.md dates
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-05-25 12:53:06 -04:00
Dmitry Butyugin
624d360a34 resonance_tester: Apply input shaper params on SHAPER_CALIBRATE
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-05-25 12:52:29 -04:00
Dmitry Butyugin
16c53992d6 resonance_tester: Support CHIPS= parameter in SHAPER_CALIBRATE command
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-05-25 12:48:17 -04:00
Frans-Willem Hardijzer
ec61f10f0f hybrid_corexy: Fix changing dual-carriage carriage will inadvertently set axis to homed, even if it wasn't. (#6183)
In hybrid_corexy and hybrid_corexz, the update_limits function is (only) called by the DualCarriage implementation, whenever the carriage changes.
Unfortunately, these limits also keep track of homing status, when they're unhomed they are set to 1 to -1 (invalid range).
As a fix, if the limit was set to "unhomed", we keep it that way, and only update it with the new rail limits if it was already properly homed before.

Signed-off-by: Frans-willem Hardijzer <fw@hardijzer.nl>
2023-05-25 11:55:07 -04:00
Stefan Dej
37315bf336 stm32: add PB5/PB6 as CAN pins - required for BTT U2C v2.x
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2023-05-20 11:31:28 -04:00
Chris
7511151ac9 docs: Add gcode_button to the Status Reference docs (#6201)
Add gcode_button to the Status Reference docs

Signed-off-by: Chris Laprade <chris@rootiest.com>
2023-05-14 10:19:42 -04:00
xpeng
2471918f08 config: Change the position_max value of Kobra Go to the physic limit (#6200)
Fixed the bed_mesh out of range issue

Signed-off-by: Yipeng Zhou <yipeng_zhou@foxmail.com>
2023-05-14 10:18:07 -04:00
Frederic Morin
33b18fd62b stm32f7: add support for stm32f7 and remram board
Signed-off-by: Frederic Morin <frederic.morin.8@gmail.com>
2023-05-07 11:15:05 -04:00
Eric Callahan
a3eebab4f2 util: report git version info as a dict
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-05-04 14:07:14 -04:00
Eric Callahan
b89a049fdb klippy: report repo branch, remote, and tracking url
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-05-04 14:07:14 -04:00
Kevin O'Connor
3bd0be40d5 lib: Update to latest can2040 code
Disable tx state machine before resetting it
Check for rx message with same id as tx but different payload
Do not use canrx line to alter bit timing of cantx line
Improve bit time synchronization with slow transmitters
Implement tx synchronization to faster transmitters

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-05-03 10:45:41 -04:00
Kevin O'Connor
1a24e7c5b6 klippy: Report repo version as "dirty" if there are untracked python files
Check for untracked files in the klippy/extras/ and klippy/kinematics/
directories and report those files in the log.  This helps identify
code modifications when inspecting a log.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-05-02 11:40:18 -04:00
Wulfsta
3b0729c949 atsamd: Add support for SAMC21
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2023-05-01 13:56:32 -04:00
Wulfsta
06e5c577bd lib: Add Atmel SAM C21 headers
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2023-05-01 13:56:32 -04:00
Thomas Lété
6414e1772d config : Longer LK4 X (#6185)
New printer : Longer LK4X configuration

This configuration is based on the one provided by Longer with some tweaks.

Signed-off-by: Thomas Lété <bistory@gmail.com>
2023-05-01 13:30:32 -04:00
Kevin O'Connor
1987742545 lib: Update to latest can2040 code
Fix tx hang after error frame during tx

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-29 11:49:53 -04:00
Kevin O'Connor
bec1d957d2 rp2040: Handle USB resets
On a USB bus reset the controller address needs to be reset to zero.
Otherwise, the device becomes unresponsive after a USB reset and will
remain unresponsive until a power cycle.  This often shows up in the
Linux system logs as "device descriptor read/64, error -32" messages.

Make sure USB_INTE_BUS_RESET_BITS is enabled and clear the USB address
on a bus reset.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-25 00:05:04 -04:00
Kevin O'Connor
b17ae55f5b usb_canbus: Rework USB message transmit prioritization
There is no need to heavily prioritize the sending of canbus packets
over USB.  A single check to flush the incoming canbus packets is
sufficient.

Also, be sure to wake up canserial_notify_tx() even if canhw_send()
blocks.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-24 11:31:06 -04:00
Kevin O'Connor
28f11244c3 usb_canbus: No need to check if canserial can accept a packet
The canserial code already advertizes a receive window, so the host
should never flood the canserial code.  Remove the extra scheduling
checks to simplify the usb_canbus code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-24 11:31:06 -04:00
Kevin O'Connor
3377f29bc5 usb_canbus: Minor code reformatting of drain_hw_queue()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-24 11:31:06 -04:00
Kevin O'Connor
f10c60eea7 usb_canbus: Increase rx canbus packet buffer to 32
A buffer of only 8 canbus packets is only 64 bytes of data, which
could be exceeded if the usb-to-canbus mcu gets busy doing other work.
Increase the buffer to 32 packets.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-24 11:31:06 -04:00
Kevin O'Connor
8b2074e068 stm32: Fix usbotg irq wakeup notification
The DAINTMSK prevents irqs but does not prevent the status reporting
in the GINTSTS and DAINT fields.  Thus, the mask bits should be
checked prior to sending a wakeup notification.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-24 11:29:43 -04:00
Scott Mudge
10e816979e aht10: update comments and docs for AHT20/AHT21 support
The control bytes for the AHT20 and AHT21 are identical to the AHT10, but I had not been able to test just yet to ensure the sensor code supported the other sensors. I've wrapped up testing and updated the comments/docs to reflect this additional support.

Signed-off-by: Scott Mudge <mail@scottmudge.com>
2023-04-24 11:10:00 -04:00
crazyroses
5a49372dec docs: Update Measuring_Resonances.md (#6177)
Correction for table "Recommended connection scheme for I2C (i2c0a) on the RP2040",  line 160, to match the correct writing in the Fritzing image shown above, RP2040 pin 36 in place of 39;
Correction of typo in line 346, "pins" in place of "pin"

Signed-off-by: Adrian Rose <adrian@crazyroses.net>
2023-04-24 11:07:10 -04:00
jdonagher
9b59d745f1 docs: Update Bed_Mesh.md (#6143)
Fix typo.

Signed-off-by: John Donagher <jdonagher@gmail.com>
2023-04-24 11:00:50 -04:00
Dr. Matthew Swabey
011b4e39e6 docs: Fix nested list in Measuring_Resonances (#6157)
Signed-off-by: Matthew Swabey <matthew@swabey.org>
2023-04-19 22:00:03 -04:00
Dr. Matthew Swabey
80a7744b42 sensor_mpu9250: Fix or improve reliability (#6170)
Fixes common MPU-9250 accelerometer issues for RPi Linux MCU and
improves reliability on all other architectures by adjusting the MPU-*
reading algorithm to only read whole Klipper messages' worth of
data from MPU-* and eliminating many unnecessary checks of the MPU FIFO
fill-level that consumed bus bandwidth needed for data transfer. Fixes
intermittent "Lost communication with MCU 'rpi'" due to "Timer too
close" and transposed / corrupted data due to FIFO overrun/data loss
when using MPU-* accelerometers. In addition FIFO overrun checks are
performed by testing the MPU interrupt flag vs. inferring from the FIFO
fill level.

Stress tested for 13hrs with two MPU-6500 attached to one I2C bus on RPi
    and one on a PR2040
Stress tested for 23hrs with two MPU-6500 attached to one I2C bus on RPi
    and one on a ATmega328P (Seeduino Nano)

Signed-off-by: Matthew Swabey <matthew@swabey.org>
2023-04-19 12:34:22 -04:00
Justin Schuh
c2fe372925 gcode_macro: Catch variable encoding errors
Catch parsing and json encoding errors at variable assignment.

Signed-off-by: Justin Schuh <code@justinschuh.com>
2023-04-19 12:22:20 -04:00
Justin Schuh
d68a6c28ba webhooks: Log json encoding errors
Signed-off-by: Justin Schuh <code@justinschuh.com>
2023-04-19 12:22:20 -04:00
Florin Popescu
40b4b34998 stm32: Support for USART5 on STM32G0B1 (#6105)
Support for USART5 on PD2,3

Add exception on RCC bits for USART5&6

Signed-off-by: Florin Popescu <florinsgpopescu@gmail.com>
2023-04-19 11:47:18 -04:00
xpeng
cba119db3a config: Add printer configuration for Anycubic Kobra Go (#6166)
Signed-off-by: Yipeng Zhou <yipeng_zhou@foxmail.com>
2023-04-15 22:24:02 -04:00
Scott Mudge
4748dffd7a docs: Add AHT10 temperature sensor doc section in Config_Reference.md (followup #6138) (#6167)
Followed general outline used by HTU21D and BME280.

Signed-off-by: Scott Mudge <mail@scottmudge.com>
2023-04-15 19:17:54 -04:00
Nathan
a8b1b0ef05 docs: Fix duplicate section in Measuring_Resonaces.md (#6160)
Removed a duplicated section in Measuring_Resonances.md.
Also fixed its header level.

Signed-off-by: Nathan Chiu <nhchiu2009@gmail.com>
2023-04-11 11:48:20 -04:00
vcore85
c2b2278a49 tmc5160: add DRV_CONF Register for TMC5160 (#6154)
In some condition ,“drvstrength 2” does not work. According to page 17, some mosfets need “drvstrength” set to 0 .

From datasheet rev1.15, the DRVSTRENGTH reset default is 0 .  (instead of 2)

Signed-off-by: Albert Lin <vcore85@gmail.com>
2023-04-11 11:43:19 -04:00
flowerysong
d16adc356b docs: Add missing code block indicators to Slicers.md(#6161)
Signed-off-by: Paul Arthur <paul.arthur@flowerysong.com>
2023-04-11 11:39:41 -04:00
Kevin O'Connor
aa8a6f4cf1 lib: Update to latest can2040 code
Avoid some gcc warnings by using uint32_t for iterators
Better document the fallthough case statement in crc_bytes()
Fix txpending race from report_line_ackdone()
Make can2040_transmit() multi-cpu atomic

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-11 11:20:57 -04:00
Kevin O'Connor
83308a1051 tmc: Support reporting tmc2240 temperature in driver get_status()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-07 15:20:40 -04:00
Kevin O'Connor
22ee889f41 serialqueue: Rename stalled_bytes stat to upcoming_bytes
The stalled_bytes counter refers to the number of bytes that are not
yet eligible for transmission.  However, the naming leads to confusion
as it could be interpretted as an inability to transmit data.  Rename
to upcoming_bytes to try to avoid that confusion.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-07 15:17:43 -04:00
Scott Mudge
acca55b074 aht10: Added support for AHT10 ambient temperature sensor (#6138)
This commit adds support for the I2C-based AHT10 ambient temperature sensor. The sensor comes pre-calibrated and has a fairly simple command interface, so the interface class is in-turn relatively simple. So far this has been tested on a BTT GTR 1.0 MCU board (STM32F4), and seems to work fine.

Signed-off-by: Scott Mudge <mail@scottmudge.com>
2023-04-07 13:41:06 -04:00
JamesH1978
754a67af4e config: SKR3, update for second chip choice (#6153)
As found on the discord by user Qtin, this board now ships with one of STM32H743 or STM32H723
Example config updated to reflect this. This has been tested on the users board. To note, the H743
bin will flash to the H723 chip, but will not work.

Signed-off-by: James Hartley <james@hartleyns.com>
2023-04-07 13:05:55 -04:00
visilya
8850084fcf scripts: Fix flash linux when OUT argument provided (#6133)
Signed-off-by: Ilya Vislotsky <write2ilya@gmail.com>
2023-04-07 12:32:23 -04:00
Kevin O'Connor
e5ed245ff2 stm32: Improve ifdef indent in hard_pwm.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-07 12:27:09 -04:00
Kevin O'Connor
ecc23fc6fa stm32: Prefer "MACH_STM32F1" test over "MACH_STM32F103 || MACH_N32G45x"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-07 12:25:27 -04:00
Kevin O'Connor
ef34c5bb5d config: Update comment header in printer-voxelab-aquila-2021.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-07 12:21:22 -04:00
Alexey
23e82d37f1 stm32: Add support for Nation N32G45x mcus (#6116)
N32G452/G455 are mostly compatible with STM32F103 but have M4 core and different ADC.

Signed-off-by: Alexey Golyshin <stas2z@gmail.com>
2023-04-07 12:20:14 -04:00
Dr. Matthew Swabey
27dab0ee51 docs: Measuring_Resonances.md improved information on I2C accelerometers and AVR support (#6132)
More information on I2C accelerometers.

Added in table of MCUs with 400kbit/s I2C support

Signed-off-by: Matthew Swabey <matthew@swabey.org>
2023-04-07 11:45:54 -04:00
Alex Voinea
fec7ddd8ae docs: Fix typo in docs (#6147)
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-30 12:30:48 -04:00
Alex Voinea
c9731a6fe2 tmc: DUMP_TMC optional REGISTER parameter
Add an optional REGISTER parameter to DUMP_TMC so that the output is more filtered/cleaner for manual TMC calibration.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-30 11:41:51 -04:00
Kevin O'Connor
36e0afea2d config: Fix motor4 comment in manta m8p configs
Reported by @jakep82.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-03-29 14:19:26 -04:00
spinixguy
9fe3152e23 config: Add config printer-sovol-sv05-2022.cfg (#6122)
Adding Sovol SV06 printer config

Signed-off-by: Joseph Spainhour <spinixguy@gmail.com>
2023-03-29 09:55:02 -04:00
bbro44
d8a9ab5ef7 config: Add Ratrig V-Minion (#6120)
This adds support for the stock configuration of the V-Minion printer from Ratrig, based on the Octopus v1.1 (STM32F446)

Signed-off-by: Benjamin Lesher <bbro44@protonmail.com>
2023-03-29 09:53:54 -04:00
Dr. Matthew Swabey
4026365270 linux: Lock Memory and Increase Priority (#6131)
Realtime programming best practice is to lock realtime code
memory to prevent paging which will lead to unbounded latencies. The
Linux MCU process has well bounded memory and small RAM footprint
so locking the entire process' RAM has no downsides and will improve
behavior when the system comes under memory pressure.
(See bootlin training and Linux Foundation documentation linked below.)
RT process priority ranges from 0-99 (although POSIX only requires 32),
boost MCU process priority to half the max/2 to improve robustness when
the system comes under pressure from other RT Kernel or user processes.

Reference links:
bootlin: https://bootlin.com/doc/training/preempt-rt/preempt-rt-slides.pdf
Linux Foundation: https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/application_base#howto_build_a_simple_rt_application

Signed-off-by: Matthew Swabey <matthew@swabey.org>
2023-03-27 21:34:24 -04:00
BIGTREETECH
d518152ab2 stm32: Enable I2C on stm32h7 (#6130)
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
2023-03-27 21:32:42 -04:00
BIGTREETECH
346e3901f6 tmc: Enable sg_angle_offset for smooth switching from Stealthchop to Spreadcycle (#6123)
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
2023-03-27 21:18:06 -04:00
Jess
1a2033aba8 scripts: add install script for Ubuntu 22.04 Jammy (#6112)
python-dev package is not  available on Jammy; specifies python3-dev.

Signed-off-by: Jess Sullivan <jess@sulliwood.org>
2023-03-27 21:09:46 -04:00
Chris Thompson
e93f39444c docs: Document how to connect ADXL345 to Pico then on to Pi. (#5996)
This is based on documentation from:
https://klipper.discourse.group/t/raspberry-pi-pico-adxl345-portable-resonance-measurement/1757

Signed-off-by: Christopher Thompson <chris@hypocrite.org>
2023-03-27 20:38:26 -04:00
Kevin O'Connor
16f54c8200 stale-issue-bot: Update github lock-threads action to v4
Update to latest version in hopes it will reduce failure reports.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-03-27 20:22:44 -04:00
Robert
52f4e20c26 config: Update printer-anycubic-vyper-2021.cfg (#6113)
Having the controller fan PA14 in the config is important for the stepper drivers not to overheat and skip steps.

Signed-off-by: Robert Lilienthal <13837429+RobLil@users.noreply.github.com>
2023-03-21 15:12:58 -04:00
Dr. Matthew Swabey
2466b7a2c6 avr: Allow I2C bus speed to be set by Klipper (#6111)
Allow I2C bus speed to be set by appropriate Klipper commands.

Signed-off-by: Matthew Swabey <matthew@swabey.org>
2023-03-21 15:02:58 -04:00
bbro44
e2d7c59812 config: Add Fysetc Cheetah V2.0 (#6119)
This adds support for the Cheetah v2.0 mainboard from Fysetc.

Signed-off-by: Benjamin Lesher <bbro44@protonmail.com>
2023-03-20 11:06:44 -04:00
Alex Voinea
73f4c6cd00 tmc: SET_TMC_FIELD VELOCITY
Ability to specify `VELOCITY` as a parameter for SET_TMC_FIELD. Useful for configuring at runtime the TSTEP based fields of the driver.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-20 10:58:25 -04:00
Alex Voinea
0469710a69 tmc: Implement TMCtstepHelper
Implement a helper for calculating velocity based thresholds for tmc drivers. This code was written in such a way that it can be used with more fields than just tpwmthrs.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-20 10:58:25 -04:00
Kevin O'Connor
c54d83c9f1 tmc: Initialize self.coolthrs in TMCVirtualPinHelper constructor
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-03-15 16:46:35 -04:00
Alex Voinea
a9feeaa9eb tmc: Do not override tcoolthrs if it is configured
If tcoolthrs is configured (not the default 0), then do not force
the value of tcoolthrs=0xfffff during homing. This way, tcoolthrs
can be set to a custom value during homing.

`tpwmthrs` and `en_pwm_mode`/`en_spreadcycle` are now also
correctly restored if they were changed after startup.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-15 16:45:36 -04:00
Kevin O'Connor
fd167894a0 docs: Update reviewers in CONTRIBUTING.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-03-15 14:55:51 -04:00
Alex Voinea
dd39091388 tmc: Enable multistep_filt for drivers that support it
`multistep_filt` was not configured at all on tmc2240 and tmc5160. As such, it would default to the value of 0 when the GCONF field was sent to the driver. However, that field has a default value of 1 in the driver, so klipper was overriding the defaults by accident.
This field improves the stability of velocity based thresholds (it's effectively TSTEP filtering) and it also improves the current regulation stability in stealthchop2 (according to the datasheet).
This field was already set to 1 correctly in the tmc2208/tmc2209 driver code.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-15 11:09:10 -04:00
Alex Voinea
117c1d42ac tmc2209: Remove duplicate pdn_disable initialization
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-15 11:06:24 -04:00
D4SK
0d5b96a601 reactor: Fix typo
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
2023-03-14 22:08:13 -04:00
D4SK
136283bd14 reactor: Fix typo
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
2023-03-14 22:08:13 -04:00
Maurice Breit
45dd30c820 docs: Remove comment about default profile loading
Remove outdated comment that the "default" profile is loaded automatically when klipper starts

Signed-off-by: Maurice Breit <github@mauricebreit.de>
2023-03-14 21:12:36 -04:00
Pedro Lamas
87f109984a probe: expose name on status report
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2023-03-14 21:11:33 -04:00
JamesH1978
2337d05f48 docs: addition of slicer specific gcode for START_PRINT (#6063)
Signed-off-by: James Hartley <james@hartleyns.com>
2023-03-14 21:09:00 -04:00
Sam
187173cbb5 config: Add Ender 3 v2 Neo base config (#6103)
Add the default base config for the Ender 3 v2 Neo (as released 2022).
This config also works with the newer D32F303 based 4.2.2 boards.

Signed-off-by: Sam McLeod <sammcj@users.noreply.github.com>
2023-03-14 21:05:08 -04:00
Dr. Matthew Swabey
9d77f44995 linux: Fast Linux MCU i2c_read() with I2C_RDRW (#6101)
Reading an I2C device from the Linux MCU used a separate write(2)
to select the target register & read(2) to get the value(s). This
implementation uses ioctl(file, I2C_RDWR, ...) to skip a large bus idle
period and extra process sleep by combining them like the stm32.

I2C_RDRW requires I2C_FUNC_I2C flag in the I2C driver. I2C_FUNC_I2C
is defined in:

BCM2835: Pi 1 Models A, A+, B, B+, the Raspberry Pi Zero, the
    Raspberry Pi Zero W, and the Raspberry Pi Compute Module 1
BCM2836: Pi 2 Model B
    Identical to BCM2835 except Cortex
BCM2837: Pi 3 Model B, later models of the Raspberry Pi 2 Model B,
    and the Raspberry Pi Compute Module 3
BCM2837B0: Pi 3 Models A+, B+, and the Raspberry Pi Compute Module 3+
BCM2711: Pi 4 Model B, the Raspberry Pi 400, and the Raspberry Pi
    Compute Module 4
RK3xxx: Rockchips SoCs NanoPi, RockPi, Tinker, etc.
SUNXI: H2, H3, etc. Orange Pi
AMLOGIC: S905x, Banana Pi, Odroid, etc.
TEGRA: NVidia Jetson etc.
MediaTek: Several SBCs in other ranges

Signed-off-by: Matthew Swabey <matthew@swabey.org>
2023-03-14 21:03:07 -04:00
Lasse Dalegaard
ca6e5fe514 probe: Allow overriding horizontal_move_z on gcode
Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
2023-03-14 21:01:40 -04:00
Derek Kaser
5a69d0f857 config: Add Anycubic Kobra Plus (#6084)
Signed-off-by: Derek Kaser <derek.kaser@gmail.com>
2023-03-14 20:58:42 -04:00
Koz Ross
e3485fc31b config: Add printer-elegoo-neptune3-pro configuration (#5965)
Adds a configuration for the Elegoo Neptune 3 Pro.

Signed-off-by: Koz Ross <koz.ross@retro-freedom.nz>
2023-03-14 20:56:45 -04:00
Brandon Baker
57c4da5ecf config: Example config file for Creality CR5 Pro HT (#6089)
Signed-off-by: Brandon Baker <bakerbrandond@gmail.com>
2023-03-11 11:30:35 -05:00
Alex Voinea
4b1536d62f tmc: Beautify initialization code
Purely esthetic. Make all tmc driver init code similar to one another. The various fields were grouped based on the register which they affect or the function they perform.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-07 10:57:01 -05:00
Alex Voinea
bee1c67416 tmc5160: allow changing the globalscaler at runtime
Previously, the globalscaler was calculated during the config parsing and set to a fixed value. If the current was changed for any reason after the initialization, only IRUN and IHOLD would be changed. This however caused issues:
- If the new current was lower, then the resolution of the possible current values would be low since there are only 32 IRUN/IHOLD steps.
- If the new current was higher, it wouldn't actually work since IRUN and IHOLD are capped at 31, so it wouldn't be possible to increase the current without increasing globalscaler.

With this commit, the globalscaler is recalculated whenever necessary in order to ensure the correct range of IRUN/IHOLD is used.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-07 10:55:44 -05:00
Alex Voinea
e6307ca9fe tmc: Fix s2vs field formatters
Rename the field formatter text for tmc2208/tmc2209 and implement it also for tmc5160.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-07 10:52:52 -05:00
BIGTREETECH
b2178f49ec stm32h7: Restore the RCC set in the bootloader to the default value (#6092)
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
2023-03-06 11:53:18 -05:00
Alex Voinea
6b75f54e50 tmc2240: initial implementation
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-03-01 20:43:53 -05:00
dahliamoth
e6ef48cdf7 config: Update printer-sunlu-t3-2022.cfg (#6040)
Fix filament sensor and remove unneeded config changes in extruder

The filament sensor on the printer used for initial testing had been removed prior to flashing klipper to it. Only a basic test to see it if triggered or not was preformed. It was discovered by someone else doing some testing on another printer that it would frequently pause. This was a simple oversight, assuming it was a runout switch.

Removed section of config related to filament runout switch and replaced with basic config for filament motion so they printer will simply pause when no more motion is detected. Also notated to add CLEAR_PAUSE to start gcode if using this sensor as it will trigger a paused state when loading or unloading filament. If printer is in a paused state at the start of the print, the attempt to pause will cause the printer to rapidly pause and unpause itself.

Removed min_extruder_temp and max_extrude_only_distance from the extruder section, as they were there only for macros on a test system that is not put into this sample config

Signed-off-by: Zachary Welvaert <zwelvaert@gmail.com>
2023-02-28 12:41:02 -05:00
Apulo
a5fb20765e config: Update and rename generic-th3d-ezboard-lite-v2.0.cfg to generic-th3d-… (#6070)
The actual board name is EZBoard V2 without the lite. Renaming the file and correcting the intro text to reflect the actual board name.

Signed-off-by: Anthony Dellett <anthony.dellett@gmail.com>
2023-02-23 11:46:21 -05:00
JamesH1978
761b350c80 scripts: Update flash-linux.sh to restart new systemd service (#6049)
This is an update to the script that looks for the new systemd service and restarts it if appropriate.

Signed-off-by: James Hartley <james@hartleyns.com>
2023-02-23 11:44:58 -05:00
Dmitry Butyugin
0a9a0eac3d scripts: Fixed potential undefined var error in graph_accelerometer.py
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-02-23 11:40:00 -05:00
Dmitry Butyugin
14bf9f8ba8 scripts: Support multiple inputs in graph_accelerometer.py raw mode
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-02-23 11:40:00 -05:00
Dmitry Butyugin
ea65670239 scripts: Support resonances files in graph_accelerometer.py
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-02-23 11:40:00 -05:00
Kevin O'Connor
d881171739 mcu: Move lookup_command_tag() to CommandWrapper class
Use mcu.lookup_command().get_command_tag() instead of
mcu.lookup_command_tag().  This improves error reporting on a protocol
mismatch.  It also enables support for a msgtag that is negative.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-02-22 11:34:36 -05:00
Kevin O'Connor
69dcda1696 mcu: Code movement in mcu.py
This is code movement and comment updates only - no code changes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-02-22 11:34:31 -05:00
Thijs Triemstra
0a645e4916 docs: use correct mpu9250 i2c_bus (#6064)
Signed-off-by: Thijs Triemstra <info@collab.nl>
2023-02-20 20:19:04 -05:00
Elias Bakken
b7978d37b3 ar100: Support for ar100 (#6054)
Add files to support AR100

Signed-off-by: Elias Bakken <elias@iagent.no>
2023-02-20 20:15:01 -05:00
H. Gregor Molter
d7bd7f1f4b stm32: Add sdio support
Adds sdio support for the stm32f4 to allow for SD card flash updates
without power cycling some boards, e.g. BTT Octopus Pro.

Signed-off-by: H. Gregor Molter <gregor.molter@secretlab.de>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-02-20 19:55:25 -05:00
Thijs Triemstra
848a78d1a5 docs: Fix typos (#6032)
Signed-off-by: Thijs Triemstra <info@collab.nl>
2023-02-20 11:06:25 -05:00
spinixguy
aca0c71a2b config: Add printer sovol sv06 config file (#6056)
Signed-off-by: Joseph Spainhour <spinixguy@gmail.com>
2023-02-14 13:26:10 -05:00
JamesH1978
738ddaf362 scripts: update_chitu.py python env version (#6055)
Change script to use Python 3 instead of Python 2, in line with changes to update_mks_robin.py

Signed-off-by: James Hartley <james@hartleyns.com>
2023-02-13 12:28:50 -05:00
Pedro Lamas
4b5d056421 stepper_enable: report status
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2023-02-13 12:16:17 -05:00
Steven Gotthardt
72b6bd7efa hc32f460: Add support for hc32f460 micro-controllers
Signed-off-by: Steven Gotthardt <gotthardt@gmail.com>
2023-02-13 12:12:27 -05:00
Steven Gotthardt
94cbf5ff48 lib: Add hc32f460 definitions
Signed-off-by: Steven Gotthardt <gotthardt@gmail.com>
2023-02-13 12:12:27 -05:00
Jordan Woyak
1e7057e917 configfile: Make getlists return an empty list on empty string. (#6042)
Signed-off-by: Jordan Woyak <jordan.woyak@gmail.com>
2023-02-09 21:41:09 -05:00
Kevin O'Connor
df1137ef75 workflows: Convert to Ubuntu 20.04 for build test
This also updates to the latest version of pru-gcc.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-02-09 20:57:53 -05:00
Kevin O'Connor
5ffe5d6349 klippy-requirements: Update to greenlet v2.0.2
Improves compatibility with Python v3.11.  Reported by @flaviut.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-02-09 18:01:04 -05:00
Pedro Lamas
da8d4b0231 extruder: store currently sync'ed motion queue name
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2023-02-09 16:51:47 -05:00
JamesH1978
17f7c03921 scripts: update_mks_robin.py python env version (#6043)
The recent PR to change this to say `#!/usr/bin/env python` instead of `#!/usr/bin/env python2` can cause issues on non rpi based OS's where `python` is not mapped to `python3`.

`#!/usr/bin/env python3` should work in both situations.

Signed-off-by: James Hartley <james@hartleyns.com>
2023-02-09 11:44:30 -05:00
Bassam Husain
ae9169c4c3 docs: Fix 'screw_thread' explanation in 'screws_tilt_adjust' section. (#6039)
Signed-off-by: Bassam Husain <bassam.husain@gmail.com>
2023-02-09 11:30:41 -05:00
Bassam Husain
5644481590 docs: Fixed wording in 'Bed_Mesh.md', fade_target section. (#6025)
Signed-off-by: Bassam Husain <bassam.husain@gmail.com>
2023-02-03 18:52:55 -05:00
CODeRUS
791ad6162a extruder: Add extruder name to extruder_stepper respond message (#6020)
Signed-off-by: Andrei Kozhevnikov <coderusinbox@gmail.com>
2023-02-03 18:50:56 -05:00
Pedro Lamas
fa78e6b8fb screws_tilt_adjust: status result as dictionary
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2023-02-03 18:16:19 -05:00
Kevin O'Connor
d479366242 config: Avoid spaces between mcu name and pin name
Prefer "option: mcu:pin" instead of "option: mcu: pin".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-02-03 15:50:17 -05:00
bigtreetech
f250bdfd8a config: Add BigTreeTech EBB V1.2 / EBB SB V1.0 / E3EZ / M5P / M8P V1.1 / Octopus Max EZ
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-02-03 15:20:20 -05:00
bigtreetech
1979c9d090 stm32: add PB12/PB13 FDCAN2 support STM32G0B1
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-02-03 15:12:09 -05:00
JamesH1978
13fd2833ce config: Add config for Kingroon KP3S (#6021)
A config that describes a Kingroon KP3S with the STM32F103 Robin Mini/Nano clone

Signed-off-by: James Hartley <james@hartleyns.com>
2023-02-03 10:47:58 -05:00
Artem
4cd5e9d222 config: Update printer-creality-ender2pro-2021.cfg (#6023)
Update pins for serial

Signed-off-by: Artem Kochegizov <metra52@ya.ru>
2023-02-02 11:17:49 -05:00
Eric Callahan
e3253cb79e docs: note change to bed_mesh profile behavior
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-01 11:07:16 -05:00
Eric Callahan
4df1adeb2e bed_mesh: do not load a profile on startup
Some users may not desire this behavior and others
may wish to initialize to a profile not named default.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-01 11:07:16 -05:00
Spookee
ead81fbf74 config: Example config file for Lulzbot Mini 2 (#5976)
Config file contains pin mappings to suit Lulzbot Mini 2 using Lulzbot SingleExtruder(0.5mm) and Lulzbot flexible magnetic bed.
Mini 2 uses Einsy Retro mainboard.

Signed-off-by: Trent Sheather <trent.sheather@gmail.com>
2023-01-30 21:47:05 -05:00
dahliamoth
6273d7e05d config: Added printer config for SUNLU T3 (#6004)
Signed-off-by: Zachary Welvaert <zwelvaert@gmail.com>
2023-01-30 10:46:51 -05:00
Evan Cowden
0407c24c78 config: Duet3-6HC & -6XD Configs (#6006)
Signed-off-by: Evan Cowden <evan38109@gmail.com>
2023-01-25 15:28:53 -05:00
Kevin O'Connor
6026a99ad8 replicape: Only call note_pwm_enable() in main thread
The pca9685_pwm set_pwm() code can be called from a background thread
(when the pin controls a heater).  Propagate updates to the main
thread for enable tracking.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:39:47 -05:00
Kevin O'Connor
1a693c18d6 stm32: Fix CAN2 handling in can.c
Using the CAN2 interface still requires that CAN1 be enabled, and the
filtering hardware is always on the CAN1 hardware block.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:32:37 -05:00
3D Print PT
3935f78543 scripts: Update update_mks_robin.py for Python3 (#5985)
Signed-off-by: Márcio Pereira <3dprintpt@gmail.com>
2023-01-17 18:31:31 -05:00
Kevin O'Connor
80943d3846 stm32: Increase sample time in stm32h7_adc.c
The existing sample times are not long enough to reliably sample the
internal temperature sensor.  Longer sample times should also improve
results with temperature sensors that have a higher inductance.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
33f973e452 stm32: Don't set boost nor linear calibration on stm32h723 adc3
Only adc1 and adc2 have these CR register bits on stm32h723.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
cefbad9ef4 stm32: Reduce read-modify-write of CR in stm32h7_adc.c init
Prefer explicitly setting the CR hardware register to defined values
during initialization.

Also, prefer "#if CONFIG_MACH_STM32H7" over bit definitions to make it
clear that the code applies only on stm32h7.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
d372f913ef stm32: Don't use read-modify-write on ISR register in stm32h7_adc.c
Bits are cleared in the ISR register by writing 1, not by masking.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
51526fd627 stm32: ADC timing rework and fixes in stm32h7_adc.c
The stm32l412 doesn't have a PLLSAI1 clock and therefore the CKMODE
should not be set to zero.

The stm32h7 chips run the adc at 25mhz, so BOOST should be set to
0b10.

Improve timing comments.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
cef0b70c88 stm32: Move clock line mapping from stm32h7_adc.c to lookup_clock_line()
Use the common lookup_clock_line() code to lookup the adc clock lines.
This also enables resets on the adc1/adc2 hardware block.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
1034f19134 stm32: Simplify setting of adc_common fields in stm32h7_adc.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
0bf073ba08 stm32: Use a consistent bank size of 20 across all chips in stm32h7_adc.c
Add a pad entry to adc_pins[] on stm32l4 so that it matches the other
chips.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
f571618376 stm32: Simplify setting of 12bit mode on stm32h7 in stm32h7_adc.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
876c3ffffd stm32: No need to use hardware oversampling in stm32h7_adc.c
Not all chips implement hardware oversampling.  The software already
implements oversampling, and additional hardware oversampling is
unlikely to improve results.  Remove the hardware oversampling to
simplify the code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
efdc29f589 stm32: Simplify CFGR register setup in stm32h7_adc.c
On all chips, the JQDIS bit is set and the CONT, RES, ALIGN bits are
clear after a reset.  There is no need to program the OVRMOD bit.  Use
the same logic across chips to help unify the adc implementation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Kevin O'Connor
9b7dcfa333 stm32: No need for LDORDY check in stm32h7_adc.c
Not all chips have the LDORDY flag, while all chips will stabilize in
10us.  There is no need for two different implementations as it is
safe to wait 20us on all chips.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:22:21 -05:00
Stefan Dej
e631840ad6 scripts: add systemd klipper-mcu.service example
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2023-01-17 18:17:25 -05:00
Stefan Dej
deed7f829a docs: update RPi_microcontroller.md to systemd
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2023-01-17 18:17:25 -05:00
Stefan Dej
cf25c3907c scripts: remove initd klipper-mcu-start.sh
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2023-01-17 18:17:25 -05:00
Stefan Dej
5502be01f7 linux: add -I attribute for user defined socket paths
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2023-01-17 18:17:25 -05:00
Kevin O'Connor
86acee6e8b z_tilt: Improve python3 compatibility
Sort using comparison on only first item in list to avoid greater/less
than comparison of stepper objects (which causes an error on Python3).

Reported by discourse user salbang.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-17 18:11:57 -05:00
Kevin O'Connor
4671cf2d0e docs: Improve SET_PIN documentation in G-Codes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-13 11:25:06 -05:00
Kevin O'Connor
bca2671efb toolhead: Flush in chunks from flush_step_generation()
If note_kinematic_activity() has a time far in the future it could
result in a single flush attempt of that time range.  Be sure to break
up that range into small chunks using the normal _update_move_time()
mechanism.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-08 10:40:52 -05:00
Kevin O'Connor
52b33c1b81 toolhead: Rename last_kin_flush_time to force_flush_time
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-08 10:40:52 -05:00
Kevin O'Connor
bd2a849566 toolhead: Fix note_kinematic_activity()
It was possible a note_kinematic_activity() call could increase
last_kin_move_time, but _process_moves() could reset it.  Fix by
making sure _process_moves() only ever increases last_kin_move_time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-08 10:40:52 -05:00
Kevin O'Connor
f1203d56f6 chelper: Minor declaration movement in __init__.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-07 23:17:37 -05:00
Kevin O'Connor
4ea11dbb4f trapq: Minor code movement in trapq.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-07 14:13:00 -05:00
Kevin O'Connor
01f90e8f28 console: No need to import pins module
The pins module is no longer used in console.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-07 12:00:16 -05:00
Kevin O'Connor
4395ae96a7 serialhdl: Add a get_serialqueue() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-06 11:59:35 -05:00
Kevin O'Connor
a564824009 serialqueue: Add comment to do_write()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-05 03:09:43 -05:00
Kevin O'Connor
cbc17a7cb6 docs: Note v0.11.0 release in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-04 12:04:45 -05:00
JamesH1978
3cd8a72e60 spi_flash: Add SKR2 F429 chip variant to spi_flash (#5956)
Later addition of a F429 variant SKR2 was released. Changed btt-skr2 to btt-skr-2-f407 and added a new alias for btt-skr-2-f429

Signed-off-by: James Hartley <james@hartleyns.com>
2023-01-04 12:01:28 -05:00
Kevin O'Connor
448c1a1488 stm32: Reindent ifdefs in stm32f0_i2c.c
A whitespace and comment change only - no functional changes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-01-03 12:52:35 -05:00
Alex Voinea
9c2ccceb9f stm32: Expand stm32g0 family (#5838)
Add stm32g07x family support.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-01-03 12:43:46 -05:00
Stas Yakobov
b337cc3ee8 config: Added precise location of [bed_screws] for Ender-3-s1 (#5944)
Signed-off-by: Stas Yakobov <stas@3os.org>
2023-01-02 15:22:46 -05:00
Clifford Roche
40d8c2ef16 palette2: Fix errors with bad handling of NoneType in a few locations
Issue specific to Python 3, NoneType is being used to compare heartbeat time (actually caused by invalid condition operator), and by returning NoneType in timer functions.

Signed-off-by: Clifford Roche <clifford.roche@gmail.com>
2022-12-31 21:03:37 -05:00
JamesH1978
6ae6aaf711 board_defs: Add Fysetc Cheetah V2 to spi_flash (#5952)
As discussed with user HiitsameAsh on discord, he has confirmed this addition will flash a Fysetc Cheetah V2

Signed-off-by: James Hartley <james@hartleyns.com>
2022-12-31 18:26:30 -05:00
CODeRUS
f57ff2c07e docs: Fix typo in mpu9250 documentation
Adding MPU-6515, replacing MPU-9255 duplicate

Signed-off-by: Andrei Kozhevnikov <coderusinbox@gmail.com>
2022-12-30 22:28:59 -05:00
janherich
29ba5ab05a delta: Better delta build volume constraint check
Existing code uses very restrictive build volume constraint checking
with just narrow cone on top of fully cylinder for delta printers.

Code here implements more permissive and still safe build volume
constraint checks.

Signed-off-by: Jan Herich <jan.herich@gmail.com>
2022-12-30 21:39:32 -05:00
Kevin O'Connor
1ff0a5494a stm32: Check for CONFIG_HAVE_BOOTLOADER_REQUEST in dfu_reboot.c
Support disabling dfu_reboot if HAVE_BOOTLOADER_REQUEST is disabled in
the Kconfig rules.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-30 21:28:32 -05:00
Kevin O'Connor
b51b068442 avr: No need to define bootloader_request()
Since avr does not define HAVE_BOOTLOADER_REQUEST it is not necessary
to define the function.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-30 21:28:32 -05:00
Kevin O'Connor
c620f4836e canserial: Only call bootloader_request() if CONFIG_HAVE_BOOTLOADER_REQUEST
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-30 21:28:32 -05:00
Kevin O'Connor
34fd3f41ea usb_cdc: Only call bootloader_request() if CONFIG_HAVE_BOOTLOADER_REQUEST
Check for the build symbol prior to calling bootloader_request().
Enable the build symbol on rp2040, atsam, and atsamd chips.

This also enables serial bootloader requsts on rp2040, atsam, and
atsamd.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-30 21:28:32 -05:00
Kevin O'Connor
806cf233ec stm32: Include "misc.h" in stm32l4.c and stm32g4.c
Include for bootloader_request() definition.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-30 21:28:32 -05:00
Kevin O'Connor
4ca1e5f670 serial_irq: Rename SERIAL_BOOTLOADER_SIDECHANNEL to HAVE_BOOTLOADER_REQUEST
Rename the build symbol.  This is in preparation for enabling
HAVE_BOOTLOADER_REQUEST on usb and canbus.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-30 21:28:32 -05:00
Kevin O'Connor
4753315601 Kconfig: No need to specify "default n" in main Kconfig file
A "bool" option already defaults to "n" so no need to state that
explicitly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-30 21:28:32 -05:00
Alex Voinea
9b60daf62d tmc: Configurable microstep lookup table (#5920)
Make all the microstep lookup table registers configurable via the
config file. It also loads the default values.
TMC220x and TMC2660 do not support this feature.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2022-12-21 21:23:23 -05:00
Chris Lee
aac613bf44 scripts: support CanBoot on RP2040 in flash_usb.py
Signed-off-by: Chris Lee <clee@mg8.org>
2022-12-19 15:42:53 -05:00
janherich
f078a27905 manual_probe: Add Z_OFFSET_APPLY_ENDSTOP for delta
Current Z_OFFSET_APPLY_ENDSTOP command only works for printers
with cartesian architecture which have separate Z axis defined.
But this functionality (persisting Z babystep value to endstops)
is exactly as convinient for delta printers, therefore this
PR implements it.

Signed-off-by: Jan Herich <jan.herich@gmail.com>
2022-12-19 13:14:06 -05:00
Keyan Mobli
8621ebbed2 bed_mesh: Allow bedmeshing at 1mm spaced intervals (#5918)
Signed-off-by: Keyan Mobli <keyan@kmobli.com>
2022-12-19 11:14:45 -05:00
Kevin O'Connor
4af8786587 stm32: Move dfu reboot logic to new dfu_reboot.c file
Move the stm32 DFU reboot logic to a new dfu_reboot.c file.  This
simplifies the per-chip code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-18 19:50:08 -05:00
Kevin O'Connor
b6cd77f6e3 stm32: Separate out USB DFU reboot logic in stm32l4.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-18 19:50:08 -05:00
Kevin O'Connor
be74c72555 stm32: Separate out USB DFU reboot logic in stm32g4.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-18 19:50:08 -05:00
theophile
2a25733cd8 screws_tilt_adjust: Add get_status() method (#5921)
Signed-off-by: Christopher Meredith <chmeredith@gmail.com>
2022-12-17 11:39:25 -05:00
Kevin O'Connor
3c1ed3bb27 initial_pins: Add check to reduce compile time size when not in use
Add a check to the start of initial_pins_setup() to make it easier for
gcc to optimize the code if it is not in use.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-16 22:46:47 -05:00
Kevin O'Connor
0c43ae1fd4 stm32: Just clean dcache instead of disabling on stm32h7 dfu reboot
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-16 17:29:45 -05:00
Kevin O'Connor
02b45c91fb armcm_reset: Flush dcache before rebooting into canboot
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-16 17:26:41 -05:00
Kevin O'Connor
b0d9cbfb4b stm32: Fix usb build on stm32g0b0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-15 18:43:25 -05:00
Kevin O'Connor
7d1df81e5e stm32: Fix USB support on stm32g0b1
A typo in commit e33b41ab broke USB selection on stm32g0b1.

Reported by @Pmant.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-15 11:44:12 -05:00
Kevin O'Connor
41c7bb818f test: Add compile test builds for stm32g431, stm32h723, stm32l412
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-15 11:27:28 -05:00
Kevin O'Connor
ac090d9d52 stm32: Fix stm32l4 build
Commit c5d56f44 neglected to define ADCIN_BANK_SIZE in stm32h7_adc.c
on stm32l4.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-15 11:27:19 -05:00
Kevin O'Connor
f31540b357 stm32: Minor changes to stm32g0b0 ifdefs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-15 10:27:51 -05:00
Alex Voinea
e33b41abaa stm32g0: add stm32g0b0 support
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2022-12-15 10:05:43 -05:00
Kevin O'Connor
9d668d63a7 stm32: Rework usb_reboot_for_dfu_bootloader() so it works on stm32h723
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-15 09:52:21 -05:00
Kevin O'Connor
f6199ef613 config: Update generic-bigtreetech-octopus.cfg for f429 and h723 chips
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-15 09:50:01 -05:00
Kevin O'Connor
fe0fc29616 rp2040: Move watchdog code to new watchdog.c file
Move the watchdog code to its own file so that it is easier to disable
it for development builds.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-14 19:21:25 -05:00
Kevin O'Connor
9b342c65c8 armcm_link: Rename CONFIG_FLASH_START to CONFIG_FLASH_APPLICATION_ADDRESS
Rename the build symbol name for better clarity on what it represents.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-14 18:44:07 -05:00
Kevin O'Connor
dc94a35752 lpc176x: Fix lpc176x build
Fix build error introduced in commit 6ba2c3e1.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-14 14:50:31 -05:00
Kevin O'Connor
d40ebdab06 canbus: Rename canserial_send() to canbus_send()
Rename canserial_send() to canbus_send() and canserial_set_filter() to
canbus_set_filter().  This makes it more clear where the code should
reside.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-14 14:25:21 -05:00
Kevin O'Connor
52a6bed24e canbus: Rename canbus_send() to canhw_send()
Rename canbus_send() to canhw_send() and rename canbus_set_filter() to
canhw_set_filter().  This makes it more clear where the code should
reside.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-14 14:15:14 -05:00
Kevin O'Connor
e16a693b1e rp2040: Fix copy-paste error in Kconfig comment
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-14 13:34:15 -05:00
Kevin O'Connor
6ba2c3e1d1 lpc176x: Use "Bootloader offset" prompt in "make menuconfig"
Use the same bootloader offset terminology that is used with other
chips (eg, stm32).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-14 13:29:39 -05:00
maze
347dfa58ea gcode_arcs: Allow either one of I, J, K to be default-zero on G2/G3 (#5939)
Signed-off-by: Wijnand Modderman-Lenstra <maze@pyth0n.org>
2022-12-14 12:06:11 -05:00
Kevin O'Connor
69f76b3b66 stm32: Apply race fixes to stm32h7_adc.c
Improve handling of race conditions with hardware updates.  This is
the same changes applied to stm32f0_adc.c in commit 88325b6c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-12 23:46:49 -05:00
Justin Schuh
201f715b55 save_variables: Verify filename path is writeable at startup
Signed-off-by: Justin Schuh <code@justinschuh.com>
2022-12-11 21:07:47 -05:00
Kevin O'Connor
ba365aff96 gcode_arcs: No need to import gcode module to access Coord()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-11 20:59:02 -05:00
Andrew Mirsky
0c5c87d7c0 gcode_arcs: support XY, XZ and YZ planes
add G17, G18 and G19 commands to select arc planes
enhance G2/G3 to support arc moves in XY, XZ and YZ planes

Signed-off-by: Andrew Mirsky <andrew@mirsky.net>
2022-12-11 20:55:59 -05:00
Alex Voinea
c7f323e863 stm32g0: Do not disable SWD by accident
Keep SWEN as 1 in FLASH->ACR register such
that the SWD interface doesn't get disabled.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2022-12-11 20:09:50 -05:00
Alex Voinea
0972561783 stm32g4: Do not disable SWD by accident
Keep SWEN as 1 in FLASH->ACR register such
that the SWD interface doesn't get disabled.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2022-12-11 20:09:50 -05:00
BIGTREETECH
516fdae2b7 linux: add 'GPIOI' for linux process (#5926)
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
2022-12-11 20:07:58 -05:00
Frank Roth
03006f5ca3 config: printer-artillery-sidewinder-x2-2022.cfg
Minor fix. The screw labels "back left" and "back right"
where swapped in [screws_tilt_adjust] section.

Signed-off-by: Frank Roth <developer@freakydu.de>
2022-12-11 19:53:42 -05:00
Kevin O'Connor
336cc92a0a parsedump: Support running on both python2 and python3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-07 14:31:03 -05:00
bigtreetech
a42f615881 stm32: add STM32H723 support
Signed-off-by: Chen.BJ from BigTreeTech chenbj@biqu3d.com
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-12-02 13:55:23 -05:00
bigtreetech
50b2e2e67e lib: update lib/stm32h7 to v1.9.0 for stm32h723
Signed-off-by: Chen.BJ from BigTreeTech chenbj@biqu3d.com
2022-12-02 13:26:02 -05:00
Matt Baker
c5d56f4438 stm32g4: implement build,usb,can,i2c,spi,serial,adc.
Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
2022-12-02 11:31:42 -05:00
Matt Baker
9ab367d813 stm32g4: add lib from stm32cubeg4 v1.4.0
Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
2022-12-02 11:31:42 -05:00
Neko-vecter
a1de69e39b corexz: Multiple steppers per axis on CoreXZ
Allowing multiple steppers per axis.

Signed-off-by: Vecter Fang <vecterfang@icloud.com>
2022-12-02 11:25:55 -05:00
553 changed files with 693650 additions and 2629 deletions

View File

@@ -4,12 +4,12 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ci_cache
key: ${{ runner.os }}-build-${{ hashFiles('scripts/ci-install.sh') }}
@@ -21,7 +21,7 @@ jobs:
run: ./scripts/ci-build.sh 2>&1
- name: Upload micro-controller data dictionaries
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: data-dict
path: ci_build/dict

View File

@@ -12,12 +12,12 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/_klipper3d/mkdocs-requirements.txt') }}
@@ -28,7 +28,7 @@ jobs:
- name: Build MkDocs Pages
run: docs/_klipper3d/build-translations.sh
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.2.5
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: site # The folder the action should deploy.

View File

@@ -34,7 +34,7 @@ jobs:
+ " bulk of a review has already been completed."
+ "\n"
+ "2. Consider opening a topic on the [Klipper Discourse]"
+ "(https://www.klipper3d.org/Contact.html#community-forum)"
+ "(https://www.klipper3d.org/Contact.html#discourse-forum)"
+ " server to discuss this work. The Discourse server is a good"
+ " place to discuss development ideas and to engage users"
+ " interested in testing. Reviewers are more likely to"
@@ -50,7 +50,7 @@ jobs:
+ " this GitHub Pull Request then it will be automatically"
+ " closed. If this happens, then it is a good idea to move"
+ " further discussion to the [Klipper Discourse]"
+ "(https://www.klipper3d.org/Contact.html#community-forum)"
+ "(https://www.klipper3d.org/Contact.html#discourse-forum)"
+ " server. Reviewers can reach out on that forum to let you"
+ " know if they are interested and when they are available."
+ "\n\n"

View File

@@ -9,7 +9,7 @@ jobs:
if: github.repository == 'Klipper3d/klipper'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: |
@@ -31,6 +31,8 @@ jobs:
exempt-issue-labels: 'enhancement,bug'
days-before-stale: 35
days-before-close: 7
days-before-pr-stale: -1
days-before-pr-close: -1
# Close tickets marked with "not on github" label
close_not_on_github:
if: github.repository == 'Klipper3d/klipper'
@@ -81,7 +83,7 @@ jobs:
+ " this GitHub Pull Request and it is therefore being"
+ " closed. It is a good idea to move"
+ " further discussion to the [Klipper Discourse]"
+ "(https://www.klipper3d.org/Contact.html#community-forum)"
+ "(https://www.klipper3d.org/Contact.html#discourse-forum)"
+ " server. Reviewers can reach out on that forum to let you"
+ " know if they are interested and when they are available."
+ "\n\n"
@@ -135,7 +137,7 @@ jobs:
+ " bulk of a review has already been completed."
+ "\n"
+ "2. Consider opening a topic on the [Klipper Discourse]"
+ "(https://www.klipper3d.org/Contact.html#community-forum)"
+ "(https://www.klipper3d.org/Contact.html#discourse-forum)"
+ " server to discuss this work. The Discourse server is a good"
+ " place to discuss development ideas and to engage users"
+ " interested in testing. Reviewers are more likely to"
@@ -151,7 +153,7 @@ jobs:
+ " this GitHub Pull Request then it will be automatically"
+ " closed. If this happens, then it is a good idea to move"
+ " further discussion to the [Klipper Discourse]"
+ "(https://www.klipper3d.org/Contact.html#community-forum)"
+ "(https://www.klipper3d.org/Contact.html#discourse-forum)"
+ " server. Reviewers can reach out on that forum to let you"
+ " know if they are interested and when they are available."
+ "\n\n"
@@ -332,7 +334,7 @@ jobs:
if: github.repository == 'Klipper3d/klipper'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
- uses: dessant/lock-threads@v4
with:
issue-inactive-days: '180'
issue-lock-reason: ''

View File

@@ -0,0 +1,200 @@
# This file contains common pin mappings for the BIGTREETECH Manta E3EZ
# To use this config, the firmware should be compiled for the
# STM32G0B1 with a "8KiB bootloader" "8 MHz crystal"
# and "USB (on PA11/PA12)" or "CAN bus (on PB12/PB13)".
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PA14
dir_pin: !PA10
enable_pin: !PA13
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC4
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PC8
dir_pin: !PA15
enable_pin: !PC14
microsteps: 16
rotation_distance: 40
endstop_pin: ^PB0
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PD2
dir_pin: PD4
enable_pin: !PD3
microsteps: 16
rotation_distance: 8
endstop_pin: ^PC6
position_endstop: 0
position_max: 270
[extruder]
step_pin: PD5
dir_pin: !PD6
enable_pin: !PB3
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB11 #HE0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA4 #TH0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
#[filament_switch_sensor material_0]
#switch_pin: PC5
#[extruder1]
#step_pin: PB7
#dir_pin: PB6
#enable_pin: !PB4
#heater_pin: PB10 # HE1
#sensor_pin: PA5 # T1
#[filament_switch_sensor material_1]
#switch_pin: PB1
[heater_bed]
heater_pin: PB2 #HB
sensor_type: EPCOS 100K B57560G104F #Generic 3950
sensor_pin: PA3 #TB
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PA8
#[heater_fan fan1]
#pin: PB15
#[heater_fan fan2]
#pin: PB14
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# TMC2209 configuration
########################################
#[tmc2209 stepper_x]
#uart_pin: PB8
##diag_pin: PC4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_y]
#uart_pin: PC9
##diag_pin: PB0
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_z]
#uart_pin: PD0
##diag_pin: PC6
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2209 extruder]
#uart_pin: PD1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder1]
#uart_pin: PB5
#run_current: 0.800
#stealthchop_threshold: 999999
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: PB8
#spi_software_miso_pin: PC11
#spi_software_mosi_pin: PC12
#spi_software_sclk_pin: PC10
##diag1_pin: PF3
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_y]
#cs_pin: PC9
#spi_software_miso_pin: PC11
#spi_software_mosi_pin: PC12
#spi_software_sclk_pin: PC10
##diag1_pin: PF4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_z]
#cs_pin: PD0
#spi_software_miso_pin: PC11
#spi_software_mosi_pin: PC12
#spi_software_sclk_pin: PC10
##diag1_pin: PF5
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2130 extruder]
#cs_pin: PD1
#spi_software_miso_pin: PC11
#spi_software_mosi_pin: PC12
#spi_software_sclk_pin: PC10
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder1]
#cs_pin: PB5
#spi_software_miso_pin: PC11
#spi_software_mosi_pin: PC12
#spi_software_sclk_pin: PC10
#run_current: 0.800
#stealthchop_threshold: 999999
[board_pins]
aliases:
# EXP1 header
EXP1_1=PC1, EXP1_3=PC3, EXP1_5=PC0, EXP1_7=PA2, EXP1_9=<GND>,
EXP1_2=PC2, EXP1_4=<RST>, EXP1_6=PA0, EXP1_8=PA1, EXP1_10=<5V>
#[bltouch]
#sensor_pin: PA6
#control_pin: PA7
#[output_pin PS_ON]
#pin: PA9
#[output_pin pb9_pin]
#pin: PB9
#[neopixel my_neopixel]
#pin: PC7
#[adxl345]
#cs_pin: PC15
#spi_software_miso_pin: PC11
#spi_software_mosi_pin: PC12
#spi_software_sclk_pin: PC10

View File

@@ -75,8 +75,8 @@ pin: PD2
#pin: PD4
#[heater_fan SoC_fan]
#pin: CB1: gpio79
#pin: RPI: gpio26
#pin: CB1:gpio79
#pin: RPI:gpio26
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00

View File

@@ -0,0 +1,199 @@
# This file contains common pin mappings for the BIGTREETECH Manta M5P
# To use this config, the firmware should be compiled for the
# STM32G0B1 with a "8KiB bootloader" "8 MHz crystal"
# and "USB (on PA11/PA12)" or "CAN bus (on PD0/PD1)".
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PC8
dir_pin: !PC9
enable_pin: !PA15
microsteps: 16
rotation_distance: 40
endstop_pin: ^PD3
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: PA10
dir_pin: !PA14
enable_pin: !PA13
microsteps: 16
rotation_distance: 40
endstop_pin: ^PD2
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: PC6
dir_pin: PC7
enable_pin: !PA9
microsteps: 16
rotation_distance: 8
endstop_pin: ^PC3
position_endstop: 0.0
position_max: 200
[extruder]
step_pin: PB12
dir_pin: !PB11
enable_pin: !PA8
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA1
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
#sensor_type:MAX31865
#sensor_pin: PA4
#spi_bus: spi1
#rtd_nominal_r: 100
#rtd_reference_r: 430
#rtd_num_of_wires: 2
#[filament_switch_sensor material_0]
#switch_pin: PC2
#[extruder1]
#step_pin: PB0
#dir_pin: PB1
#enable_pin: !PC4
#heater_pin: PA7
#sensor_pin: PA2
#...
[heater_bed]
heater_pin: PA5
sensor_type: Generic 3950
sensor_pin: PA0
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PA4
#[heater_fan fan1]
#pin: PA3
#[heater_fan SoC_fan]
#pin: CB1:gpio79
#pin: RPI:gpio26
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# TMC2209 configuration
########################################
#[tmc2209 stepper_x]
#uart_pin: PD9
#run_current: 0.800
#diag_pin: PD3
#[tmc2209 stepper_y]
#uart_pin: PD8
#run_current: 0.800
#diag_pin: PD2
#[tmc2209 stepper_z]
#uart_pin: PB10
#run_current: 0.800
#diag_pin: PC3
#[tmc2209 extruder]
#uart_pin: PB2
#run_current: 0.600
#diag_pin: PC2
#[tmc2209 extruder1]
#uart_pin: PA6
#run_current: 0.600
#diag_pin:
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: PD9
#spi_bus: spi2
#run_current: 0.800
#stealthchop_threshold: 999999
#diag1_pin: PD3
#[tmc2130 stepper_y]
#cs_pin: PD8
#spi_bus: spi2
#run_current: 0.800
#stealthchop_threshold: 999999
#diag1_pin: PD2
#[tmc2130 stepper_z]
#cs_pin: PB10
#spi_bus: spi2
#run_current: 0.650
#stealthchop_threshold: 999999
#diag1_pin: PC3
#[tmc2130 extruder]
#cs_pin: PB2
#spi_bus: spi2
#run_current: 0.800
#stealthchop_threshold: 999999
#diag1_pin: PC2
#[tmc2130 extruder1]
#cs_pin: PA6
#spi_bus: spi2
#run_current: 0.800
#stealthchop_threshold: 999999
#diag1_pin:
[board_pins]
aliases:
# EXP1 header
EXP1_1=PD5, EXP1_3=PB3, EXP1_5=PB5, EXP1_7=PB7, EXP1_9=<GND>,
EXP1_2=PD4, EXP1_4=PD6, EXP1_6=PB4, EXP1_8=PB6, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB14, EXP2_3=PB8, EXP2_5=PC10, EXP2_7=PC12, EXP2_9=<GND>,
EXP2_2=PB13, EXP2_4=PB9, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=<NC>
# See the sample-lcd.cfg file for definitions of common LCD displays.
#[bltouch]
#sensor_pin: PC13
#control_pin: PC15
# Proximity switch
#[probe]
#pin: PC15
#[neopixel my_neopixel1]
#pin: PC11
#[neopixel my_neopixel2]
#pin: PC14
#[adxl345]
#cs_pin: PC0
#spi_bus: spi2

View File

@@ -43,7 +43,7 @@ position_max: 270
#[stepper_]
#step_pin: PD3
#dir_pin: PD2
#enable_pin: PD5
#enable_pin: !PD5
#endstop_pin: PC0
#...
@@ -258,7 +258,7 @@ aliases:
EXP2_3=PF7, EXP2_4=PB12,
EXP2_5=PE7, EXP2_6=PB11, # Slot in the socket on this side
EXP2_7=PE8, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=PC5
EXP2_9=<GND>, EXP2_10=<NC>
# See the sample-lcd.cfg file for definitions of common LCD displays.
@@ -282,3 +282,7 @@ aliases:
#[hall_filament_width_sensor]
#adc1: PC5
#adc2: PB0
#[adxl345]
#cs_pin: PB15
#spi_bus: spi1

View File

@@ -0,0 +1,295 @@
# This file contains common pin mappings for the BIGTREETECH Manta M8P
# To use this config, the firmware should be compiled for the
# STM32G0B1 with a "8KiB bootloader" "8 MHz crystal"
# and "USB (on PA11/PA12)" or "CAN bus (on PD12/PD13)".
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PE2
dir_pin: PB4
enable_pin: !PC11
microsteps: 16
rotation_distance: 40
endstop_pin: ^PF3
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PF12
dir_pin: PF11
enable_pin: !PB3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PF4
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PD7
dir_pin: !PD6
enable_pin: !PF10
microsteps: 16
rotation_distance: 8
endstop_pin: ^PF5
position_endstop: 0
position_max: 270
# Motor4
# The M8P only has 4 heater outputs which leaves an extra stepper
# This can be used for a second Z stepper, dual_carriage, extruder co-stepper,
# or other accesory such as an MMU
#[stepper_]
#step_pin: PD3
#dir_pin: PD2
#enable_pin: !PD5
#endstop_pin: PC0
#...
[extruder]
step_pin: PC9
dir_pin: PC8
enable_pin: !PD1
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.4
filament_diameter: 1.75
heater_pin: PE3 # HE0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA1 # T0
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
#[filament_switch_sensor material_0]
#switch_pin: PC1
# Motor6
#[extruder1]
#step_pin: PA10
#dir_pin: PA14
#enable_pin: !PA15
#heater_pin: PB5 # HE1
#sensor_pin: PA2 # T1
#...
#[filament_switch_sensor material_1]
#switch_pin: PC2
# Motor7
#[extruder2]
#step_pin: PD11
#dir_pin: PD9
#enable_pin: !PD15
#heater_pin: PB6 # HE2
#sensor_pin: PA3 # T2
#...
# Motor8
#[extruder3]
#step_pin: PD8
#dir_pin: PC6
#enable_pin: !PC7
#heater_pin: PE1 # HE3
#sensor_pin: PA4 # T3
#...
[heater_bed]
heater_pin: PB7
sensor_type: Generic 3950
sensor_pin: PA0 # TB
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PE6
#[heater_fan fan1]
#pin: PE0
#[heater_fan fan2]
#pin: PC12
#[heater_fan fan3]
#pin: PE5
#[heater_fan fan4]
#pin: PE4
#[heater_fan fan5]
#pin: PB8
#tachometer_pin: PC14
#[heater_fan fan6]
#pin: PB9
#tachometer_pin: PC15
#[heater_fan SoC_fan]
#pin: CB1:gpio79
#pin: RPI:gpio26
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# TMC2209 configuration
########################################
#[tmc2209 stepper_x]
#uart_pin: PC10
##diag_pin: PF3
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_y]
#uart_pin: PF13
##diag_pin: PF4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_z]
#uart_pin: PF9
##diag_pin: PF5
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2209 stepper_]
#uart_pin: PD4
##diag_pin: PC0
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2209 extruder]
#uart_pin: PD0
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder1]
#uart_pin: PF8
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder2]
#uart_pin: PD14
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder3]
#uart_pin: PD10
#run_current: 0.800
#stealthchop_threshold: 999999
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: PC10
#spi_bus: spi1
##diag1_pin: PF3
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_y]
#cs_pin: PF13
#spi_bus: spi1
##diag1_pin: PF4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_z]
#cs_pin: PF9
#spi_bus: spi1
##diag1_pin: PF5
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2130 stepper_]
#cs_pin: PD4
#spi_bus: spi1
##diag1_pin: PC0
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder]
#cs_pin: PD0
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder1]
#cs_pin: PF8
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder2]
#cs_pin: PD14
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder3]
#cs_pin: PD10
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
[board_pins]
aliases:
# EXP1 header
EXP1_1=PE9, EXP1_2=PE10,
EXP1_3=PE11, EXP1_4=PE12,
EXP1_5=PE13, EXP1_6=PE14, # Slot in the socket on this side
EXP1_7=PE15, EXP1_8=PB10,
EXP1_9=<GND>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB14, EXP2_2=PB13,
EXP2_3=PF7, EXP2_4=PB12,
EXP2_5=PE7, EXP2_6=PB11, # Slot in the socket on this side
EXP2_7=PE8, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=<NC>
# See the sample-lcd.cfg file for definitions of common LCD displays.
#[bltouch]
#sensor_pin: PB2
#control_pin: PB1
# Proximity switch
#[probe]
#pin: PF6
#[output_pin ps_on_pin]
#pin: PC3
#[output_pin pc13_pin]
#pin: PC13
#[neopixel my_neopixel_1]
#pin: PA9
#[neopixel my_neopixel_2]
#pin: PB15
#[hall_filament_width_sensor]
#adc1: PC5
#adc2: PB0
#[adxl345]
#cs_pin: PC4
#spi_bus: spi1

View File

@@ -0,0 +1,332 @@
# This file contains common pin mappings for the BIGTREETECH Octopus Max EZ.
# To use this config, the firmware should be compiled for the
# STM32H723 with a "128KiB bootloader" "25 MHz crystal"
# and "USB (on PA11/PA12)" or "CAN bus (on PD0/PD1)".
# See docs/Config_Reference.md for a description of parameters.
# Motor-1
[stepper_x]
step_pin: PC13
dir_pin: PC14
enable_pin: !PE6
microsteps: 16
rotation_distance: 40
endstop_pin: PF0
position_endstop: 0
position_max: 200
homing_speed: 50
# Motor-2
[stepper_y]
step_pin: PE4
dir_pin: PE5
enable_pin: !PE3
microsteps: 16
rotation_distance: 40
endstop_pin: PF2
position_endstop: 0
position_max: 200
homing_speed: 50
# Motor-3
[stepper_z]
step_pin: PE1
dir_pin: PE0
enable_pin: !PE2
microsteps: 16
rotation_distance: 8
endstop_pin: PF4
position_endstop: 0.5
position_max: 200
# Motor-4
# The Octopus only has 4 heater outputs which leaves an extra stepper
# This can be used for a second Z stepper, dual_carriage, extruder co-stepper,
# or other accesory such as an MMU
#[stepper_]
#step_pin: PB8
#dir_pin: PB9
#enable_pin: PB7
#endstop_pin: PF3
#...
# Motor-5
[extruder]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB6
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PF6 # HE0
sensor_pin: PB0 # T0
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
#[filament_switch_sensor material_0]
#switch_pin: PF1
# Motor-6
#[extruder1]
#step_pin: PG15
#dir_pin: PB3
#enable_pin: !PD5
#heater_pin: PA0 # HE1
#sensor_pin: PC5 # T1
#...
#[filament_switch_sensor material_1]
#switch_pin: PC15
# Motor-7
#[extruder2]
#step_pin: PD3
#dir_pin: PD2
#enable_pin: !PD4
#heater_pin: PF9 # HE2
#sensor_pin: PC4 # T2
#...
# Motor-8
#[extruder3]
#step_pin: PA10
#dir_pin: PA9
#enable_pin: !PA15
#heater_pin: PF7 # HE3
#sensor_pin: PA7 # T3
#...
# Motor-9
#[extruder4]
#step_pin: PA8
#dir_pin: PC7
#enable_pin: !PC9
#...
# Motor-10
#[extruder5]
#step_pin: PG6
#dir_pin: PC6
#enable_pin: !PC8
#...
[heater_bed]
heater_pin: PF5
sensor_pin: PB1 # TB
sensor_type: ATC Semitec 104GT-2
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PA6
#[heater_fan fan1]
#pin: PA5
#[heater_fan fan2]
#pin: PA4
#[heater_fan fan3]
#pin: PA3
#[heater_fan fan4]
#pin: PA1
#tachometer_pin: PC3
#[heater_fan fan5]
#pin: PF8
#tachometer_pin: PC1
#[heater_fan fan6]
#pin: PA2
#tachometer_pin: PC2
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# TMC2209 configuration
########################################
#[tmc2209 stepper_x]
#uart_pin: PG14
##diag_pin: PF0
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_y]
#uart_pin: PG13
##diag_pin: PF2
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_z]
#uart_pin: PG12
##diag_pin: PF4
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2209 stepper_]
#uart_pin: PG11
##diag_pin: PF3
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2209 extruder]
#uart_pin: PG10
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder1]
#uart_pin: PG9
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder2]
#uart_pin: PD7
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder3]
#uart_pin: PD6
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder4]
#uart_pin: PG8
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder5]
#uart_pin: PG7
#run_current: 0.800
#stealthchop_threshold: 999999
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: PG14
#spi_bus: spi4
##diag1_pin: PF0
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_y]
#cs_pin: PG13
#spi_bus: spi4
##diag1_pin: PF2
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_z]
#cs_pin: PG12
#spi_bus: spi4
##diag1_pin: PF4
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2130 stepper_]
#cs_pin: PG11
#spi_bus: spi4
##diag1_pin: PF3
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder]
#cs_pin: PG10
#spi_bus: spi4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder1]
#cs_pin: PG9
#spi_bus: spi4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder2]
#cs_pin: PD7
#spi_bus: spi4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder3]
#cs_pin: PD6
#spi_bus: spi4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder4]
#cs_pin: PG8
#spi_bus: spi4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder5]
#cs_pin: PG7
#spi_bus: spi4
#run_current: 0.800
#stealthchop_threshold: 999999
[board_pins]
aliases:
# FPC header, Aliases EXP1 & EXP2 for mini12864
EXP1_1=PG2, EXP1_2=PD15,
EXP1_3=PD14, EXP1_4=PD13,
EXP1_5=PD12, EXP1_6=PD11,
EXP1_7=PD10, EXP1_8=PE15,
EXP1_9=<GND>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PE13, EXP2_2=PE12,
EXP2_3=PG5, EXP2_4=PE11,
EXP2_5=PG4, EXP2_6=PE14,
EXP2_7=PG3, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=<NC>
# See the sample-lcd.cfg file for definitions of common LCD displays.
#[bltouch]
#sensor_pin: ^PB15
#control_pin: PB14
# Proximity switch
#[probe]
#pin: PF11
#[output_pin ps_on_pin]
#pin: PF13
#[output_pin pf12_pin]
#pin: PF12
#[neopixel my_neopixel_1]
#pin: PE10
#[neopixel my_neopixel_2]
#pin: PE9
#[hall_filament_width_sensor]
#adc1: PC0
#adc2: PF10
#[adxl345]
#cs_pin: PF14
#spi_bus: spi4

View File

@@ -0,0 +1,289 @@
# This file contains common pin mappings for the BigTreeTech Octopus
# Pro v1.0 board.
# Important! Do not use this config with an Octopus Pro v1.1 board as
# doing so could result in a heater being inadvertently enabled.
# To use this config, start by identifying the micro-controller on the
# board - it may be an STM32F446, STM32F429, or an STM32H723. Select
# the appropriate micro-controller in "make menuconfig" and select
# "Enable low-level configuration options". For STM32F446 boards the
# firmware should be compiled with a "32KiB bootloader" and a "12MHz
# crystal" clock reference. For STM32F429 boards use a "32KiB
# bootloader" and an "8MHz crystal". For STM32H723 boards use a
# "128KiB bootloader" and a "25Mhz crystal".
# See docs/Config_Reference.md for a description of parameters.
# Driver0
[stepper_x]
step_pin: PF13
dir_pin: PF12
enable_pin: !PF14
microsteps: 16
rotation_distance: 40
endstop_pin: PG6
position_endstop: 0
position_max: 200
homing_speed: 50
# Driver1
[stepper_y]
step_pin: PG0
dir_pin: PG1
enable_pin: !PF15
microsteps: 16
rotation_distance: 40
endstop_pin: PG9
position_endstop: 0
position_max: 200
homing_speed: 50
# Driver2
[stepper_z]
step_pin: PF11
dir_pin: PG3
enable_pin: !PG5
microsteps: 16
rotation_distance: 8
endstop_pin: PG10
position_endstop: 0.5
position_max: 200
# Driver3
# The Octopus only has 4 heater outputs which leaves an extra stepper
# This can be used for a second Z stepper, dual_carriage, extruder co-stepper,
# or other accesory such as an MMU
#[stepper_]
#step_pin: PG4
#dir_pin: PC1
#enable_pin: !PA0
#endstop_pin: PG11
#...
# Driver4
[extruder]
step_pin: PF9
dir_pin: PF10
enable_pin: !PG2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA2 # HE0
sensor_pin: PF4 # T0
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
#[filament_switch_sensor material_0]
#switch_pin: PG12
# Driver5
#[extruder1]
#step_pin: PC13
#dir_pin: PF0
#enable_pin: !PF1
#heater_pin: PA3 # HE1
#sensor_pin: PF5 # T1
#...
#[filament_switch_sensor material_1]
#switch_pin: PG13
# Driver6
#[extruder2]
#step_pin: PE2
#dir_pin: PE3
#enable_pin: !PD4
#heater_pin: PB10 # HE2
#sensor_pin: PF6 # T2
#...
#[filament_switch_sensor material_2]
#switch_pin: PG14
# Driver7
#[extruder3]
#step_pin: PE6
#dir_pin: PA14
#enable_pin: !PE0
#heater_pin: PB11 # HE3
#sensor_pin: PF7 # T3
#...
#[filament_switch_sensor material_3]
#switch_pin: PG15
[heater_bed]
heater_pin: PA1
sensor_pin: PF3 # TB
sensor_type: ATC Semitec 104GT-2
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PA8
#[heater_fan fan1]
#pin: PE5
#[heater_fan fan2]
#pin: PD12
#[heater_fan fan3]
#pin: PD13
#[heater_fan fan4]
#pin: PD14
#[controller_fan fan5]
#pin: PD15
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
# CAN bus is also available on this board
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# TMC2209 configuration
########################################
#[tmc2209 stepper_x]
#uart_pin: PC4
##diag_pin: PG6
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_y]
#uart_pin: PD11
##diag_pin: PG9
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_z]
#uart_pin: PC6
##diag_pin: PG10
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2209 stepper_]
#uart_pin: PC7
##diag_pin: PG11
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2209 extruder]
#uart_pin: PF2
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder1]
#uart_pin: PE4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder2]
#uart_pin: PE1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder3]
#uart_pin: PD3
#run_current: 0.800
#stealthchop_threshold: 999999
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: PC4
#spi_bus: spi1
##diag1_pin: PG6
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_y]
#cs_pin: PD11
#spi_bus: spi1
##diag1_pin: PG9
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_z]
#cs_pin: PC6
#spi_bus: spi1
##diag1_pin: PG10
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2130 stepper_]
#cs_pin: PC7
#spi_bus: spi1
##diag1_pin: PG11
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder]
#cs_pin: PF2
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder1]
#cs_pin: PE4
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder2]
#cs_pin: PE1
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder3]
#cs_pin: PD3
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
[board_pins]
aliases:
# EXP1 header
EXP1_1=PE8, EXP1_2=PE7,
EXP1_3=PE9, EXP1_4=PE10,
EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side
EXP1_7=PE14, EXP1_8=PE15,
EXP1_9=<GND>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_2=PA5,
EXP2_3=PB1, EXP2_4=PA4,
EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side
EXP2_7=PC15, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=PC5
# See the sample-lcd.cfg file for definitions of common LCD displays.
# A [probe] section can be defined instead with a pin: setting identical
# to the sensor_pin: for a bltouch
#[bltouch]
#sensor_pin: PB7
#control_pin: PB6
#z_offset: 0
#[neopixel my_neopixel]
#pin: PB0

View File

@@ -1,6 +1,13 @@
# This file contains common pin mappings for the BigTreeTech Octopus.
# To use this config, the firmware should be compiled for the
# STM32F446 with a "32KiB bootloader" and a "12MHz crystal" clock reference.
# This file contains common pin mappings for the BigTreeTech Octopus
# Pro v1.1 board.
# Important! Do not use this config with an Octopus Pro v1.0 board nor
# non-Pro board.
# To use this config, during "make menuconfig", select "Enable
# low-level configuration options", select the STM32H723
# micro-controller, select a "128KiB bootloader", and select a "25Mhz
# crystal".
# See docs/Config_Reference.md for a description of parameters.
@@ -46,7 +53,7 @@ position_max: 200
#[stepper_]
#step_pin: PG4
#dir_pin: PC1
#enable_pin: PA0
#enable_pin: !PA2
#endstop_pin: PG11
#...
@@ -59,7 +66,7 @@ microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA2 # HE0
heater_pin: PA0 # HE0
sensor_pin: PF4 # T0
sensor_type: EPCOS 100K B57560G104F
control: pid
@@ -89,7 +96,7 @@ max_temp: 250
#step_pin: PE2
#dir_pin: PE3
#enable_pin: !PD4
#heater_pin: PB10 # HE2
#heater_pin: PB0 # HE2
#sensor_pin: PF6 # T2
#...
@@ -275,4 +282,4 @@ aliases:
#z_offset: 0
#[neopixel my_neopixel]
#pin: PB0
#pin: PB10

View File

@@ -0,0 +1,288 @@
# This file contains common pin mappings for the BigTreeTech Octopus
# (non-Pro) boards.
# Important! Do not use this config with an Octopus Pro v1.1 board as
# doing so could result in a heater being inadvertently enabled.
# To use this config, start by identifying the micro-controller on the
# board - it may be an STM32F446, or STM32F429. Select the
# appropriate micro-controller in "make menuconfig" and select "Enable
# low-level configuration options". For STM32F446 boards the firmware
# should be compiled with a "32KiB bootloader" and a "12MHz crystal"
# clock reference. For STM32F429 boards use a "32KiB bootloader" and
# an "8MHz crystal".
# See docs/Config_Reference.md for a description of parameters.
# Driver0
[stepper_x]
step_pin: PF13
dir_pin: PF12
enable_pin: !PF14
microsteps: 16
rotation_distance: 40
endstop_pin: PG6
position_endstop: 0
position_max: 200
homing_speed: 50
# Driver1
[stepper_y]
step_pin: PG0
dir_pin: PG1
enable_pin: !PF15
microsteps: 16
rotation_distance: 40
endstop_pin: PG9
position_endstop: 0
position_max: 200
homing_speed: 50
# Driver2
[stepper_z]
step_pin: PF11
dir_pin: PG3
enable_pin: !PG5
microsteps: 16
rotation_distance: 8
endstop_pin: PG10
position_endstop: 0.5
position_max: 200
# Driver3
# The Octopus only has 4 heater outputs which leaves an extra stepper
# This can be used for a second Z stepper, dual_carriage, extruder co-stepper,
# or other accesory such as an MMU
#[stepper_]
#step_pin: PG4
#dir_pin: PC1
#enable_pin: !PA0
#endstop_pin: PG11
#...
# Driver4
[extruder]
step_pin: PF9
dir_pin: PF10
enable_pin: !PG2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA2 # HE0
sensor_pin: PF4 # T0
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
#[filament_switch_sensor material_0]
#switch_pin: PG12
# Driver5
#[extruder1]
#step_pin: PC13
#dir_pin: PF0
#enable_pin: !PF1
#heater_pin: PA3 # HE1
#sensor_pin: PF5 # T1
#...
#[filament_switch_sensor material_1]
#switch_pin: PG13
# Driver6
#[extruder2]
#step_pin: PE2
#dir_pin: PE3
#enable_pin: !PD4
#heater_pin: PB10 # HE2
#sensor_pin: PF6 # T2
#...
#[filament_switch_sensor material_2]
#switch_pin: PG14
# Driver7
#[extruder3]
#step_pin: PE6
#dir_pin: PA14
#enable_pin: !PE0
#heater_pin: PB11 # HE3
#sensor_pin: PF7 # T3
#...
#[filament_switch_sensor material_3]
#switch_pin: PG15
[heater_bed]
heater_pin: PA1
sensor_pin: PF3 # TB
sensor_type: ATC Semitec 104GT-2
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PA8
#[heater_fan fan1]
#pin: PE5
#[heater_fan fan2]
#pin: PD12
#[heater_fan fan3]
#pin: PD13
#[heater_fan fan4]
#pin: PD14
#[controller_fan fan5]
#pin: PD15
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
# CAN bus is also available on this board
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# TMC2209 configuration
########################################
#[tmc2209 stepper_x]
#uart_pin: PC4
##diag_pin: PG6
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_y]
#uart_pin: PD11
##diag_pin: PG9
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 stepper_z]
#uart_pin: PC6
##diag_pin: PG10
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2209 stepper_]
#uart_pin: PC7
##diag_pin: PG11
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2209 extruder]
#uart_pin: PF2
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder1]
#uart_pin: PE4
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder2]
#uart_pin: PE1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2209 extruder3]
#uart_pin: PD3
#run_current: 0.800
#stealthchop_threshold: 999999
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: PC4
#spi_bus: spi1
##diag1_pin: PG6
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_y]
#cs_pin: PD11
#spi_bus: spi1
##diag1_pin: PG9
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 stepper_z]
#cs_pin: PC6
#spi_bus: spi1
##diag1_pin: PG10
#run_current: 0.650
#stealthchop_threshold: 999999
#[tmc2130 stepper_]
#cs_pin: PC7
#spi_bus: spi1
##diag1_pin: PG11
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder]
#cs_pin: PF2
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder1]
#cs_pin: PE4
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder2]
#cs_pin: PE1
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
#[tmc2130 extruder3]
#cs_pin: PD3
#spi_bus: spi1
#run_current: 0.800
#stealthchop_threshold: 999999
[board_pins]
aliases:
# EXP1 header
EXP1_1=PE8, EXP1_2=PE7,
EXP1_3=PE9, EXP1_4=PE10,
EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side
EXP1_7=PE14, EXP1_8=PE15,
EXP1_9=<GND>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_2=PA5,
EXP2_3=PB1, EXP2_4=PA4,
EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side
EXP2_7=PC15, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=PC5
# See the sample-lcd.cfg file for definitions of common LCD displays.
# A [probe] section can be defined instead with a pin: setting identical
# to the sensor_pin: for a bltouch
#[bltouch]
#sensor_pin: PB7
#control_pin: PB6
#z_offset: 0
#[neopixel my_neopixel]
#pin: PB0

View File

@@ -1,6 +1,8 @@
# This file contains common pin mappings for the BigTreeTech SKR 3.
# This board can ship with one of two chips, STM32H743 or STM32H723.
# To use this config, during "make menuconfig" enable "low-level
# options", "STM32H743", "128KiB bootloader", and "25MHz clock".
# options", "STM32H743" or "STM32H723", "128KiB bootloader",
# and "25MHz clock".
# See docs/Config_Reference.md for a description of parameters.

View File

@@ -106,6 +106,9 @@ pin: gpio18
[heater_fan controller_fan]
pin: gpio20
[temperature_sensor pico]
sensor_type: temperature_mcu
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00

View File

@@ -0,0 +1,152 @@
# This file contains common pin mappings for the Duet3 6HC. To use
# this config, the firmware should be compiled for the SAME70Q20B.
# To flash the board, erase the existing firmware by jumpering the erase jumper.
# Boot the board, wait for reset to complete, remove the jumper, and then reboot the board,
# as described in Duet's documentation:
# https://docs.duet3d.com/en/User_manual/RepRapFirmware/Updating_firmware#all-other-duet-boards
# Then run: make flash FLASH_DEVICE=/dev/ttyACM0
# See docs/Config_Reference.md for a description of parameters.
# Pins for reference, v1.02 board:
# Driver Step Pins - 0:PC18 1:PC16 2:PC28 3:PC1 4:PC4 5:PC9
# Driver Dir Pins - 0:PB5 1:PD10 2:PA4 3:PA22 4:PC3 5:PD14
# Driver Enable - !PA9
# Driver CS - PD17
# Thermistor Pins - TEMP0:PC15 TEMP1:PC29 TEMP2:PC30 TEMP3:PC31
# Pullup Resistor - 2200
# Vssa Sense:PC13 | Vref Sense:PC0
# Current Sense resistor for drivers - 0.05ohm
# SPI lines:{PC25} -> SPIMosi:PC27 SPIMiso:PC26 SPISCLK:PC24
# Vin Monitor:PA20
# CAN Pins - TX0:PB2 RX0:PB3 TX1:PD12 RX1:PC12
# Heaters - Out0:PA7 Out1:PA24 Out2:PA16 Out3:PA11
# Fan outputs - Out4:PA15 Out5:PC5 Out6:PA8 Out7:PC11 Out8:PC8 Out9:PA12 | Out9 is shared with VFD_Out
# Tach Pins for Fans - Out4.Tach:PC7 Out5.Tach:PD23 Out6.Tach:PA1
# GPIO_out - IO0:PD26 IO1:PD16 IO2:PD27 IO3:PA3 IO4:PE0 IO5:PD21 IO6:PA0 IO7:PD23 IO8:PE1
# GPIO_in - IO0:PD25 IO1:PD15 IO2:PD28 IO3:PE5 IO4:PD30 IO5:PA19 IO6:PA18 IO7:PA17 IO8:PE3
# Driver Diag - 0:PD29 1:PC17 2:PD13 3:PC2 4:PD31 5:PC10
[stepper_x]
#driver 0
step_pin: PC18
dir_pin: PB5
enable_pin: !PA9
microsteps: 128
rotation_distance: 40
endstop_pin: PD25 #IO0
position_endstop: 0
position_max: 450
[tmc5160 stepper_x]
cs_pin: PD17
spi_bus: usart1
chain_position: 1
chain_length: 6
interpolate: False
run_current: 1
sense_resistor: 0.05
[stepper_y]
#driver 1
step_pin: PC16
dir_pin: PD10
enable_pin: !PA9
microsteps: 128
rotation_distance: 40
endstop_pin: PD15 #IO1
position_endstop: 0
position_max: 450
[tmc5160 stepper_y]
cs_pin: PD17
chain_position: 2
chain_length: 6
interpolate: False
run_current: 1.0
sense_resistor: 0.05
[stepper_z]
#driver2
step_pin: PC28
dir_pin: PA4
enable_pin: !PA9
microsteps: 64
rotation_distance: 8
endstop_pin: PD28 #IO2
position_endstop: 0
position_min: 0
position_max: 400
[tmc5160 stepper_z]
cs_pin: PD17
chain_position: 3
chain_length: 6
interpolate: False
run_current: 1.0
sense_resistor: 0.05
[adc_scaled vref_scaled]
vref_pin: PC0
vssa_pin: PC13
[extruder]
#driver3
step_pin: PC1
dir_pin: PA22
enable_pin: !PA9
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA24 #Out1
sensor_type: ATC Semitec 104GT-2
pullup_resistor: 2200
sensor_pin: vref_scaled:PC29 #Temp1
control: pid
pid_Kp: 30.089
pid_Ki: 2.229
pid_Kd: 101.550
min_temp: 0
max_temp: 285
[tmc5160 extruder]
cs_pin: PD17
chain_position: 4
chain_length: 6
interpolate: False
run_current: .6
sense_resistor: 0.05
[heater_fan heatbreak_fan]
pin: PC8 #Out8
heater: extruder
heater_temp: 50.0
[heater_bed]
heater_pin: PA7 #Out0
sensor_type: Generic 3950
sensor_pin: vref_scaled:PC15 #Temp0
control: pid
pullup_resistor: 2200
pid_Kp: 61.049
pid_Ki: 2.339
pid_Kd: 398.344
min_temp: 0
max_temp: 130
[heater_fan heatbreak_fan]
pin: PA15 #Out4
[fan]
pin: PC5 #Out5
[mcu]
serial: /dev/ttyACM0
[printer]
kinematics: cartesian
max_velocity: 350
max_accel: 3000

View File

@@ -0,0 +1,108 @@
# This file contains common pin mappings for the Duet3 6XD. To use
# this config, the firmware should be compiled for the SAME70Q20B.
# To flash the board, erase the existing firmware by jumpering the erase jumper.
# Boot the board, wait for reset to complete, remove the jumper, and then reboot the board,
# as described in Duet's documentation:
# https://docs.duet3d.com/en/User_manual/RepRapFirmware/Updating_firmware#all-other-duet-boards
# Then run: make flash FLASH_DEVICE=/dev/ttyACM0
# See docs/Config_Reference.md for a description of parameters.
# Pins for reference, v1.0 board:
# Driver Step Pins - 0:PC18 1:PC16 2:PC28 3:PC1 4:PC4 5:PC9
# Driver Dir Pins - 0:PB5 1:PD10 2:PA4 3:PA22 4:PC3 5:PD14
# Driver En Pins - 0:PB4 1:PA21 2:PC20 3:PA23 4:PA2 5:PD17
# Driver Err Pins - 0:PD29 1:PC17 2:PD13 3:PC2 4:PD31 5:PC10
# Thermistor Pins - TEMP0:PC15 TEMP1:PC29 TEMP2:PC0 TEMP3:PC31
# Pullup Resistor - 2200
# Vssa Sense:PC13 | Vref Sense:PC30
# SPI0:{PD19, PA5, PA6, PD20, PC22} -> SPIMosi:PB1 SPIMiso:PB0 SPISCLK:PB13
# SPI1:{PC25} -> SPIMosi:PC27 SPIMiso:PC26 SPISCLK:PC24 DATA_RDY:PE2
# Vin Monitor:PA20
# LED's - Diag:PB6, Act:PB7
# CAN Pins - TX0:PB2 RX0:PB3 TX1:PD12 RX1:PC12
# Heaters - Out0:PA24 Out1:PA16 Out2:PA11
# Fan outputs - Out3:PA15 Out4:PC5 Out5:PA8 Out6:PC11 Out7:PC8 Out8:PA12
# Tach Pins for Fans - Out3.Tach:PC7 Out4.Tach:PD23 Out5.Tach:PA1
# VFD - PA7
# GPIO_out - IO0:PD26 IO1:PD16 IO2:PD27 IO3:PA3 IO4:PE0 IO5:PD21 IO6:PA0 IO7:PD23 IO8:PE1
# GPIO_in - IO0:PD25 IO1:PD15 IO2:PD28 IO3:PE5 IO4:PD30 IO5:PA19 IO6:PA18 IO7:PA17 IO8:PE3
[stepper_x]
#driver 0
step_pin: PC18
dir_pin: PB5
enable_pin: PB4
microsteps: 128
rotation_distance: 40
endstop_pin: PD25 #IO0
position_endstop: 0
position_max: 450
[stepper_y]
#driver 1
step_pin: PC16
dir_pin: PD10
enable_pin: PA21
microsteps: 128
rotation_distance: 40
endstop_pin: PD15 #IO1
position_endstop: 0
position_max: 450
[stepper_z]
#driver2
step_pin: PC28
dir_pin: PA4
enable_pin: PC20
microsteps: 64
rotation_distance: 8
endstop_pin: PD28 #IO2
position_endstop: 0
position_min: 0
position_max: 400
[adc_scaled vref_scaled]
vref_pin: PC30
vssa_pin: PC13
[extruder]
#driver3
step_pin: PC1
dir_pin: PA22
enable_pin: PA23
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA24 #Out0
sensor_type: ATC Semitec 104GT-2
pullup_resistor: 2200
sensor_pin: vref_scaled:PC29 #Temp1
control: pid
pid_Kp: 30.089
pid_Ki: 2.229
pid_Kd: 101.550
min_temp: 0
max_temp: 285
[heater_fan heatbreak_fan]
pin: PC8 #Out7
heater: extruder
heater_temp: 50.0
[heater_fan heatbreak_fan]
pin: PA15 #Out3
[fan]
pin: PC5 #Out4
[mcu]
serial: /dev/ttyACM0
[printer]
kinematics: cartesian
max_velocity: 350
max_accel: 3000

View File

@@ -0,0 +1,138 @@
# This file contains common pin mappings for the Fysetc Cheetah V2.0
# To use this config, the firmware should be compiled for the
# STM32F401 with a "32KiB bootloader".
# Rename "klipper.bin" to "firmware.bin", copy to Sdcard and insert in motherboard
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PC0
dir_pin: PC1
enable_pin: !PA8
rotation_distance: 40
microsteps: 64
endstop_pin: ^PB4
position_endstop: 0
position_max: 200
homing_speed: 50
[tmc2209 stepper_x]
uart_pin: PA3
tx_pin: PA2
uart_address: 0
run_current: 0.800
interpolate: false
stealthchop_threshold: 0
[stepper_y]
step_pin: PC14
dir_pin: !PC13
enable_pin: !PC15
rotation_distance: 40
microsteps: 64
endstop_pin: ^PC8
position_endstop: 0
position_max: 200
homing_speed: 50
[tmc2209 stepper_y]
uart_pin: PA3
tx_pin: PA2
uart_address: 2
run_current: 0.800
interpolate: false
stealthchop_threshold: 0
[stepper_z]
step_pin: PB9
dir_pin: PB8
enable_pin: !PC2
rotation_distance: 8
microsteps: 64
endstop_pin: ^PB1
position_endstop: 0
position_max: 200
[tmc2209 stepper_z]
uart_pin: PA3
tx_pin: PA2
uart_address: 1
run_current: 0.800
interpolate: false
stealthchop_threshold: 0
[extruder]
step_pin: PB2
dir_pin: !PA15
enable_pin: !PD2
rotation_distance: 33.500
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC6
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
pid_kp: 21.527
pid_ki: 1.063
pid_kd: 108.982
min_temp: 0
max_temp: 250
[tmc2209 extruder]
uart_pin: PA3
tx_pin: PA2
uart_address: 3
run_current: 0.800
interpolate: false
stealthchop_threshold: 0
[heater_bed]
heater_pin: PC7
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
pid_kp: 54.027
pid_ki: 0.770
pid_kd: 948.182
min_temp: 0
max_temp: 120
[fan]
pin: PA1
[heater_fan my_hotend_fan]
pin: PA13
heater: extruder
heater_temp: 50.0
[controller_fan my_controller_fan]
pin: PA14
heater: extruder, heater_bed
stepper: stepper_x, stepper_y, stepper_z, extruder
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 5000
max_z_velocity: 5
max_z_accel: 1000
[mcu]
serial: INSERTSERIALIDHERE
[board_pins]
aliases:
# EXP1 header
EXP1_1=<5V>, EXP1_3=<RST>, EXP1_5=PA7, EXP1_7=PA4, EXP1_9=PA5,
EXP1_2=<GND>, EXP1_4=PC3, EXP1_6=PC11, EXP1_8=PC10, EXP1_10=PA6,
# EXP2 header
EXP2_1=<5V>, EXP2_3=PB7, EXP2_5=PB14, EXP2_7=PB12, EXP2_9=PC12,
EXP2_2=<GND>, EXP2_4=PB6, EXP2_6=PB13, EXP2_8=PB15, EXP2_10=PC9,
# EXP3 header
EXP3_1=PC9, EXP3_3=PC10, EXP3_5=PC11, EXP3_7=PB12, EXP3_9=<GND>,
EXP3_2=PC12, EXP3_4=PB14, EXP3_6=PB13, EXP3_8=PB15, EXP3_10=<5V>
# Pins EXP1_4, EXP1_8, EXP1_6 are also MISO, MOSI, SCK of bus "spi2"

View File

@@ -78,7 +78,7 @@ max_temp: 130
pin: PL5
#fan for hotend FAN1
#[heater_fan my_nozzle_fan]
#[heater_fan heatbreak_cooling_fan]
#pin: PL4
#shutdown_speed: 1

View File

@@ -80,7 +80,7 @@ max_temp: 130
pin: PB0
#fan for hotend FAN1
#[heater_fan my_nozzle_fan]
#[heater_fan heatbreak_cooling_fan]
#pin: PB1
#shutdown_speed: 1

View File

@@ -80,7 +80,7 @@ max_temp: 130
pin: PB0
#fan for hotend FAN1
#[heater_fan my_nozzle_fan]
#[heater_fan heatbreak_cooling_fan]
#pin: PB1
#shutdown_speed: 1

View File

@@ -91,7 +91,7 @@ max_temp: 130
pin: PB0
#fan for hotend FAN1
#[heater_fan my_nozzle_fan]
#[heater_fan heatbreak_cooling_fan]
#pin: PB1
#shutdown_speed: 1

View File

@@ -0,0 +1,268 @@
# This file contains common pin mappings for MKS Monster8
# 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 Monster8. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "mks_monster8.bin" on an SD card or Udisk and then restart the
# MKS Monster8 with that SD card or Udisk.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PC14
dir_pin: PC13
enable_pin: !PC15
microsteps: 16
rotation_distance: 40
endstop_pin: !PA14 # PA13 for X-max; endstop have'!' is NO
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: PE5
dir_pin: !PE4
enable_pin: !PC15
microsteps: 16
rotation_distance: 40
endstop_pin: !PA15 # PC5 for Y-max; endstop have'!' is NO
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: PE1
dir_pin: PE0
enable_pin: !PE2
microsteps: 16
rotation_distance: 8
endstop_pin: !PB13 # PB12 for Z-max; endstop have'!' is NO
position_endstop: 0
position_max: 220
[extruder]
step_pin: PB5
dir_pin: !PB4
enable_pin: !PB6
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
control: pid
pid_Kp: 22
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 260
#[extruder1]
#step_pin: PD6
#dir_pin: !PD5
#enable_pin: !PD7
#heater_pin: PB0
#sensor_pin: PC2
#[extruder2]
#step_pin: PD2
#dir_pin: !PD1
#enable_pin: !PD3
#heater_pin: PA3
#sensor_pin: PC3
#[extruder3]
#step_pin: PC7
#dir_pin: PC6
#enable_pin: !PC8
#[extruder4]
#step_pin: PD13
#dir_pin: !PD12
#enable_pin: !PD14
[heater_bed]
heater_pin: PB10
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: PC0
max_power: 1.0
control: pid
pid_kp: 71.039
pid_ki: 2.223
pid_kd: 567.421
min_temp: 0
max_temp: 200
#fan for printed model FAN0
[fan]
pin: PA2
#fan for hotend FAN1
#[heater_fan my_nozzle_fan]
[heater_fan fan1]
pin: PA1
shutdown_speed: 1
#fan for control board FAN2
#[heater_fan my_control_fan]
[heater_fan fan2]
pin: PA0
shutdown_speed: 1
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_4D0045001850314335393520-if00
[printer]
kinematics: cartesian
max_velocity: 10000
max_accel: 20000
max_z_velocity: 100
max_z_accel: 1000
#####################################################################
# LED Control
#####################################################################
#[output_pin caselight ](Use PA9)
## Chamber Lighting - In 5V-RGB Position
#pin: PA9
#pwm: true
#shutdown_value: 0
#value:100
#cycle_time: 0.01
########################################
# TMC UART configuration
########################################
#[tmc2208 stepper_x]
#uart_pin: PE6
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 999999
#[tmc2208 stepper_y]
#uart_pin: PE3
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 999999
#[tmc2208 stepper_z]
#uart_pin: PB7
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 999999
#[tmc2208 extruder]
#uart_pin: PB3
#run_current: 0.8
#hold_current: 0.5
#sense_resistor: 0.110
#stealthchop_threshold: 999999
#[tmc2208 extruder1]
#uart_pin: PD4
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 999999
#[tmc2208 extruder2]
#uart_pin: PD0
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 999999
#[tmc2208 extruder3]
#uart_pin: PD15
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 999999
#[tmc2208 extruder4]
#uart_pin: PD11
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 999999
########################################
# TMC SPI configuration
########################################
#[tmc2130 stepper_x]
#spi_bus: spi4
#cs_pin: PE6
#diag1_pin: PA14
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 stepper_y]
#spi_bus: spi4
#cs_pin: PE3
#diag1_pin: PA15
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 stepper_z]
#spi_bus: spi4
#cs_pin: PB7
#diag1_pin: PB13
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 extruder]
#spi_bus: spi4
#cs_pin: PB3
#diag1_pin: PA13
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 extruder1]
#spi_bus: spi4
#cs_pin: PD4
#diag1_pin: PC5
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 extruder2]
#spi_bus: spi4
#cs_pin: PD0
#diag1_pin: PB12
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 extruder3]
#spi_bus: spi4
#cs_pin: PD15
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 extruder4]
#spi_bus: spi4
#cs_pin: PD11
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB2, EXP1_3=PE11, EXP1_5=PD9, EXP1_7=PE15, EXP1_9=<GND>,
EXP1_2=PE10, EXP1_4=PD10, EXP1_6=PD8, EXP1_8=PE7, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_3=PE9, EXP2_5=PE8, EXP2_7=PB11, EXP2_9=<GND>,
EXP2_2=PA5, EXP2_4=PA4, 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"

117
config/generic-remram.cfg Normal file
View File

@@ -0,0 +1,117 @@
# This file contains common pin mappings for remram boards. To use this
# config, the firmware should be compiled for the ST stm32f765.
# See docs/Config_Reference.md for a description of parameters.
[mcu]
serial: /dev/ttyACM0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[stepper_x]
step_pin: PA15
dir_pin: PC10
enable_pin: !PC12
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PB12 # X_MIN
position_endstop: 0
position_max: 200
homing_speed: 10
[tmc2130 stepper_x]
cs_pin: PB1
spi_bus: spi1
run_current: 0.600
stealthchop_threshold: 999999
diag1_pin: ^!PC11
[stepper_y]
step_pin: PB3
dir_pin: !PD6
enable_pin: !PD4
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PB14 # Y_MIN
position_endstop: 0
position_max: 200
homing_speed: 10
[tmc2130 stepper_y]
cs_pin: PB0
spi_bus: spi1
run_current: 0.600
stealthchop_threshold: 999999
diag1_pin: ^!PD5
[stepper_z]
step_pin: PB10
dir_pin: PE13
enable_pin: !PE15
microsteps: 16
rotation_distance: 8
endstop_pin: ^!PD8 # Z_MIN
position_endstop: 0.5
position_max: 200
homing_speed: 10
[tmc2130 stepper_z]
cs_pin: PC5
spi_bus: spi1
run_current: 0.600
stealthchop_threshold: 999999
diag1_pin: ^!PE14
[extruder]
step_pin: PB11
dir_pin: PE10
enable_pin: !PE11
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA3 # HEATER
sensor_type: Generic 3950
sensor_pin: PC1 # TEMP2
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
[tmc2130 extruder]
cs_pin: PC4
spi_bus: spi1
run_current: 0.600
stealthchop_threshold: 999999
diag1_pin: ^!PE12
[heater_fan hotend_fan]
pin: PA2 # FAN2
[heater_bed]
heater_pin: PA1 # BED OUT
sensor_type: Generic 3950
sensor_pin: PC0 # TEMP1
control: watermark
min_temp: 0
max_temp: 130
[fan] # Print cooling fan.
pin: PA0 # FAN1
# [temperature_sensor temp3]
# sensor_type: Generic 3950
# sensor_pin: PC2 # TEMP3
# min_temp: 0
# max_temp: 300
# gcode_id: temp3
[static_digital_output yellow_led]
pins: !PD0 # STATUS LED

View File

@@ -1,4 +1,4 @@
# This file contains common pin mappings for the TH3D EZBoard Lite v2.
# This file contains common pin mappings for the TH3D EZBoard v2.
# To use this config, check "Enable extra low-level configuration options"
# and compile the firmware for the STM32F405 with 12mhz Crystal,
# 48KiB Bootloader, and USB communication.

View File

@@ -0,0 +1,133 @@
# This file contains a configuration for the Anycubic Kobra Go printer.
#
# See docs/Config_Reference.md for a description of parameters.
#
# To build the firmware, use the following configuration:
# - Micro-controller: Huada Semiconductor HC32F460
# - Communication interface: Serial (PA3 & PA2) - Anycubic
#
# Installation:
# 1. Rename the klipper bin to `firmware.bin` and copy it to an SD Card.
# 2. Power off the Printer, insert the SD Card and power it on.
# 3. The the LCD will be stuck on the Firmware-update screen.
# Just Wait for 3-5 minutes to ensure the firmware is flashed.
# 4. After waiting, shutdown the printer and remove the SD Card.
[stepper_x]
step_pin: PA12
dir_pin: PA11
enable_pin: !PA15
microsteps: 16
rotation_distance: 40
endstop_pin: !PH2
position_endstop: -13
position_min:-13
position_max: 236
homing_speed: 50
[stepper_y]
step_pin: PA9
dir_pin: PA8
enable_pin: !PA15
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PC13
position_endstop: -9
position_min:-9
position_max: 230
homing_speed: 50
[stepper_z]
step_pin: PC7
dir_pin: !PC6
enable_pin: !PA15
microsteps: 16
rotation_distance: 8
endstop_pin: ^PC14
position_endstop: 0
position_min: -10
position_max: 255
homing_speed: 5
[extruder]
step_pin: PB15
dir_pin: PB14
enable_pin: !PA15
microsteps: 16
rotation_distance: 31.07
max_extrude_only_velocity: 25
max_extrude_only_accel: 1000
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB8
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC3
min_extrude_temp: 170
min_temp: 0
max_temp: 250
control: pid
pid_kp: 19.56
pid_ki: 1.62
pid_kd: 200.00
[heater_bed]
heater_pin: PB9
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
min_temp: 0
max_temp: 120
control: pid
pid_kp: 97.1
pid_ki: 1.41
pid_kd: 1675.16
[bed_mesh]
speed: 200
horizontal_move_z: 2.5
mesh_min: 5, 5
mesh_max: 215, 215
probe_count: 5, 5
[probe]
pin: PA1
x_offset: -20.8
y_offset: 0
z_offset: 0
samples: 3
samples_result: average
samples_tolerance_retries: 3
sample_retract_dist: 0.5
speed: 2
lift_speed: 4
[safe_z_home]
home_xy_position: 0, 0
speed: 5
z_hop: 10
z_hop_speed: 15
[controller_fan controller_fan]
pin: PB12
[heater_fan extruder_fan]
pin: PB13
[fan]
pin: PB5
cycle_time: 0.00005 #20kHz
[output_pin enable_pin]
pin: PB6
static_value: 1
#This pin enables the bed, hotend, extruder fan, part fan.
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 500
max_z_velocity: 4
max_z_accel: 100

View File

@@ -0,0 +1,197 @@
# This file contains a configuration for the Anycubic Kobra Plus printer.
#
# The Kobra Plus mainboard must be modified to correct conflicting UART
# addresses. As delivered, the X stepper and E0 stepper use UART address 0.
# To correct, move resistor R65 to R66. This moves the X stepper to address 3.
#
# After making this modification, any future firmwares will need to use the new
# address for the X stepper. To revert to the stock firmware, either undo the
# modification, or recompile the stock firmware using the correct addresses for
# X_SLAVE_ADDRESS and E0_SLAVE_ADDRESS.
#
# See docs/Config_Reference.md for a description of parameters.
#
# To build the firmware, use the following configuration:
# - Micro-controller: Huada Semiconductor HC32F460
# - Communication interface: Serial (PA3 & PA2) - Anycube
#
# Installation:
# 1. Rename the klipper bin to `firmware.bin` and copy it to an SD Card.
# 2. Power off the Printer, insert the SD Card and power it on.
# 3. The printer should beep several times and the LCD will be stuck on the
# Splash screen.
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 1800
max_z_velocity: 40
max_z_accel: 100
[stepper_x]
step_pin: PA5
dir_pin: PA4
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: !PA6
position_min: -4
position_endstop: -4
position_max: 304
homing_speed: 100
[tmc2209 stepper_x]
uart_pin: PA15
tx_pin: PA9
sense_resistor: 0.100
run_current: 0.9
uart_address: 3
stealthchop_threshold: 999999
[stepper_y]
step_pin: PC4
dir_pin: PA7
enable_pin: !PC3
microsteps: 16
rotation_distance: 32
endstop_pin: !PC5
position_min: -6
position_endstop: -6
position_max: 300
homing_speed: 100
[tmc2209 stepper_y]
uart_pin: PA15
tx_pin: PA9
sense_resistor: 0.100
run_current: 0.9
uart_address: 1
stealthchop_threshold: 999999
[stepper_z]
step_pin: PC7
dir_pin: !PC6
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
endstop_pin: PA8
position_endstop: 0
position_min: -15
position_max: 350
homing_speed: 10
[tmc2209 stepper_z]
uart_pin: PA15
tx_pin: PA9
sense_resistor: 0.100
run_current: 0.9
uart_address: 2
stealthchop_threshold: 999999
[stepper_z1]
step_pin: PB1
dir_pin: !PB0
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
[extruder]
max_extrude_only_distance: 200
max_extrude_only_velocity: 60
max_extrude_only_accel: 3000
step_pin: PC14
dir_pin: !PC15
enable_pin: !PC3
microsteps: 16
rotation_distance: 7.71
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
min_extrude_temp: 170
control: pid
pid_kp: 22.20
pid_ki: 1.08
pid_kd: 119.0
min_temp: 0
max_temp: 275
[tmc2208 extruder]
uart_pin: PA15
tx_pin: PA9
sense_resistor: 0.100
run_current: 0.8
uart_address: 0
stealthchop_threshold: 999999
[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
pid_kp: 97.1
pid_ki: 1.41
pid_kd: 1675.16
min_temp: 0
max_temp: 120
[filament_switch_sensor runout]
pause_on_runout: True
switch_pin: !PC13
[heater_fan controller_fan]
pin: PA14
heater: heater_bed
heater_temp: 45.0
[heater_fan hotend_fan]
pin: PA13
[fan]
pin: PB9
[probe]
pin: !PB6
speed: 2.0
lift_speed: 4.0
samples: 2
sample_retract_dist: 5
samples_tolerance_retries: 3
z_offset: 0.2
activate_gcode: probe_reset
[output_pin probe_reset_pin]
pin: PB7
value: 1
[safe_z_home]
home_xy_position: 0, 0
speed: 100
z_hop: 10
z_hop_speed: 15
move_to_previous: False
[bed_mesh]
speed: 100
mesh_min: 10, 10
mesh_max: 290, 290
algorithm: bicubic
probe_count: 5, 5
[gcode_macro probe_reset]
gcode:
SET_PIN PIN=probe_reset_pin VALUE=0
G4 P300
SET_PIN PIN=probe_reset_pin VALUE=1
G4 P100
[output_pin LED]
pin: PB8
[output_pin beeper]
pin: PB5

View File

@@ -102,6 +102,10 @@ max_temp: 110
[fan]
pin: PA0
[controller_fan controller_fan]
pin: PA14
stepper: stepper_x,stepper_y,stepper_z,stepper_z1
[probe]
pin: !PB12
z_offset: 0

View File

@@ -132,9 +132,9 @@ screw1_name: front left
screw2: 223,63
screw2_name: front right
screw3: 223,263
screw3_name: back left
screw3_name: back right
screw4: 23,263
screw4_name: back right
screw4_name: back left
speed: 100.0
screw_thread: CW-M5

View File

@@ -6,7 +6,8 @@
# communication. Enable PA0 GPIO pin on startup.
#
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# card and turning the printer on by pressing and holding the power
# button with the card inserted for 10-20 seconds. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
#

View File

@@ -0,0 +1,154 @@
# This file contains pin mappings for the Creality CR-10S Pro V2. To use
# this config, the firmware should be compiled for the AVR atmega2560.
# See docs/Config_Reference.md for a description of parameters.
## General Config
[mcu]
serial: /dev/serial/by-id/<YOUR_USB_ID>
[printer]
kinematics: cartesian
max_velocity: 200
max_accel: 1500
max_z_velocity: 10
max_z_accel: 100
## Stepper Motors and Extruder
[stepper_x]
step_pin: PF0 #ar54
dir_pin: PF1 #ar55
enable_pin: !PD7 #!ar38
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: ^PE5 #^ar3
position_endstop: 0
position_min: 0
position_max: 300
homing_speed: 50
homing_retract_dist: 5
[stepper_y]
step_pin: PF6 #ar60
dir_pin: !PF7 #ar61
enable_pin: !PF2 #!ar56
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: ^PJ1 #^ar14
position_endstop: 0
position_min: 0
position_max: 310
homing_speed: 50
homing_retract_dist: 5
[stepper_z]
step_pin: PL3 #ar46
dir_pin: !PL1 #!ar48
enable_pin: !PK0 #!ar62
rotation_distance: 8
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: probe:z_virtual_endstop
position_min: -3
position_max: 363 # you can go higher but then the cables crimp
[extruder]
step_pin: PA4 # ar26
dir_pin: PA6 # !ar28
enable_pin: !PA2 # !ar24
rotation_distance: 22.900
microsteps: 16
full_steps_per_rotation: 200
nozzle_diameter: 0.400
filament_diameter: 1.750
max_extrude_only_distance: 500.0
max_extrude_only_velocity: 70.0
max_extrude_only_accel: 1000.0
heater_pin: PB4 #ar10
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK5 #analog13
control: pid #calibrated in Klipper, you will need to run this for your machine
pid_kp: 28.359
pid_ki: 1.616
pid_kd: 124.426
min_extrude_temp: 170
min_temp: 5
max_temp: 275
[fan]
pin: PH6 #ar9
[heater_bed]
heater_pin: PH5 #ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK6 #analog14
control: pid #calibrated in Klipper, you will need to run this for your machine
pid_kp: 70.936
pid_ki: 1.151
pid_kd: 1093.298
min_temp: 5
max_temp: 140
## BLTouch and Safe Z Settings
[bltouch]
sensor_pin: ^PD2
control_pin: PB5
stow_on_each_sample: False # Be careful
probe_with_touch_mode: True
x_offset: -27
y_offset: -2
z_offset: 2 # you will need to calibrate this in Klipper
speed: 4.0
samples: 2
sample_retract_dist: 3.0
[safe_z_home]
home_xy_position: 177,155
speed: 80.0
z_hop: 10.0
z_hop_speed: 5.0
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 5, 5
mesh_max: 268, 305
probe_count: 5,5
fade_start: 1
fade_end: 10
[filament_switch_sensor e0_sensor]
switch_pin: PE4 #ar2
pause_on_runout: False
runout_gcode:
PAUSE_PARK
## Calibrating the Bed
# this is for the bltouch to calibrate the bed
[screws_tilt_adjust]
screw1: 40,40
screw1_name: front left screw
screw2: 295,40
screw2_name: front right screw
screw3: 295,280
screw3_name: rear right screw
screw4: 40,280
screw4_name: rear left screw
speed: 50
horizontal_move_z: 10
screw_thread: CW-M3
[bed_screws]
screw1: 13,38
screw1_name: front left screw
screw2: 268,38
screw2_name: front right screw
screw3: 268,278
screw3_name: rear right screw
screw4: 13,38
screw4_name: rear left screw
horizontal_move_z: 5
[pause_resume]

View File

@@ -0,0 +1,152 @@
# This file contains common pin mappings for the Creality CR5 Pro HT.
# The mainboard is a Creality 3D v2.5.1 (8-bit mainboard with
# ATMega2560). To use this config, the firmware should be compiled for
# the AVR atmega2560.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PF0 #ar54
dir_pin: !PF1 #ar55
enable_pin: !PD7 #!ar38
microsteps: 16
rotation_distance: 40 # 16 microsteps * 200 steps/rotation / 80 steps/mm
endstop_pin: ^!PE5 #^ar3
position_min: 0
position_max: 300
position_endstop: 0
homing_speed: 50
[stepper_y]
step_pin: PF6 #ar60
dir_pin: !PF7 #ar61
enable_pin: !PF2 #!ar56
microsteps: 16
rotation_distance: 40 # 16 microsteps * 200 steps/rotation / 80 steps/mm
endstop_pin: ^!PJ1 #^ar14
position_endstop: 0
position_max: 220
homing_speed: 50
[stepper_z]
step_pin: PL3 #ar46
dir_pin: !PL1 #!ar48
enable_pin: !PK0 #!ar62
microsteps: 16
rotation_distance: 4 # 16 microsteps * 200 steps/rotation / 800 steps/mm
position_max: 380
position_min: -10
endstop_pin: probe:z_virtual_endstop
[safe_z_home]
home_xy_position: 140, 110
speed: 80
z_hop: 10
z_hop_speed: 10
[extruder]
step_pin: PA4 # ar26
dir_pin: !PA6 # !ar28
enable_pin: !PA2 # !ar24
microsteps: 16
rotation_distance: 23.24736 # 16 microsteps * 200 steps/rotation / 137.65 steps/mm
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB4 #ar10
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK5 #analog13
control: pid
pid_kp: 17.647
pid_ki: 1.079
pid_kd: 72.131
min_temp: 0
max_temp: 300
[heater_bed]
heater_pin: PH5 #ar8
sensor_type: ATC Semitec 104GT-2
sensor_pin: PK6 #analog14
control: pid
pid_kp: 75.501
pid_ki: 2.542
pid_kd: 560.598
min_temp: 0
max_temp: 130
[fan]
pin: PH6 #ar9
[mcu]
serial: /dev/ttyUSB0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 2000
max_z_velocity: 5
max_z_accel: 100
#[display]
# DWIN screen currently unsupported
[bltouch]
sensor_pin: ^PD2 #^ar19
control_pin: PB5 #ar11
set_output_mode: 5V
pin_move_time: 0.4
x_offset: 37.0
y_offset: 0.0
z_offset: 2.40
samples: 2
sample_retract_dist: 2
samples_result: average
[bed_mesh]
speed: 50
horizontal_move_z: 6
mesh_min: 47,10
mesh_max: 270,210
probe_count: 7,7
algorithm: bicubic
[pause_resume]
recover_velocity: 50
[filament_switch_sensor fil_runout_sensor]
pause_on_runout: True
switch_pin: !PE4 #ar2
[bed_screws]
screw1: 8,5
screw1_name: front left screw
screw2: 8,210
screw2_name: rear left screw
screw3: 218,210
screw3_name: rear right screw
screw4: 218,5
screw4_name: front right screw
[screws_tilt_adjust]
screw1: 8,5
screw1_name: front left screw
screw2: 8,210
screw2_name: rear left screw
screw3: 218,210
screw3_name: rear right screw
screw4: 218,5
screw4_name: front right screw
speed: 50
horizontal_move_z: 10
screw_thread: CW-M4
[output_pin case_light]
pin: PH4 #ar7
value: 1
[gcode_macro CASE_LIGHT_ON]
gcode:
SET_PIN PIN=case_light VALUE=1
[gcode_macro CASE_LIGHT_OFF]
gcode:
SET_PIN PIN=case_light VALUE=0

View File

@@ -5,7 +5,7 @@
# 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
# serial (on USART2 PA3/PA2), 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

View File

@@ -0,0 +1,95 @@
# This file contains pin mappings for the Creality Ender2 Pro
# with the HC32F460. The board is CR-FDM-v2.5.S4.170
# To use this config, during "make menuconfig" select HC32F460
# Flash this firmware by copying "out/klipper.bin" to a SD card
# as /user/firmware.bin
# Turn on the printer with the card inserted.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PC1
dir_pin: PC0
enable_pin: !PC2
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_min: -20
position_endstop: -20
position_max: 165
homing_speed: 50
[stepper_y]
step_pin: PB9
dir_pin: PB8
enable_pin: !PH2
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_min: -5
position_endstop: -5
position_max: 165
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PB7
microsteps: 16
rotation_distance: 8
endstop_pin: ^PB0
position_endstop: 0.0
position_max: 180
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB3
dir_pin: PA15
enable_pin: !PB4
microsteps: 16
rotation_distance: 27.53480577
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_pin: PC5
sensor_type: Generic 3950
control: pid
pid_Kp: 29.634
pid_Ki: 2.102
pid_Kd: 104.459
min_temp: 0
max_temp: 260
[heater_bed]
heater_pin: PB10
sensor_type: Generic 3950
sensor_pin: PC4
control: pid
pid_Kp: 72.921
pid_Ki: 1.594
pid_Kd: 834.031
min_temp: 0
max_temp: 80
[fan]
pin: PA0
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
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: PB15
sclk_pin: PB14
sid_pin: PB12
encoder_pins: ^PB13,^PA2
click_pin: ^!PC7

View File

@@ -110,8 +110,8 @@ stow_on_each_sample: false
[bed_mesh]
speed: 120
mesh_min: 20, 20
mesh_max: 200, 197
mesh_min: 10, 10
mesh_max: 200, 194
probe_count: 4,4
algorithm: bicubic
@@ -120,7 +120,6 @@ home_xy_position: 147, 154
speed: 75
z_hop: 10
z_hop_speed: 5
move_to_previous: true
[filament_switch_sensor e0_sensor]
switch_pin: !PC15
@@ -129,3 +128,9 @@ runout_gcode: PAUSE
[pause_resume]
recover_velocity: 25
[bed_screws]
screw1: 20, 29
screw2: 195, 29
screw3: 195, 198
screw4: 20, 198

View File

@@ -120,7 +120,6 @@ home_xy_position: 187, 192
speed: 75
z_hop: 10
z_hop_speed: 5
move_to_previous: true
[filament_switch_sensor e0_sensor]
switch_pin: !PC15

View File

@@ -0,0 +1,155 @@
# This file contains pin mappings for the stock 2022 Creality Ender 3
# V2 Neo. To use this config, during "make menuconfig" select the
# 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
# 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.
# This also works for the GD32F303 based Creality 4.2.2 board.
# 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: 235
homing_speed: 80
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_endstop: 0
position_max: 235
homing_speed: 80
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_max: 250
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 34.406
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
# tuned for stock hardware with 70 degree Celsius target
pid_kp: 70.405
pid_ki: 1.229
pid_kd: 1008.553
min_temp: 0
max_temp: 130
[fan]
pin: PA0
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 5000
max_z_velocity: 5
square_corner_velocity: 5.0
max_z_accel: 100
[bltouch]
sensor_pin: ^PB1
control_pin: PB0
x_offset: -45.0
y_offset: -10.0
z_offset: 0
speed: 20
samples: 1
sample_retract_dist: 8.0
[safe_z_home]
home_xy_position: 160,120
speed: 150
z_hop: 10
z_hop_speed: 10
[bed_mesh]
speed: 120
mesh_min: 30,30 # Need to handle head distance with cr-touch (bl_touch)
mesh_max: 189,189 # Max probe range
probe_count: 5,5
fade_start: 1
fade_end: 10
fade_target: 0
algorithm: bicubic
[bed_screws]
screw1:30,25
screw1_name:1
screw2:200,25
screw2_name:2
screw3:200,195
screw3_name:3
screw4:30,195
screw4_name:4
[screws_tilt_adjust]
screw1: 67, 42
screw1_name: front left screw
screw2: 237.60, 42
screw2_name: front right screw
screw3: 237.60, 212
screw3_name: rear right screw
screw4: 67.60, 212
screw4_name: rear left screw
horizontal_move_z: 10
speed: 200
screw_thread: CW-M4 # Use CW for Clockwise and CCW for Counter Clockwise
# [display]
# The Ender 3 v2 Neo's 4.3" LCD display is not supported by klipper
[output_pin beeper]
pin: PB13

View File

@@ -1,10 +1,12 @@
# This file contains common pin mappings for the 2019 Creality
# Ender 5. To use this config, the firmware should be compiled for the
# AVR atmega1284p.
# AVR atmega1284p. This also works for the v1.1.5 silent boards.
# Note, a number of Melzi boards are shipped with a bootloader that
# requires the following command to flash the board:
# avrdude -p atmega1284p -c arduino -b 57600 -P /dev/ttyUSB0 -U out/klipper.elf.hex
# For v1.1.5 silent boards, the following command is used:
# avrdude -p atmega1284p -c arduino -P /dev/ttyUSB0 -b 115200 -U flash:w:out/klipper.elf.hex
# If the above command does not work and "make flash" does not work
# then one may need to flash a bootloader to the board - see the
# Klipper docs/Bootloaders.md file for more information.
@@ -80,6 +82,8 @@ pin: PB4
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
# Silent boards tend to have the exact same serial ID, except without USB2.0, using USB instead.
# e.g. /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
[printer]
kinematics: cartesian

View File

@@ -0,0 +1,126 @@
# This file contains pin mappings for the stock Elegoo Neptune 3 Pro (ZNP Robin Nano_DW V2.2)
# To use this config, during "make menuconfig" select the STM32F401 with a
# "32KiB bootloader" and serial (on USART1 PA10/PA9) communication.
# Note that the "make flash" command does not work with ZNP Robin boards.
# After running "make", rename the out/klipper.bin file to out/ZNP_ROBIN_NANO.bin
# Copy the file out/ZNP_ROBIN_NANO.bin to an SD card formatted to FAT32
# and then restart the printer with the SD card inserted.
# See docs/Config_Reference.md for a description of parameters.
# Core
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
# Steppers
[stepper_x]
step_pin: PC12
dir_pin: PB3
enable_pin: !PD2
microsteps: 16
rotation_distance: 40
endstop_pin: PA13
position_min: -5
position_endstop: -5
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PC11
dir_pin: PA15
enable_pin: !PC10
microsteps: 16
rotation_distance: 40
endstop_pin: PB8
position_endstop: 0
position_max: 234
homing_speed: 50
[stepper_z]
step_pin: PC7
dir_pin: !PC9
enable_pin: !PC8
microsteps: 16
rotation_distance: 8
position_min: -0.8
endstop_pin: probe:z_virtual_endstop
position_max: 283
homing_speed: 10
[probe]
pin: PA8
# NOTE: Set this to a value based on your printer and bed.
z_offset: 0
x_offset: -28.5
y_offset: 22
[extruder]
step_pin: PB10
dir_pin: PB1
enable_pin: !PC6
microsteps: 16
rotation_distance: 8.42
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA6
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
control: pid
# NOTE: These settings are for PETG, thus 240C at 30% fan.
pid_Kp: 26.27
pid_Ki: 1.607
pid_Kd: 107.380
min_temp: 0
max_temp: 260
max_extrude_only_distance: 100
[heater_bed]
heater_pin: PA5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
# NOTE: These settings are for PETG, thus 80C bed temperature.
pid_Kp: 70.173
pid_Ki: 1.418
pid_Kd: 868.388
min_temp: 0
max_temp: 100
# Coooling
[fan]
pin: PA7
[heater_fan hotend_fan]
pin: PB0
# Rest
# This is put on the FAN3 pin.
[led top_LEDs]
white_pin: PB9
cycle_time: 0.005
[filament_switch_sensor filament_runout_sensor]
switch_pin: PB4
[safe_z_home]
home_xy_position: 143.5, 93
[bed_mesh]
mesh_min: 10, 25
mesh_max: 205, 220
probe_count: 6, 6
algorithm: bicubic
speed: 100

View File

@@ -0,0 +1,108 @@
# This file contains common pin mappings for the Kingroon KP3S printer,
# which uses a modified MKS Robin 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. Also, select "Enable extra low-level
# configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PC6,!PD13" to disable the LCD as it is not
# compatible with klipper
# 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.
[stepper_x]
step_pin: PE3
dir_pin: !PE2
enable_pin: !PE4
microsteps: 32
rotation_distance: 40
endstop_pin: !PA15
position_endstop: 0
position_max: 180
homing_speed: 50
[stepper_y]
step_pin: PE0
dir_pin: !PB9
enable_pin: !PE1
microsteps: 32
rotation_distance: 40
endstop_pin: !PA12
position_endstop: 0
position_max: 180
homing_speed: 50
[stepper_z]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
microsteps: 32
rotation_distance: 8
endstop_pin: !PA11
position_endstop: 0.5
position_max: 180
[safe_z_home]
home_xy_position: 90,90
z_hop: 10
[thermistor Kingroon_B3950]
temperature1: 25.0
resistance1: 103180.0
temperature2: 150.0
resistance2: 1366.2
temperature3: 250.0
resistance3: 168.6
[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
microsteps: 32
gear_ratio: 3:1
rotation_distance: 23.244
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC3
sensor_type: Kingroon_B3950
sensor_pin: PC1
control: pid
pid_kp: 27.057
pid_ki: 1.171
pid_kd: 156.254
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PA0
sensor_type: Kingroon_B3950
sensor_pin: PC0
control: pid
pid_kp: 61.779
pid_ki: 1.572
pid_kd: 606.980
min_temp: 0
max_temp: 130
[fan]
pin: PB1
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 250
max_accel: 2000
max_z_velocity: 25
max_z_accel: 100
[static_digital_output display_reset]
pins: !PC6, !PD13

View File

@@ -0,0 +1,118 @@
# This file contains pin mappings for the stock 2022 LONGER3D LK4 X
# with the 32-bit LGT_KIT_V2_X board. To use this config, during
# "make menuconfig" select the STM32F103 with a "32KiB bootloader" and
# serial (on USART1 PA10/PA9) communication.
# Flash this firmware by copying "out/klipper.bin" to a SD card,
# then rename it to "firmware.bin"and turning on the printer with
# the card inserted.
# See docs/Config_Reference.md for a description of parameters.
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 4000
max_z_velocity: 5
max_z_accel: 100
[stepper_x]
step_pin: PD3
dir_pin: PD2
enable_pin: !PD4
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PE6
position_endstop: 0
position_max: 265
homing_speed: 80
[stepper_y]
step_pin: PD6
dir_pin: PD5
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PE4
position_endstop: 0
position_max: 220
homing_speed: 80
[stepper_z]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PB5
microsteps: 16
rotation_distance: 8
# Without BLTouch
# endstop_pin: ^!PE2
# With BLTouch
endstop_pin: probe: z_virtual_endstop
# position_endstop: 0.0
position_min: -5
position_max: 250
[extruder]
max_extrude_only_distance: 200
step_pin: PB9
dir_pin: PB8
enable_pin: !PE0
microsteps: 16
rotation_distance: 4.4504
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA7
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_Kp: 25.011
pid_Ki: 1.463
pid_Kd: 106.922
min_temp: 0
max_temp: 260
[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
# tuned for stock hardware with 60 degree Celsius target
pid_Kp: 69.370
pid_Ki: 1.526
pid_Kd: 788.215
min_temp: 0
max_temp: 110
[fan]
pin: PA1
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[bed_screws]
screw1: 30,30
screw2: 190,30
screw3: 190,190
screw4: 30,190
# Pin mappings for BL_T port
[bltouch]
sensor_pin: ^PE1
control_pin: PA8
x_offset: -51
y_offset: -8
z_offset: 0 # You need to adjust this for your printer
[bed_mesh]
speed: 120
mesh_min: 10, 10
mesh_max: 210, 210
probe_count: 4, 4
[safe_z_home]
home_xy_position: 161, 118
speed: 80
z_hop: 10 # Move up 10mm
z_hop_speed: 5

View File

@@ -0,0 +1,157 @@
#This file contains pin mappings for the stock Lulzbot Mini 2 which uses
#EinsyRetro mainboard and SingleExtruder(0.5mm) hotend.
#To use this config, the firmware should be compiled for the AVR atmega2560.
# Pin numbers checked against Lulzbot fork of Marlin pins_EINSYRETRO.h
# https://gitlab.com/lulzbot3d/marlin/-/blob/master/Marlin/src/pins/rambo/
#pins_EINSY_RETRO.h
# validated against https://github.com/ultimachine/EinsyRetro/blob/1.0b/board/
#Project%20Outputs%20for%20EinsyRetro/Schematic%20Prints_EinsyRetro_1.0b.PDF
# See docs/Config_Reference.md for a description of parameters.
[mcu]
serial: /dev/ttyACM0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 2000
max_z_velocity: 40
max_z_accel: 100
[stepper_x]
step_pin: PC0
dir_pin: !PL0
enable_pin: !PA7
rotation_distance: 32
microsteps: 16
endstop_pin: tmc2130_stepper_x:virtual_endstop
position_endstop: -7
position_min: -7
position_max: 168
homing_retract_dist: 0
homing_speed: 30
[stepper_y]
step_pin: PC1
dir_pin: !PL1
enable_pin: !PA6
rotation_distance: 32
microsteps: 16
endstop_pin: tmc2130_stepper_y:virtual_endstop
position_endstop: -5
position_min: -5
position_max: 192
homing_retract_dist: 0
homing_speed: 30
[stepper_z]
step_pin: PC2
dir_pin: !PL2
enable_pin: !PA5
rotation_distance: 32
microsteps: 16
endstop_pin: PH4
position_endstop: 183
position_max: 185
position_min: -2
[extruder]
step_pin: PC3
dir_pin: PL6
enable_pin: !PA4
microsteps: 16
rotation_distance: 7.465
nozzle_diameter: 0.5
filament_diameter: 2.85
heater_pin: PE5
sensor_type: ATC Semitec 104GT-2
sensor_pin: PF0
min_temp: 0
max_temp: 280
control: pid
pid_kp: 24.121
pid_ki: 1.079
pid_kd: 134.779
[heater_bed]
heater_pin: PG5
sensor_type: Honeywell 100K 135-104LAG-J01
sensor_pin: PF2
min_temp: 0
max_temp: 130
control: pid
pid_kp: 71.304
pid_ki: 1.662
pid_kd: 764.734
[fan]
pin: PH5
[heater_fan nozzle_cooling_fan]
pin: PH3
[probe]
pin: ^!PB4
z_offset: 1.377
#z offset will need to be adjusted if you use the magnetic bed upgrade as the
#washer thickness will apply a different offset between the nozzle and true
#bed level.
samples: 3
sample_retract_dist: 1.0
samples_tolerance: 0.200
[bed_tilt]
points: -5, 22
-5, 190
160, 190
160, 22
speed: 30
horizontal_move_z: 5
[tmc2130 stepper_x]
cs_pin: PG0
run_current: 0.975
diag0_pin: ^!PK2
driver_SGT: 4
sense_resistor: 0.120
[tmc2130 stepper_y]
cs_pin: PG2
run_current: 0.975
diag0_pin: ^!PK7
driver_SGT: 4
sense_resistor: 0.120
[tmc2130 stepper_z]
cs_pin: PK5
run_current: 0.960
diag0_pin: ^!PK6
stealthchop_threshold: 999999
sense_resistor: 0.120
[tmc2130 extruder]
cs_pin: PK4
run_current: 0.960
diag0_pin: ^!PK3
stealthchop_threshold: 999999
sense_resistor: 0.120
[static_digital_output sd_card]
pins: PB0
[safe_z_home]
home_xy_position: 75, 75
speed: 30.0
z_hop: 5
[display]
lcd_type: st7920
cs_pin: PD5
sclk_pin: PD2
sid_pin: PD3
menu_timeout: 5
encoder_pins: ^PJ1,^PJ2
encoder_steps_per_detent: 2
click_pin: ^!PH6

View File

@@ -0,0 +1,180 @@
# This file contains pin mappings for a full Ratrig V-Minion kit
# with an Octopus Pro v1.1 board.
#
# This will not work with RatOS
#
# To use this config, during "make menuconfig" select the STM32F446
# with a "32KiB bootloader", USB (on PA11/PA12) communication, and
# a "12MHZ Crystal"
#
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# filename must be named "firmware.bin"
#
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PF13
dir_pin: !PF12
enable_pin: !PF14
endstop_pin: ^PG6
rotation_distance: 40
microsteps: 64
position_max: 180
position_min: 0
homing_speed: 60
position_endstop: 0
[tmc2209 stepper_x]
uart_pin: PC4
run_current: 0.8
interpolate: false
stealthchop_threshold: 0
[stepper_y]
step_pin: PG0
dir_pin: PG1
enable_pin: !PF15
endstop_pin: ^PG9
rotation_distance: 40
microsteps: 64
position_max: 180
position_min: 0
homing_speed: 60
position_endstop: 0
[tmc2209 stepper_y]
uart_pin: PD11
run_current: 0.8
interpolate: false
stealthchop_threshold: 0
[stepper_z]
step_pin: PC13
dir_pin: !PF0
enable_pin: !PF1
endstop_pin: probe:z_virtual_endstop
rotation_distance: 4
position_min: -5
microsteps: 64
position_max: 180
[tmc2209 stepper_z]
uart_pin: PE4
run_current: 0.8
interpolate: false
stealthchop_threshold: 0
[extruder]
rotation_distance: 5.57
full_steps_per_rotation: 200
filament_diameter: 1.750
step_pin: PF11
dir_pin: !PG3
enable_pin: !PG5
microsteps: 64
nozzle_diameter: 0.4
heater_pin: PA2
sensor_type: Generic 3950
sensor_pin: PF4
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 290
[tmc2209 extruder]
uart_pin: PC6
run_current: 0.70
stealthchop_threshold: 0
interpolate: False
[probe]
pin: ^PB7
x_offset: -24.0
y_offset: -13.0
z_offset: 0.0
speed: 5
samples: 2
sample_retract_dist: 2
lift_speed: 5.0
samples_result: median
samples_tolerance: 0.02
samples_tolerance_retries: 5
[bed_mesh]
speed: 300
horizontal_move_z: 5
mesh_min: 15,15
mesh_max: 150,160
probe_count: 5,5
fade_start: 1.0
fade_end: 10.0
mesh_pps: 2,2
algorithm: bicubic
bicubic_tension: .2
[screws_tilt_adjust]
screw1: 80, 108
screw1_name: Left Screw
screw2: 155, 72
screw2_name: Front Right Screw
screw3: 155, 147
screw3_name: Rear Right Screw
horizontal_move_z: 10
speed: 300
screw_thread: CCW-M4
[safe_z_home]
home_xy_position: 90,90
z_hop: 5
speed: 300
[heater_bed]
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PF3
control: pid
pid_kp: 54.027
pid_ki: 0.770
pid_kd: 948.182
min_temp: 0
max_temp: 120
[fan]
pin: PA8
shutdown_speed: 0.0
[heater_fan hotend_cooling_fan]
pin: PE5
fan_speed: 1.0
heater: extruder
heater_temp: 50.0
[controller_fan controller_fan]
pin: PD12
fan_speed: 1.0
stepper: stepper_x, stepper_y, stepper_z
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 20000
max_z_velocity: 15
max_z_accel: 2000
[mcu]
serial: INSERTSERIALIDHERE
[board_pins octopus_11_tmc2209]
aliases:
## Expansion ports
# 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=PB1, EXP2_5=PB2, EXP2_7=PC15, EXP2_9=<GND>,
EXP2_2=PA5, EXP2_4=PA4, EXP2_6=PA7, EXP2_8=<RST>, EXP2_10=PC5,
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi2"

View File

@@ -0,0 +1,144 @@
# This file contains pin mappings for the stock 2022 Sovol SV05
# with the 32-bit Creality 4.2.2 board.
#
# 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
# filename must end in ".bin" and must not match the last filename
# that was flashed. Might need a renaming if printer dosnt flash.
# 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: cartesian
max_velocity: 300
max_accel: 1000
max_accel_to_decel: 1000
max_z_velocity: 5
max_z_accel: 100
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: 220
position_max: 220
homing_speed: 50
position_min: -4
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_endstop: 220
position_max: 220
position_min: -4
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_max: 300
position_min: -3
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
min_temp: 0
max_temp: 130
control: pid
pid_kp: 64.742
pid_ki: 0.827
pid_kd: 1267.326
[fan]
pin: PA0
[safe_z_home]
home_xy_position: 70, 103
speed: 100
z_hop: 10
z_hop_speed: 20
[extruder]
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 7.394
nozzle_diameter: 0.400
filament_diameter: 1.750
max_extrude_only_distance: 100.0
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
min_temp: 0
max_temp: 280
control: pid
pid_kp: 28.850
pid_ki: 1.658
pid_kd: 125.496
[bltouch]
sensor_pin: ^PB1
control_pin: PB0
z_offset: 0
x_offset: 40
y_offset: 7
samples: 2
samples_tolerance: 0.015
samples_tolerance_retries: 5
[bed_mesh]
speed: 100
horizontal_move_z: 5
mesh_min: 40, 7
mesh_max: 220, 220
probe_count: 5, 5
algorithm: bicubic
fade_start: 1
fade_end: 10
[bed_screws]
screw1: 25,28
screw2: 195,28
screw3: 195,197
screw4: 25,197
[screws_tilt_adjust]
screw1: -4,21
screw1_name: front left screw
screw2: 155,21
screw2_name: front right screw
screw3: 155,190
screw3_name: rear right screw
screw4: -4,190
screw4_name: rear left screw
horizontal_move_z: 10
speed: 50
screw_thread: CW-M4
[display]
lcd_type: st7920
cs_pin: PB12
sclk_pin: PB13
sid_pin: PB15
encoder_pins: ^PB14, ^PB10
click_pin: ^!PB2

View File

@@ -0,0 +1,159 @@
# This file contains pin mappings for the stock Sovol SV06
# To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9) communication.
# Also, since it is using the GD32F103, please select Disable SWD at startup
#
# 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.
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[stepper_x]
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 0
position_max: 225
homing_speed: 40
homing_retract_dist: 0
[tmc2209 stepper_x]
uart_pin: PC1
run_current: 0.860
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.150
uart_address: 3
driver_SGTHRS: 81
diag_pin: PA5
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: tmc2209_stepper_y:virtual_endstop
position_endstop: 0
position_max: 225
homing_speed: 40
homing_retract_dist: 0
[tmc2209 stepper_y]
uart_pin: PC0
run_current: 0.900
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.150
uart_address: 3
driver_SGTHRS: 82
diag_pin: PA6
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 4
endstop_pin: probe:z_virtual_endstop
position_min: -4
position_max: 261
homing_speed: 4
[tmc2209 stepper_z]
uart_pin: PA15
run_current: 1.000
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.150
uart_address: 3
diag_pin: PA7
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 4.56
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
pid_kd: 86.991
pid_kp: 21.479
pid_ki: 1.326
min_temp: 0
max_temp: 300
[tmc2209 extruder]
uart_pin: PC14
run_current: 0.550
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.150
uart_address: 3
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
pid_kp: 64.440
pid_ki: 0.773
pid_kd: 1343.571
min_temp: 0
max_temp: 130
[fan]
pin: PA0
[probe]
pin: PB1
x_offset: 28
y_offset: -20
z_offset: 0
samples: 2
samples_tolerance: 0.015
samples_tolerance_retries: 5
[safe_z_home]
home_xy_position: 85,135
z_hop: 10
z_hop_speed: 5
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 28, 20
mesh_max: 210, 205
probe_count: 10
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0
[display]
lcd_type: st7920
cs_pin: PB12
sclk_pin: PB13
sid_pin: PB15
encoder_pins: ^PB14, ^PB10
click_pin: ^!PB2

View File

@@ -0,0 +1,198 @@
# This file contains common pin mappings for the SUNLU Terminator T3 board
# To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader" and USB communication.
# Select "Disable SWD at startup (for GigaDevice stmf32f103 clones)"
# 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 SUNLU Terminator T3 board. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the board with that SD card.
# See docs/Config_Reference.md for a description of parameters.
# Rename the file to printer.cfg
##################################################################
# Printer
##################################################################
[mcu]
#obtain your MCU id using ls /dev/serial/by-path/*
serial: dev/serial/by-id/usb-Klipper_stm32f103xe_00000000000
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[static_digital_output usb_pullup_enable]
pins: !PA14
[bltouch]
sensor_pin: PC14
control_pin: PA1
x_offset: -28.45
y_offset: 4
z_offset: 1.915
pin_up_touch_mode_reports_triggered: FALSE #needed bc of the bltouch clone used by sunlu
[safe_z_home]
home_xy_position: 115,115
speed: 75
z_hop: 10
z_hop_speed: 5
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 10, 10
mesh_max: 190, 220
probe_count: 5,5
fade_start: 1
fade_end: 10
[bed_screws]
#for BED_SCREWS_ADJUST
screw1: 31,38 #X,Y Position
screw1_name: Front Left
screw2: 201,38 #X,Y Position
screw2_name: Front Right
screw3: 201,204 #X,Y Position
screw3_name: Rear Right
screw4: 31,204 #X,Y Position
screw4_name: Rear Left
##IMPORTANT. If using the filament sensor add CLEAR_PAUSE to your slicer's start gcode or to your print start macro.##
##The act of loading and unloading filament will trigger a paused state##
[filament_motion_sensor Filament_Sensor]
detection_length: 7.0
extruder: extruder
switch_pin: !PC15
pause_on_runout: FALSE
runout_gcode: PAUSE
#########################################################
# Motion Axis
#########################################################
[stepper_x]
step_pin: PB13
dir_pin: !PB12
enable_pin: !PB14
microsteps: 16
rotation_distance: 40
endstop_pin: !PC0
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PB10
dir_pin: !PB2
enable_pin: !PB11
microsteps: 16
rotation_distance: 40
endstop_pin: !PC1
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PB0
dir_pin: PC5
enable_pin: !PB1
microsteps: 16
rotation_distance: 4
position_max: 250
endstop_pin: probe:z_virtual_endstop
###################################################
# Heaters
###################################################
[extruder]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PD2
microsteps: 16
rotation_distance: 23.18840579710145
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp: 19.479
pid_Ki: 1.073
pid_Kd: 88.385
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PC9
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC3
control: pid
pid_Kp: 62.673
pid_Ki: 1.530
pid_Kd: 641.619
min_temp: 0
max_temp: 130
#########################################
# Fans
#########################################
[heater_fan Hotend]
pin: PC7
heater: extruder
heater_temp: 50.0
[fan]
pin: PC6
###############################################
# Stock Screen
###############################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
EXP1_2=PA15, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PB15, EXP1_10=<5V>
[display]
lcd_type: st7920
cs_pin: PB8 #EXP1_7
sclk_pin: PB9 #EXP1_6
sid_pin: PB15 #EXP1_8
encoder_pins: ^PA10, ^PA9 #^EXP1_5, ^EXP1_3
click_pin: ^!PA15 #^!EXP1_2
[output_pin beeper]
pin: PB5 #EXP1_1
pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.001
scale: 1
[gcode_macro M300]
gcode:
{% set S = params.S|default(1000)|int %} ; S sets the tone frequency
{% set P = params.P|default(100)|int %} ; P sets the tone duration
{% set L = 0.5 %} ; L varies the PWM on time, close to 0 or 1 the tone gets a bit quieter. 0.5 is a symmetric waveform
{% if S <= 0 %} ; dont divide through zero
{% set F = 1 %}
{% set L = 0 %}
{% elif S >= 10000 %} ;max frequency set to 10kHz
{% set F = 0 %}
{% else %}
{% set F = 1/S %} ;convert frequency to seconds
{% endif %}
SET_PIN PIN=beeper VALUE={L} CYCLE_TIME={F} ;Play tone
G4 P{P} ;tone duration
SET_PIN PIN=beeper VALUE=0

View File

@@ -78,7 +78,7 @@ pid_Kd: 698.838
min_temp: 0
max_temp: 70
[heater_fan my_nozzle_fan]
[heater_fan heatbreak_cooling_fan]
pin: PH4
[fan]

View File

@@ -0,0 +1,84 @@
# This file contains pin mappings for the Voxelab Aquila
# with the FFP0173 1.0.1 mainboard. To use this config, during
# "make menuconfig" select the STM32F103 for STM32/G32, or
# Nation N32G452 for N32 version, 28KB boot, serial PA9/PA10.
# 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: 235
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: 235
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
endstop_pin: ^PA7
position_endstop: 0.0
position_max: 250
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 34.406
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PA0
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100

View File

@@ -10,21 +10,21 @@ serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
#canbus_uuid: 0e0d81e4210c
[adxl345]
cs_pin: EBBCan: PB12
cs_pin: EBBCan:PB12
spi_bus: spi2
axes_map: x,y,z
[extruder]
step_pin: EBBCan: PA9
dir_pin: !EBBCan: PA8
enable_pin: !EBBCan: PA10
step_pin: EBBCan:PA9
dir_pin: !EBBCan:PA8
enable_pin: !EBBCan:PA10
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: EBBCan: PB1
heater_pin: EBBCan:PB1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: EBBCan: PA0
sensor_pin: EBBCan:PA0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
@@ -33,22 +33,22 @@ min_temp: 0
max_temp: 250
#sensor_type:MAX31865
#sensor_pin: EBBCan: PA15
#sensor_pin: EBBCan:PA15
#spi_bus: spi1a
#rtd_nominal_r: 100
#rtd_reference_r: 430
#rtd_num_of_wires: 2
[tmc2209 extruder]
uart_pin: EBBCan: PA13
uart_pin: EBBCan:PA13
run_current: 0.650
stealthchop_threshold: 999999
[fan]
pin: EBBCan: PA1
pin: EBBCan:PA1
[heater_fan hotend_fan]
pin: EBBCan: PA2
pin: EBBCan:PA2
heater: extruder
heater_temp: 50.0

View File

@@ -10,23 +10,23 @@ serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
#canbus_uuid: 0e0d81e4210c
[adxl345]
cs_pin: EBBCan: PB12
spi_software_sclk_pin: EBBCan: PB10
spi_software_mosi_pin: EBBCan: PB11
spi_software_miso_pin: EBBCan: PB2
cs_pin: EBBCan:PB12
spi_software_sclk_pin: EBBCan:PB10
spi_software_mosi_pin: EBBCan:PB11
spi_software_miso_pin: EBBCan:PB2
axes_map: x,y,z
[extruder]
step_pin: EBBCan: PD0
dir_pin: !EBBCan: PD1
enable_pin: !EBBCan: PD2
step_pin: EBBCan:PD0
dir_pin: !EBBCan:PD1
enable_pin: !EBBCan:PD2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: EBBCan: PA2
heater_pin: EBBCan:PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: EBBCan: PA3
sensor_pin: EBBCan:PA3
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
@@ -35,22 +35,22 @@ min_temp: 0
max_temp: 250
# sensor_type:MAX31865
# sensor_pin: EBBCan: PA4
# sensor_pin: EBBCan:PA4
# spi_bus: spi1
# rtd_nominal_r: 100
# rtd_reference_r: 430
# rtd_num_of_wires: 2
[tmc2209 extruder]
uart_pin: EBBCan: PA15
uart_pin: EBBCan:PA15
run_current: 0.650
stealthchop_threshold: 999999
[fan]
pin: EBBCan: PA0
pin: EBBCan:PA0
[heater_fan hotend_fan]
pin: EBBCan: PA1
pin: EBBCan:PA1
heater: extruder
heater_temp: 50.0

View File

@@ -0,0 +1,68 @@
# This file contains common pin mappings for the BIGTREETECH EBBCan
# Canbus board. To use this config, the firmware should be compiled for the
# STM32G0B1 with "8 MHz crystal" and "USB (on PA11/PA12)" or "CAN bus (on PB0/PB1)".
# The "EBB Can" micro-controller will be used to control the components on the nozzle.
# See docs/Config_Reference.md for a description of parameters.
[mcu EBBCan]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
#canbus_uuid: 0e0d81e4210c
[adxl345]
cs_pin: EBBCan:PB12
spi_software_sclk_pin: EBBCan:PB10
spi_software_mosi_pin: EBBCan:PB11
spi_software_miso_pin: EBBCan:PB2
axes_map: x,y,z
[extruder]
step_pin: EBBCan:PD0
dir_pin: !EBBCan:PD1
enable_pin: !EBBCan:PD2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: EBBCan:PB13
sensor_type: EPCOS 100K B57560G104F
sensor_pin: EBBCan:PA3
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
# sensor_type:MAX31865
# sensor_pin: EBBCan:PA4
# spi_bus: spi1
# rtd_nominal_r: 100
# rtd_reference_r: 430
# rtd_num_of_wires: 2
[tmc2209 extruder]
uart_pin: EBBCan:PA15
run_current: 0.650
stealthchop_threshold: 999999
[fan]
pin: EBBCan:PA0
[heater_fan hotend_fan]
pin: EBBCan:PA1
heater: extruder
heater_temp: 50.0
#[neopixel hotend_rgb]
#pin: EBBCan:PD3
#[bltouch]
#sensor_pin: ^EBBCan:PB8
#control_pin: EBBCan:PB9
#[filament_switch_sensor switch_sensor]
#switch_pin: EBBCan:PB4
#[filament_motion_sensor motion_sensor]
#switch_pin: ^EBBCan:PB3

View File

@@ -0,0 +1,84 @@
# This file contains common pin mappings for the BIGTREETECH EBBCan
# Canbus board. To use this config, the firmware should be compiled for the
# STM32G0B1 with "8 MHz crystal" and "USB (on PA11/PA12)" or "CAN bus (on PB0/PB1)".
# The "EBB Can" micro-controller will be used to control the components on the nozzle.
# See docs/Config_Reference.md for a description of parameters.
[mcu EBBCan]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
#canbus_uuid: 0e0d81e4210c
[temperature_sensor EBB_NTC]
sensor_type: Generic 3950
sensor_pin: EBBCan:PA2
[adxl345]
cs_pin: EBBCan:PB12
spi_software_sclk_pin: EBBCan:PB10
spi_software_mosi_pin: EBBCan:PB11
spi_software_miso_pin: EBBCan:PB2
axes_map: x,y,z
[extruder]
step_pin: EBBCan:PD0
dir_pin: !EBBCan:PD1
enable_pin: !EBBCan:PD2
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: EBBCan:PB13
sensor_type: EPCOS 100K B57560G104F
sensor_pin: EBBCan:PA3
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
# sensor_type:MAX31865
# sensor_pin: EBBCan:PA4
# spi_bus: spi1
# rtd_nominal_r: 100
# rtd_reference_r: 430
# rtd_num_of_wires: 2
[tmc2209 extruder]
uart_pin: EBBCan:PA15
run_current: 0.650
stealthchop_threshold: 999999
[fan]
pin: EBBCan:PA0
[heater_fan hotend_fan]
pin: EBBCan:PA1
heater: extruder
heater_temp: 50.0
#[heater_fan 4W_FAN0]
#pin: EBBCan:PB14
#tachometer_pin: EBBCan:PB15
#tachometer_ppr: 1
#[neopixel hotend_rgb]
#pin: EBBCan:PD3
#[bltouch]
#sensor_pin: ^EBBCan:PB8
#control_pin: EBBCan:PB9
## NPN and PNP proximity switch types can be set by jumper
#[probe]
#pin: ^EBBCan:PC13
#[output_pin PB5]
#pin: EBBCan:PB5
#[output_pin PB7]
#pin: EBBCan:PB7
#[output_pin PB6]
#pin: EBBCan:PB6

View File

@@ -10,21 +10,21 @@ serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
#canbus_uuid: 0e0d81e4210c
[adxl345]
cs_pin: HermitCrab: PB12
cs_pin: HermitCrab:PB12
spi_bus: spi2
axes_map: y,z,-x
[extruder]
step_pin: HermitCrab: PA6
dir_pin: !HermitCrab: PA7
enable_pin: !HermitCrab: PA5
step_pin: HermitCrab:PA6
dir_pin: !HermitCrab:PA7
enable_pin: !HermitCrab:PA5
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: HermitCrab: PA2
heater_pin: HermitCrab:PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: HermitCrab: PA1
sensor_pin: HermitCrab:PA1
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
@@ -33,15 +33,15 @@ min_temp: 0
max_temp: 250
[tmc2209 extruder]
uart_pin: HermitCrab: PB0
uart_pin: HermitCrab:PB0
run_current: 0.650
stealthchop_threshold: 999999
[fan]
pin: HermitCrab: PA4
pin: HermitCrab:PA4
[heater_fan hotend_fan]
pin: HermitCrab: PA3
pin: HermitCrab:PA3
heater: extruder
heater_temp: 50.0

View File

@@ -0,0 +1,81 @@
# This file contains common pin mappings for the Duet3 1LC. To use
# this config, the firmware should be compiled for the SAMC21G18 with:
# Bootloader offset of "No Bootloader"
# Clock Reference of "25 Mhz crystal" if the board version is v1.1 or later
# Clock Reference of "12 Mhz crystal" if the board version is v1.0 or earlier
# Communication interface of "CAN bus (on PA25/PA24)"
# To flash the board use a debugger, or use a raspberry pi and follow
# the instructions at docs/Bootloaders.md fot the SAMC21. You may
# supply power to the 1LC by connecting the 3.3v rail on the Pi to the
# 5v input of the SWD header on the 1LC.
# See docs/Config_Reference.md for a description of parameters.
# Pins for reference, v1.3 board:
# Driver Step Pin - PA27
# Driver Dir Pin - PA28
# Driver Enable - !PB2
# Thermistor Pins - TEMP0:PB9 TEMP1:PA2
# Pullup Resistor - 2200
# Vssa Sense:PA6 | Vref Sense:PA7
# Current Sense resistor for drivers - 0.091ohm
# CAN Pins - CAN0_TX:PA24 CAN0_RX:PA25
# Heaters - OUT_0:PA11
# Fan outputs - OUT_1:PA10 OUT_2:PB11
# Tach Pins for Fans - OUT_1_TACHO:PA13 OUT_2_TACHO:PB10
# GPIO_out - IO0:PA12
# GPIO_in - IO0:PA9 IO1:PA21 IO2:PA18
# Driver Diag - 0:PB3
[adc_scaled toolboard_vref_scaled]
vref_pin: toolboard:PA7
vssa_pin: toolboard:PA6
[extruder]
step_pin: toolboard:PA27
dir_pin: toolboard:PA28
enable_pin: !toolboard:PB2
rotation_distance: 23.1336867485061
gear_ratio: 50:10
microsteps: 64
full_steps_per_rotation: 200
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: toolboard:PA11
sensor_type: PT1000
sensor_pin: toolboard_vref_scaled:PB9
pullup_resistor: 2200
min_temp: 0
max_temp: 280
max_power: 1.0
control: pid
pwm_cycle_time: 0.01666
pid_Kp: 26.454
pid_Ki: 1.357
pid_Kd: 128.955
[tmc2209 extruder]
uart_pin: toolboard:PA20
tx_pin: toolboard:PA22
interpolate: False
run_current: 0.35
sense_resistor: 0.091
[fan]
pin: toolboard:PA10
tachometer_pin: toolboard:PA13
[heater_fan hotend_fan]
pin: toolboard:PB11
tachometer_pin: toolboard:PB10
heater: extruder
heater_temp: 50.0
[probe]
pin: toolboard:PA9
z_offset: 20
[mcu toolboard]
canbus_uuid: 4b194673554e

View File

@@ -19,15 +19,15 @@ canbus_uuid: ac20f0bbda05
# ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
[extruder]
step_pin: huvud: PB3
dir_pin: huvud: PB4
enable_pin: !huvud: PB5
step_pin: huvud:PB3
dir_pin: huvud:PB4
enable_pin: !huvud:PB5
rotation_distance: 22.52453125
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: huvud: PA6
heater_pin: huvud:PA6
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: huvud: PA0
sensor_pin: huvud:PA0
pullup_resistor: 2200
min_temp: 0
max_temp: 300
@@ -37,22 +37,22 @@ pid_ki: 1.304
pid_kd: 131.721
[tmc2209 extruder]
uart_pin: huvud: PA10
tx_pin: huvud: PA9
uart_pin: huvud:PA10
tx_pin: huvud:PA9
run_current: 0.35
[probe]
pin: huvud: PB12
pin: huvud:PB12
z_offset: 0
[fan]
pin: huvud: PA8
pin: huvud:PA8
[heater_fan extruder_fan]
pin: huvud: PA7
pin: huvud:PA7
[adxl345]
cs_pin: PB1
[led huvud_led]
blue_pin: huvud: PC13
blue_pin: huvud:PC13

View File

@@ -62,6 +62,8 @@ endstop_pin: ^ar2
position_endstop: 200
position_max: 200
homing_speed: 50
# A minimum distance between the carriages to enforce
safe_distance: 40
[extruder1]
step_pin: ar36
@@ -94,3 +96,37 @@ gcode:
ACTIVATE_EXTRUDER EXTRUDER=extruder1
SET_DUAL_CARRIAGE CARRIAGE=1
SET_GCODE_OFFSET Y=15
# A helper script to activate copy mode
[gcode_macro ACTIVATE_COPY_MODE]
gcode:
SET_DUAL_CARRIAGE CARRIAGE=0 MODE=PRIMARY
G1 X0
ACTIVATE_EXTRUDER EXTRUDER=extruder
SET_DUAL_CARRIAGE CARRIAGE=1 MODE=PRIMARY
G1 X100
SET_DUAL_CARRIAGE CARRIAGE=1 MODE=COPY
SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder
# A helper script to activate mirror mode
[gcode_macro ACTIVATE_MIRROR_MODE]
gcode:
SET_DUAL_CARRIAGE CARRIAGE=0 MODE=PRIMARY
G1 X0
ACTIVATE_EXTRUDER EXTRUDER=extruder
SET_DUAL_CARRIAGE CARRIAGE=1 MODE=PRIMARY
G1 X200
SET_DUAL_CARRIAGE CARRIAGE=1 MODE=MIRROR
SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder
## An optional input shaper support
#[input_shaper]
## The section is intentionally empty
#
#[delayed_gcode init_shaper]
#initial_duration: 0.1
#gcode:
# SET_DUAL_CARRIAGE CARRIAGE=1
# SET_INPUT_SHAPER SHAPER_TYPE_X=<dual_carriage_shaper> SHAPER_FREQ_X=<dual_carriage_freq> SHAPER_TYPE_Y=<y_shaper> SHAPER_FREQ_Y=<y_freq>
# SET_DUAL_CARRIAGE CARRIAGE=0
# SET_INPUT_SHAPER SHAPER_TYPE_X=<primary_carriage_shaper> SHAPER_FREQ_X=<primary_carriage_freq> SHAPER_TYPE_Y=<y_shaper> SHAPER_FREQ_Y=<y_freq>

View File

@@ -10,7 +10,7 @@
######################################################################
# Replace the slicer's custom start and end g-code scripts with
# START_PRINT and END_PRINT.
# START_PRINT and END_PRINT. See docs/Slicers.md for more information on using these macros.
[gcode_macro START_PRINT]
gcode:

View File

@@ -0,0 +1,50 @@
# Axis Twist Compensation
This document describes the [axis_twist_compensation] module.
Some printers may have a small twist in their X rail which can skew the results
of a probe attached to the X carriage.
This is common in printers with designs like the Prusa MK3, Sovol SV06 etc and is
further described under [probe location
bias](Probe_Calibrate.md#location-bias-check). It may result in
probe operations such as [Bed Mesh](Bed_Mesh.md),
[Screws Tilt Adjust](G-Codes.md#screws_tilt_adjust),
[Z Tilt Adjust](G-Codes.md#z_tilt_adjust) etc returning inaccurate
representations of the bed.
This module uses manual measurements by the user to correct the probe's results.
Note that if your axis is significantly twisted it is strongly recommended to
first use mechanical means to fix it prior to applying software corrections.
**Warning**: This module is not compatible with dockable probes yet and will
try to probe the bed without attaching the probe if you use it.
## Overview of compensation usage
> **Tip:** Make sure the [probe X and Y offsets](Config_Reference.md#probe) are
> correctly set as they greatly influence calibration.
1. After setting up the [axis_twist_compensation] module,
perform `AXIS_TWIST_COMPENSATION_CALIBRATE`
* The calibration wizard will prompt you to measure the probe Z offset at a few
points along the bed
* The calibration defaults to 3 points but you can use the option
`SAMPLE_COUNT=` to use a different number.
2. [Adjust your Z offset](Probe_Calibrate.md#calibrating-probe-z-offset)
3. Perform automatic/probe-based bed tramming operations, such as
[Screws Tilt Adjust](G-Codes.md#screws_tilt_adjust),
[Z Tilt Adjust](G-Codes.md#z_tilt_adjust) etc
4. Home all axis, then perform a [Bed Mesh](Bed_Mesh.md) if required
5. Perform a test print, followed by any
[fine-tuning](Axis_Twist_Compensation.md#fine-tuning) as desired
> **Tip:** Bed temperature and nozzle temperature and size do not seem to have
> an influence to the calibration process.
## [axis_twist_compensation] setup and commands
Configuration options for [axis_twist_compensation] can be found in the
[Configuration Reference](Config_Reference.md#axis_twist_compensation).
Commands for [axis_twist_compensation] can be found in the
[G-Codes Reference](G-Codes.md#axis_twist_compensation)

View File

@@ -1,8 +1,8 @@
# Bed Mesh
The Bed Mesh module may be used to compensate for bed surface irregularties to
achieve a better first layer across the entire bed. It should be noted that
software based correction will not achieve perfect results, it can only
The Bed Mesh module may be used to compensate for bed surface irregularities
to achieve a better first layer across the entire bed. It should be noted
that software based correction will not achieve perfect results, it can only
approximate the shape of the bed. Bed Mesh also cannot compensate for
mechanical and electrical issues. If an axis is skewed or a probe is not
accurate then the bed_mesh module will not receive accurate results from
@@ -46,7 +46,7 @@ probe_count: 5, 3
_Required_\
The probed coordinate farthest farthest from the origin. This is not
necessarily the last point probed, as the probing process occurs in a
zig-zag fashion. As with `mesh_min`, this coordiante is relative to
zig-zag fashion. As with `mesh_min`, this coordinate is relative to
the probe's location.
- `probe_count: 5, 3`\
@@ -101,7 +101,7 @@ round_probe_count: 5
that the center of the mesh is probed.
The illustration below shows how the probed points are generated. As you can see,
setting the `mesh_origin` to (-10, 0) allows us to specifiy a larger mesh radius
setting the `mesh_origin` to (-10, 0) allows us to specify a larger mesh radius
of 85.
![bedmesh_round_basic](img/bedmesh_round_basic.svg)
@@ -114,7 +114,7 @@ Each of the advanced options apply to round beds in the same manner.
### Mesh Interpolation
While its possible to sample the probed matrix directly using simple bilinear
While its possible to sample the probed matrix directly using simple bi-linear
interpolation to determine the Z-Values between probed points, it is often
useful to interpolate extra points using more advanced interpolation algorithms
to increase mesh density. These algorithms add curvature to the mesh,
@@ -207,7 +207,7 @@ split_delta_z: .025
Generally the default values for these options are sufficient, in fact the
default value of 5mm for the `move_check_distance` may be overkill. However an
advanced user may wish to experiment with these options in an effort to squeeze
out the optimial first layer.
out the optimal first layer.
### Mesh Fade
@@ -255,19 +255,24 @@ fade_target: 0
example, lets assume your homing position on the bed is an outlier, its
.2 mm lower than the average probed height of the bed. If the `fade_target`
is 0, fade will shrink the print by an average of .2 mm across the bed. By
setting the `fade_target` to .2, the homed area will expand by .2 mm, however
the rest of the bed will have an accurately sized. Generally its a good idea
setting the `fade_target` to .2, the homed area will expand by .2 mm, however,
the rest of the bed will be accurately sized. Generally its a good idea
to leave `fade_target` out of the configuration so the average height of the
mesh is used, however it may be desirable to manually adjust the fade target
if one wants to print on a specific portion of the bed.
### The Relative Reference Index
### Configuring the zero reference position
Most probes are suceptible to drift, ie: inaccuracies in probing introduced by
heat or interference. This can make calculating the probe's z-offset
challenging, particuarly at different bed temperatures. As such, some printers
use an endstop for homing the Z axis, and a probe for calibrating the mesh.
These printers can benefit from configuring the relative reference index.
Many probes are susceptible to "drift", ie: inaccuracies in probing introduced
by heat or interference. This can make calculating the probe's z-offset
challenging, particularly at different bed temperatures. As such, some
printers use an endstop for homing the Z axis and a probe for calibrating the
mesh. In this configuration it is possible offset the mesh so that the (X, Y)
`reference position` applies zero adjustment. The `reference postion` should
be the location on the bed where a
[Z_ENDSTOP_CALIBRATE](./Manual_Level#calibrating-a-z-endstop)
paper test is performed. The bed_mesh module provides the
`zero_reference_position` option for specifying this coordinate:
```
[bed_mesh]
@@ -275,23 +280,45 @@ speed: 120
horizontal_move_z: 5
mesh_min: 35, 6
mesh_max: 240, 198
zero_reference_position: 125, 110
probe_count: 5, 3
relative_reference_index: 7
```
- `zero_reference_position: `\
_Default Value: None (disabled)_\
The `zero_reference_position` expects an (X, Y) coordinate matching that
of the `reference position` described above. If the coordinate lies within
the mesh then the mesh will be offset so the reference position applies zero
adjustment. If the coordinate lies outside of the mesh then the coordinate
will be probed after calibration, with the resulting z-value used as the
z-offset. Note that this coordinate must NOT be in a location specified as
a `faulty_region` if a probe is necessary.
#### The deprecated relative_reference_index
Existing configurations using the `relative_reference_index` option must be
updated to use the `zero_reference_position`. The response to the
[BED_MESH_OUTPUT PGP=1](#output) gcode command will include the (X, Y)
coordinate associated with the index; this position may be used as the value for
the `zero_reference_position`. The output will look similar to the following:
```
// bed_mesh: generated points
// Index | Tool Adjusted | Probe
// 0 | (1.0, 1.0) | (24.0, 6.0)
// 1 | (36.7, 1.0) | (59.7, 6.0)
// 2 | (72.3, 1.0) | (95.3, 6.0)
// 3 | (108.0, 1.0) | (131.0, 6.0)
... (additional generated points)
// bed_mesh: relative_reference_index 24 is (131.5, 108.0)
```
- `relative_reference_index: 7`\
_Default Value: None (disabled)_\
When the probed points are generated they are each assigned an index. You
can look up this index in klippy.log or by using BED_MESH_OUTPUT (see the
section on Bed Mesh GCodes below for more information). If you assign an
index to the `relative_reference_index` option, the value probed at this
coordinate will replace the probe's z_offset. This effectively makes
this coordinate the "zero" reference for the mesh.
_Note: The above output is also printed in `klippy.log` during initialization._
Using the example above we see that the `relative_reference_index` is
printed along with its coordinate. Thus the `zero_reference_position`
is `131.5, 108`.
When using the relative reference index, you should choose the index nearest
to the spot on the bed where Z endstop calibration was done. Note that
when looking up the index using the log or BED_MESH_OUTPUT, you should use
the coordinates listed under the "Probe" header to find the correct index.
### Faulty Regions
@@ -371,12 +398,12 @@ following parameters are available:
- `MESH_ORIGIN`
- `ROUND_PROBE_COUNT`
- All beds:
- `RELATIVE_REFERNCE_INDEX`
- `ALGORITHM`
See the configuration documentation above for details on how each parameter
applies to the mesh.
### Profiles
`BED_MESH_PROFILE SAVE=<name> LOAD=<name> REMOVE=<name>`
@@ -390,15 +417,33 @@ to write the profile to printer.cfg.
Profiles can be loaded by executing `BED_MESH_PROFILE LOAD=<name>`.
It should be noted that each time a BED_MESH_CALIBRATE occurs, the current
state is automatically saved to the _default_ profile. If this profile
exists it is automatically loaded when Klipper starts. If this behavior
is not desirable the _default_ profile can be removed as follows:
state is automatically saved to the _default_ profile. The _default_ profile can be removed as follows:
`BED_MESH_PROFILE REMOVE=default`
Any other saved profile can be removed in the same fashion, replacing
_default_ with the named profile you wish to remove.
#### Loading the default profile
Previous versions of `bed_mesh` always loaded the profile named _default_
on startup if it was present. This behavior has been removed in favor of
allowing the user to determine when a profile is loaded. If a user wishes to
load the `default` profile it is recommended to add
`BED_MESH_PROFILE LOAD=default` to either their `START_PRINT` macro or their
slicer's "Start G-Code" configuration, whichever is applicable.
Alternatively the old behavior of loading a profile at startup can be
restored with a `[delayed_gcode]`:
```ini
[delayed_gcode bed_mesh_init]
initial_duration: .01
gcode:
BED_MESH_PROFILE LOAD=default
```
### Output
`BED_MESH_OUTPUT PGP=[0 | 1]`

View File

@@ -354,6 +354,27 @@ micro-controller.
| 1 stepper (200Mhz) | 39 |
| 3 stepper (200Mhz) | 181 |
### AR100 step rate benchmark ###
The following configuration sequence is used on AR100 CPU (Allwinner A64):
```
allocate_oids count=3
config_stepper oid=0 step_pin=PL10 dir_pin=PE14 invert_step=-1 step_pulse_ticks=0
config_stepper oid=1 step_pin=PL11 dir_pin=PE15 invert_step=-1 step_pulse_ticks=0
config_stepper oid=2 step_pin=PL12 dir_pin=PE16 invert_step=-1 step_pulse_ticks=0
finalize_config crc=0
```
The test was last run on commit `08d037c6` with gcc version
`or1k-linux-musl-gcc (GCC) 9.2.0` on an Allwinner A64-H
micro-controller.
| AR100 R_PIO | ticks |
| -------------------- | ----- |
| 1 stepper | 85 |
| 3 stepper | 359 |
### RP2040 step rate benchmark
The following configuration sequence is used on the RP2040:
@@ -425,6 +446,7 @@ hub.
| 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 |
| ar100 (serial) | 138K | 08d037c6 | or1k-linux-musl-gcc 9.3.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 |

125
docs/Bootloader_Entry.md Normal file
View File

@@ -0,0 +1,125 @@
# Bootloader Entry
Klipper can be instructed to reboot into a [Bootloader](Bootloaders.md) in one
of the following ways:
## Requesting the bootloader
### Virtual Serial
If a virtual (USB-ACM) serial port is in use, pulsing DTR while at 1200 baud
will request the bootloader.
#### Python (with `flash_usb`)
To enter the bootloader using python (using `flash_usb`):
```shell
> cd klipper/scripts
> python3 -c 'import flash_usb as u; u.enter_bootloader("<DEVICE>")'
Entering bootloader on <DEVICE>
```
Where `<DEVICE>` is your serial device, such as
`/dev/serial.by-id/usb-Klipper[...]` or `/dev/ttyACM0`
Note that if this fails, no output will be printed, success is indicated by
printing `Entering bootloader on <DEVICE>`.
#### Picocom
```shell
picocom -b 1200 <DEVICE>
<Ctrl-A><Ctrl-P>
```
Where `<DEVICE>` is your serial device, such as
`/dev/serial.by-id/usb-Klipper[...]` or `/dev/ttyACM0`
`<Ctrl-A><Ctrl-P>` means
holding `Ctrl`, pressing and releasing `a`, pressing and releasing `p`, then
releasing `Ctrl`
### Physical serial
If a physical serial port is being used on the MCU (even if a USB serial adapter
is being used to connect to it), sending the string
`<SPACE><FS><SPACE>Request Serial Bootloader!!<SPACE>~` requests the bootloader.
`<SPACE>` is an ASCII literal space, 0x20.
`<FS>` is the ASCII File Separator,
0x1c.
Note that this is not a valid message as per the
[MCU Protocol](Protocol.md#micro-controller-interface), but sync characters(`~`)
are still respected.
Because this message must be the only thing in the "block"
it is received in, prefixing an extra sync character can increase reliability if
other tools were previously accessing the serial port.
#### Shell
```shell
stty <BAUD> < /dev/<DEVICE>
echo $'~ \x1c Request Serial Bootloader!! ~' >> /dev/<DEVICE>
```
Where `<DEVICE>` is your serial port, such as `/dev/ttyS0`, or
`/dev/serial/by-id/gpio-serial2`, and
`<BAUD>` is the baud rate of the serial
port, such as `115200`.
### CANBUS
If CANBUS is in use, a special
[admin message](CANBUS_protocol.md#admin-messages) will request the bootloader.
This message will be respected even if the device already has a nodeid, and will
also be processed if the mcu is shutdown.
This method also applies to devices operating in
[CANBridge](CANBUS.md#usb-to-can-bus-bridge-mode) mode.
#### Katapult's flashtool.py
```shell
python3 ./katapult/scripts/flashtool.py -i <CAN_IFACE> -u <UUID> -r
```
Where `<CAN_IFACE>` is the can interface to use. If using `can0`, both the `-i`
and `<CAN_IFACE>` may be omitted.
`<UUID>` is the UUID of your CAN device.
See the
[CANBUS Documentation](CANBUS.md#finding-the-canbus_uuid-for-new-micro-controllers)
for information on finding the CAN UUID of your devices.
## Entering the bootloader
When klipper receives one of the above bootloader requests:
If Katapult (formerly known as CANBoot) is available, klipper will request that
Katapult stay active on the next boot, then reset the MCU (therefore entering
Katapult).
If Katapult is not available, klipper will then try to enter a
platform-specific bootloader, such as STM32's DFU
mode([see note](#stm32-dfu-warning)).
In short, Klipper will reboot to Katapult if installed, then a hardware specific
bootloader if available.
For details about the specific bootloaders on various platforms see
[Bootloaders](Bootloaders.md)
## Notes
### STM32 DFU Warning
Note that on some boards, like the Octopus Pro v1, entering DFU mode can cause
undesired actions (such as powering the heater while in DFU mode). It is
recommended to disconnect heaters, and otherwise prevent undesired operations
when using DFU mode. Consult the documentation for your board for more details.

View File

@@ -185,6 +185,50 @@ To flash an application use something like:
bossac --port=/dev/ttyACM0 -b -U -e -w -v -R out/klipper.bin
```
## SAMDC21 micro-controllers (Duet3D Toolboard 1LC)
The SAMC21 is flashed via the ARM Serial Wire Debug (SWD) interface.
This is commonly done with a dedicated SWD hardware dongle.
Alternatively, one can use a
[Raspberry Pi with OpenOCD](#running-openocd-on-the-raspberry-pi).
When using OpenOCD with the SAMC21, extra steps must be taken to first
put the chip into Cold Plugging mode if the board makes use of the
SWD pins for other purposes. If using OpenOCD on a Rasberry Pi, this
can be done by running the following commands before invoking OpenOCD.
```
SWCLK=25
SWDIO=24
SRST=18
echo "Exporting SWCLK and SRST pins."
echo $SWCLK > /sys/class/gpio/export
echo $SRST > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio$SWCLK/direction
echo "out" > /sys/class/gpio/gpio$SRST/direction
echo "Setting SWCLK low and pulsing SRST."
echo "0" > /sys/class/gpio/gpio$SWCLK/value
echo "0" > /sys/class/gpio/gpio$SRST/value
echo "1" > /sys/class/gpio/gpio$SRST/value
echo "Unexporting SWCLK and SRST pins."
echo $SWCLK > /sys/class/gpio/unexport
echo $SRST > /sys/class/gpio/unexport
```
To flash a program with OpenOCD use the following chip config:
```
source [find target/at91samdXX.cfg]
```
Obtain a program; for instance, klipper can be built for this chip.
Flash with OpenOCD commands similar to:
```
at91samd chip-erase
at91samd bootloader 0
program out/klipper.elf verify
```
## SAMD21 micro-controllers (Arduino Zero)
The SAMD21 bootloader is flashed via the ARM Serial Wire Debug (SWD)
@@ -305,7 +349,7 @@ is a [fork with builds specific to the SKR Mini E3 1.2](
https://github.com/Arksine/STM32_HID_Bootloader/releases/latest).
For generic STM32F103 boards such as the blue pill it is possible to flash
the bootloader via 3.3v serial using stm32flash as noted in the stm32duino
the bootloader via 3.3V serial using stm32flash as noted in the stm32duino
section above, substituting the file name for the desired hid bootloader binary
(ie: hid_generic_pc13.bin for the blue pill).
@@ -382,7 +426,7 @@ make flash FLASH_DEVICE=/dev/ttyACM0
It may be necessary to manually enter the bootloader, this can be done by
setting "boot 0" low and "boot 1" high. On the SKR Mini E3 "Boot 1" is
not available, so it may be done by setting pin PA2 low if you flashed
"hid_btt_skr_mini_e3.bin". This pin is labeld "TX0" on the TFT header in
"hid_btt_skr_mini_e3.bin". This pin is labeled "TX0" on the TFT header in
the SKR Mini E3's "PIN" document. There is a ground pin next to PA2
which you can use to pull PA2 low.
@@ -390,7 +434,7 @@ which you can use to pull PA2 low.
The [MSC bootloader](https://github.com/Telekatz/MSC-stm32f103-bootloader) is a driverless bootloader capable of flashing over USB.
It is possible to flash the bootloader via 3.3v serial using stm32flash as noted
It is possible to flash the bootloader via 3.3V serial using stm32flash as noted
in the stm32duino section above, substituting the file name for the desired
MSC bootloader binary (ie: MSCboot-Bluepill.bin for the blue pill).
@@ -419,7 +463,7 @@ It is recommended to use a ST-Link Programmer to flash CanBoot, however it
should be possible to flash using `stm32flash` on STM32F103 devices, and
`dfu-util` on STM32F042/STM32F072 devices. See the previous sections in this
document for instructions on these flashing methods, substituting `canboot.bin`
for the file name where appropriate. The CanBoot repo linked above provides
for the file name where appropriate. The CanBoot repository linked above provides
instructions for building the bootloader.
The first time CanBoot has been flashed it should detect that no application
@@ -448,8 +492,8 @@ When building Klipper for use with CanBoot, select the 8 KiB Bootloader option.
## STM32F4 micro-controllers (SKR Pro 1.1)
STM32F4 microcontrollers come equipped with a built-in system bootloader
capable of flashing over USB (via DFU), 3.3v Serial, and various other
STM32F4 micro-controllers come equipped with a built-in system bootloader
capable of flashing over USB (via DFU), 3.3V Serial, and various other
methods (see STM Document AN2606 for more information). Some
STM32F4 boards, such as the SKR Pro 1.1, are not able to enter the DFU
bootloader. The HID bootloader is available for STM32F405/407
@@ -458,8 +502,8 @@ Note that you may need to configure and build a version specific to your
board, a [build for the SKR Pro 1.1 is available here](
https://github.com/Arksine/STM32_HID_Bootloader/releases/latest).
Unless your board is DFU capable the most accessable flashing method
is likely via 3.3v serial, which follows the same procedure as
Unless your board is DFU capable the most accessible flashing method
is likely via 3.3V serial, which follows the same procedure as
[flashing the STM32F103 using stm32flash](#stm32f103-micro-controllers-blue-pill-devices).
For example:
```

View File

@@ -4,7 +4,7 @@ This document describes Klipper's CAN bus support.
## Device Hardware
Klipper currently supports CAN on stm32, same5x, and rp2040 chips. In
Klipper currently supports CAN on stm32, SAME5x, and rp2040 chips. In
addition, the micro-controller chip must be on a board that has a CAN
transceiver.
@@ -14,44 +14,35 @@ 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.)
In order to use a CAN bus, it is necessary to have a host adapter. It
is recommended to use a "USB to CAN adapter". There are many different
USB to CAN adapters available from different manufacturers. When
choosing one, we recommend verifying that the firmware can be updated
on it. (Unfortunately, we've found some USB adapters run defective
firmware and are locked down, so verify before purchasing.) Look for
adapters that can run Klipper directly (in its "USB to CAN bridge
mode") or that run the
[candlelight firmware](https://github.com/candle-usb/candleLight_fw).
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
allow-hotplug can0
iface can0 can static
bitrate 500000
bitrate 1000000
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).
## Terminating Resistors
A CAN bus should have two 120 ohm resistors between the CANH and CANL
wires. Ideally, one resistor located at each the end of the bus.
Note that some devices have a builtin 120 ohm resistor (for example,
the "Waveshare Raspberry Pi CAN hat" has a soldered on resistor that
can not be easily removed). Some devices do not include a resistor at
all. Other devices have a mechanism to select the resistor (typically
by connecting a "pin jumper"). Be sure to check the schematics of all
Note that some devices have a builtin 120 ohm resistor that can not be
easily removed. Some devices do not include a resistor at all. Other
devices have a mechanism to select the resistor (typically by
connecting a "pin jumper"). Be sure to check the schematics of all
devices on the CAN bus to verify that there are two and only two 120
Ohm resistors on the bus.
@@ -95,22 +86,18 @@ canbus_uuid: 11aa22bb33cc
## USB to CAN bus bridge mode
Some micro-controllers support selecting "USB to CAN bus bridge" mode
during "make menuconfig". This mode may allow one to use a
during Klipper's "make menuconfig". This mode may allow one to use a
micro-controller as both a "USB to CAN bus adapter" and as a Klipper
node.
When Klipper uses this mode the micro-controller appears as a "USB CAN
bus adapter" under Linux. The "Klipper bridge mcu" itself will appear
as if was on this CAN bus - it can be identified via `canbus_query.py`
and configured like other CAN bus Klipper nodes. It will appear
alongside other devices that are actually on the CAN bus.
as if it was on this CAN bus - it can be identified via
`canbus_query.py` and it must be configured like other CAN bus Klipper
nodes.
Some important notes when using this mode:
* The "bridge mcu" is not actually on the CAN bus. Messages to and
from it do not consume bandwidth on the CAN bus. The mcu can not be
seen by other adapters that may be on the CAN bus.
* It is necessary to configure the `can0` (or similar) interface in
Linux in order to communicate with the bus. However, Linux CAN bus
speed and CAN bus bit-timing options are ignored by Klipper.
@@ -119,12 +106,36 @@ Some important notes when using this mode:
* Whenever the "bridge mcu" is reset, Linux will disable the
corresponding `can0` interface. To ensure proper handling of
FIRMWARE_RESTART and RESTART commands, it is recommended to replace
`auto` with `allow-hotplug` in the `/etc/network/interfaces.d/can0`
file. For example:
FIRMWARE_RESTART and RESTART commands, it is recommended to use
`allow-hotplug` in the `/etc/network/interfaces.d/can0` file. For
example:
```
allow-hotplug can0
iface can0 can static
bitrate 500000
bitrate 1000000
up ifconfig $IFACE txqueuelen 128
```
* The "bridge mcu" is not actually on the CAN bus. Messages to and
from the bridge mcu will not be seen by other adapters that may be
on the CAN bus.
* The available bandwidth to both the "bridge mcu" itself and all
devices on the CAN bus is effectively limited by the CAN bus
frequency. As a result, it is recommended to use a CAN bus frequency
of 1000000 when using "USB to CAN bus bridge mode".
Even at a CAN bus frequency of 1000000, there may not be sufficient
bandwidth to run a `SHAPER_CALIBRATE` test if both the XY steppers
and the accelerometer all communicate via a single "USB to CAN bus"
interface.
* A USB to CAN bridge board will not appear as a USB serial device, it
will not show up when running `ls /dev/serial/by-id`, and it can not
be configured in Klipper's printer.cfg file with a `serial:`
parameter. The bridge board appears as a "USB CAN adapter" and it is
configured in the printer.cfg as a [CAN node](#configuring-klipper).
## Tips for troubleshooting
See the [CAN bus troubleshooting](CANBUS_Troubleshooting.md) document.

View File

@@ -0,0 +1,140 @@
# CANBUS Troubleshooting
This document provides information on troubleshooting communication
issues when using [Klipper with CAN bus](CANBUS.md).
## Verify CAN bus wiring
The first step in troubleshooting communication issues is to verify
the CAN bus wiring.
Be sure there are exactly two 120 Ohm [terminating
resistors](CANBUS.md#terminating-resistors) on the CAN bus. If the
resistors are not properly installed then messages may not be able to
be sent at all or the connection may have sporadic instability.
The CANH and CANL bus wiring should be twisted around each other. At a
minimum, the wiring should have a twist every few centimeters. Avoid
twisting the CANH and CANL wiring around power wires and ensure that
power wires that travel parallel to the CANH and CANL wires do not
have the same amount of twists.
Verify that all plugs and wire crimps on the CAN bus wiring are fully
secured. Movement of the printer toolhead may jostle the CAN bus
wiring causing a bad wire crimp or unsecured plug to result in
intermittent communication errors.
## Check for incrementing bytes_invalid counter
The Klipper log file will report a `Stats` line once a second when the
printer is active. These "Stats" lines will have a `bytes_invalid`
counter for each micro-controller. This counter should not increment
during normal printer operation (it is normal for the counter to be
non-zero after a RESTART and it is not a concern if the counter
increments once a month or so). If this counter increments on a CAN
bus micro-controller during normal printing (it increments every few
hours or more frequently) then it is an indication of a severe
problem.
Incrementing `bytes_invalid` on a CAN bus connection is a symptom of
reordered messages on the CAN bus. There are two known causes of
reordered messages:
1. Old versions of the popular candlight_firmware for USB CAN adapters
had a bug that could cause reordered messages. If using a USB CAN
adapter running this firmware then make sure to update to the
latest firmware if incrementing `bytes_invalid` is observed.
2. Some Linux kernel builds for embedded devices have been known to
reorder CAN bus messages. It may be necessary to use an alternative
Linux kernel or to use alternative hardware that supports
mainstream Linux kernels that do not exhibit this problem.
Reordered messages is a severe problem that must be fixed. It will
result in unstable behavior and can lead to confusing errors at any
part of a print.
## Obtaining candump logs
The CAN bus messages sent to and from the micro-controller are handled
by the Linux kernel. It is possible to capture these messages from the
kernel for debugging purposes. A log of these messages may be of use
in diagnostics.
The Linux [can-utils](https://github.com/linux-can/can-utils) tool
provides the capture software. It is typically installed on a machine
by running:
```
sudo apt-get update && sudo apt-get install can-utils
```
Once installed, one may obtain a capture of all CAN bus messages on an
interface with the following command:
```
candump -tz -Ddex can0,#FFFFFFFF > mycanlog
```
One can view the resulting log file (`mycanlog` in the example above)
to see each raw CAN bus message that was sent and received by Klipper.
Understanding the content of these messages will likely require
low-level knowledge of Klipper's [CANBUS protocol](CANBUS_protocol.md)
and Klipper's [MCU commands](MCU_Commands.md).
### Parsing Klipper messages in a candump log
One may use the `parsecandump.py` tool to parse the low-level Klipper
micro-controller messages contained in a candump log. Using this tool
is an advanced topic that requires knowledge of Klipper
[MCU commands](MCU_Commands.md). For example:
```
./scripts/parsecandump.py mycanlog 108 ./out/klipper.dict
```
This tool produces output similar to the [parsedump
tool](Debugging.md#translating-gcode-files-to-micro-controller-commands). See
the documentation for that tool for information on generating the
Klipper micro-controller data dictionary.
In the above example, `108` is the [CAN bus
id](CANBUS_protocol.md#micro-controller-id-assignment). It is a
hexadecimal number. The id `108` is assigned by Klipper to the first
micro-controller. If the CAN bus has multiple micro-controllers on it,
then the second micro-controller would be `10a`, the third would be
`10c`, and so on.
The candump log must be produced using the `-tz -Ddex` command-line
arguments (for example: `candump -tz -Ddex can0,#FFFFFFFF`) in order
to use the `parsecandump.py` tool.
## Using a logic analyzer on the canbus wiring
The [Sigrok Pulseview](https://sigrok.org/wiki/PulseView) software
along with a low-cost
[logic analyzer](https://en.wikipedia.org/wiki/Logic_analyzer) can be
useful for diagnosing CAN bus signaling. This is an advanced topic
likely only of interest to experts.
One can often find "USB logic analyzers" for under $15 (US pricing as
of 2023). These devices are often listed as "Saleae logic clones" or
as "24MHz 8 channel USB logic analyzers".
![pulseview-canbus](img/pulseview-canbus.png)
The above picture was taken while using Pulseview with a "Saleae
clone" logic analyzer. The Sigrok and Pulseview software was installed
on a desktop machine (also install the "fx2lafw" firmware if that is
packaged separately). The CH0 pin on the logic analyzer was routed to
the CAN Rx line, the CH1 pin was wired to the CAN Tx pin, and GND was
wired to GND. Pulseview was configured to only display the D0 and D1
lines (red "probe" icon center top toolbar). The number of samples was
set to 5 million (top toolbar) and the sample rate was set to 24Mhz
(top toolbar). The CAN decoder was added (yellow and green "bubble
icon" right top toolbar). The D0 channel was labeled as RX and set to
trigger on a falling edge (click on black D0 label at left). The D1
channel was labeled as TX (click on brown D1 label at left). The CAN
decoder was configured for 1Mbit rate (click on green CAN label at
left). The CAN decoder was moved to the top of the display (click and
drag green CAN label). Finally, the capture was started (click "Run"
at top left) and a packet was transmitted on the CAN bus (`cansend
can0 123#121212121212`).
The logic analyzer provides an independent tool for capturing packets
and verifying bit timing.

View File

@@ -253,8 +253,8 @@ The Klipper "reviewers" are:
| ---------------------- | ----------------- | ----------------- |
| Dmitry Butyugin | @dmbutyugin | Input shaping, resonance testing, kinematics |
| Eric Callahan | @Arksine | Bed leveling, MCU flashing |
| James Hartley | @JamesH1978 | Configuration files |
| Kevin O'Connor | @KevinOConnor | Core motion system, Micro-controller code |
| Paul McGowan | @mental405 | Configuration files, documentation |
Please do not "ping" any of the reviewers and please do not direct
submissions at them. All of the reviewers monitor the forums and PRs,

View File

@@ -8,6 +8,71 @@ All dates in this document are approximate.
## Changes
20230826: If `safe_distance` is set or calculated to be 0 in `[dual_carriage]`,
the carriages proximity checks will be disabled as per documentation. A user
may wish to configure `safe_distance` explicitly to prevent accidental crashes
of the carriages with each other. Additionally, the homing order of the primary
and the dual carriage is changed in some configurations (certain configurations
when both carriages home in the same direction, see
[[dual_carriage] configuration reference](./Config_Reference.md#dual_carriage)
for more details).
20230810: The flash-sdcard.sh script now supports both variants of the
Bigtreetech SKR-3, STM32H743 and STM32H723. For this, the original tag
of btt-skr-3 now has changed to be either btt-skr-3-h743 or btt-skr-3-h723.
20230729: The exported status for `dual_carriage` is changed. Instead of
exporting `mode` and `active_carriage`, the individual modes for each
carriage are exported as `printer.dual_carriage.carriage_0` and
`printer.dual_carriage.carriage_1`.
20230619: The `relative_reference_index` option has been deprecated
and superceded by the `zero_reference_position` option. Refer to the
[Bed Mesh Documentation](./Bed_Mesh.md#the-deprecated-relative_reference_index)
for details on how to update the configuration. With this deprecation
the `RELATIVE_REFERENCE_INDEX` is no longer available as a parameter
for the `BED_MESH_CALIBRATE` gcode command.
20230530: The default canbus frequency in "make menuconfig" is
now 1000000. If using canbus and using canbus with some other
frequency is required, then be sure to select "Enable extra low-level
configuration options" and specify the desired "CAN bus speed" in
"make menuconfig" when compiling and flashing the micro-controller.
20230525: `SHAPER_CALIBRATE` command immediately applies input shaper
parameters if `[input_shaper]` was enabled already.
20230407: The `stalled_bytes` counter in the log and in the
`printer.mcu.last_stats` field has been renamed to `upcoming_bytes`.
20230323: On tmc5160 drivers `multistep_filt` is now enabled by default. Set
`driver_MULTISTEP_FILT: False` in the tmc5160 config for the previous behavior.
20230304: The `SET_TMC_CURRENT` command now properly adjusts the globalscaler
register for drivers that have it. This removes a limitation where on tmc5160,
the currents could not be raised higher with `SET_TMC_CURRENT` than the
`run_current` value set in the config file.
However, this has a side effect: After running `SET_TMC_CURRENT`, the stepper
must be held at standstill for >130ms in case StealthChop2 is used so that the
AT#1 calibration gets executed by the driver.
20230202: The format of the `printer.screws_tilt_adjust` status
information has changed. The information is now stored as a dictionary of
screws with the resulting measurements. See the
[status reference](Status_Reference.md#screws_tilt_adjust) for details.
20230201: The `[bed_mesh]` module no longer loads the `default` profile
on startup. It is recommended that users who use the `default` profile
add `BED_MESH_PROFILE LOAD=default` to their `START_PRINT` macro (or
to their slicer's "Start G-Code" configuration when applicable).
20230103: It is now possible with the flash-sdcard.sh script to flash
both variants of the Bigtreetech SKR-2, STM32F407 and STM32F429.
This means that the original tag of btt-skr2 now has changed to either
btt-skr-2-f407 or btt-skr-2-f429.
20221128: Klipper v0.11.0 released.
20221122: Previously, with safe_z_home, it was possible that the
z_hop after the g28 homing would go in the negative z direction.
Now, a z_hop is performed after g28 only if it results in a positive

View File

@@ -346,7 +346,7 @@ max_z_velocity:
#min_angle: 5
# This represents the minimum angle (in degrees) relative to horizontal
# that the deltesian arms are allowed to achieve. This parameter is
# intended to restrict the arms from becomming completely horizontal,
# intended to restrict the arms from becoming completely horizontal,
# which would risk accidental inversion of the XZ axis. The default is 5.
#print_width:
# The distance (in mm) of valid toolhead X coordinates. One may use
@@ -383,7 +383,7 @@ arm_x_length:
# for stepper_right, this parameter defaults to the value specified for
# stepper_left.
# The stepper_right section is used to desribe the stepper controlling the
# The stepper_right section is used to describe the stepper controlling the
# right tower.
[stepper_right]
@@ -966,10 +966,18 @@ Visual Examples:
# be applied to change the amount of slope interpolated. Larger
# numbers will increase the amount of slope, which results in more
# curvature in the mesh. Default is .2.
#zero_reference_position:
# An optional X,Y coordinate that specifies the location on the bed
# where Z = 0. When this option is specified the mesh will be offset
# so that zero Z adjustment occurs at this location. The default is
# no zero reference.
#relative_reference_index:
# A point index in the mesh to reference all z values to. Enabling
# this parameter produces a mesh relative to the probed z position
# at the provided index.
# **DEPRECATED, use the "zero_reference_position" option**
# The legacy option superceded by the "zero reference position".
# Rather than a coordinate this option takes an integer "index" that
# refers to the location of one of the generated points. It is recommended
# to use the "zero_reference_position" instead of this option for new
# configurations. The default is no relative reference index.
#faulty_region_1_min:
#faulty_region_1_max:
# Optional points that define a faulty region. See docs/Bed_Mesh.md
@@ -1093,12 +1101,12 @@ information.
# The height (in mm) that the head should be commanded to move to
# just prior to starting a probe operation. The default is 5.
#screw_thread: CW-M3
# The type of screw used for bed level, M3, M4 or M5 and the
# direction of the knob used to level the bed, clockwise decrease
# counter-clockwise decrease.
# The type of screw used for bed leveling, M3, M4, or M5, and the
# rotation direction of the knob that is used to level the bed.
# Accepted values: CW-M3, CCW-M3, CW-M4, CCW-M4, CW-M5, CCW-M5.
# Default value is CW-M3, most printers use an M3 screw and
# turning the knob clockwise decrease distance.
# Default value is CW-M3 which most printers use. A clockwise
# rotation of the knob decreases the gap between the nozzle and the
# bed. Conversely, a counter-clockwise rotation increases the gap.
```
### [z_tilt]
@@ -1638,9 +1646,30 @@ cs_pin:
# measurements.
```
### [lis2dw]
Support for LIS2DW accelerometers.
```
[lis2dw]
cs_pin:
# The SPI enable pin for the sensor. This parameter must be provided.
#spi_speed: 5000000
# The SPI speed (in hz) to use when communicating with the chip.
# The default is 5000000.
#spi_bus:
#spi_software_sclk_pin:
#spi_software_mosi_pin:
#spi_software_miso_pin:
# See the "common SPI settings" section for a description of the
# above parameters.
#axes_map: x, y, z
# See the "adxl345" section for information on this parameter.
```
### [mpu9250]
Support for MPU-9250, MPU-9255, MPU-9255, MPU-6050, and MPU-6500
Support for MPU-9250, MPU-9255, MPU-6515, MPU-6050, and MPU-6500
accelerometers (one may define any number of sections with an
"mpu9250" prefix).
@@ -1650,6 +1679,8 @@ accelerometers (one may define any number of sections with an
# Default is 104 (0x68). If AD0 is high, it would be 0x69 instead.
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed: 400000
# See the "common I2C settings" section for a description of the
# above parameters. The default "i2c_speed" is 400000.
@@ -1949,6 +1980,35 @@ z_offset:
# See the "probe" section for more information on the parameters above.
```
### [axis_twist_compensation]
A tool to compensate for inaccurate probe readings due to twist in X gantry. See
the [Axis Twist Compensation Guide](Axis_Twist_Compensation.md) for more
detailed information regarding symptoms, configuration and setup.
```
[axis_twist_compensation]
#speed: 50
# The speed (in mm/s) of non-probing moves during the calibration.
# The default is 50.
#horizontal_move_z: 5
# The height (in mm) that the head should be commanded to move to
# just prior to starting a probe operation. The default is 5.
calibrate_start_x: 20
# Defines the minimum X coordinate of the calibration
# This should be the X coordinate that positions the nozzle at the starting
# calibration position. This parameter must be provided.
calibrate_end_x: 200
# Defines the maximum X coordinate of the calibration
# This should be the X coordinate that positions the nozzle at the ending
# calibration position. This parameter must be provided.
calibrate_y: 112.5
# Defines the Y coordinate of the calibration
# This should be the Y coordinate that positions the nozzle during the
# calibration process. This parameter must be provided and is recommended to
# be near the center of the bed
```
## Additional stepper motors and extruders
### [stepper_z1]
@@ -1997,14 +2057,32 @@ for an example configuration.
### [dual_carriage]
Support for cartesian printers with dual carriages on a single
axis. The active carriage is set via the SET_DUAL_CARRIAGE extended
g-code command. The "SET_DUAL_CARRIAGE CARRIAGE=1" command will
activate the carriage defined in this section (CARRIAGE=0 will return
activation to the primary carriage). Dual carriage support is
typically combined with extra extruders - the SET_DUAL_CARRIAGE
command is often called at the same time as the ACTIVATE_EXTRUDER
command. Be sure to park the carriages during deactivation.
Support for cartesian and hybrid_corexy/z printers with dual carriages
on a single axis. The carriage mode can be set via the
SET_DUAL_CARRIAGE extended g-code command. For example,
"SET_DUAL_CARRIAGE CARRIAGE=1" command will activate the carriage defined
in this section (CARRIAGE=0 will return activation to the primary carriage).
Dual carriage support is typically combined with extra extruders - the
SET_DUAL_CARRIAGE command is often called at the same time as the
ACTIVATE_EXTRUDER command. Be sure to park the carriages during deactivation.
Note that during G28 homing, typically the primary carriage is homed first
followed by the carriage defined in the `[dual_carriage]` config section.
However, the `[dual_carriage]` carriage will be homed first if both carriages
home in a positive direction and the [dual_carriage] carriage has a
`position_endstop` greater than the primary carriage, or if both carriages home
in a negative direction and the `[dual_carriage]` carriage has a
`position_endstop` less than the primary carriage.
Additionally, one could use "SET_DUAL_CARRIAGE CARRIAGE=1 MODE=COPY" or
"SET_DUAL_CARRIAGE CARRIAGE=1 MODE=MIRROR" commands to activate either copying
or mirroring mode of the dual carriage, in which case it will follow the
motion of the carriage 0 accordingly. These commands can be used to print
two parts simultaneously - either two identical parts (in COPY mode) or
mirrored parts (in MIRROR mode). Note that COPY and MIRROR modes also require
appropriate configuration of the extruder on the dual carriage, which can
typically be achieved with
"SYNC_EXTRUDER_MOTION MOTION_QUEUE=extruder EXTRUDER=<dual_carriage_extruder>"
or a similar command.
See [sample-idex.cfg](../config/sample-idex.cfg) for an example
configuration.
@@ -2014,6 +2092,15 @@ configuration.
axis:
# The axis this extra carriage is on (either x or y). This parameter
# must be provided.
#safe_distance:
# The minimum distance (in mm) to enforce between the dual and the primary
# carriages. If a G-Code command is executed that will bring the carriages
# closer than the specified limit, such a command will be rejected with an
# error. If safe_distance is not provided, it will be inferred from
# position_min and position_max for the dual and primary carriages. If set
# to 0 (or safe_distance is unset and position_min and position_max are
# identical for the primary and dual carraiges), the carriages proximity
# checks will be disabled.
#step_pin:
#dir_pin:
#enable_pin:
@@ -2370,11 +2457,37 @@ sensor_type: BME280
# (0x77).
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
```
### AHT10/AHT20/AHT21 temperature sensor
AHT10/AHT20/AHT21 two wire interface (I2C) environmental sensors.
Note that these sensors are not intended for use with extruders and
heater beds, but rather for monitoring ambient temperature (C) and
relative humidity. See
[sample-macros.cfg](../config/sample-macros.cfg) for a gcode_macro
that may be used to report humidity in addition to temperature.
```
sensor_type: AHT10
# Also use AHT10 for AHT20 and AHT21 sensors.
#i2c_address:
# Default is 56 (0x38). Some AHT10 sensors give the option to use
# 57 (0x39) by moving a resistor.
#i2c_mcu:
#i2c_bus:
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
#aht10_report_time:
# Interval in seconds between readings. Default is 30, minimum is 5
```
### HTU21D sensor
HTU21D family two wire interface (I2C) environmental sensor. Note that
@@ -2391,6 +2504,8 @@ sensor_type:
# Default is 64 (0x40).
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
@@ -2424,6 +2539,8 @@ sensor_type: LM75
# (usually with jumpers or hard wired).
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
@@ -2495,6 +2612,24 @@ serial_no:
# The micro-controller to read from. Must be the host_mcu
```
### Combined temperature sensor
Combined temperature sensor is a virtual temperature sensor based on several other sensors. This sensor can be used with extruders, heater_generic and heater beds.
```
sensor_type: temperature_combined
#sensor_list:
# Must be provided. List of sensors to combine to new "virtual"
# sensor.
# E.g. 'temperature_sensor sensor1,extruder,heater_bed'
#combination_method:
# Must be provided. Combination method used for the sensor.
# Available options are 'max', 'min', 'mean'.
#maximum_deviation:
# Must be provided. Maximum permissible deviation between the sensors
# to combine (e.g. 5 degrees). To disable it, use a large value (e.g. 999.9)
```
## Fans
### [fan]
@@ -2576,7 +2711,7 @@ whenever its associated heater is active. By default, a heater_fan has
a shutdown_speed equal to max_power.
```
[heater_fan my_nozzle_fan]
[heater_fan heatbreak_cooling_fan]
#pin:
#max_power:
#shutdown_speed:
@@ -2831,6 +2966,8 @@ PCA9533 LED support. The PCA9533 is used on the mightyboard.
# the PCA9533/1, 99 for the PCA9533/2. The default is 98.
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
@@ -2852,6 +2989,8 @@ PCA9632 LED support. The PCA9632 is used on the FlashForge Dreamer.
# 96, 97, 98, or 99. The default is 98.
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
@@ -3073,6 +3212,30 @@ run_current:
# set, "stealthChop" mode will be enabled if the stepper motor
# velocity is below this value. The default is 0, which disables
# "stealthChop" mode.
#driver_MSLUT0: 2863314260
#driver_MSLUT1: 1251300522
#driver_MSLUT2: 608774441
#driver_MSLUT3: 269500962
#driver_MSLUT4: 4227858431
#driver_MSLUT5: 3048961917
#driver_MSLUT6: 1227445590
#driver_MSLUT7: 4211234
#driver_W0: 2
#driver_W1: 1
#driver_W2: 1
#driver_W3: 1
#driver_X1: 128
#driver_X2: 255
#driver_X3: 255
#driver_START_SIN: 0
#driver_START_SIN90: 247
# These fields control the Microstep Table registers directly. The optimal
# wave table is specific to each motor and might vary with current. An
# optimal configuration will have minimal print artifacts caused by
# non-linear stepper movement. The values specified above are the default
# values used by the driver. The value must be specified as a decimal integer
# (hex form is not supported). In order to compute the wave table fields,
# see the tmc2130 "Calculation Sheet" from the Trinamic website.
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 0
#driver_TBL: 1
@@ -3142,6 +3305,7 @@ run_current:
# set, "stealthChop" mode will be enabled if the stepper motor
# velocity is below this value. The default is 0, which disables
# "stealthChop" mode.
#driver_MULTISTEP_FILT: True
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
@@ -3183,6 +3347,7 @@ run_current:
# The address of the TMC2209 chip for UART messages (an integer
# between 0 and 3). This is typically used when multiple TMC2209
# chips are connected to the same UART pin. The default is zero.
#driver_MULTISTEP_FILT: True
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
@@ -3283,6 +3448,130 @@ run_current:
# HDEC) is interpreted as the MSB of HSTRT in this case).
```
### [tmc2240]
Configure a TMC2240 stepper motor driver via SPI bus or UART. To use this
feature, define a config section with a "tmc2240" prefix followed by
the name of the corresponding stepper config section (for example,
"[tmc2240 stepper_x]").
```
[tmc2240 stepper_x]
cs_pin:
# The pin corresponding to the TMC2240 chip select line. This pin
# will be set to low at the start of SPI messages and raised to high
# after the message completes. This parameter must be provided.
#spi_speed:
#spi_bus:
#spi_software_sclk_pin:
#spi_software_mosi_pin:
#spi_software_miso_pin:
# See the "common SPI settings" section for a description of the
# above parameters.
#uart_pin:
# The pin connected to the TMC2240 DIAG1/SW line. If this parameter
# is provided UART communication is used rather then SPI.
#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.
run_current:
# The amount of current (in amps RMS) to configure the driver to use
# during stepper movement. This parameter must be provided.
#hold_current:
# The amount of current (in amps RMS) to configure the driver to use
# when the stepper is not moving. Setting a hold_current is not
# recommended (see TMC_Drivers.md for details). The default is to
# not reduce the current.
#rref: 12000
# The resistance (in ohms) of the resistor between IREF and GND. The
# default is 12000.
#stealthchop_threshold: 0
# The velocity (in mm/s) to set the "stealthChop" threshold to. When
# set, "stealthChop" mode will be enabled if the stepper motor
# velocity is below this value. The default is 0, which disables
# "stealthChop" mode.
#driver_MSLUT0: 2863314260
#driver_MSLUT1: 1251300522
#driver_MSLUT2: 608774441
#driver_MSLUT3: 269500962
#driver_MSLUT4: 4227858431
#driver_MSLUT5: 3048961917
#driver_MSLUT6: 1227445590
#driver_MSLUT7: 4211234
#driver_W0: 2
#driver_W1: 1
#driver_W2: 1
#driver_W3: 1
#driver_X1: 128
#driver_X2: 255
#driver_X3: 255
#driver_START_SIN: 0
#driver_START_SIN90: 247
#driver_OFFSET_SIN90: 0
# These fields control the Microstep Table registers directly. The optimal
# wave table is specific to each motor and might vary with current. An
# optimal configuration will have minimal print artifacts caused by
# non-linear stepper movement. The values specified above are the default
# values used by the driver. The value must be specified as a decimal integer
# (hex form is not supported). In order to compute the wave table fields,
# see the tmc2130 "Calculation Sheet" from the Trinamic website.
# Additionally, this driver also has the OFFSET_SIN90 field which can be used
# to tune a motor with unbalanced coils. See the `Sine Wave Lookup Table`
# section in the datasheet for information about this field and how to tune
# it.
#driver_MULTISTEP_FILT: True
#driver_IHOLDDELAY: 6
#driver_IRUNDELAY: 4
#driver_TPOWERDOWN: 10
#driver_TBL: 2
#driver_TOFF: 3
#driver_HEND: 2
#driver_HSTRT: 5
#driver_FD3: 0
#driver_TPFD: 4
#driver_CHM: 0
#driver_VHIGHFS: 0
#driver_VHIGHCHM: 0
#driver_DISS2G: 0
#driver_DISS2VS: 0
#driver_PWM_AUTOSCALE: True
#driver_PWM_AUTOGRAD: True
#driver_PWM_FREQ: 0
#driver_FREEWHEEL: 0
#driver_PWM_GRAD: 0
#driver_PWM_OFS: 29
#driver_PWM_REG: 4
#driver_PWM_LIM: 12
#driver_SGT: 0
#driver_SEMIN: 0
#driver_SEUP: 0
#driver_SEMAX: 0
#driver_SEDN: 0
#driver_SEIMIN: 0
#driver_SFILT: 0
#driver_SG4_ANGLE_OFFSET: 1
# Set the given register during the configuration of the TMC2240
# chip. This may be used to set custom motor parameters. The
# defaults for each parameter are next to the parameter name in the
# above list.
#diag0_pin:
#diag1_pin:
# The micro-controller pin attached to one of the DIAG lines of the
# TMC2240 chip. Only a single diag pin should be specified. The pin
# is "active low" and is thus normally prefaced with "^!". Setting
# this creates a "tmc2240_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.
```
### [tmc5160]
Configure a TMC5160 stepper motor driver via SPI bus. To use this
@@ -3328,6 +3617,31 @@ run_current:
# set, "stealthChop" mode will be enabled if the stepper motor
# velocity is below this value. The default is 0, which disables
# "stealthChop" mode.
#driver_MSLUT0: 2863314260
#driver_MSLUT1: 1251300522
#driver_MSLUT2: 608774441
#driver_MSLUT3: 269500962
#driver_MSLUT4: 4227858431
#driver_MSLUT5: 3048961917
#driver_MSLUT6: 1227445590
#driver_MSLUT7: 4211234
#driver_W0: 2
#driver_W1: 1
#driver_W2: 1
#driver_W3: 1
#driver_X1: 128
#driver_X2: 255
#driver_X3: 255
#driver_START_SIN: 0
#driver_START_SIN90: 247
# These fields control the Microstep Table registers directly. The optimal
# wave table is specific to each motor and might vary with current. An
# optimal configuration will have minimal print artifacts caused by
# non-linear stepper movement. The values specified above are the default
# values used by the driver. The value must be specified as a decimal integer
# (hex form is not supported). In order to compute the wave table fields,
# see the tmc2130 "Calculation Sheet" from the Trinamic website.
#driver_MULTISTEP_FILT: True
#driver_IHOLDDELAY: 6
#driver_TPOWERDOWN: 10
#driver_TBL: 2
@@ -3356,6 +3670,10 @@ run_current:
#driver_SEDN: 0
#driver_SEIMIN: 0
#driver_SFILT: 0
#driver_DRVSTRENGTH: 0
#driver_BBMCLKS: 4
#driver_BBMTIME: 0
#driver_FILT_ISENSE: 0
# Set the given register during the configuration of the TMC5160
# chip. This may be used to set custom motor parameters. The
# defaults for each parameter are next to the parameter name in the
@@ -3426,6 +3744,8 @@ i2c_address:
# parameter must be provided.
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
@@ -3462,6 +3782,8 @@ prefix).
# is 96.
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
@@ -3732,6 +4054,8 @@ lcd_type:
# Set to either "ssd1306" or "sh1106" for the given display type.
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed:
# Optional parameters available for displays connected via an i2c
# bus. See the "common I2C settings" section for a description of
@@ -4112,13 +4436,11 @@ i2c_address:
# 113. This parameter must be provided.
#i2c_mcu:
#i2c_bus:
#i2c_software_scl_pin:
#i2c_software_sda_pin:
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
#i2c_bus:
# If the I2C implementation of your micro-controller supports
# multiple I2C busses, you may specify the bus name here. The
# default is to use the default micro-controller i2c bus.
```
### [samd_sercom]
@@ -4275,7 +4597,7 @@ serial:
#auto_load_speed: 2
# Extrude feedrate when autoloading, default is 2 (mm/s)
#auto_cancel_variation: 0.1
# Auto cancel print when ping varation is above this threshold
# Auto cancel print when ping variation is above this threshold
```
### [angle]
@@ -4341,20 +4663,20 @@ SPI bus.
The following parameters are generally available for devices using an
I2C bus.
Note that Klipper's current micro-controller support for i2c is
generally not tolerant to line noise. Unexpected errors on the i2c
Note that Klipper's current micro-controller support for I2C is
generally not tolerant to line noise. Unexpected errors on the I2C
wires may result in Klipper raising a run-time error. Klipper's
support for error recovery varies between each micro-controller type.
It is generally recommended to only use i2c devices that are on the
It is generally recommended to only use I2C devices that are on the
same printed circuit board as the micro-controller.
Most Klipper micro-controller implementations only support an
`i2c_speed` of 100000. The Klipper "linux" micro-controller supports a
400000 speed, but it must be
`i2c_speed` of 100000 (*standard mode*, 100kbit/s). The Klipper "Linux"
micro-controller supports a 400000 speed (*fast mode*, 400kbit/s), but it must be
[set in the operating system](RPi_microcontroller.md#optional-enabling-i2c)
and the `i2c_speed` parameter is otherwise ignored. The Klipper
"rp2040" micro-controller supports a rate of 400000 via the
`i2c_speed` parameter. All other Klipper micro-controllers use a
"RP2040" micro-controller and ATmega AVR family support a rate of 400000
via the `i2c_speed` parameter. All other Klipper micro-controllers use a
100000 rate and ignore the `i2c_speed` parameter.
```
@@ -4368,9 +4690,16 @@ and the `i2c_speed` parameter is otherwise ignored. The Klipper
# If the micro-controller supports multiple I2C busses then one may
# specify the micro-controller bus name here. The default depends on
# the type of micro-controller.
#i2c_software_scl_pin:
#i2c_software_sda_pin:
# Specify these parameters to use micro-controller software based
# I2C "bit-banging" support. The two parameters should the two pins
# on the micro-controller to use for the scl and sda wires. The
# default is to use hardware based I2C support as specified by the
# i2c_bus parameter.
#i2c_speed:
# The I2C speed (in Hz) to use when communicating with the device.
# The Klipper implementation on most micro-controllers is hard-coded
# to 100000 and changing this value has no effect. The default is
# 100000.
# 100000. Linux, RP2040 and ATmega support 400000.
```

View File

@@ -15,10 +15,7 @@ config file is successfully loaded.
## Verify temperature
Start by verifying that temperatures are being properly reported.
Navigate to the Octoprint temperature tab.
![octoprint-temperature](img/octoprint-temperature.png)
Navigate to the temperature graph section in the user interface.
Verify that the temperature of the nozzle and bed (if applicable) are
present and not increasing. If it is increasing, remove power from the
printer. If the temperatures are not accurate, review the
@@ -26,28 +23,25 @@ printer. If the temperatures are not accurate, review the
## Verify M112
Navigate to the Octoprint terminal tab and issue an M112 command in
the terminal box. This command requests Klipper to go into a
"shutdown" state. It will cause Octoprint to disconnect from Klipper -
navigate to the Connection area and click on "Connect" to cause
Octoprint to reconnect. Then navigate to the Octoprint temperature tab
and verify that temperatures continue to update and the temperatures
are not increasing. If temperatures are increasing, remove power from
the printer.
The M112 command causes Klipper to go into a "shutdown" state. To
clear this state, issue a FIRMWARE_RESTART command in the Octoprint
terminal tab.
Navigate to the command console and issue an M112
command in the terminal box. This command requests Klipper to go into a
"shutdown" state. It will cause an error to show,
which can be cleared with a FIRMWARE_RESTART command in the
command console. Octoprint will also require a reconnect. Then navigate
to the temperature graph section and verify that temperatures continue
to update and the temperatures are not increasing.
If temperatures are increasing, remove power from the printer.
## Verify heaters
Navigate to the Octoprint temperature tab and type in 50 followed by
enter in the "Tool" temperature box. The extruder temperature in the
graph should start to increase (within about 30 seconds or so). Then
go to the "Tool" temperature drop-down box and select "Off". After
several minutes the temperature should start to return to its initial
room temperature value. If the temperature does not increase then
verify the "heater_pin" setting in the config.
Navigate to the temperature graph section and type in 50 followed by
enter in the extruder/tool temperature box.
The extruder temperature in the graph should start to increase
(within about 30 seconds or so). Then go to the extruder temperature
drop-down box and select "Off". After several minutes the temperature
should start to return to its initial room temperature value. If the
temperature does not increase then verify the "heater_pin" setting
in the config.
If the printer has a heated bed then perform the above test again with
the bed.
@@ -60,21 +54,20 @@ the motors. If any of the axes still can not move freely, then verify
the stepper "enable_pin" configuration for the given axis. On most
commodity stepper motor drivers, the motor enable pin is "active low"
and therefore the enable pin should have a "!" before the pin (for
example, "enable_pin: !ar38").
example, "enable_pin: !PA1").
## Verify endstops
Manually move all the printer axes so that none of them are in contact
with an endstop. Send a QUERY_ENDSTOPS command via the Octoprint
terminal tab. It should respond with the current state of all of the
configured endstops and they should all report a state of "open". For
each of the endstops, rerun the QUERY_ENDSTOPS command while manually
triggering the endstop. The QUERY_ENDSTOPS command should report the
endstop as "TRIGGERED".
with an endstop. Send a QUERY_ENDSTOPS command via the command console.
It should respond with the current state of all of the configured endstops
and they should all report a state of "open". For each of the endstops,
rerun the QUERY_ENDSTOPS command while manually triggering the endstop.
The QUERY_ENDSTOPS command should report the endstop as "TRIGGERED".
If the endstop appears inverted (it reports "open" when triggered and
vice-versa) then add a "!" to the pin definition (for example,
"endstop_pin: ^!ar3"), or remove the "!" if there is already one
"endstop_pin: ^!PA2"), or remove the "!" if there is already one
present.
If the endstop does not change at all then it generally indicates that
@@ -87,12 +80,13 @@ resistor and the '^' should be present).
Use the STEPPER_BUZZ command to verify the connectivity of each
stepper motor. Start by manually positioning the given axis to a
midway point and then run `STEPPER_BUZZ STEPPER=stepper_x`. The
STEPPER_BUZZ command will cause the given stepper to move one
millimeter in a positive direction and then it will return to its
starting position. (If the endstop is defined at position_endstop=0
then at the start of each movement the stepper will move away from the
endstop.) It will perform this oscillation ten times.
midway point and then run `STEPPER_BUZZ STEPPER=stepper_x` in the
command console. The STEPPER_BUZZ command will cause the given
stepper to move one millimeter in a positive direction and then it
will return to its starting position. (If the endstop is defined at
position_endstop=0 then at the start of each movement the stepper
will move away from the endstop.) It will perform this oscillation
ten times.
If the stepper does not move at all, then verify the "enable_pin" and
"step_pin" settings for the stepper. If the stepper motor moves but
@@ -119,11 +113,11 @@ Rerun the endstop and stepper motor verification steps if necessary.
## Verify extruder motor
To test the extruder motor it will be necessary to heat the extruder
to a printing temperature. Navigate to the Octoprint temperature tab
to a printing temperature. Navigate to the temperature graph section
and select a target temperature from the temperature drop-down box (or
manually enter an appropriate temperature). Wait for the printer to
reach the desired temperature. Then navigate to the Octoprint control
tab and click the "Extrude" button. Verify that the extruder motor
reach the desired temperature. Then navigate to the command console and
click the "Extrude" button. Verify that the extruder motor
turns in the correct direction. If it does not, see the
troubleshooting tips in the previous section to confirm the
"enable_pin", "step_pin", and "dir_pin" settings for the extruder.
@@ -137,8 +131,8 @@ necessary to calibrate the PID settings on each printer (PID settings
found in other firmwares or in the example configuration files often
work poorly).
To calibrate the extruder, navigate to the OctoPrint terminal tab and
run the PID_CALIBRATE command. For example: `PID_CALIBRATE
To calibrate the extruder, navigate to the command console
and run the PID_CALIBRATE command. For example: `PID_CALIBRATE
HEATER=extruder TARGET=170`
At the completion of the tuning test run `SAVE_CONFIG` to update the

View File

@@ -2,25 +2,18 @@
This document provides contact information for Klipper.
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 found a bug in the Klipper software](#i-found-a-bug-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)
8. [Klipper github](#klipper-github)
## Community Forum
## Discourse Forum
There is a
[Klipper Community Discourse server](https://community.klipper3d.org)
for discussions on Klipper.
for "forum" style discussions on Klipper. Note that Discourse is not
Discord.
## Discord Chat
There is a Discord server dedicated to Klipper at:
[https://discord.klipper3d.org](https://discord.klipper3d.org).
[https://discord.klipper3d.org](https://discord.klipper3d.org). Note
that Discord is not Discourse.
This server is run by a community of Klipper enthusiasts dedicated to
discussions on Klipper. It allows users to chat with other users in
@@ -33,37 +26,29 @@ Many questions we receive are already answered in the
documentation and follow the directions provided there.
It is also possible to search for similar questions in the
[Klipper Community Forum](#community-forum).
[Klipper Discourse Forum](#discourse-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 Discourse Forum](#discourse-forum) or
[Klipper Discord Chat](#discord-chat). Both are communities where
Klipper users can discuss Klipper with other users.
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 you have a general question or are experiencing general printing
problems, then also consider a general 3d-printing forum or a forum
dedicated to the printer hardware.
## 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 Discourse Forum](#discourse-forum). There is also
[Klipper Discord Chat](#discord-chat) for discussions between
collaborators.
## 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.
@@ -72,16 +57,15 @@ 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.
the printer hardware then consider searching general 3d-printing
forums or forums dedicated to the printer hardware.
It is also possible to search for similar issues in the
[Klipper Community Forum](#community-forum).
[Klipper Discourse Forum](#discourse-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 Discourse Forum](#discourse-forum) or
[Klipper Discord Chat](#discord-chat). Both are communities where
Klipper users can discuss Klipper with other users.
@@ -91,7 +75,7 @@ Klipper is an open-source project and we appreciate when collaborators
diagnose errors in the software.
Problems should be reported in the
[Klipper Community Forum](#community-forum).
[Klipper Discourse Forum](#discourse-forum).
There is important information that will be needed in order to fix a
bug. Please follow these steps:
@@ -110,23 +94,28 @@ bug. Please follow these steps:
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
1. Dedicated Klipper web interfaces have the ability to directly
obtain the Klipper log file. It's the easiest way to obtain the
log when using one of these interfaces. Otherwise, an "scp" or
"sftp" utility is needed to copy the 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). The log file may be located in the
`~/printer_data/logs/klippy.log` file (if using a graphical scp
utility, look for the "printer_data" folder, then the "logs"
folder under that, then the `klippy.log` file). The log file may
alternatively be located in the `/tmp/klippy.log` file (if using
a graphical scp utility that can not directly copy
`/tmp/klippy.log` then repeatedly click on `..` or
"parent folder" until reaching the root directory, click on
the `tmp` folder, and then select the `klippy.log` file).
2. 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
3. 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. It is a good idea to compress the log file with zip or gzip.
5. Open a new topic on the [Klipper Community Forum](#community-forum)
4. It is a good idea to compress the log file with zip or gzip.
5. Open a new topic on the [Klipper Discourse Forum](#discourse-forum)
and provide a clear description of the problem. Other Klipper
contributors will need to understand what steps were taken, what
the desired outcome was, and what outcome actually occurred. The
@@ -136,22 +125,10 @@ bug. Please follow these steps:
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.
See the [CONTRIBUTING document](CONTRIBUTING.md) for 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).
## Klipper github
Klipper github may be used by contributors to share the status of
their work to improve Klipper. It is expected that the person opening
a github ticket is actively working on the given task and will be the
one performing all the work necessary to accomplish it. The Klipper
github is not used for requests, nor to report bugs, nor to ask
questions. Use the [Klipper Community Forum](#community-forum) or the
[Klipper Community Discord](#discord-chat) instead.
[Klipper Discourse Forum](#discourse-forum) or on the
[Klipper Discord Chat](#discord-chat).

View File

@@ -216,7 +216,7 @@ after the above compilation:
```
ls ./build/pysimulavr/_pysimulavr.*.so
```
This commmand should report a specific file (e.g.
This command should report a specific file (e.g.
**./build/pysimulavr/_pysimulavr.cpython-39-x86_64-linux-gnu.so**) and
not an error.

View File

@@ -15,7 +15,7 @@ Klipper has several compelling features:
movement provides quieter and more stable printer operation.
* Best in class performance. Klipper is able to achieve high stepping
rates on both new and old micro-controllers. Even old 8bit
rates on both new and old micro-controllers. Even old 8-bit
micro-controllers can obtain rates over 175K steps per second. On
more recent micro-controllers, several million steps per second are
possible. Higher stepper rates enable higher print velocities. The
@@ -60,7 +60,7 @@ Klipper has several compelling features:
if it is unable to). This makes it easier to use available hardware,
to upgrade to new hardware, and to have confidence in the hardware.
* Portable code. Klipper works on ARM, AVR, and PRU based
* Portable code. Klipper works on ARM, AVR, PRU, and other
micro-controllers. Existing "reprap" style printers can run Klipper
without hardware modification - just add a Raspberry Pi. Klipper's
internal code layout makes it easier to support other
@@ -105,7 +105,8 @@ Klipper supports many standard 3d printer features:
bed tilt detection or full mesh bed leveling. If the bed uses
multiple Z steppers then Klipper can also level by independently
manipulating the Z steppers. Most Z height probes are supported,
including BL-Touch probes and servo activated probes.
including BL-Touch probes and servo activated probes. Probes may be
calibrated for axis twist compensation.
* Automatic delta calibration support. The calibration tool can
perform basic height calibration as well as an enhanced X and Y
@@ -117,10 +118,11 @@ Klipper supports many standard 3d printer features:
* Support for common temperature sensors (eg, common thermistors,
AD595, AD597, AD849x, PT100, PT1000, MAX6675, MAX31855, MAX31856,
MAX31865, BME280, HTU21D, DS18B20, and LM75). Custom thermistors and
custom analog temperature sensors can also be configured. One can
monitor the internal micro-controller temperature sensor and the
internal temperature sensor of a Raspberry Pi.
MAX31865, BME280, HTU21D, DS18B20, AHT10, and LM75). Custom
thermistors and custom analog temperature sensors can also be
configured. One can monitor the internal micro-controller
temperature sensor and the internal temperature sensor of a
Raspberry Pi.
* Basic thermal heater protection enabled by default.
@@ -129,9 +131,9 @@ Klipper supports many standard 3d printer features:
speed can be monitored on fans that have a tachometer.
* Support for run-time configuration of TMC2130, TMC2208/TMC2224,
TMC2209, TMC2660, and TMC5160 stepper motor drivers. There is also
support for current control of traditional stepper drivers via
AD5206, DAC084S085, MCP4451, MCP4728, MCP4018, and PWM pins.
TMC2209, TMC2240, TMC2660, and TMC5160 stepper motor drivers. There
is also support for current control of traditional stepper drivers
via AD5206, DAC084S085, MCP4451, MCP4728, MCP4018, and PWM pins.
* Support for common LCD displays attached directly to the printer. A
default menu is also available. The contents of the display and menu
@@ -151,8 +153,8 @@ Klipper supports many standard 3d printer features:
* Support for filament presence sensors, filament motion sensors, and
filament width sensors.
* Support for measuring and recording acceleration using an adxl345,
mpu9250, and mpu6050 accelerometers.
* Support for measuring and recording acceleration using adxl345,
mpu9250, mpu6050, and lis2dw12 accelerometers.
* Support for limiting the top speed of short "zigzag" moves to reduce
printer vibration and noise. See the [kinematics](Kinematics.md)
@@ -185,6 +187,7 @@ represent total number of steps per second on the micro-controller.
| RP2040 | 2400K | 1636K |
| SAM4E8E | 2500K | 1674K |
| SAMD51 | 3077K | 1885K |
| AR100 | 3529K | 2507K |
| STM32F407 | 3652K | 2459K |
| STM32F446 | 3913K | 2634K |
| STM32H743 | 9091K | 6061K |

View File

@@ -146,14 +146,15 @@ The following commands are available when the
(also see the [bed mesh guide](Bed_Mesh.md)).
#### BED_MESH_CALIBRATE
`BED_MESH_CALIBRATE [METHOD=manual] [<probe_parameter>=<value>]
[<mesh_parameter>=<value>]`: This command probes the bed using
generated points specified by the parameters in the config. After
probing, a mesh is generated and z-movement is adjusted according to
the mesh. See the PROBE command for details on the optional probe
parameters. If METHOD=manual is specified then the manual probing tool
is activated - see the MANUAL_PROBE command above for details on the
additional commands available while this tool is active.
`BED_MESH_CALIBRATE [METHOD=manual] [HORIZONTAL_MOVE_Z=<value>]
[<probe_parameter>=<value>] [<mesh_parameter>=<value>]`: This command probes
the bed using generated points specified by the parameters in the config. After
probing, a mesh is generated and z-movement is adjusted according to the mesh.
See the PROBE command for details on the optional probe parameters. If
METHOD=manual is specified then the manual probing tool is activated - see the
MANUAL_PROBE command above for details on the additional commands available
while this tool is active. The optional `HORIZONTAL_MOVE_Z` value overrides the
`horizontal_move_z` option specified in the config file.
#### BED_MESH_OUTPUT
`BED_MESH_OUTPUT PGP=[<0:1>]`: This command outputs the current probed
@@ -207,13 +208,14 @@ The following commands are available when the
[bed_tilt config section](Config_Reference.md#bed_tilt) is enabled.
#### BED_TILT_CALIBRATE
`BED_TILT_CALIBRATE [METHOD=manual] [<probe_parameter>=<value>]`: This
command will probe the points specified in the config and then
recommend updated x and y tilt adjustments. See the PROBE command for
details on the optional probe parameters. If METHOD=manual is
specified then the manual probing tool is activated - see the
MANUAL_PROBE command above for details on the additional commands
available while this tool is active.
`BED_TILT_CALIBRATE [METHOD=manual] [HORIZONTAL_MOVE_Z=<value>]
[<probe_parameter>=<value>]`: This command will probe the points specified in
the config and then recommend updated x and y tilt adjustments. See the PROBE
command for details on the optional probe parameters. If METHOD=manual is
specified then the manual probing tool is activated - see the MANUAL_PROBE
command above for details on the additional commands available while this tool
is active. The optional `HORIZONTAL_MOVE_Z` value overrides the
`horizontal_move_z` option specified in the config file.
### [bltouch]
@@ -262,13 +264,14 @@ The following commands are available when the
is enabled (also see the [delta calibrate guide](Delta_Calibrate.md)).
#### DELTA_CALIBRATE
`DELTA_CALIBRATE [METHOD=manual] [<probe_parameter>=<value>]`: This
command will probe seven points on the bed and recommend updated
endstop positions, tower angles, and radius. See the PROBE command for
details on the optional probe parameters. If METHOD=manual is
specified then the manual probing tool is activated - see the
MANUAL_PROBE command above for details on the additional commands
available while this tool is active.
`DELTA_CALIBRATE [METHOD=manual] [HORIZONTAL_MOVE_Z=<value>]
[<probe_parameter>=<value>]`: This command will probe seven points on the bed
and recommend updated endstop positions, tower angles, and radius. See the
PROBE command for details on the optional probe parameters. If METHOD=manual is
specified then the manual probing tool is activated - see the MANUAL_PROBE
command above for details on the additional commands available while this tool
is active. The optional `HORIZONTAL_MOVE_Z` value overrides the
`horizontal_move_z` option specified in the config file.
#### DELTA_ANALYZE
`DELTA_ANALYZE`: This command is used during enhanced delta
@@ -307,9 +310,33 @@ The following command is available when the
enabled.
#### SET_DUAL_CARRIAGE
`SET_DUAL_CARRIAGE CARRIAGE=[0|1]`: This command will set the active
carriage. It is typically invoked from the activate_gcode and
deactivate_gcode fields in a multiple extruder configuration.
`SET_DUAL_CARRIAGE CARRIAGE=[0|1] [MODE=[PRIMARY|COPY|MIRROR]]`:
This command will change the mode of the specified carriage.
If no `MODE` is provided it defaults to `PRIMARY`. Setting the mode
to `PRIMARY` deactivates the other carriage and makes the specified
carriage execute subsequent G-Code commands as-is. `COPY` and `MIRROR`
modes are supported only for `CARRIAGE=1`. When set to either of these
modes, carriage 1 will then track the subsequent moves of the carriage 0
and either copy relative movements of it (in `COPY` mode) or execute them
in the opposite (mirror) direction (in `MIRROR` mode).
#### SAVE_DUAL_CARRIAGE_STATE
`SAVE_DUAL_CARRIAGE_STATE [NAME=<state_name>]`: Save the current positions
of the dual carriages and their modes. Saving and restoring DUAL_CARRIAGE
state can be useful in scripts and macros, as well as in homing routine
overrides. If NAME is provided it allows one to name the saved state
to the given string. If NAME is not provided it defaults to "default".
#### RESTORE_DUAL_CARRIAGE_STATE
`RESTORE_DUAL_CARRIAGE_STATE [NAME=<state_name>] [MOVE=[0|1] [MOVE_SPEED=<speed>]]`:
Restore the previously saved positions of the dual carriages and their modes,
unless "MOVE=0" is specified, in which case only the saved modes will be
restored, but not the positions of the carriages. If positions are being
restored and "MOVE_SPEED" is specified, then the toolhead moves will be
performed with the given speed (in mm/s); otherwise the toolhead move will
use the rail homing speed. Note that the carriages restore their positions
only over their own axis, which may be necessary to correctly restore COPY
and MIRROR mode of the dual carraige.
### [endstop_phase]
@@ -549,8 +576,9 @@ clears any error state from the micro-controller.
The following standard G-Code commands are available if a
[gcode_arcs config section](Config_Reference.md#gcode_arcs) is
enabled:
- Controlled Arc Move (G2 or G3): `G2 [X<pos>] [Y<pos>] [Z<pos>]
[E<pos>] [F<speed>] I<value> J<value>`
- Arc Move Clockwise (G2), Arc Move Counter-clockwise (G3): `G2|G3 [X<pos>] [Y<pos>] [Z<pos>]
[E<pos>] [F<speed>] I<value> J<value>|I<value> K<value>|J<value> K<value>`
- Arc Plane Select: G17 (XY plane), G18 (XZ plane), G19 (YZ plane)
### [gcode_macro]
@@ -810,9 +838,17 @@ The following command is available when an
enabled.
#### SET_PIN
`SET_PIN PIN=config_name VALUE=<value> CYCLE_TIME=<cycle_time>`:
Note - hardware PWM does not currently support the CYCLE_TIME
parameter and will use the cycle time defined in the config.
`SET_PIN PIN=config_name VALUE=<value> [CYCLE_TIME=<cycle_time>]`: Set
the pin to the given output `VALUE`. VALUE should be 0 or 1 for
"digital" output pins. For PWM pins, set to a value between 0.0 and
1.0, or between 0.0 and `scale` if a scale is configured in the
output_pin config section.
Some pins (currently only "soft PWM" pins) support setting an explicit
cycle time using the CYCLE_TIME parameter (specified in seconds). Note
that the CYCLE_TIME parameter is not stored between SET_PIN commands
(any SET_PIN command without an explicit CYCLE_TIME parameter will use
the `cycle_time` specified in the output_pin config section).
### [palette2]
@@ -1006,7 +1042,7 @@ frequency response is calculated (across all probe points) and written into
#### SHAPER_CALIBRATE
`SHAPER_CALIBRATE [AXIS=<axis>] [NAME=<name>] [FREQ_START=<min_freq>]
[FREQ_END=<max_freq>] [HZ_PER_SEC=<hz_per_sec>]
[FREQ_END=<max_freq>] [HZ_PER_SEC=<hz_per_sec>] [CHIPS=<adxl345_chip_name>]
[MAX_SMOOTHING=<max_smoothing>]`: Similarly to `TEST_RESONANCES`, runs
the resonance test as configured, and tries to find the optimal
parameters for the input shaper for the requested axis (or both X and
@@ -1020,7 +1056,9 @@ frequency responses and the different input shapers values are written
to a CSV file(s) `/tmp/calibration_data_<axis>_<name>.csv`. Unless
specified, NAME 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.
persisted in the config by issuing `SAVE_CONFIG` command, and if
`[input_shaper]` was already enabled previously, these parameters
take effect immediately.
### [respond]
@@ -1069,16 +1107,17 @@ is enabled (also see the
#### SCREWS_TILT_CALCULATE
`SCREWS_TILT_CALCULATE [DIRECTION=CW|CCW] [MAX_DEVIATION=<value>]
[<probe_parameter>=<value>]`: This command will invoke the bed screws
adjustment tool. It will command the nozzle to different locations (as
defined in the config file) probing the z height and calculate the
number of knob turns to adjust the bed level. If DIRECTION is
specified, the knob turns will all be in the same direction, clockwise
(CW) or counterclockwise (CCW). See the PROBE command for details on
the optional probe parameters. IMPORTANT: You MUST always do a G28
before using this command. If MAX_DEVIATION is specified, the command
will raise a gcode error if any difference in the screw height
relative to the base screw height is greater than the value provided.
[HORIZONTAL_MOVE_Z=<value>] [<probe_parameter>=<value>]`: This command will
invoke the bed screws adjustment tool. It will command the nozzle to different
locations (as defined in the config file) probing the z height and calculate
the number of knob turns to adjust the bed level. If DIRECTION is specified,
the knob turns will all be in the same direction, clockwise (CW) or
counterclockwise (CCW). See the PROBE command for details on the optional probe
parameters. IMPORTANT: You MUST always do a G28 before using this command. If
MAX_DEVIATION is specified, the command will raise a gcode error if any
difference in the screw height relative to the base screw height is greater
than the value provided. The optional `HORIZONTAL_MOVE_Z` value overrides the
`horizontal_move_z` option specified in the config file.
### [sdcard_loop]
@@ -1206,8 +1245,9 @@ The following commands are available when any of the
are enabled.
#### DUMP_TMC
`DUMP_TMC STEPPER=<name>`: This command will read the TMC driver
registers and report their values.
`DUMP_TMC STEPPER=<name> [REGISTER=<name>]`: This command will read all TMC
driver registers and report their values. If a REGISTER is provided, only
the specified register will be dumped.
#### INIT_TMC
`INIT_TMC STEPPER=<name>`: This command will initialize the TMC
@@ -1217,16 +1257,22 @@ turned off then back on.
#### SET_TMC_CURRENT
`SET_TMC_CURRENT STEPPER=<name> CURRENT=<amps> HOLDCURRENT=<amps>`:
This will adjust the run and hold currents of the TMC driver.
(HOLDCURRENT is not applicable to tmc2660 drivers.)
`HOLDCURRENT` is not applicable to tmc2660 drivers.
When used on a driver which has the `globalscaler` field (tmc5160 and tmc2240),
if StealthChop2 is used, the stepper must be held at standstill for >130ms so
that the driver executes the AT#1 calibration.
#### SET_TMC_FIELD
`SET_TMC_FIELD STEPPER=<name> FIELD=<field> VALUE=<value>`: This will
alter the value of the specified register field of the TMC driver.
`SET_TMC_FIELD STEPPER=<name> FIELD=<field> VALUE=<value> VELOCITY=<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.
A VELOCITY can also be specified instead of a VALUE. This velocity is
converted to the 20bit TSTEP based value representation. Only use the VELOCITY
argument for fields that represent velocities.
### [toolhead]
@@ -1293,6 +1339,17 @@ print.
#### SDCARD_RESET_FILE
`SDCARD_RESET_FILE`: Unload file and clear SD state.
### [axis_twist_compensation]
The following commands are available when the
[axis_twist_compensation config
section](Config_Reference.md#axis_twist_compensation) is enabled.
#### AXIS_TWIST_COMPENSATION_CALIBRATE
`AXIS_TWIST_COMPENSATION_CALIBRATE [SAMPLE_COUNT=<value>]`: Initiates the X
twist calibration wizard. `SAMPLE_COUNT` specifies the number of points along
the X axis to calibrate at and defaults to 3.
### [z_thermal_adjust]
The following commands are available when the
@@ -1317,7 +1374,8 @@ The following commands are available when the
[z_tilt config section](Config_Reference.md#z_tilt) is enabled.
#### Z_TILT_ADJUST
`Z_TILT_ADJUST [<probe_parameter>=<value>]`: This command will probe
the points specified in the config and then make independent
adjustments to each Z stepper to compensate for tilt. See the PROBE
command for details on the optional probe parameters.
`Z_TILT_ADJUST [HORIZONTAL_MOVE_Z=<value>] [<probe_parameter>=<value>]`: This
command will probe the points specified in the config and then make independent
adjustments to each Z stepper to compensate for tilt. See the PROBE command for
details on the optional probe parameters. The optional `HORIZONTAL_MOVE_Z`
value overrides the `horizontal_move_z` option specified in the config file.

View File

@@ -2,7 +2,7 @@
This document describes Filament Width Sensor host module. Hardware used for
developing this host module is based on two Hall linear sensors (ss49e for
example). Sensors in the body are located opposite sides. Principle of operation:
example). Sensors in the body are located on opposite sides. Principle of operation:
two hall sensors work in differential mode, temperature drift same for sensor.
Special temperature compensation not needed.
@@ -18,9 +18,9 @@ To use Hall filament width sensor, read
Sensor generates two analog output based on calculated filament width. Sum of
output voltage always equals to detected filament width. Host module monitors
voltage changes and adjusts extrusion multiplier. I use aux2 connector on
ramps-like board analog11 and analog12 pins. You can use different pins and
differenr boards.
voltage changes and adjusts extrusion multiplier. I use the aux2 connector on
a ramps-like board with the analog11 and analog12 pins. You can use different pins
and different boards.
## Template for menu variables

View File

@@ -1,35 +1,60 @@
# Measuring Resonances
Klipper has built-in support for ADXL345 accelerometer, which can be used to
measure resonance frequencies of the printer for different axes, and auto-tune
[input shapers](Resonance_Compensation.md) to compensate for resonances.
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).
Klipper has built-in support for the ADXL345, MPU-9250 and LIS2DW compatible
accelerometers which can be used to measure resonance frequencies of the printer
for different axes, and auto-tune [input shapers](Resonance_Compensation.md) to
compensate for resonances. Note that using accelerometers requires some
soldering and crimping. The ADXL345/LIS2DW can be connected to the SPI interface
of a Raspberry Pi or MCU board (it needs to be reasonably fast). The MPU family can
be connected to the I2C interface of a Raspberry Pi directly, or to an I2C
interface of an MCU board that supports 400kbit/s *fast mode* in Klipper.
When sourcing ADXL345, 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.
When sourcing accelerometers, be aware that there are a variety of different PCB
board designs and different clones of them. If it is going to be connected to a
5V printer MCU ensure it has a voltage regulator and level shifters.
For ADXL345s/LIS2DWs, make sure that the board supports SPI mode (a small number of
boards appear to be hard-configured for I2C by pulling SDO to GND).
For MPU-9250/MPU-9255/MPU-6515/MPU-6050/MPU-6500s there are also a variety of
board designs and clones with different I2C pull-up resistors which will need
supplementing.
## MCUs with Klipper I2C *fast-mode* Support
| MCU Family | MCU(s) Tested | MCU(s) with Support |
|:--:|:--|:--|
| Raspberry Pi | 3B+, Pico | 3A, 3A+, 3B, 4 |
| AVR ATmega | ATmega328p | ATmega32u4, ATmega128, ATmega168, ATmega328, ATmega644p, ATmega1280, ATmega1284, ATmega2560 |
| AVR AT90 | - | AT90usb646, AT90usb1286 |
## Installation instructions
### Wiring
An ethernet cable with shielded twisted pairs (cat5e or better) is recommended
for signal integrety over a long distance. If you still experience signal integrity
issues (SPI/I2C errors), shorten the cable.
for signal integrity over a long distance. If you still experience signal
integrity issues (SPI/I2C errors):
Connect ethernet cable shielding to the controller board/RPI ground.
- Double check the wiring with a digital multimeter for:
- Correct connections when turned off (continuity)
- Correct power and ground voltages
- I2C only:
- Check the SCL and SDA lines' resistances to 3.3V are in the range of 900
ohms to 1.8K
- For full technical details consult [chapter 7 of the I2C-bus specification
and user manual UM10204](https://www.pololu.com/file/0J435/UM10204.pdf)
for *fast-mode*
- Shorten the cable
Connect ethernet cable shielding only to the MCU board/Pi ground.
***Double-check your wiring before powering up to prevent
damaging your MCU/Raspberry Pi or the accelerometer.***
#### SPI Accelerometers
### SPI Accelerometers
Suggested twisted pair order:
Suggested twisted pair order for three twisted pairs:
```
GND+MISO
@@ -37,11 +62,15 @@ GND+MISO
SCLK+CS
```
##### ADXL345
Note that unlike a cable shield, GND must be connected at both ends.
#### ADXL345
**Note: Many MCUs will work with an ADXL345 in SPI mode(eg Pi Pico), wiring and
configuration will vary according to your specific board and avaliable pins.**
##### Direct to Raspberry Pi
**Note: Many MCUs will work with an ADXL345 in SPI mode (e.g. Pi Pico), wiring
and configuration will vary according to your specific board and available
pins.**
You need to connect ADXL345 to your Raspberry Pi via SPI. Note that the I2C
connection, which is suggested by ADXL345 documentation, has too low throughput
@@ -49,7 +78,7 @@ and **will not work**. The recommended connection scheme:
| ADXL345 pin | RPi pin | RPi pin name |
|:--:|:--:|:--:|
| 3V3 (or VCC) | 01 | 3.3v DC power |
| 3V3 (or VCC) | 01 | 3.3V DC power |
| GND | 06 | Ground |
| CS | 24 | GPIO08 (SPI0_CE0_N) |
| SDO | 21 | GPIO09 (SPI0_MISO) |
@@ -60,20 +89,56 @@ Fritzing wiring diagrams for some of the ADXL345 boards:
![ADXL345-Rpi](img/adxl345-fritzing.png)
#### I2C Accelerometers
##### Using Raspberry Pi Pico
Suggested twisted pair order:
You may connect the ADXL345 to your Raspberry Pi Pico and then connect the
Pico to your Raspberry Pi via USB. This makes it easy to reuse the
accelerometer on other Klipper devices, as you can connect via USB instead
of GPIO. The Pico does not have much processing power, so make sure it is
only running the accelerometer and not performing any other duties.
In order to avoid damage to your RPi make sure to connect the ADXL345 to 3.3V
only. Depending on the board's layout, a level shifter may be present, which
makes 5V dangerous for your RPi.
| ADXL345 pin | Pico pin | Pico pin name |
|:--:|:--:|:--:|
| 3V3 (or VCC) | 36 | 3.3V DC power |
| GND | 38 | Ground |
| CS | 2 | GP1 (SPI0_CSn) |
| SDO | 1 | GP0 (SPI0_RX) |
| SDA | 5 | GP3 (SPI0_TX) |
| SCL | 4 | GP2 (SPI0_SCK) |
Wiring diagrams for some of the ADXL345 boards:
![ADXL345-Pico](img/adxl345-pico.png)
### I2C Accelerometers
Suggested twisted pair order for three pairs (preferred):
```
3.3V+GND
SDA+GND
SCL+GND
```
or for two pairs:
```
3.3V+SDA
GND+SCL
```
##### MPU-9250/MPU-9255/MPU-6515/MPU-6050/MPU-6500
Note that unlike a cable shield, any GND(s) should be connected at both ends.
Alternatives to the ADXL345 are MPU-9250/MPU-9255/MPU-6515/MPU-6050/MPU-6500.
These accelerometers have been tested to work over I2C on the RPi or RP2040(pico)
at 400kbaud.
#### MPU-9250/MPU-9255/MPU-6515/MPU-6050/MPU-6500
These accelerometers have been tested to work over I2C on the RPi, RP2040 (Pico)
and AVR at 400kbit/s (*fast mode*). Some MPU accelerometer modules include
pull-ups, but some are too large at 10K and must be changed or supplemented by
smaller parallel resistors.
Recommended connection scheme for I2C on the Raspberry Pi:
@@ -84,18 +149,34 @@ Recommended connection scheme for I2C on the Raspberry Pi:
| SDA | 03 | GPIO02 (SDA1) |
| SCL | 05 | GPIO03 (SCL1) |
![MPU-9250 connected to RPI](img/mpu9250-PI-fritzing.png)
The RPi has buit-in 1.8K pull-ups on both SCL and SDA.
Recommended connection scheme for I2C(i2c0a) on the RP2040:
![MPU-9250 connected to Pi](img/mpu9250-PI-fritzing.png)
| MPU-9250 pin | RP2040 pin | RPi pin name |
Recommended connection scheme for I2C (i2c0a) on the RP2040:
| MPU-9250 pin | RP2040 pin | RP2040 pin name |
|:--:|:--:|:--:|
| VCC | 39 | 3v3 |
| VCC | 36 | 3v3 |
| GND | 38 | Ground |
| SDA | 01 | GP0 (I2C0 SDA) |
| SCL | 02 | GP1 (I2C0 SCL) |
![MPU-9250 connected to PICO](img/mpu9250-PICO-fritzing.png)
The Pico does not include any built-in I2C pull-up resistors.
![MPU-9250 connected to Pico](img/mpu9250-PICO-fritzing.png)
##### Recommended connection scheme for I2C(TWI) on the AVR ATmega328P Arduino Nano:
| MPU-9250 pin | Atmega328P TQFP32 pin | Atmega328P pin name | Arduino Nano pin |
|:--:|:--:|:--:|:--:|
| VCC | 39 | - | - |
| GND | 38 | Ground | GND |
| SDA | 27 | SDA | A4 |
| SCL | 28 | SCL | A5 |
The Arduino Nano does not include any built-in pull-up resistors nor a 3.3V
power pin.
### Mounting the accelerometer
@@ -138,12 +219,13 @@ of time, up to 10-20 minutes. Be patient and wait for the completion of
the installation. On some occasions, if the board has too little RAM
the installation may fail and you will need to enable swap.
Afterwards, check and follow the instructions in the
[RPi Microcontroller document](RPi_microcontroller.md) to setup the
"linux mcu" on the Raspberry Pi.
#### Configure ADXL345 With RPi
First, check and follow the instructions in the
[RPi Microcontroller document](RPi_microcontroller.md) to setup the
"linux mcu" on the Raspberry Pi. This will configure a second Klipper
instance that runs on your Pi.
Make sure the Linux SPI driver is enabled by running `sudo
raspi-config` and enabling SPI under the "Interfacing options" menu.
@@ -164,6 +246,85 @@ probe_points:
It is advised to start with 1 probe point, in the middle of the print bed,
slightly above it.
#### Configure ADXL345 With Pi Pico
##### Flash the Pico Firmware
On your Raspberry Pi, compile the firmware for the Pico.
```
cd ~/klipper
make clean
make menuconfig
```
![Pico menuconfig](img/klipper_pico_menuconfig.png)
Now, while holding down the `BOOTSEL` button on the Pico, connect the Pico to
the Raspberry Pi via USB. Compile and flash the firmware.
```
make flash FLASH_DEVICE=first
```
If that fails, you will be told which `FLASH_DEVICE` to use. In this example,
that's ```make flash FLASH_DEVICE=2e8a:0003```.
![Determine flash device](img/flash_rp2040_FLASH_DEVICE.png)
##### Configure the Connection
The Pico will now reboot with the new firmware and should show up as a serial
device. Find the pico serial device with `ls /dev/serial/by-id/*`. You can
now add an `adxl.cfg` file with the following settings:
```
[mcu adxl]
# Change <mySerial> to whatever you found above. For example,
# usb-Klipper_rp2040_E661640843545B2E-if00
serial: /dev/serial/by-id/usb-Klipper_rp2040_<mySerial>
[adxl345]
cs_pin: adxl:gpio1
spi_bus: spi0a
axes_map: x,z,y
[resonance_tester]
accel_chip: adxl345
probe_points:
# Somewhere slightly above the middle of your print bed
147,154, 20
[output_pin power_mode] # Improve power stability
pin: adxl:gpio23
```
If setting up the ADXL345 configuration in a separate file, as shown above,
you'll also want to modify your `printer.cfg` file to include this:
```
[include adxl.cfg] # Comment this out when you disconnect the accelerometer
```
Restart Klipper via the `RESTART` command.
#### Configure LIS2DW series
```
[mcu lis]
# Change <mySerial> to whatever you found above. For example,
# usb-Klipper_rp2040_E661640843545B2E-if00
serial: /dev/serial/by-id/usb-Klipper_rp2040_<mySerial>
[lis2dw]
cs_pin: lis:gpio1
spi_bus: spi0a
axes_map: x,z,y
[resonance_tester]
accel_chip: lis2dw
probe_points:
# Somewhere slightly above the middle of your print bed
147,154, 20
```
#### Configure MPU-6000/9000 series With RPi
Make sure the Linux I2C driver is enabled and the baud rate is
@@ -184,18 +345,18 @@ probe_points:
100, 100, 20 # an example
```
#### Configure MPU-6000/9000 series With PICO
#### Configure MPU-9520 Compatibles With Pico
PICO I2C is set to 400000 on default. Simply add the following to the
Pico I2C is set to 400000 on default. Simply add the following to the
printer.cfg:
```
[mcu pico]
serial: /dev/serial/by-id/<your PICO's serial ID>
serial: /dev/serial/by-id/<your Pico's serial ID>
[mpu9250]
i2c_mcu: pico
i2c_bus: i2c1a
i2c_bus: i2c0a
[resonance_tester]
accel_chip: mpu9250
@@ -203,7 +364,25 @@ probe_points:
100, 100, 20 # an example
[static_digital_output pico_3V3pwm] # Improve power stability
pin: pico:gpio23
pins: pico:gpio23
```
#### Configure MPU-9520 Compatibles with AVR
AVR I2C will be set to 400000 by the mpu9250 option. Simply add the following
to the printer.cfg:
```
[mcu nano]
serial: /dev/serial/by-id/<your nano's serial ID>
[mpu9250]
i2c_mcu: nano
[resonance_tester]
accel_chip: mpu9250
probe_points:
100, 100, 20 # an example
```
Restart Klipper via the `RESTART` command.
@@ -228,12 +407,14 @@ Recv: // adxl345 values (x, y, z): 470.719200, 941.438400, 9728.196800
```
If you get an error like `Invalid adxl345 id (got xx vs e5)`, where `xx`
is some other ID, it is indicative of the connection problem with ADXL345,
is some other ID, immediately try again. There's an issue with SPI
initialization. If you still get an error, it is indicative of the connection
problem with ADXL345,
or the faulty sensor. Double-check the power, the wiring (that it matches
the schematics, no wire is broken or loose, etc.), and soldering quality.
**If you are using MPU-6000/9000 series accelerometer and it show up as `mpu-unknown`, use with
caution! They are probably refurbished chips!**
**If you are using a MPU-9250 compatible accelerometer and it shows up as
`mpu-unknown`, use with caution! They are probably refurbished chips!**
Next, try running `MEASURE_AXES_NOISE` in Octoprint, you should get some
baseline numbers for the noise of accelerometer on the axes (should be
@@ -310,7 +491,7 @@ or you can choose some other configuration yourself based on the generated
charts: peaks in the power spectral density on the charts correspond to
the resonance frequencies of the printer.
Note that alternatively you can run the input shaper autocalibration
Note that alternatively you can run the input shaper auto-calibration
from Klipper [directly](#input-shaper-auto-calibration), which can be
convenient, for example, for the input shaper
[re-calibration](#input-shaper-re-calibration).
@@ -322,10 +503,11 @@ of the accelerometer between the measurements for X and Y axes: measure the
resonances of X axis with the accelerometer attached to the toolhead and the
resonances of Y axis - to the bed (the usual bed slinger setup).
However, you can also connect two accelerometers simultaneously, though they
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:
However, you can also connect two accelerometers simultaneously, though the
ADXL345 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 hotend]
# Assuming `hotend` chip is connected to an RPi
@@ -342,6 +524,30 @@ accel_chip_y: adxl345 bed
probe_points: ...
```
Two MPUs can share one I2C bus, but they **cannot** measure simultaneously as
the 400kbit/s I2C bus is not fast enough. One must have its AD0 pin pulled-down
to 0V (address 104) and the other its AD0 pin pulled-up to 3.3V (address 105):
```
[mpu9250 hotend]
i2c_mcu: rpi
i2c_bus: i2c.1
i2c_address: 104 # This MPU has pin AD0 pulled low
[mpu9250 bed]
i2c_mcu: rpi
i2c_bus: i2c.1
i2c_address: 105 # This MPU has pin AD0 pulled high
[resonance_tester]
# Assuming the typical setup of the bed slinger printer
accel_chip_x: mpu9250 hotend
accel_chip_y: mpu9250 bed
probe_points: ...
```
[Test with each MPU individually before connecting both to the bus for easy
debugging.]
Then the commands `TEST_RESONANCES AXIS=X` and `TEST_RESONANCES AXIS=Y`
will use the correct accelerometer for each axis.
@@ -550,9 +756,9 @@ supplying `AXIS=` parameter, like
SHAPER_CALIBRATE AXIS=X
```
**Warning!** It is not advisable to run the shaper autocalibration very
**Warning!** It is not advisable to run the shaper auto-calibration very
frequently (e.g. before every print, or every day). In order to determine
resonance frequencies, autocalibration creates intensive vibrations on each of
resonance frequencies, auto-calibration creates intensive vibrations on each of
the axes. Generally, 3D printers are not designed to withstand a prolonged
exposure to vibrations near the resonance frequencies. Doing so may increase
wear of the printer components and reduce their lifespan. There is also an

View File

@@ -35,6 +35,8 @@ communication with the Klipper developers.
locations.
- [Endstop phase](Endstop_Phase.md): Stepper assisted Z endstop
positioning.
- [Axis Twist Compensation](Axis_Twist_Compensation.md): A tool to compensate
for inaccurate probe readings due to twist in X gantry.
- [Resonance compensation](Resonance_Compensation.md): A tool to
reduce ringing in prints.
- [Measuring resonances](Measuring_Resonances.md): Information on
@@ -54,7 +56,7 @@ communication with the Klipper developers.
perfectly square.
- [PWM tools](Using_PWM_Tools.md): Guide on how to use PWM controlled
tools such as lasers or spindles.
- [Exclude Object](Exclude_Object.md): The guide to the Exclude Objecs
- [Exclude Object](Exclude_Object.md): The guide to the Exclude Objects
implementation.
## Developer Documentation
@@ -91,6 +93,9 @@ communication with the Klipper developers.
Beaglebone PRU.
- [Bootloaders](Bootloaders.md): Developer information on
micro-controller flashing.
- [Bootloader Entry](Bootloader_Entry.md): Requesting the bootloader.
- [CAN bus](CANBUS.md): Information on using CAN bus with Klipper.
- [CAN bus troubleshooting](CANBUS_Troubleshooting.md): Tips for
troubleshooting CAN bus.
- [TSL1401CL filament width sensor](TSL1401CL_Filament_Width_Sensor.md)
- [Hall filament width sensor](Hall_Filament_Width_Sensor.md)

View File

@@ -27,4 +27,4 @@ follows: `python2 scripts/make_version.py YOURDISTRONAME > klippy/.version`.
## Sample packaging script
klipper-git is packaged for Arch Linux, and has a PKGBUILD (package build
script) available at [Arch User Repositiory](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=klipper-git).
script) available at [Arch User Repository](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=klipper-git).

View File

@@ -25,8 +25,8 @@ must run before the klippy process.
After installing Klipper, install the script. run:
```
cd ~/klipper/
sudo cp "./scripts/klipper-mcu-start.sh" /etc/init.d/klipper_mcu
sudo update-rc.d klipper_mcu defaults
sudo cp ./scripts/klipper-mcu.service /etc/systemd/system/
sudo systemctl enable klipper-mcu.service
```
## Building the micro-controller code
@@ -198,18 +198,28 @@ default on a Raspberry and can be activated by adding a line to
dtoverlay=pwm,pin=12,func=4
```
This example enables only PWM0 and routes it to gpio12. If both PWM
channels need to be enabled you can use `pwm-2chan`.
channels need to be enabled you can use `pwm-2chan`:
```
# Enable pwmchip sysfs interface
dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4
```
This example additionally enables PWM1 and routes it to gpio13.
The overlay does not expose the pwm line on sysfs on boot and needs to
be exported by echo'ing the number of the pwm channel to
`/sys/class/pwm/pwmchip0/export`:
`/sys/class/pwm/pwmchip0/export`. This will create device `/sys/class/pwm/pwmchip0/pwm0` in the
filesystem. The easiest way to do this is by adding this to
`/etc/rc.local` before the `exit 0` line:
```
# Enable pwmchip sysfs interface
echo 0 > /sys/class/pwm/pwmchip0/export
```
This will create device `/sys/class/pwm/pwmchip0/pwm0` in the
filesystem. The easiest way to do this is by adding this to
`/etc/rc.local` before the `exit 0` line.
When using both PWM channels, the number of the second channel needs to be echo'd as well:
```
# Enable pwmchip sysfs interface
echo 0 > /sys/class/pwm/pwmchip0/export
echo 1 > /sys/class/pwm/pwmchip0/export
```
With the sysfs in place, you can now use either the pwm channel(s) by
adding the following piece of configuration to your `printer.cfg`:
@@ -219,9 +229,17 @@ pin: host:pwmchip0/pwm0
pwm: True
hardware_pwm: True
cycle_time: 0.000001
[output_pin beeper]
pin: host:pwmchip0/pwm1
pwm: True
hardware_pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.0005
```
This will add hardware pwm control to gpio12 on the Pi (because the
overlay was configured to route pwm0 to pin=12).
This will add hardware pwm control to gpio12 and gpio13 on the Pi (because the
overlay was configured to route pwm0 to pin=12 and pwm1 to pin=13).
PWM0 can be routed to gpio12 and gpio18, PWM1 can be routed to gpio13
and gpio19:

View File

@@ -3,6 +3,24 @@
History of Klipper releases. Please see
[installation](Installation.md) for information on installing Klipper.
## Klipper 0.12.0
Available on 20231110. Major changes in this release:
* Support for COPY and MIRROR modes on IDEX printers.
* Several micro-controller improvements:
* Support for new ar100 and hc32f460 architectures.
* Support for stm32f7, stm32g0b0, stm32g07x, stm32g4, stm32h723,
n32g45x, samc21, and samd21j18 chip variants.
* Improved DFU and Katapult reboot handling.
* Improved performance on USB to CANbus bridge mode.
* Improved performance on "linux mcu".
* New support for software based i2c.
* New hardware support for tmc2240 stepper motor drivers, lis2dw12
accelerometers, and aht10 temperature sensors.
* New axis_twist_compensation and temperature_combined modules added.
* New support for gcode arcs in XY, XZ, and YZ planes.
* Several bug fixes and code cleanups.
## Klipper 0.11.0
Available on 20221128. Major changes in this release:

View File

@@ -418,18 +418,34 @@ if necessary.
### Is dual carriage setup supported with input shapers?
There is no dedicated support for dual carriages with input shapers, but it does
not mean this setup will not work. One should run the tuning twice for each
of the carriages, and calculate the ringing frequencies for X and Y axes for
each of the carriages independently. Then put the values for carriage 0 into
[input_shaper] section, and change the values on the fly when changing
carriages, e.g. as a part of some macro:
```
SET_DUAL_CARRIAGE CARRIAGE=1
SET_INPUT_SHAPER SHAPER_FREQ_X=... SHAPER_FREQ_Y=...
Yes. In this case, one should measure the resonances twice for each carriage.
For example, if the second (dual) carriage is installed on X axis, it is
possible to set different input shapers for X axis for the primary and dual
carriages. However, the input shaper for Y axis should be the same for both
carriages (as ultimately this axis is driven by one or more stepper motors each
commanded to perform exactly the same steps). One possibility to configure
the input shaper for such setups is to keep `[input_shaper]` section empty and
additionally define a `[delayed_gcode]` section in the `printer.cfg` as follows:
```
[input_shaper]
# Intentionally empty
And similarly when switching back to carriage 0.
[delayed_gcode init_shaper]
initial_duration: 0.1
gcode:
SET_DUAL_CARRIAGE CARRIAGE=1
SET_INPUT_SHAPER SHAPER_TYPE_X=<dual_carriage_shaper> SHAPER_FREQ_X=<dual_carriage_freq> SHAPER_TYPE_Y=<y_shaper> SHAPER_FREQ_Y=<y_freq>
SET_DUAL_CARRIAGE CARRIAGE=0
SET_INPUT_SHAPER SHAPER_TYPE_X=<primary_carriage_shaper> SHAPER_FREQ_X=<primary_carriage_freq> SHAPER_TYPE_Y=<y_shaper> SHAPER_FREQ_Y=<y_freq>
```
Note that `SHAPER_TYPE_Y` and `SHAPER_FREQ_Y` should be the same in both
commands. It is also possible to put a similar snippet into the start g-code
in the slicer, however then the shaper will not be enabled until any print
is started.
Note that the input shaper only needs to be configured once. Subsequent changes
of the carriages or their modes via `SET_DUAL_CARRIAGE` command will preserve
the configured input shaper parameters.
### Does input_shaper affect print time?

View File

@@ -127,13 +127,13 @@ BOARD_DEFS = {
```
The following fields may be specified:
- `mcu`: The mcu type. This can be retrevied after configuring the build
- `mcu`: The mcu type. This can be retrieved 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
- `spi_bus`: The SPI bus connected to the SD Card. This should be retrieved
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.
retrieved 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
@@ -170,7 +170,7 @@ BOARD_ALIASES = {
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).
the [Klipper Discord](Contact.md).
## Flashing Boards that use SDIO

View File

@@ -87,3 +87,39 @@ Klipper's maximum extrusion cross-section check.
In contrast, it is okay (and often helpful) to use a slicer's
"retract" setting, "wipe" setting, and/or "wipe on retract" setting.
## START_PRINT macros
When using a START_PRINT macro or similar, it is useful to sometimes
pass through parameters from the slicer variables to the macro.
In Cura, to pass through temperatures, the following start gcode
would be used:
```
START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}
```
In slic3r derivatives such as PrusaSlicer and SuperSlicer, the
following would be used:
```
START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]
```
Also note that these slicers will insert their own heating codes when
certain conditions are not met. In Cura, the existence of the
`{material_bed_temperature_layer_0}` and `{material_print_temperature_layer_0}`
variables is enough to mitigate this. In slic3r derivatives,
you would use:
```
M140 S0
M104 S0
```
before the macro call. Also note that SuperSlicer has a
"custom gcode only" button option, which achieves the same outcome.
An example of a START_PRINT macro using these paramaters can
be found in config/sample-macros.cfg

View File

@@ -6,7 +6,7 @@ sponsors.
## BIGTREETECH
[<img src="./img/sponsors/BTT_BTT.png" width="200" />](https://bigtree-tech.com/collections/all-products)
[<img src="./img/sponsors/BTT_BTT.png" width="200" style="margin:25px"/>](https://bigtree-tech.com/collections/all-products)
BIGTREETECH is the official mainboard sponsor of Klipper. BIGTREETECH
is committed to developing innovative and competitive products to
@@ -14,6 +14,11 @@ serve the 3D printing community better. Follow them on
[Facebook](https://www.facebook.com/BIGTREETECH) or
[Twitter](https://twitter.com/BigTreeTech).
## Sponsors
[<img src="./img/sponsors/obico-light-horizontal.png" width="200" style="margin:25px" />](https://obico.io/klipper.html?source=klipper_sponsor)
[<img src="./img/sponsors/peopoly-logo.png" width="200" style="margin:25px" />](https://peopoly.net)
## Klipper Developers
### Kevin O'Connor

View File

@@ -126,6 +126,9 @@ The following information is available for extruder_stepper objects (as well as
[extruder](Config_Reference.md#extruder) objects):
- `pressure_advance`: The current [pressure advance](Pressure_Advance.md) value.
- `smooth_time`: The current pressure advance smooth time.
- `motion_queue`: The name of the extruder that this extruder stepper is
currently synchronized to. This is reported as `None` if the extruder stepper
is not currently associated with an extruder.
## fan
@@ -165,6 +168,12 @@ The following information is available in the
module. These settings may differ from the config file if a
`SET_RETRACTION` command alters them.
## gcode_button
The following information is available in
[gcode_button some_name](Config_Reference.md#gcode_button) objects:
- `state`: The current button state returned as "PRESSED" or "RELEASED"
## gcode_macro
The following information is available in
@@ -236,6 +245,11 @@ object is available if any heater is defined):
temperature sensors by their full config section names,
e.g. `["extruder", "heater_bed", "heater_generic my_custom_heater",
"temperature_sensor electronics_temp"]`.
- `available_monitors`: Returns a list of all currently available
temperature monitors by their full config section names,
e.g. `["tmc2240 stepper_x"]`. While a temperature sensor is always
available to read, a temperature monitor may not be available and
will return null in such case.
## idle_timeout
@@ -343,6 +357,7 @@ The following information is available in the
[probe](Config_Reference.md#probe) object (this object is also
available if a [bltouch](Config_Reference.md#bltouch) config section
is defined):
- `name`: Returns the name of the probe in use.
- `last_query`: Returns True if the probe was reported as "triggered"
during the last QUERY_PROBE command. Note, if this is used in a
macro, due to the order of template expansion, the QUERY_PROBE
@@ -369,6 +384,27 @@ The following information is available in the `query_endstops` object
the QUERY_ENDSTOP command must be run prior to the macro containing
this reference.
## screws_tilt_adjust
The following information is available in the `screws_tilt_adjust`
object:
- `error`: Returns True if the most recent `SCREWS_TILT_CALCULATE`
command included the `MAX_DEVIATION` parameter and any of the probed
screw points exceeded the specified `MAX_DEVIATION`.
- `max_deviation`: Return the last `MAX_DEVIATION` value of the most
recent `SCREWS_TILT_CALCULATE` command.
- `results["<screw>"]`: A dictionary containing the following keys:
- `z`: The measured Z height of the screw location.
- `sign`: A string specifying the direction to turn to screw for the
necessary adjustment. Either "CW" for clockwise or "CCW" for
counterclockwise.
- `adjust`: The number of screw turns to adjust the screw, given in
the format "HH:MM," where "HH" is the number of full screw turns
and "MM" is the number of "minutes of a clock face" representing
a partial screw turn. (E.g. "01:15" would mean to turn the screw
one and a quarter revolutions.)
- `is_base`: Returns True if this is the base screw.
## servo
The following information is available in
@@ -376,6 +412,12 @@ The following information is available in
- `printer["servo <config_name>"].value`: The last setting of the PWM
pin (a value between 0.0 and 1.0) associated with the servo.
## stepper_enable
The following information is available in the `stepper_enable` object (this
object is available if any stepper is defined):
- `steppers["<stepper>"]`: Returns True if the given stepper is enabled.
## system_stats
The following information is available in the `system_stats` object
@@ -390,8 +432,9 @@ The following information is available in
[bme280 config_section_name](Config_Reference.md#bmp280bme280bme680-temperature-sensor),
[htu21d config_section_name](Config_Reference.md#htu21d-sensor),
[lm75 config_section_name](Config_Reference.md#lm75-temperature-sensor),
and
[temperature_host config_section_name](Config_Reference.md#host-temperature-sensor)
and
[temperature_combined config_section_name](Config_Reference.md#combined-temperature-sensor)
objects:
- `temperature`: The last read temperature from the sensor.
- `humidity`, `pressure`, `gas`: The last read values from the sensor
@@ -429,6 +472,9 @@ objects (eg, `[tmc2208 stepper_x]`):
- `drv_status`: The results of the last driver status query. (Only
non-zero fields are reported.) This field will be null if the driver
is not enabled (and thus is not periodically queried).
- `temperature`: The internal temperature reported by the driver. This
field will be null if the driver is not enabled or if the driver
does not support temperature reporting.
- `run_current`: The currently set run current.
- `hold_current`: The currently set hold current.
@@ -463,10 +509,11 @@ The following information is available in the `toolhead` object
The following information is available in
[dual_carriage](Config_Reference.md#dual_carriage)
on a hybrid_corexy or hybrid_corexz robot
- `mode`: The current mode. Possible values are: "FULL_CONTROL"
- `active_carriage`: The current active carriage.
Possible values are: "CARRIAGE_0", "CARRIAGE_1"
on a cartesian, hybrid_corexy or hybrid_corexz robot
- `carriage_0`: The mode of the carriage 0. Possible values are:
"INACTIVE" and "PRIMARY".
- `carriage_1`: The mode of the carriage 1. Possible values are:
"INACTIVE", "PRIMARY", "COPY", and "MIRROR".
## virtual_sdcard

View File

@@ -544,7 +544,7 @@ 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`
#### TMC reports error: `... ShortToGND` OR `ShortToSupply`
This indicates the driver has disabled itself because it detected very
high current passing through the driver. This may indicate a loose or

View File

@@ -101,6 +101,7 @@ nav:
- Manual_Level.md
- Bed_Mesh.md
- Endstop_Phase.md
- Axis_Twist_Compensation.md
- Resonance Compensation:
- Resonance_Compensation.md
- Measuring_Resonances.md
@@ -132,7 +133,9 @@ nav:
- RPi_microcontroller.md
- Beaglebone.md
- Bootloaders.md
- Bootloader_Entry.md
- CANBUS.md
- CANBUS_Troubleshooting.md
- TSL1401CL_Filament_Width_Sensor.md
- Hall_Filament_Width_Sensor.md
- Sponsors.md

BIN
docs/img/adxl345-pico.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -21,7 +21,7 @@ SOURCE_FILES = [
'pollreactor.c', 'msgblock.c', 'trdispatch.c',
'kin_cartesian.c', 'kin_corexy.c', 'kin_corexz.c', 'kin_delta.c',
'kin_deltesian.c', 'kin_polar.c', 'kin_rotary_delta.c', 'kin_winch.c',
'kin_extruder.c', 'kin_shaper.c',
'kin_extruder.c', 'kin_shaper.c', 'kin_idex.c',
]
DEST_LIB = "c_helper.so"
OTHER_FILES = [
@@ -85,13 +85,13 @@ defs_trapq = """
double x_r, y_r, z_r;
};
struct trapq *trapq_alloc(void);
void trapq_free(struct trapq *tq);
void trapq_append(struct trapq *tq, double print_time
, double accel_t, double cruise_t, double decel_t
, double start_pos_x, double start_pos_y, double start_pos_z
, double axes_r_x, double axes_r_y, double axes_r_z
, double start_v, double cruise_v, double accel);
struct trapq *trapq_alloc(void);
void trapq_free(struct trapq *tq);
void trapq_finalize_moves(struct trapq *tq, double print_time);
void trapq_set_position(struct trapq *tq, double print_time
, double pos_x, double pos_y, double pos_z);
@@ -101,7 +101,6 @@ defs_trapq = """
defs_kin_cartesian = """
struct stepper_kinematics *cartesian_stepper_alloc(char axis);
struct stepper_kinematics *cartesian_reverse_stepper_alloc(char axis);
"""
defs_kin_corexy = """
@@ -144,8 +143,8 @@ defs_kin_extruder = """
"""
defs_kin_shaper = """
double input_shaper_get_step_generation_window(int n, double a[]
, double t[]);
double input_shaper_get_step_generation_window(
struct stepper_kinematics *sk);
int input_shaper_set_shaper_params(struct stepper_kinematics *sk, char axis
, int n, double a[], double t[]);
int input_shaper_set_sk(struct stepper_kinematics *sk
@@ -153,6 +152,14 @@ defs_kin_shaper = """
struct stepper_kinematics * input_shaper_alloc(void);
"""
defs_kin_idex = """
void dual_carriage_set_sk(struct stepper_kinematics *sk
, struct stepper_kinematics *orig_sk);
int dual_carriage_set_transform(struct stepper_kinematics *sk
, char axis, double scale, double offs);
struct stepper_kinematics * dual_carriage_alloc(void);
"""
defs_serialqueue = """
#define MESSAGE_MAX 64
struct pull_queue_message {
@@ -211,7 +218,7 @@ defs_all = [
defs_itersolve, defs_trapq, defs_trdispatch,
defs_kin_cartesian, defs_kin_corexy, defs_kin_corexz, defs_kin_delta,
defs_kin_deltesian, defs_kin_polar, defs_kin_rotary_delta, defs_kin_winch,
defs_kin_extruder, defs_kin_shaper,
defs_kin_extruder, defs_kin_shaper, defs_kin_idex,
]
# Update filenames to an absolute path

View File

@@ -49,42 +49,3 @@ cartesian_stepper_alloc(char axis)
}
return sk;
}
static double
cart_reverse_stepper_x_calc_position(struct stepper_kinematics *sk
, struct move *m, double move_time)
{
return -move_get_coord(m, move_time).x;
}
static double
cart_reverse_stepper_y_calc_position(struct stepper_kinematics *sk
, struct move *m, double move_time)
{
return -move_get_coord(m, move_time).y;
}
static double
cart_reverse_stepper_z_calc_position(struct stepper_kinematics *sk
, struct move *m, double move_time)
{
return -move_get_coord(m, move_time).z;
}
struct stepper_kinematics * __visible
cartesian_reverse_stepper_alloc(char axis)
{
struct stepper_kinematics *sk = malloc(sizeof(*sk));
memset(sk, 0, sizeof(*sk));
if (axis == 'x') {
sk->calc_position_cb = cart_reverse_stepper_x_calc_position;
sk->active_flags = AF_X;
} else if (axis == 'y') {
sk->calc_position_cb = cart_reverse_stepper_y_calc_position;
sk->active_flags = AF_Y;
} else if (axis == 'z') {
sk->calc_position_cb = cart_reverse_stepper_z_calc_position;
sk->active_flags = AF_Z;
}
return sk;
}

81
klippy/chelper/kin_idex.c Normal file
View File

@@ -0,0 +1,81 @@
// Idex dual carriage kinematics
//
// Copyright (C) 2023 Dmitry Butyugin <dmbutyugin@google.com>
//
// This file may be distributed under the terms of the GNU GPLv3 license.
#include <stddef.h> // offsetof
#include <stdlib.h> // malloc
#include <string.h> // memset
#include "compiler.h" // __visible
#include "itersolve.h" // struct stepper_kinematics
#include "trapq.h" // struct move
#define DUMMY_T 500.0
struct dual_carriage_stepper {
struct stepper_kinematics sk;
struct stepper_kinematics *orig_sk;
struct move m;
double x_scale, x_offs, y_scale, y_offs;
};
double
dual_carriage_calc_position(struct stepper_kinematics *sk, struct move *m
, double move_time)
{
struct dual_carriage_stepper *dc = container_of(
sk, struct dual_carriage_stepper, sk);
struct coord pos = move_get_coord(m, move_time);
dc->m.start_pos.x = pos.x * dc->x_scale + dc->x_offs;
dc->m.start_pos.y = pos.y * dc->y_scale + dc->y_offs;
dc->m.start_pos.z = pos.z;
return dc->orig_sk->calc_position_cb(dc->orig_sk, &dc->m, DUMMY_T);
}
void __visible
dual_carriage_set_sk(struct stepper_kinematics *sk
, struct stepper_kinematics *orig_sk)
{
struct dual_carriage_stepper *dc = container_of(
sk, struct dual_carriage_stepper, sk);
dc->sk.calc_position_cb = dual_carriage_calc_position;
dc->sk.active_flags = orig_sk->active_flags;
dc->orig_sk = orig_sk;
}
int __visible
dual_carriage_set_transform(struct stepper_kinematics *sk, char axis
, double scale, double offs)
{
struct dual_carriage_stepper *dc = container_of(
sk, struct dual_carriage_stepper, sk);
if (axis == 'x') {
dc->x_scale = scale;
dc->x_offs = offs;
if (!scale)
dc->sk.active_flags &= ~AF_X;
else if (scale && dc->orig_sk->active_flags & AF_X)
dc->sk.active_flags |= AF_X;
return 0;
}
if (axis == 'y') {
dc->y_scale = scale;
dc->y_offs = offs;
if (!scale)
dc->sk.active_flags &= ~AF_Y;
else if (scale && dc->orig_sk->active_flags & AF_Y)
dc->sk.active_flags |= AF_Y;
return 0;
}
return -1;
}
struct stepper_kinematics * __visible
dual_carriage_alloc(void)
{
struct dual_carriage_stepper *dc = malloc(sizeof(*dc));
memset(dc, 0, sizeof(*dc));
dc->m.move_t = 2. * DUMMY_T;
return &dc->sk;
}

View File

@@ -171,6 +171,9 @@ input_shaper_set_sk(struct stepper_kinematics *sk
return -1;
is->sk.active_flags = orig_sk->active_flags;
is->orig_sk = orig_sk;
is->sk.commanded_pos = orig_sk->commanded_pos;
is->sk.last_flush_time = orig_sk->last_flush_time;
is->sk.last_move_time = orig_sk->last_move_time;
return 0;
}
@@ -201,25 +204,20 @@ input_shaper_set_shaper_params(struct stepper_kinematics *sk, char axis
struct input_shaper *is = container_of(sk, struct input_shaper, sk);
struct shaper_pulses *sp = axis == 'x' ? &is->sx : &is->sy;
int status = 0;
if (is->orig_sk->active_flags & (axis == 'x' ? AF_X : AF_Y))
// Ignore input shaper update if the axis is not active
if (is->orig_sk->active_flags & (axis == 'x' ? AF_X : AF_Y)) {
status = init_shaper(n, a, t, sp);
else
sp->num_pulses = 0;
shaper_note_generation_time(is);
shaper_note_generation_time(is);
}
return status;
}
double __visible
input_shaper_get_step_generation_window(int n, double a[], double t[])
input_shaper_get_step_generation_window(struct stepper_kinematics *sk)
{
struct shaper_pulses sp;
init_shaper(n, a, t, &sp);
if (!sp.num_pulses)
return 0.;
double window = -sp.pulses[0].t;
if (sp.pulses[sp.num_pulses-1].t > window)
window = sp.pulses[sp.num_pulses-1].t;
return window;
struct input_shaper *is = container_of(sk, struct input_shaper, sk);
return is->sk.gen_steps_pre_active > is->sk.gen_steps_post_active
? is->sk.gen_steps_pre_active : is->sk.gen_steps_post_active;
}
struct stepper_kinematics * __visible

View File

@@ -30,7 +30,7 @@
#include "serialqueue.h" // struct queue_message
struct command_queue {
struct list_head stalled_queue, ready_queue;
struct list_head upcoming_queue, ready_queue;
struct list_node node;
};
@@ -59,9 +59,10 @@ struct serialqueue {
double srtt, rttvar, rto;
// Pending transmission message queues
struct list_head pending_queues;
int ready_bytes, stalled_bytes, need_ack_bytes, last_ack_bytes;
int ready_bytes, upcoming_bytes, need_ack_bytes, last_ack_bytes;
uint64_t need_kick_clock;
struct list_head notify_queue;
double last_write_fail_time;
// Received messages
struct list_head receive_queue;
// Fastreader support
@@ -356,6 +357,7 @@ kick_event(struct serialqueue *sq, double eventtime)
pollreactor_update_timer(sq->pr, SQPT_COMMAND, PR_NOW);
}
// OS write of data to be sent to the mcu
static void
do_write(struct serialqueue *sq, void *buf, int buflen)
{
@@ -375,8 +377,16 @@ do_write(struct serialqueue *sq, void *buf, int buflen)
int ret = write(sq->serial_fd, &cf, sizeof(cf));
if (ret < 0) {
report_errno("can write", ret);
double curtime = get_monotonic();
if (!sq->last_write_fail_time) {
sq->last_write_fail_time = curtime;
} else if (curtime > sq->last_write_fail_time + 10.0) {
errorf("Halting reads due to CAN write errors.");
pollreactor_do_exit(sq->pr);
}
return;
}
sq->last_write_fail_time = 0.0;
buf += size;
buflen -= size;
}
@@ -457,7 +467,7 @@ build_and_send_command(struct serialqueue *sq, uint8_t *buf, int pending
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))
if (list_empty(&cq->ready_queue) && list_empty(&cq->upcoming_queue))
list_del(&cq->node);
memcpy(&buf[len], qm->msg, qm->len);
len += qm->len;
@@ -522,10 +532,10 @@ check_send_command(struct serialqueue *sq, int pending, double eventtime)
uint64_t min_stalled_clock = MAX_CLOCK, min_ready_clock = MAX_CLOCK;
struct command_queue *cq;
list_for_each_entry(cq, &sq->pending_queues, node) {
// Move messages from the stalled_queue to the ready_queue
while (!list_empty(&cq->stalled_queue)) {
// Move messages from the upcoming_queue to the ready_queue
while (!list_empty(&cq->upcoming_queue)) {
struct queue_message *qm = list_first_entry(
&cq->stalled_queue, struct queue_message, node);
&cq->upcoming_queue, struct queue_message, node);
if (ack_clock < qm->min_clock) {
if (qm->min_clock < min_stalled_clock)
min_stalled_clock = qm->min_clock;
@@ -533,7 +543,7 @@ check_send_command(struct serialqueue *sq, int pending, double eventtime)
}
list_del(&qm->node);
list_add_tail(&qm->node, &cq->ready_queue);
sq->stalled_bytes -= qm->len;
sq->upcoming_bytes -= qm->len;
sq->ready_bytes += qm->len;
}
// Update min_ready_clock
@@ -713,7 +723,7 @@ serialqueue_free(struct serialqueue *sq)
&sq->pending_queues, struct command_queue, node);
list_del(&cq->node);
message_queue_free(&cq->ready_queue);
message_queue_free(&cq->stalled_queue);
message_queue_free(&cq->upcoming_queue);
}
pthread_mutex_unlock(&sq->lock);
pollreactor_free(sq->pr);
@@ -727,7 +737,7 @@ serialqueue_alloc_commandqueue(void)
struct command_queue *cq = malloc(sizeof(*cq));
memset(cq, 0, sizeof(*cq));
list_init(&cq->ready_queue);
list_init(&cq->stalled_queue);
list_init(&cq->upcoming_queue);
return cq;
}
@@ -737,7 +747,7 @@ serialqueue_free_commandqueue(struct command_queue *cq)
{
if (!cq)
return;
if (!list_empty(&cq->ready_queue) || !list_empty(&cq->stalled_queue)) {
if (!list_empty(&cq->ready_queue) || !list_empty(&cq->upcoming_queue)) {
errorf("Memory leak! Can't free non-empty commandqueue");
return;
}
@@ -783,12 +793,12 @@ serialqueue_send_batch(struct serialqueue *sq, struct command_queue *cq
return;
qm = list_first_entry(msgs, struct queue_message, node);
// Add list to cq->stalled_queue
// Add list to cq->upcoming_queue
pthread_mutex_lock(&sq->lock);
if (list_empty(&cq->ready_queue) && list_empty(&cq->stalled_queue))
if (list_empty(&cq->ready_queue) && list_empty(&cq->upcoming_queue))
list_add_tail(&cq->node, &sq->pending_queues);
list_join_tail(msgs, &cq->stalled_queue);
sq->stalled_bytes += len;
list_join_tail(msgs, &cq->upcoming_queue);
sq->upcoming_bytes += len;
int mustwake = 0;
if (qm->min_clock < sq->need_kick_clock) {
sq->need_kick_clock = 0;
@@ -924,13 +934,13 @@ serialqueue_get_stats(struct serialqueue *sq, char *buf, int len)
" bytes_retransmit=%u bytes_invalid=%u"
" send_seq=%u receive_seq=%u retransmit_seq=%u"
" srtt=%.3f rttvar=%.3f rto=%.3f"
" ready_bytes=%u stalled_bytes=%u"
" ready_bytes=%u upcoming_bytes=%u"
, stats.bytes_write, stats.bytes_read
, stats.bytes_retransmit, stats.bytes_invalid
, (int)stats.send_seq, (int)stats.receive_seq
, (int)stats.retransmit_seq
, stats.srtt, stats.rttvar, stats.rto
, stats.ready_bytes, stats.stalled_bytes);
, stats.ready_bytes, stats.upcoming_bytes);
}
// Extract old messages stored in the debug queues

View File

@@ -20,54 +20,6 @@ move_alloc(void)
return m;
}
// Fill and add a move to the trapezoid velocity queue
void __visible
trapq_append(struct trapq *tq, double print_time
, double accel_t, double cruise_t, double decel_t
, double start_pos_x, double start_pos_y, double start_pos_z
, double axes_r_x, double axes_r_y, double axes_r_z
, double start_v, double cruise_v, double accel)
{
struct coord start_pos = { .x=start_pos_x, .y=start_pos_y, .z=start_pos_z };
struct coord axes_r = { .x=axes_r_x, .y=axes_r_y, .z=axes_r_z };
if (accel_t) {
struct move *m = move_alloc();
m->print_time = print_time;
m->move_t = accel_t;
m->start_v = start_v;
m->half_accel = .5 * accel;
m->start_pos = start_pos;
m->axes_r = axes_r;
trapq_add_move(tq, m);
print_time += accel_t;
start_pos = move_get_coord(m, accel_t);
}
if (cruise_t) {
struct move *m = move_alloc();
m->print_time = print_time;
m->move_t = cruise_t;
m->start_v = cruise_v;
m->half_accel = 0.;
m->start_pos = start_pos;
m->axes_r = axes_r;
trapq_add_move(tq, m);
print_time += cruise_t;
start_pos = move_get_coord(m, cruise_t);
}
if (decel_t) {
struct move *m = move_alloc();
m->print_time = print_time;
m->move_t = decel_t;
m->start_v = cruise_v;
m->half_accel = -.5 * accel;
m->start_pos = start_pos;
m->axes_r = axes_r;
trapq_add_move(tq, m);
}
}
// Return the distance moved given a time in a move
inline double
move_get_distance(struct move *m, double move_time)
@@ -163,6 +115,54 @@ trapq_add_move(struct trapq *tq, struct move *m)
tail_sentinel->print_time = 0.;
}
// Fill and add a move to the trapezoid velocity queue
void __visible
trapq_append(struct trapq *tq, double print_time
, double accel_t, double cruise_t, double decel_t
, double start_pos_x, double start_pos_y, double start_pos_z
, double axes_r_x, double axes_r_y, double axes_r_z
, double start_v, double cruise_v, double accel)
{
struct coord start_pos = { .x=start_pos_x, .y=start_pos_y, .z=start_pos_z };
struct coord axes_r = { .x=axes_r_x, .y=axes_r_y, .z=axes_r_z };
if (accel_t) {
struct move *m = move_alloc();
m->print_time = print_time;
m->move_t = accel_t;
m->start_v = start_v;
m->half_accel = .5 * accel;
m->start_pos = start_pos;
m->axes_r = axes_r;
trapq_add_move(tq, m);
print_time += accel_t;
start_pos = move_get_coord(m, accel_t);
}
if (cruise_t) {
struct move *m = move_alloc();
m->print_time = print_time;
m->move_t = cruise_t;
m->start_v = cruise_v;
m->half_accel = 0.;
m->start_pos = start_pos;
m->axes_r = axes_r;
trapq_add_move(tq, m);
print_time += cruise_t;
start_pos = move_get_coord(m, cruise_t);
}
if (decel_t) {
struct move *m = move_alloc();
m->print_time = print_time;
m->move_t = decel_t;
m->start_v = cruise_v;
m->half_accel = -.5 * accel;
m->start_pos = start_pos;
m->axes_r = axes_r;
trapq_add_move(tq, m);
}
}
#define HISTORY_EXPIRE (30.0)
// Expire any moves older than `print_time` from the trapezoid velocity queue

View File

@@ -32,17 +32,17 @@ struct pull_move {
};
struct move *move_alloc(void);
void trapq_append(struct trapq *tq, double print_time
, double accel_t, double cruise_t, double decel_t
, double start_pos_x, double start_pos_y, double start_pos_z
, double axes_r_x, double axes_r_y, double axes_r_z
, double start_v, double cruise_v, double accel);
double move_get_distance(struct move *m, double move_time);
struct coord move_get_coord(struct move *m, double move_time);
struct trapq *trapq_alloc(void);
void trapq_free(struct trapq *tq);
void trapq_check_sentinels(struct trapq *tq);
void trapq_add_move(struct trapq *tq, struct move *m);
void trapq_append(struct trapq *tq, double print_time
, double accel_t, double cruise_t, double decel_t
, double start_pos_x, double start_pos_y, double start_pos_z
, double axes_r_x, double axes_r_y, double axes_r_z
, double start_v, double cruise_v, double accel);
void trapq_finalize_moves(struct trapq *tq, double print_time);
void trapq_set_position(struct trapq *tq, double print_time
, double pos_x, double pos_y, double pos_z);

View File

@@ -80,11 +80,15 @@ class ConfigWrapper:
def getlists(self, option, default=sentinel, seps=(',',), count=None,
parser=str, note_valid=True):
def lparser(value, pos):
if len(value.strip()) == 0:
# Return an empty list instead of [''] for empty string
parts = []
else:
parts = [p.strip() for p in value.split(seps[pos])]
if pos:
# Nested list
parts = [p.strip() for p in value.split(seps[pos])]
return tuple([lparser(p, pos - 1) for p in parts if p])
res = [parser(p.strip()) for p in value.split(seps[pos])]
res = [parser(p) for p in parts]
if count is not None and len(res) != count:
raise error("Option '%s' in section '%s' must have %d elements"
% (option, self.section, count))

View File

@@ -5,7 +5,7 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import sys, optparse, os, re, logging
import util, reactor, serialhdl, pins, msgproto, clocksync
import util, reactor, serialhdl, msgproto, clocksync
help_txt = """
This is a debugging console for the Klipper micro-controller.
@@ -43,7 +43,6 @@ class KeyboardReader:
self.fd = sys.stdin.fileno()
util.set_nonblock(self.fd)
self.mcu_freq = 0
self.pins = pins.PinResolver(validate_aliases=False)
self.data = ""
reactor.register_fd(self.fd, self.process_kbd)
reactor.register_callback(self.connect)
@@ -223,11 +222,7 @@ class KeyboardReader:
return None
line = ''.join(evalparts)
self.output("Eval: %s" % (line,))
try:
line = self.pins.update_command(line).strip()
except:
self.output("Unable to map pin: %s" % (line,))
return None
line = line.strip()
if line:
parts = line.split()
if parts[0] in self.local_commands:

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