849 Commits

Author SHA1 Message Date
Kevin O'Connor
106d1d2a2a docs: Note the release of v0.9.1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-28 10:55:21 -04:00
Kevin O'Connor
ed5ce9cb37 linux: Fix spi handling with more than one spi device
Reported by @opensource-alt.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-25 10:14:15 -04:00
Kevin O'Connor
c2c79ff98d bltouch: Fix bug causing incorrect position when "stow_on_each_sample=False"
It is only valid to call raise_probe() when the toolhead is not
moving.  Make sure to call sync_print_time() from multi_probe_end() to
ensure that.  This fixes a bug that could cause the Z axis steppers to
lose their position when "stow_on_each_sample=False".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-24 00:22:58 -04:00
Kevin O'Connor
1b6b7fc58c kin_extruder: Fix numerical stability when using pressure advance
Avoid using the absolute E position when calculating pressure advance
as that position can grow arbitrarily large, which can result in
"numerical stability" problems.  That instability could eventually
lead to internal errors during step compression.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-23 22:59:20 -04:00
Kevin O'Connor
2bcf06a295 docs: Update release notes for v0.9.0 release
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-20 19:40:32 -04:00
Kevin O'Connor
1b471b482d docs: Note PROBE_CALIBRATE results invalidated on motion system update
Any hardware change to the hotend or probe, change to the kinematics,
or change to the bed tilt is likely to invalidate the results of
PROBE_CALIBRATE.  Try to warn the user of that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-20 19:26:24 -04:00
Kevin O'Connor
f8cb1e30eb heaters: Don't raise an error if PID Ki is set to zero
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-17 20:48:25 -04:00
Kevin O'Connor
abb0d8801c docs: Note screws_tilt_adjust nozzle/probe coordinates in Manual_Level.md
The screws_tilt_adjust takes nozzle coordinates, but the goal is for
the Z probe to be above the screws.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-17 19:24:54 -04:00
Kevin O'Connor
ac57b6522e docs: Minor formatting change to Probe_Calibrate.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-17 18:48:43 -04:00
Kevin O'Connor
6b23dd9ff1 docs: Provide response_template in subscription examples in API_Server.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-17 10:59:21 -04:00
Kevin O'Connor
bfcd5536fc docs: Add initial API_Server.md document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-17 10:41:14 -04:00
Kevin O'Connor
11bf83b498 config: Additional formatting changes to example-extras.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-16 22:12:58 -04:00
Kevin O'Connor
3a15219de3 config: Formatting changes to example-extras.cfg
Updates to improve consistency of example-extras.cfg formatting.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-16 21:52:02 -04:00
Kevin O'Connor
a87e5616a0 docs: Add Measuring_Resonances.md to Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-16 21:32:33 -04:00
Kevin O'Connor
cf6d302ac3 docs: Update Command_Templates.md with available get_status() fields
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-15 13:29:50 -04:00
Kevin O'Connor
c0eefc0076 docs: Recommend disable "dynamic acceleration control" during tuning
Note that "dynamic acceleration control" should be disabled in the
pressure advance and input shaper tests.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-15 12:07:10 -04:00
Kevin O'Connor
e5f5070dca config: Update printer-makergear-m2-2012.cfg
Config should not specify a default pressure_advance.  Note limit on
current with old 30 Ohm Z-motor.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-15 11:55:32 -04:00
Dmitry Butyugin
f8c4f90c04 resonance_tester: Resonance testing and input shaper auto-calibration (#3381)
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-10-14 20:08:10 -04:00
Dmitry Butyugin
fac4e53e86 toolhead: Fixed reporting of the kinematic limits
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-10-14 12:42:15 -04:00
Kevin O'Connor
d53365f996 docs: Updates to Features.md document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-13 16:38:32 -04:00
Kevin O'Connor
2885a4c728 stm32: Don't default to HID bootloader in Kconfig
Restore the default of an 8KiB bootloader for stm32f103 and a 32KiB
bootloader for stm32f207/stm32f407.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-13 14:25:17 -04:00
Jon C
cef9cc29b8 config: Fixing replicape aliases for thermistors (#3420)
Fixing alias for thermistors to be on the host rather than the PRU.
Moving the D1W alias from PRU MCU to host MCU.

Signed-off by Jon Charnas <goeland86@gmail.com>
2020-10-11 19:23:46 -04:00
uncholowapo
1651b18aea config: Update generic-bigtreetech-skr-v1.4.cfg (#3419)
Corrected the diag1_pin numbers. Useful for anyone copying and pasting the lines. Its something really easy to look over and can lead to some hair pulling from the time wasted trying to troubleshoot why the tmc diag pin error from Klipper.

Signed-off-by: Juan Moreno <uncholowapo@gmail.com>
2020-10-11 19:22:23 -04:00
bondus
387fceb453 stm32: Fixed CAN bus for STM32F4, there were syntax errors that prevented compilation
Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
2020-10-11 11:24:05 -04:00
Kevin O'Connor
27249dc709 mcu: Increase the time to reset a pwm pin during startup
Some RPi0 users were reporting "timer too close" errors due to pwm pin
resets - increase the time the host has to complete the startup to
avoid this.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-11 11:14:32 -04:00
Kevin O'Connor
d317793171 bltouch: Add an extra 200ms delay to the initialization process
On a reset, the mcu.py code may have sent an initialization message to
the bltouch, which needs time to complete.  Add additional time during
the bltouch setup to avoid a race with these two times.  This avoids
some "timer too close" errors that users of fast host machines were
reporting.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-11 11:14:32 -04:00
Kevin O'Connor
930317fa2a thermistor: Add support for the board thermistor on the Einsy Rambo
Add in support for the "TDK NTCG104LH104JT1" thermistor.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-08 15:25:09 -04:00
Kevin O'Connor
d9af6129ea config: Note TMC drivers specify current in RMS in example-extras.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-07 10:56:30 -04:00
Kevin O'Connor
0bf0cb5b54 config: Add a generic-creality-v4.2.7.cfg example config
Reported by @Feche and @yjh0502 .

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-29 12:00:09 -04:00
jhpadjustable
48b30e0f5a display_status: fix M117 checksum trimming (#3377)
The M117 command parser discards the last character of the message
whenever the M117 command does not begin the line and there is no *xx
checksum, e.g.
  N0 M117 Look at me
causes the banner area of the printer screen to display "Look at m".
This patch only trims the checksum when one is found to trim.

Signed-Off-By: Jonathan Pickard <jhp@adjustablelabs.info>
2020-09-28 10:11:05 -04:00
Eric Callahan
a8e3afd64a configfile: report "save_config_pending" via get_status() (#3372)
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-28 00:05:55 -04:00
Kevin O'Connor
4d0d219716 mcu: Fix set_pwm() for hard pwm
Must use self._pwm_max to calculate range for hard pwm updates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-27 18:09:53 -04:00
Kevin O'Connor
55e20f2c19 mcu: Add support for changing cycle_time in set_pwm()
Signed-off-by: Guy Shapira <gayuha@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:55:56 -04:00
Guy Shapira
27cefb2b38 gpiocmds: Add soft-pwm frequency modulation support
Signed-off-by: Guy Shapira <gayuha@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:51:38 -04:00
Guy Shapira
a79c57ab29 test: Add pwm tests
Signed-off-by: Guy Shapira <gayuha@gmail.com>
2020-09-26 20:26:44 -04:00
Kevin O'Connor
04f9f1b44e chelper: Add missing serialqueue_set_receive_window() def to serialqueue.h
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:15:33 -04:00
Kevin O'Connor
04b822c3aa chelper: Use standard C type definition for pyhelper_logging_callback
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:15:21 -04:00
Kevin O'Connor
73b78af6b2 chelper: Rework check for building C code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:15:10 -04:00
Kevin O'Connor
08eec0da86 config: Use "restart_method: command" in example stm32f103 ender3 configs
Reported by @jasonttech.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-22 11:12:38 -04:00
Florian Heilmann
b8bafcf0ed sample-macros.cfg: Fix action_respond_info
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-09-21 10:58:27 -04:00
Florian Heilmann
3a854cacd1 sample-raspberry-pi.cfg: Fix action_respond_info
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-09-21 10:58:27 -04:00
Kevin O'Connor
ad0b76bd4b delta_calibrate: Don't error on an invalid kinematic guess
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 22:41:13 -04:00
Kevin O'Connor
6bba285f8e gcode: Don't log debugging output for unknown commands if command is blank
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 21:46:00 -04:00
Kevin O'Connor
4c14063404 heaters: Disable unused pwm output debugging info
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 02:06:20 -04:00
Kevin O'Connor
1af4a4ae9f reactor: Record time of recent gc collection sweeps
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 02:06:20 -04:00
Kevin O'Connor
cd23c95760 display: Remove circular references from intermediate context object
Explicilty clear the local context object so that it does not require
a gc sweep to free it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor
cb0a8f2ed9 reactor: Add support for explicit Python garbage collection
Add support for performing Python gc work only from the main reactor
thread and only when it appears the main thread is idle.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor
73cd8c241c klippy: Call gc.collect() on a "restart" request
Explicitly run the python garbage collector on a restart.  This cleans
up memory from the previous session.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor
7d83aed410 reactor: Terminate any greenlets on finalize() call
Make sure to terminate any greenlets that are in a pause() state.
This is necessary to ensure the reactor can be deallocated.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor
760a0f8df5 reactor: Add explicit finalize() method to clean up reactor state
The existence of a __del__() method prevents deallocation on python2
if there are circular references.  Replace the __del__() method with a
new finalize() call and arrange for it to be called when the main
reactor is released.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor
a3fa11ffd4 serialhdl: Setup for serialqueue_free to be automatically called
Use ffi_main.gc() to automatically free the C serialqueue object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor
3dc0522870 serialhdl: Don't define a __del__() method
The existence of a __del__() method prevents deallocation on python2
if there are circular references.  Just remove the method as
disconnect() should already be called directly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor
9814daa999 mcu: Setup for steppersync_free to be automatically called
Use ffi_main.gc() to automatically free the C steppersync object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor
2447025fa6 mcu: Don't define a __del__() method
The existence of a __del__() method prevents deallocation on python2
if there are circular references.  Just remove the method as
disconnect() should already be called directly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor
3efb424d66 graphstats: Add support for graphing system load
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 21:35:09 -04:00
Kevin O'Connor
1208ec1f52 avrsim: Minor changes so avrsim can run on both Python2 and Python3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 12:05:26 -04:00
Arksine
3ac636b33e docs: document additions to BED_MESH_CALIBRATE
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine
7ba1a2a749 bed_mesh: add mesh parameters to BED_MESH_CALIBRATE
This allows the generated points to be modified prior to probing the bed.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine
9e68105b74 probe: add update_probe_points() method to helper
This allows the consumers of the ProbePoints helper to be reconfigured at runtime.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine
6e77fd27cd bed_mesh: move algorithm verification to its own method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine
98931789d8 bed_mesh: move mesh area configuration to _init_mesh_config
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Kevin O'Connor
a92d995727 chelper: Set compiler flags to never use "x387" floating point math
The default on X86 32bit machines is to use 80bit floating point math
(as found in the ancient "387 coprocessor").  This can cause numerical
stability problems.  Set the compiler flags to make sure the newer SSE
math is always used on X86.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-15 17:12:53 -04:00
Dmitry Butyugin
054762da3d avrsim: migrated to Python 3
Note that the latest simulavr 1.1.0 does not support Python 2 anymore.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-09-13 11:08:46 -04:00
Kevin O'Connor
063f9a2c02 docs: Fix "QUERY_STATUS" typo in Command_Templates.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 23:11:24 -04:00
Paul McGowan
5a2f406fd1 probe: add get_status wrapper to probe for last_query from query_probe command (#3296)
Add get_status wrapper with last_query status for macros  It is sometimes useful to determine the state of the probe from a macro. If the probe is connected to an endstop pin, the results can be obtained via QUERY_ENDSTOPS but if a physical endstop is in use in addition to the probe the probe state cannot be obtained. This change allows one to use QUERY_PROBE  and then access the printer.probe.last_query object to obtain the state.

Signed-off-by: Paul McGowan <mental405@gmail.com>
2020-09-09 23:10:35 -04:00
rjpatawaran
c7ea4b89c9 uc1701: Add x_offset (Used to add horizontal offset on SSD1306/SH1106 displays) (#3284)
Signed-off-by: RJ Patawaran <rjpatawaran@me.com>
2020-09-09 23:07:40 -04:00
Kevin O'Connor
1f5848fc1a adc_scaled: Add support for Duet2 Maestro "vref monitoring"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 22:20:54 -04:00
Kevin O'Connor
9b2816477b graph_temp_sensor: Add support for graphing sensor resistance
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 17:14:09 -04:00
Kevin O'Connor
fc85675145 gcode_button: Add support for analog buttons
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 14:21:30 -04:00
Kevin O'Connor
13ee6032ae mcu: Use schedule_pwm_out instead of set_pwm_out on a restart
Some mcu implementations don't like it when the pwm pin is configured
twice, so use the normal schedule_pwm_out implementation to update on
a restart.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 13:16:02 -04:00
Kevin O'Connor
9197975625 docs: Note that FORCE_MOVE can lead to "No next step" errors in G-Codes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-08 10:18:28 -04:00
Kevin O'Connor
c285f8b6cf klippy: Improve handling of reactor.run() exceptions
Try to invoke a shutdown on an unhandled exception from reactor.run().
If that fails, try to do a clean exit.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-06 12:45:27 -04:00
Kevin O'Connor
1cdf0d474d sensor_adxl345: Remove unused stop_time parameter
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-05 09:18:59 -04:00
Kevin O'Connor
09bc207189 graph_accelerometer: Add tool to graph accelerometer results
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-05 09:11:04 -04:00
Kevin O'Connor
3405095f0a adxl345: Add support for adxl345 accelerometer
Add support for taking measurements from an adxl345 accelerometer via
SPI interface.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-05 09:11:04 -04:00
Kevin O'Connor
2b2b610cff uc1701: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 22:29:55 -04:00
Kevin O'Connor
d69a496b83 hd44780: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 22:14:06 -04:00
Kevin O'Connor
c3e9999e0c docs: Update OctoPrint and OctoPi versions in Installation.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 21:24:26 -04:00
Kevin O'Connor
166ce06aea buttons: Improve python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 19:33:04 -04:00
Kevin O'Connor
5cce7f4d55 pid_calibrate: Update for improved python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 19:30:18 -04:00
Vladimir Serov
9406baf40b config: fixed update file extension for TronXY X5SA
Signed-off-by: Vladimir Serov <me@cab404.ru>
2020-09-04 19:28:48 -04:00
Kevin O'Connor
3bcb6970f5 probe: Make sure z is homed before probing
Warn if the Z axis is not homed before attempting to probe.  This
improves the error message.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 15:47:52 -04:00
Kevin O'Connor
08adecd226 homing: Prefer printer.command_error() instead of homing.CommandError()
Update callers to use the printer.command_error reference instead of
directly using homing.CommandError() when raising or catching errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 12:10:36 -04:00
Kevin O'Connor
f6dd97b784 homing: Remove EndstopError
There's no reason to distinguish between an EndstopError and a
CommandError, so just use CommandError.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 11:41:57 -04:00
Kevin O'Connor
1f3a160f47 toolhead: Add a move.move_error() helper
Move the EndstopMoveError() code from homing.py to a new method in the
toolhead Move class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 16:22:54 -04:00
Kevin O'Connor
d0ed6e5705 input_shaper: Fix typo in SET_INPUT_SHAPER report of shaper_type_y
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 14:19:55 -04:00
Kevin O'Connor
61fa7e82d9 travis-install: Minor change to virtualenv command-line arguments
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 13:27:27 -04:00
Kevin O'Connor
81865b5940 install-octopi: Use "virtualenv -p python2" to ensure python2 is selected
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 13:19:55 -04:00
Kevin O'Connor
6c872c71a7 quad_gantry_level: Add additional comments on how leveling works
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 12:09:02 -04:00
Kevin O'Connor
c69527e2b0 spi_temperature: Simplify and comment MAX31865 temperature calculations
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-02 10:04:35 -04:00
Adrian Keet
37d7742468 spi_temperature: fix MAX31865 temperature conversion (#3274)
Signed-off-by: Adrian Keet <arkeet@gmail.com>
2020-09-02 09:32:30 -04:00
Jon C
7c5b108531 config: Replicape config updates with pin aliases (#3269)
Adding board_pins section.

Added linux host MCU board pin aliases for endstops.

Also added a sample filament switch sensor config.

Signed-off-by: Jon Charnas <goeland86@gmail.com>
2020-09-01 11:00:48 -04:00
Kevin O'Connor
d0c5802fe2 config: Add printer-creality-ender3pro-2020.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 21:53:26 -04:00
Matthias Liffers
99251015fa config: Added example config for Ender 3 Pro with 32-bit Creality 4.2.2 board (#3264)
From July 2020, Ender 3 Pros came with a 32-bit Creality 4.2.2 board, similar to the Ender 3 V2. Unlike the Ender 3 V2, it comes with the ST7920 LCD screen and HR4988 steppers. Using the config file already in Marlin source, I came up with this klipper config file.

Signed-off-by: Matthias Liffers <m@tthi.as>
2020-08-30 21:49:55 -04:00
Kevin O'Connor
12529ef6cd update_chitu: Rename script and minor changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 13:11:34 -04:00
Kevin O'Connor
1d201c3592 config: Minor updates to printer-tronxy-x5sa-v6-2019.cfg
Minor changes to default config and add to printers.test.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 13:04:40 -04:00
Cabia Rangris
15853da28c config: Added TronXY X5SA support (#3265)
Added printer-tronxy-x5sa-v6 config.
Added "chitu" bootloader option to stm32 Kconfig.
Added chitu_crypt.

Signed-off-by: Vladimir Serov <me@cab404.ru>
2020-08-30 12:59:28 -04:00
Kevin O'Connor
a7defdcad0 kin_shaper: Fix check for optimized X or Y only calculations
The optimized version is only available if it's the only axis used.
This fixes input_shaper on corexz.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 12:32:11 -04:00
Kevin O'Connor
08ddf25cf3 kin_shaper: Add an init_shaper() helper function
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 12:32:11 -04:00
Kevin O'Connor
d28e148ddc kin_shaper: Group shaper setup code together
No code changes - just code movement.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 12:32:11 -04:00
Kevin O'Connor
0e21188cb2 kin_shaper: Allocate space for maximum number of shaper pulses in advance
Combine the shaper pulses and count of those pulses into a `struct
shaper_pulses`.  Allocate space for the maximum number of pulses in
`struct input_shaper`.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-30 11:30:39 -04:00
Kevin O'Connor
b6a25393d3 webhooks: Add client_info parameter to "info" webhook
Allow clients to send their version info to klipper and arrange for
that info to be logged.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-26 10:12:58 -04:00
Kevin O'Connor
2bb6b0f58f docs: Expand on host computer restrictions in the FAQ
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-26 10:11:21 -04:00
Janar Sööt
97da129793 menu: only render visible list items
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-26 10:08:12 -04:00
Janar Sööt
9459549db3 menu: fixing input gcode run issue on edit start
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-26 10:07:03 -04:00
Kevin O'Connor
37c379ddc5 stale-issue-bot: Enable github actions to handle stale issues
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-24 19:53:06 -04:00
Kevin O'Connor
ff6e879349 display: Allow redrawing the screen up to 10 times per second
Increase the maximum redraw rate from 4 times per second to 10 times
per second.  Some users have reported slower rendering times as a
result of 8fa1c977.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-24 19:02:30 -04:00
Oliver Fawcett-Griffiths
af43faa3f2 config: Tarantula Pro - Multiple tweaks and description change (#3230)
The following parameters have been tweaked:
 - X endstop position has been set to -2, as per original marlin cofig
 - Second Z axis disabled by default (this must be purchased as an
   add-on)

The comment at the top of this file has also been modified to describe
the difference between this (old) model and the new (rebranded) Tevo
Tarantula pro.

Signed-off-by: Oliver Fawcett-Griffiths <olly@ollyfg.com>
2020-08-24 18:23:50 -04:00
Kevin O'Connor
6763210558 gcode: Fix out-of-order cmd_M112 reference
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-23 13:18:30 -04:00
Kevin O'Connor
37bbf161f8 adc_temperature: Minor simplification of default sensor registration
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-23 09:02:18 -04:00
Oliver Fawcett-Griffiths
bc30414362 config: Add example printer-tevo-tarantula-pro-2020.cfg config (#3225)
Signed-off-by: Oliver Fawcett-Griffiths <olly@ollyfg.com>
2020-08-23 08:35:01 -04:00
Kevin O'Connor
4a6360f2af adc_temperature: Calculate "PT100 INA826" values from formula
Calculate the "PT100 INA826" values instead of using a voltage table.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-22 17:21:17 -04:00
Kevin O'Connor
d3e41b55b7 adc_temperature: Calculate PT1000 temperature/resistance pairs from formula
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-22 17:16:45 -04:00
Kevin O'Connor
2c76f7527d lib: Add a .gitignore file for intermediate files in lib/ directory
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-21 11:34:06 -04:00
Kevin O'Connor
1286d3006c gcode_move: Move GCodeMove class from gcode.py to new extras module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
b691e013f0 docs: Document printer.gcode_move variables in Command_Templates.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
4c5e93d51d gcode: Split G0/G1 command handling to new gcode_move class
Split up the main GCodeParser class into GCodeDispatch and GCodeMove
classes.  The GCodeMove class is now available using the "gcode_move"
printer object name.  This split simplifies the gcode.py code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
cd7c1b8e68 toolhead: Move G4 and M400 commands from gcode.py to toolhead.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
80a6f59c8f gcode: Convert get_status() last_xpos to use a namedtuple
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
2d5f9b6cda gcode: Remove unneeded base_xpos variables from get_status()
Convert the only user of base_zpos to use gcode_position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
c0daf43d2f gcode: Convert get_status() homing_xpos to use a namedtuple
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
39261d884d gcode: Remove unused move_xpos get_status() variables
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
5f47a91464 docs: Add idle_timeout get_status() info to Command_Templates.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
9103aaf6d5 toolhead: Remove unused get_stats() data
The "status" and "printing_time" are now available in the
"idle_timeout" module, so no need to report them from toolhead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
b2c78d71b0 gcode: Remove "action_" commands from get_status() calls
Rename printer.gcode.action_emergency_stop() to
action_emergency_stop(), printer.gcode.action_respond_info() to
action_respond_info(), and printer.gcode.action_respond_error() to
action_raise_error() in command templates.

This simplifies the get_status() interface, as returning callable
functions from that interface was confusing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
2caaaea9a4 toolhead: Add a manual_move() helper function
Add a helper function for submitting relative movements.  This
function will also automatically ensure gcode.reset_last_position() is
called.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
b9ac6d6306 skew_correction: Make sure to call reset_last_position() on a skew update
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor
4115a77342 gcode: Automatically call reset_last_position() on a toolhead set_position()
Generate a "toolhead:set_position" event on a call to
toolhead.set_position() and use that event to automatically call
gcode.reset_last_position().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Janar Sööt
560d48dbc9 menu: reduce timeout timer period to 1s
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-20 09:10:23 -04:00
Kevin O'Connor
8fa1c97767 display: Support requesting a screen redraw on a menu key press
Add a request_redraw() method and call it when a key menu event
occurs.  Limit these proactive screen redraws to no more than 4 per
second.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 09:04:56 -04:00
alocin73
1bdf705524 hall_filament_width_sensor: Fix Flow update before next pending_position #3184 (#3198)
After reading the first item of self.filament_array, filament_width is updated back to self.nominal_filament_dia or self.diameter instead of retaining the value until next pending_position.

Updated Filament Menu Template.

Signed-off-by: Nicola Falciani <nicola.fal@gmail.com>
2020-08-19 18:58:49 -04:00
Janar Sööt
bc904dd431 menu: remove surplus self.running=False
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-18 21:39:15 -04:00
Janar Sööt
ccfcc3789b menu: optimize container populate
- don't populate all items at once
- populate items when container is pushed to stack
- precreate List back item, don't create it during populate.
- don't update items during populate

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-18 21:39:15 -04:00
Kevin O'Connor
2a27093f69 graph_temp_sensor: Add tool to graph ADC resolution of temperature sensors
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-17 12:37:43 -04:00
Kevin O'Connor
9d9e5c7edc klippy: Report "shutdown" category from get_state_message()
Reported by @Arksine.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 14:10:54 -04:00
Kevin O'Connor
fa83b1319c webhooks: Improve type checking of api requests
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:49:45 -04:00
Kevin O'Connor
7ec2ec30e3 webhooks: Convert to a json-rpc inspired message format
Convert to a new json message format.  Requests look like:

{"id":14, "method": "info", "params": {}}

and responses look like:

{"id": 14, "result": {}}

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:23:16 -04:00
Kevin O'Connor
2b0b30ccd5 webhooks: Remove call_remote_method()
Clients will now only receive messages that they've subscribed to.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:23:16 -04:00
Kevin O'Connor
1ae671f61f webhooks: Add klippy state to webhooks get_status() method
Clients can now subscribe to the webhooks get_status() info to
determine if the printer state changes.  It is no longer needed to
send a message to all clients on a shutdown transition.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:23:16 -04:00
Kevin O'Connor
b0e3effb53 webhooks: Rework get_status() subscriptions
Implement a new subscription system for get_status() updates.
Subscriptions are per-client.  After an initial update, only changes
will be transmitted.  Responses are only transmitted to the client
that issued the subscription.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:23:05 -04:00
Kevin O'Connor
16a53e6918 webhooks: Require a subscription to receive gcode output
Add a new "gcode/subscribe_output" webhook endpoint to subscribe to
gcode output.  Only client connections that subscribe to the gcode
output will receive that output.

This also moves all the gcode webhooks from gcode.py to webhooks.py
and arranges for gcode.py to be initialized prior to webhooks.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:26 -04:00
Kevin O'Connor
568393c941 webhooks: Remove "method" parameter from webhook requests
Don't require or use the "method" parameter of requests.  This
simplifies the interface.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:25 -04:00
Kevin O'Connor
7289af6560 webhooks: Create StatusHandler class in add_early_printer_objects()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:25 -04:00
Kevin O'Connor
b74a5c5217 webhooks: Remove register_static_path()
Use the "info" webhook to pass critical process information back to
the caller.  The remaining users of register_static_path() can get the
required information via get_status() calls.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:25 -04:00
Kevin O'Connor
0aad2437c5 webhooks: Specify server_address on klippy command-line
Don't default to "/tmp/klippy_uds" for the webhooks unix domain socket
filename.  Instead, require the filename to be specified on the
command-line (via a new "-a" parameter).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:25 -04:00
Kevin O'Connor
ebc79a1ee8 whconsole: Add utility for testing the "webhooks" interface
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:25 -04:00
Kevin O'Connor
118ef908a5 display: Remove reference to printer.gcode.busy from display.cfg
The "busy" variable was removed and using it isn't necessary.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-15 17:20:24 -04:00
Janar Sööt
b490848bc9 menu: fix for overwriting existing menu item (#3189)
In case of an overwriting existing menu item,
the new item was added additionally to the end of the items list.

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-14 13:42:33 -04:00
Janar Sööt
7a615b4f69 hall_filament_width_sensor: fix error
Fix no attribute error in in get_status

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-13 16:49:51 -04:00
Arksine
e4f3f60ea6 virtual_sdcard: register sd static path
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 10:47:04 -04:00
Arksine
0c7faa978c webhooks: register gcode output handler and additional static paths
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 10:47:04 -04:00
Arksine
bf221d5e26 webhooks: Implement a send buffer for socket writes
This prevents ClientConnection.send() from blocking, removing the possibility that callers become reentrant.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 10:47:04 -04:00
Arksine
4dcf494b97 webhooks: Implement unix domain socket server
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-11 10:47:04 -04:00
Yannic Schröder
d4dab9da5d config: Add homing order not to Ender 3 config (#3069)
By homing the y axis before the x axis, the nozzle will not touch the
plastic cover of the bed heater cable.

Signed-off-by: Yannic Schroeder <schroeder@ibr.cs.tu-bs.de>
2020-08-09 21:12:09 -04:00
Kevin O'Connor
153883c6c5 lib: Fix whitespace in README
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-09 21:10:08 -04:00
bondus
35d28e880d stm32: Improvements to CAN bus ID generation. And added a small fast hash library (#3165)
Improved CAM bus ID generation, there were issues with ID collisions.
Added a small fast hash library.

Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
2020-08-09 21:07:59 -04:00
Bryan Boettcher
04bd48ca9d adc_temperature: add support for AD597 (#3164)
The AD597 thermocouple amplifier is used in the Raise3D N2+ (and
possibly others).

Signed-off-by: Bryan Boettcher <bryan.boettcher@gmail.com>
2020-08-09 21:06:43 -04:00
Kevin O'Connor
864d172b68 docs: Note menu change in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-09 09:37:54 -04:00
Janar Sööt
d991b4c83b menu: Replace menu with new Jinja2 template system (#2344)
menu.cfg:
- jinja2 template scripting
- new Setup menu
- new Calibration menu
menu:
- redesigned menu code
- jinja2 support
- option to reverse menu up and down directions
- functionality set to support menu injection from other modules
- a new way of defining menu hierarchy
- other adjustments

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-09 09:29:55 -04:00
Trevor Jones
efebbb9a2f tmc5160: diag0 support (#3159)
Allow for diag0 only hardware to use sensorless homing.

Signed-off-by:  Trevor Jones <trevorjones141@gmail.com>
2020-08-09 08:17:51 -04:00
Kevin O'Connor
ea5e76746a itersolve: Use stricter completion check in itersolve_find_step()
Use a more strict check for determining if the iterative solver has
correctly found a step - the guess must be within 1 picometer of the
target or correct to within 1 nanosecond.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-08 11:59:19 -04:00
Kevin O'Connor
513582afc4 itersolve: Enhance "false position" method with "illinois algorithm"
This prevents some cases where the iterative solver fails to converge
in a reasonable time, causing "no next step" errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-08 10:58:20 -04:00
Kevin O'Connor
e5a3fd7cee gcode: Fix error causing _dump_debug() to fail
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-08 10:02:38 -04:00
Toby Harper
f851cfae46 gcode_arcs: increment absolute e coord for each arc segment (#3162)
Arc travel was working but extrusion in absolute mode seemed not to be happening at all. This was because the E coord being sent with each G1 segment of the arc was not incrementing, effectively the same value was being sent over and over so the total extrusion for the whole arc was the amount for just one segment which is an extremely tiny amount.

My change increments e_base by e_per_move for each subsequent coord when in absolute extrude mode which results in the correct absolute E value being sent for each segment.

Signed-off-by: Toby Harper <toby@fuith.org>
2020-08-07 12:15:03 -04:00
bondus
c9e7119a93 fan_generic: Add support for named fans and gcode to control them (#3054)
Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
2020-08-07 11:39:44 -04:00
Arksine
3eefc037c5 polar: fix limit_z default value
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-06 14:31:42 -04:00
Arksine
27ef58642e webhooks: Implement StatusHandler class
This class provides endpoints that allow connected hosts to fetch the state of printer objects and subscribe to state "pushed" over the connection.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-06 14:30:48 -04:00
Arksine
cde7e75139 webhooks: Add call_remote_method helper function
This may be used to execute formatted RPC calls.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-06 14:30:13 -04:00
Kevin O'Connor
447374f73e gcode: Separate IO handling to its own class
Move the pseudo-tty IO handling from the main gcode class to a new
gcode_io class.  This simplifies the main gcode class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-06 14:21:08 -04:00
Kevin O'Connor
795bd03b33 webhooks: Directly invoke printer.invoke_shutdown()
No need to indirectly shutdown via the gcode class - just call
printer.invoke_shutdown() directly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-06 14:21:08 -04:00
Kevin O'Connor
4346d37c06 webhooks: Introduce add_early_printer_objects()
Create the initial gcode class via new module level
add_early_printer_objects() function.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-06 14:21:08 -04:00
Kevin O'Connor
8c8b9b1812 gcode: Introduce add_early_printer_objects()
Create the initial gcode class via new module level
add_early_printer_objects() function.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-06 14:21:08 -04:00
Kevin O'Connor
0d930bf871 gcode: Pass the pseudo-tty fd via the start_args system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-06 14:21:08 -04:00
Kevin O'Connor
b66dd1a60f gcode: Allow handlers to be registered for all gcode output
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-06 14:21:08 -04:00
Kevin O'Connor
8ed1696624 gcode: Only write to the gcode pseudo-tty if it appears to be active
If there isn't a reader of the output pipe it can lead to the
generation of a large number of errors.  Only attempt to write if it
appears the pipe is active.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-06 14:21:08 -04:00
Tonny Møller
8a69e5d596 config: add sample-bigtreetech-exp-mot.cfg (#3135)
Signed-off-by: Tonny Møller <tonn0297@gmail.com>
2020-08-06 14:19:37 -04:00
Kevin O'Connor
605c32fc98 docs: Move and reword the Resonance_Compensation.md link in Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-05 23:28:54 -04:00
Arksine
b9f48e634e print_stats: Add virtual_sdcard state tracking
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Arksine
74c0e3a484 docs: document changes to the virtual_sdcard module
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Arksine
6b1ad715aa print_stats: stat tracking for virtual sdcard prints in progress
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Arksine
463194b1a3 virtual_sdcard: update get_status method
Do not reset progress to zero while paused.  Report 'is_active' and 'file_position'.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Arksine
963d7c247b virtual_sdcard: add SDCARD_PRINT_FILE gcode
SDCARD_PRINT_FILE allows Klipper to load and start the print for any
gcode file within the virtual_sdcard path, including subdirectories.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Arksine
af39a209f3 virtual_sdcard: add SDCARD_RESET_FILE gcode
This allows the user to close a currently loaded file and reset the virtual_sdcard's state.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-05 13:46:24 -04:00
Florian Heilmann
10987003b0 safe_z_home: Make sure X and Y are homed before homing Z (#3153)
In it's current behavior, safe_z_home will attempt to home Z if it thinks the toolhead is above the z endstop even if the motors have since been disabled and the toolhead was moved to another position

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-08-05 11:52:23 -04:00
Elton Law
fe84968bdc docs: Add uninstall notes to faq
From comments in https://github.com/KevinOConnor/klipper/issues/1084

This documents the script added in 0ba1f5109d

Signed-off-by: Elton Law <eltonlaw296@gmail.com>
2020-08-03 14:16:34 -04:00
Kevin O'Connor
68e9a495dd config: Minor updates to printer-creality-ender3-v2-2020.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-02 16:27:31 -04:00
Jimmacle
6030551075 config: Add example configuration for Creality Ender 3 V2 (#3144)
Includes special serial configuration and flashing instructions for the
Creality V4.2.2 board.

Signed-off-by: John Gross <jmgross@jmgross.dev>
2020-08-01 20:20:48 -04:00
Arksine
3143e31aca temperature_sensor: report min/max measured temp via get_status
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 15:56:51 -04:00
Arksine
d37374974d filament_switch_sensor: report "enabled" state via get_status
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-08-01 15:56:51 -04:00
Arksine
c22d5b2444 toolhead: report velocity and accel via get_status
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-08-01 15:56:51 -04:00
Kevin O'Connor
d33a34614f docs: Add RPi_microcontroller.md link in Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-01 13:09:09 -04:00
Kevin O'Connor
0f3b1bce66 linux: Set the SPI mode in spidev.c
Fix omission causing the SPI mode to not be set on the linux mcu.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-31 23:18:46 -04:00
Kevin O'Connor
1f7c3fc8ec gcode: Report the final print_time in debuginput mode
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-30 12:53:59 -04:00
Voron
9213646c63 corexz: Add CoreXZ kinematics (#3129)
Add a CoreXZ kinematics

Signed-off-by: Maks Zolin <mzolin@vorondesign.com>
2020-07-30 12:42:23 -04:00
Dmitry Butyugin
f3b980c1b2 docs: Suggested improvements to Input Shaper tuning guide
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-07-29 21:28:18 -04:00
Dmitry Butyugin
b944666bb1 docs: ringing_tower model for input shapers tuning
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-07-29 21:28:18 -04:00
Dmitry Butyugin
b62a0d5db5 docs: First version of documentation for Input Shaper tuning
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-07-29 21:28:18 -04:00
Kevin O'Connor
25a9a32ecb docs: Move SET_TEMPERATURE_FAN_TARGET to its own section in G-Codes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-26 10:41:43 -04:00
Martin Nowroth
ab923883f7 docs: Update G-Codes.md for SET_TEMPERATURE_FAN_TARGET (#3122)
Added extended G-Code documentation for SET_TEMPERATURE_FAN_TARGET

Signed-off-by: Martin Nowroth <madnoth@gmail.com>
2020-07-26 10:39:53 -04:00
Arksine
4795c0896d bed_mesh: Move profile management to its own class
This streamlines the BedMeshCalibrate class, making it only resposible for configuring and executing the calibration procedure.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-25 12:05:29 -04:00
Arksine
dbec03abd9 bed_mesh: track the probed_matrix and mesh_params exclusively in the ZMesh class
Rather than have multiple classes keep a reference to these items, keep them in the z_mesh.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-25 12:05:29 -04:00
Arksine
41eedda5d6 bed_mesh: differentiate between "mesh_config" and "mesh_params"
This fixes an issue where a new profile is not properly saved after a restart.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-25 12:05:29 -04:00
Arksine
7c8b60b40e bed_mesh: round x and y positions received via the finalize callback
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>

Update bed_mesh.py
2020-07-25 12:05:29 -04:00
Arksine
6458def588 bed_mesh: add get_status() method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-25 12:05:29 -04:00
Kevin O'Connor
8ecec4be8e config: Consolidate description of heater parameters in example.cfg
Describe max_delta in [heater] instead of in [heater_bed].

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-25 11:56:21 -04:00
Kevin O'Connor
db05938a5f servo: Set initial value via mcu_servo.setup_start_value()
Using the setup_start_value() method avoids the PWM output line
transitioning to an intermediate state prior to setting the initial
value.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-25 11:39:39 -04:00
Kevin O'Connor
428a8d4881 servo: Remove servo ENABLE parameter
Allow one to disable servos via `SET_SERVO WIDTH=0` instead of using
an explicit ENABLE parameter.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-25 11:39:39 -04:00
Kevin O'Connor
122fd88c6a mcu: Reset pwm and digital output pins to start values on a host restart
This makes sure output pins are reset to their defaults when the host
is restarted and the micro-controller is not.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-25 11:36:44 -04:00
Kevin O'Connor
d204cc1fb7 mcu: Add support for commands to send only on a host restart
Add a new "on_restart" parameter to mcu.add_config_cmd() and only send
those commands on a host restart that does not involve a
micro-controller restart.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-25 11:36:44 -04:00
Kevin O'Connor
4a35d7e8bd update_mks_robin: Remove unnecessary imports
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-24 11:02:15 -04:00
Kevin O'Connor
5f2cb5436c linux: Disable hardware pwm when it is set to zero
Only write "1" to the "enable" file when a non-zero pwm width is
requested.  Write "0" to the "enable" file when a zero pwm width is
requested.

This fixes a problem on the replicape servo lines that prevented them
from being fully disabled.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-20 22:18:28 -04:00
Dmitry Butyugin
bc488c2161 scripts: scripts to simulate input_shaper response and toolhead movement (#3063)
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-07-19 20:23:02 -04:00
combolek
3835654116 lm75: Added support for LM75/LM75A I2C connected temperature sensors (#3101)
Signed-off-by: Boleslaw Ciesielski <combolek@users.noreply.github.com>
2020-07-19 20:18:54 -04:00
Iakabos
b0901daa85 display: Add configuration options for OLED displays (#3084)
Add user-configurable contrast, vcomh (affects "smearing"), and invert options for SSD1306/SH1106 type OLED displays.

Signed-off-by:  James Esau <james_esau@hotmail.com>
2020-07-19 20:18:08 -04:00
Kevin O'Connor
0f24406acc config: Fix printer-creality-ender5-2019.cfg positions flipped
The X and Y axes were flipped.  Reported by @njilk.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-19 19:46:29 -04:00
Kevin O'Connor
25b6bc2f73 mcu: Remove undocumented "custom" config parameter
The "custom" config parameter is not documented and has not been
recommended in years.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-19 12:07:53 -04:00
Kevin O'Connor
1c508c38aa config: Minor formatting change to example.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-16 13:04:00 -04:00
Kevin O'Connor
53092a6474 docs: Add link to config/sample-macros.cfg in Slicers.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-16 13:04:00 -04:00
Kevin O'Connor
e4d0044be8 docs: Add a "hardware pin type" section to the FAQ
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-16 13:04:00 -04:00
Arksine
180f44b876 webhooks: fix lambda wrapper around _process_request
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-13 18:39:15 -04:00
Kevin O'Connor
af981432f0 thermistor: Add in definition for "SliceEngineering 450" thermistor
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-11 12:50:58 -04:00
Kevin O'Connor
c83688b7bc lpc176x: Fix spi mode bits
The lpc176x hardware spi initialization code was swapping the CPOL and
CPHA bits.  This caused the MAX31865 and MAX31856 chips to not work
correctly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-10 16:08:18 -04:00
Dmitry Butyugin
5dc0c8aac0 input_shaper: Fixed C module compilation on older gnu90 compilers
For example, Raspbian GNU/Linux 8 (jessie) uses an old GCC version 4.9.2
which uses -std=gnu90 by default.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-07-07 17:50:51 -04:00
Arksine
cd8f250e84 webooks: do not connect if debuginput is enabled
Changing this check from debugoutput to debuginput allows remote applications to perform tests against Klippy without an MCU connected.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-06 12:57:50 -04:00
Arksine
bfbdc04c02 webhooks: process request handlers using a Reactor Callback
This prevents _process_data from blocking and becoming reentrant.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-06 12:57:50 -04:00
Paul Greidanus
65ade083b2 config: Fix for SKR Mini-e3 v2.0 UART addresses (#3059)
Y and Z were flipped as per: https://github.com/bigtreetech/BIGTREETECH-SKR-mini-E3/blob/master/firmware/V2.0/Marlin-2.0.x-SKR-mini-E3-V2.0/Marlin/Configuration_adv.h#L2204-L2212

thanks to Vael#9090 on Discord for pointing this out

Signed-off-by: Paul Greidanus <paul@majestik.org>
2020-07-06 11:40:45 -04:00
Kevin O'Connor
3a57608642 fan: Separate out the part cooling fan code from the generic fan code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-07-05 21:04:04 -04:00
Dmitry Butyugin
4bdc11a8b3 input_shaper: Initial support of input shaping (#3032)
Input shaping can help to reduce printer vibrations due to resonances
and eliminate or reduce ghosting in prints.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-07-05 20:54:38 -04:00
Arksine
09a3d018a8 docs: Fix broken links in RPi_microcontroller.md
Also add a note regarding "Permission denied" errors.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-05 20:48:12 -04:00
Arksine
342a230984 scripts: add executable permissions to klipper-mcu-start.sh
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-07-05 20:48:12 -04:00
James
7bc6470082 config: Added some sample glyphs for 128x64 screens (#3028)
A selection of sample glyphs for use on 128x64 displays.

Signed-off-by: James Wood <james@james-wood.com.au>
2020-07-02 07:37:59 -04:00
Kevin O'Connor
c6b652044d stepper: Make sure to reload trapq in set_stepper_kinematics()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-30 20:20:16 -04:00
Kevin O'Connor
541665679e config: Add printer-creality-ender5plus-2019.cfg example config
Reported by @mihaiserban.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-25 12:45:47 -04:00
Kianusch Sayah Karadji
2ae6c220e3 config: Example configuration for MKS Robin E3D/E3
Signed-off-by: Kianusch Sayah Karadji <kianusch@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-25 12:37:10 -04:00
Arksine
014c06f8a2 klippy: return message category in get_state_message()
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00
Arksine
2d2c09a0a3 webhooks: protect command processing from re-entry
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00
Arksine
a342770ac5 pause_resume: Add CANCEL_PRINT gcode
Register API endpoints for "pause_resume/pause", "pause_resume/resume" and "pause_resume/cancel".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00
Arksine
a31dd0ff0e query_endstops: register "query_endstops/status" endpoint
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00
Arksine
72962c5ca2 gcode: add webhooks support
Register "gcode/script", "gcode/help", "gcode/restart", and "gcode/firmware_restart" endpoints.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00
Arksine
14ac453861 klippy: Instantiate the webhooks module
Add 'cpu_info' to start_args so it may be reported via the "info" endpoint in webhooks.py.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00
Arksine
475f543790 webhooks: Initial implementation
The webhooks module provides a means for Klippy to register remote API endpoints.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00
bondus
7a8e9591e3 stm32: Improved CAN support for STM32 (#2976)
Reworked the STM32F0 CAN bus implementation. It's more robust and higher performance.

Added support for function remapping to different pins.  API is emulating an STM32F0.

Improved and ported CAN bus to STM32F0, F1 and F4.

Signed-off-by: Pontus Borg <glpontus@gmail.com>
2020-06-24 18:59:38 -04:00
combolek
7cab732ae9 stm32: Initial support for stm32f2 (#3001)
Initial support for stm32f2 in general and STM32F207 in particular.

Boots up and communicates on STM32F207VC.

Signed-off-by: Boleslaw Ciesielski <combolek@users.noreply.github.com>
2020-06-23 10:52:15 -04:00
kianusch
a4c31bafb0 stm32: Support for 20KiB bootloader offset. (#3008)
Signed-off-by: Kianusch Sayah Karadji <kianusch@gmail.com>
2020-06-20 13:30:10 -04:00
Kevin O'Connor
755064177b config: Add pin hints for probe header in generic-duet2-maestro.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-17 13:23:53 -04:00
Denis Ignatenko
b3298d8992 hall_filament_width_sensor: Added width logging (#2981)
Signed-off-by: Denis Ignatenko deniss979@gmail.com
2020-06-16 13:36:49 -04:00
Arksine
4c571ea9ac bme280: fix reported measured time
This allows the bme280 to correctly work with the temperature_fan module.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-16 09:53:10 -04:00
Kevin O'Connor
65ae08ef21 menu_keys: Add a register_button() helper method
Use a helper method to register each button handler.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:23:34 -04:00
Kevin O'Connor
8d9566b945 menu_keys: Reschedule long-click timer on each click
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:23:34 -04:00
Kevin O'Connor
7d8ade74e8 menu_keys: Move button handling from menu.py to new file menu_keys.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:23:34 -04:00
Kevin O'Connor
a1fc1ac214 configfile: Use "import ConfigParser as configparser"
This minor change makes it easier to port the code to Python3.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
40da3f406a queuelogger: Use "import Queue as queue" for improved Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
4905667ee2 reactor: Use "import Queue as queue" for improved Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
0e9aa76066 uc1701: Update bus import to "from .. import bus"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
f931da1b87 extras: Use "from . import module" for relative imports
Use alternate import syntax to improve Python3 compatibility.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
6edc2946db sx1509: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
4b231470ed delta_calibrate: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
8c96e9dd11 bed_mesh: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
0ccf3018d5 msgproto: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
8d8c239e47 util: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor
f5cdfad333 mcu: Avoid using "async" for variables as it conflicts with Python3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Boleslaw Ciesielski
ca2e84abba Makefile: fixed missing dependency on autoconf.h
Signed-off-by: Boleslaw Ciesielski <combolek@users.noreply.github.com>
2020-06-15 17:14:58 -04:00
Kevin O'Connor
d47a5eb8b6 config: Update generic-bigtreetech-skr-v1.4.cfg with diag1 pins
Reported by @Tomblarom.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 16:48:08 -04:00
Kevin O'Connor
c4de0bba50 pid_calibrate: Avoid internal error on a shutdown
If a shutdown occurs during a PID_CALIBRATE command (eg, due to a
heater problem) then exit cleanly instead of throwing an internal
error.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-14 11:34:04 -04:00
Lucio Tarantino
35bbd989e4 docs: LinuxMCU doc & script (#2956)
Signed-off-by: Lucio Tarantino <lucio.tarantino@gmail.com>
2020-06-12 20:32:12 -04:00
Kevin O'Connor
519c3ad5ee uc1701: Optimize swizzle_bits() code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-12 09:37:37 -04:00
Kevin O'Connor
9465618adb display: Rework write_graphics() to take one character cell at a time
Change write_graphics() from taking one pixel row of n characters to
taking all the rows and columns for one character cell.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-11 00:18:23 -04:00
Kevin O'Connor
467e8e6f40 display: Default DISPLAY=display in SET_DISPLAY_GROUP command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-09 12:19:53 -04:00
Florian Heilmann
68fcbe2a62 display: add SET_DISPLAY_GROUP command (#2969)
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-06-09 12:07:25 -04:00
Kevin O'Connor
c630ecf3c7 config: Mention 0/1 is valid for display_glyph data
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-09 09:05:41 -04:00
Florian Heilmann
f28c3319ed uc1701: Fix for glyph rendering on uc1701 display (#2966)
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-06-09 08:20:48 -04:00
Kevin O'Connor
cf9627cc05 display: Use animated heated bed icons on default hd44780 display
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-09 08:09:59 -04:00
Kevin O'Connor
7713986ae1 display: Make hd44780 glyphs configurable
Allow the 20x4 hd44780 screen glyphs to be customizable from the
config file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-09 08:09:59 -04:00
Kevin O'Connor
1a7e4e51b3 display: Use '.' and '*' in display_glyph description
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-08 21:40:42 -04:00
Kevin O'Connor
d94dd8e9fd docs: Note changes to glyph names
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-08 16:55:09 -04:00
Florian Heilmann
3dcac1308e display: Move glyph definition to printer config
This commit allows to modify the icons (or glyphs) in the displays that
support it. Existing icons can be modified and new icons can be added via
a [display_glyph] section in the config.

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-06-08 16:40:45 -04:00
Kevin O'Connor
722770f62f generic: Minor header cleanup to generic/irq.h
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-07 21:18:04 -04:00
Kevin O'Connor
b0e8e84d6e docs: Add linux mcu test results to Benchmarks.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-07 09:27:55 -04:00
Kevin O'Connor
06437c5892 linux: Wait in timer dispatch for up to 2us
Use 2us in the linux timer dispatch code to unify linux timer dispatch
logic with the common timer_irq.c code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-07 09:17:51 -04:00
Kevin O'Connor
12e3b9fa7b hall_filament_width_sensor: Fix whitespace errors
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-06 14:52:56 -04:00
Kevin O'Connor
739e6e7396 extruder_stepper: Don't directly access extruder member variables
Rework extruder.get_trapq() into extruder.sync_stepper() so that
extruder_stepper.py does not need to directly access the extruder
internals.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-06 14:41:15 -04:00
theophile
518fe023b4 extruder_stepper: Support changing synced extruder on the fly (#2824)
Signed-off-by: Christopher Meredith <chmeredith@gmail.com>
2020-06-06 14:30:58 -04:00
matpab
967fe1c01c HallFilamentWidthSensor: Use current width instead of nomal width while delay is not over (#2907)
Option for using the current diameter instead of nominal while the first measurement isn't in place

Signed-off-by: Matthias Pabel <matthias.pabel@hs-augsburg.de>
2020-06-06 14:19:00 -04:00
Kevin O'Connor
a6f2fc7179 docs: Minor reword to latest Config_Changes.md update
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-06 12:51:36 -04:00
Lucio Tarantino
b7699d374a linux: Ability to use multiple GPIO chips (#2935)
Signed-off-by: Lucio Tarantino <lucio.tarantino@gmail.com>
2020-06-06 12:47:11 -04:00
Kevin O'Connor
7912c39f9e docs: Add a "why does klipper report errors" section to FAQ
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-05 17:04:02 -04:00
Kevin O'Connor
5d26c2a08e gcode_arcs: Add back in support for E moves in absolute extrude mode
This reverts commit 43fa41c1af.

The above commit disabled absolute extrude moves because it was
unclear if the code would work properly when an M221 extrude factor or
G92 offset was in use.  However, since the calculation is done
relative to the raw E position and is sent as a raw E position to
gcode.cmd_G1() these modes should not matter.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-04 15:25:17 -04:00
Kevin O'Connor
2a66286d1c display: Do not show time remaining in default 16x4 display
The time remaining estimation is wildy inaccurate.  Only show the time
elapsed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-04 15:02:18 -04:00
Kevin O'Connor
2da7d65402 config: Add example config printer-makergear-m2-2016.cfg
Reported by @N5QM.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-04 12:01:30 -04:00
Kevin O'Connor
c890aba45e config: Fix uart addresses on generic-bigtreetech-skr-mini-e3-v1.0.cfg
Reported by @Jumbu.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-04 11:50:50 -04:00
Kevin O'Connor
3a3ea90ba5 config: Fixes for generic-bigtreetech-skr-mini-e3-v2.0.cfg
Add config file to printers.test.  Fix errors in config and unify
settings with the mini-e3-v1.2 config.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-04 11:46:57 -04:00
Paul Greidanus
4b650eccb2 config: Config example for a SKR Mini E3 v2.0 (#2929)
This is a basic config example for a SKR Mini E3 v2.0, the pinouts are different than the 1.2 and requires different compile options, so worth having an example.

Signed-off-by: Paul Greidanus <paul@majestik.org>
2020-06-04 11:38:52 -04:00
Kevin O'Connor
9850dc75f4 toolhead: Handle flush_step_generation() call after dwell()
If self.kin_flush_delay changes after a G4 dwell command (or other
non-kinematic time update) then it could lead to "internal step
compression" errors.  Make sure to handle this case in
flush_step_generation().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-01 15:29:20 -04:00
Kevin O'Connor
38772492f9 Kconfig: Only show the "usb ids" menu if low-level options are enabled
It's rare to customize the usb ids, so make it a "low-level" option.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-31 21:05:04 -04:00
Kevin O'Connor
ea9eac6c38 Kconfig: Change the default usb vendor/product id
Change the product/vendor id to 0x1d50/0x614e, which has been reserved
for Klipper (thanks to the openmoko project).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-31 21:05:04 -04:00
BlackStump
bceb8ddee2 scripts: Permission fix for debian-install (#2936)
Signed-off-by: Trevor Wilson <altocoey@hotmail.com>
2020-05-31 19:05:46 -04:00
Kevin O'Connor
634dcc7387 lcd_hd44780: Only calibrate cmd_wait_ticks on mcus with strict timing
The calibration isn't valid on the linux mcu, so make it dependent on
CONFIG_HAVE_STRICT_TIMING.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-31 14:57:06 -04:00
Kevin O'Connor
0cbb8fdc9a lcd_st7920: Only calibrate wait ticks on mcus with strict timing
The calibration isn't valid on the linux mcu, so make it dependent on
CONFIG_HAVE_STRICT_TIMING.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-31 14:57:06 -04:00
Kevin O'Connor
98192d710f stepper: Make toggling the step gpio after timer read conditional
On the Linux mcu, toggling the pin after the time is read is not
valid.  Make that optimization dependent on CONFIG_HAVE_STRICT_TIMING.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-31 14:57:06 -04:00
Kevin O'Connor
835ec3513d Kconfig: Add a new CONFIG_HAVE_STRICT_TIMING build definition
Add a new build definition to note micro-controllers that have strict
timing.  The Linux mcu code does not have strict timing - all other
targets currently do.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-31 14:57:06 -04:00
Kevin O'Connor
b80d2f7706 stm32: Fix typo causing internal clock to always be used on stm32f042
Reported by Pontus Borg.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-28 15:56:22 -04:00
Kevin O'Connor
5ef930454e lib: Add info on hidflash to README.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-28 14:53:57 -04:00
Kevin O'Connor
a5b5474f69 hidflash: Convert changes.diff to a unix style file
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-28 14:52:22 -04:00
Arksine
67b554fde2 hidflash: Add diff file with changes from original source
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-05-28 14:44:51 -04:00
Arksine
a9426d045b docs: Update bootloaders.md with HID bootloader documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-05-28 14:44:51 -04:00
Arksine
ab87af90a3 stm32f4: Add support for HID bootloader
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-05-28 14:44:51 -04:00
Arksine
380ba2a618 scripts: add libusb-1.0 to install scripts
The hid-flash tool depends on libusb-1.0-0-dev

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-05-28 14:44:51 -04:00
Arksine
05efccc874 stm32f1: Add support for HID Bootloader
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2020-05-28 14:44:51 -04:00
Arksine
4b9b705b99 lib: Add hidflash source
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-05-28 14:44:51 -04:00
kiwigod
bf367ad2b6 scripts: add arch linux install script
Automate installation for Arch Linux based systems

Signed-off-by: Arjun Sardjoe Missier <amissier@pm.me>
2020-05-28 14:40:04 -04:00
Kevin O'Connor
1ab41cf41d gcode: Make it clear that gcode.get_status() can be called without eventtime
Make it clear that gcode.get_status() to be called without an
eventtime by defaulting eventtime=None.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-26 14:59:15 -04:00
Kevin O'Connor
ceaf818a11 tuning_tower: Minor optimization
Store a reference to the gcode class in self.code.  Obtain the
z_offset once and use for both the oldval and newval calculation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-26 14:56:52 -04:00
Kevin O'Connor
04532448bc tuning_tower: Remove max(0, z) check
Commit 9530373c introduced a minimum value of zero for the g-code z
position.  Unfortunately, that would likely cause the tuning tower to
not emit a command at the start of a test because the initial dummy z
position is set to a negative value.  The minimum bound should not be
needed so remove it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-26 14:46:15 -04:00
Kevin O'Connor
686d557863 tmc5160: Change the default for the pwm_freq field to zero
The tmc5160 spec shows a default of zero, so use that same default for
Klipper.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-24 23:58:48 -04:00
Kevin O'Connor
5afa5d3fbb docs: Fix typo in Contact.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-24 15:26:00 -04:00
Adrian Keet
b267178370 controller_fan: Add fan_speed parameter.
This gives it parity with heater_fan.  Also change the default speed from
max_power to 1.0, since it is already scaled by max_power in set_speed.

Signed-off-by: Adrian Keet <arkeet@gmail.com>
2020-05-24 11:46:46 -04:00
Rubens Panfili
9530373ccb tuning_tower: compensate z-offset (#2881)
Signed-off-by: Rubens Panfili <rubens.panfili@gmail.com>
2020-05-24 11:33:09 -04:00
Kevin O'Connor
492cd3d99f configfile: Fix check for unused config sections and options
Commit c3899cef inadvertently broke the error check for unused config
options.  Add a new note_valid parameter to the config access wrappers
and use that in get_status() to fix the check.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-21 17:50:51 -04:00
Denis Ignatenko
9270cabb74 hall_filament_width_sensor: fix overflow issue on 12 bit adc (#2902)
Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
2020-05-21 13:59:09 -04:00
Denis Ignatenko
1d2746f167 hall_filament_width_sensor: Increasing measure stability (#2836)
Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
2020-05-18 17:14:24 -04:00
fess
c9daefd97f z_tilt: retries, fix extra retry bug.
round to only 6 decimal places of precision.  prevents doing extra retry
from small variations due to floating point math.

Signed-off-by: John "Fess" Fessenden <fess@fess.org>
2020-05-18 14:55:25 -04:00
fess
7b0e6725ca z_tilt: retries fixup err message
print retries status before erroring on increase

Signed-off-by: John "Fess" Fessenden <fess@fess.org>
2020-05-18 14:55:25 -04:00
andryblack
8fd330c54e linux: userspace GPIO control
Allow use host GPIO pins for non-realtime purposes.

Signed-off-by: Andrey Kunitsyn <blackicebox@gmail.com>
2020-05-17 22:17:15 -04:00
Kevin O'Connor
f0c394de81 docs: Add stow_on_each_sample description to BL-Touch.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-11 12:46:25 -04:00
Kevin O'Connor
eebd7e6579 docs: Update bltouch probe_with_touch_mode documentation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-11 12:46:25 -04:00
Kevin O'Connor
20a27c697f bltouch: Add "probe in touch mode" option
Signed-off-by: Mike Stiemke <fandjango@gmx.de>
2020-05-11 12:46:25 -04:00
Kevin O'Connor
703490da1c bltouch: Simplify handling of command timing
Always disable the PWM after each command sent.  Automatically trim
the command duration so the PWM disable doesn't increase the total
pulse time (when the duration is 200ms or greater).

Track the ideal command end time separately from the pwm transmit time
and only delay toolhead moves to this ideal time.

Update verify_state() to automatically schedule the check using the
time of the last sent command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-11 12:46:25 -04:00
Kevin O'Connor
c3b973319f config: Add printer-anet-e16-2019.cfg example config file
Reported by @dstack.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-11 12:34:58 -04:00
Nathan Plamondon
c402b275c3 bed_mesh: Fix typo (#2849)
Signed-off-by: Nate Plamondon <nplamondon@gmail.com>
2020-05-11 12:30:57 -04:00
Kevin O'Connor
787ed452c2 klippy: Rename try_load_module() to load_object()
Rename try_load_module() so that it uses consistent naming for
"printer objects".  Change the function to raise an error by default
if the specified module does not exist.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-08 11:05:14 -04:00
Kevin O'Connor
8472c57b59 klippy: Minor code movement
Move set_rollover_info() - no code changes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-08 11:05:14 -04:00
Georgios Karnas
393f37dbfc avrsim: update avrsim pty attr (#2343)
Signed-off-by: Georgios Karnas <kargeor@gmail.com>
2020-05-05 17:57:42 -04:00
Denis Ignatenko
f88117c7e4 docs: Update HallFilamentWidthSensor.md (#2827)
Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
2020-05-05 17:45:26 -04:00
Arksine
72b3ab8b29 stm32: add support for i2c read
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-05-05 11:44:19 -04:00
Kevin O'Connor
2d4b520260 gcode: Move "ok" tracking to GCodeCommand class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
bf4bd5cfc1 gcode: Remove parsing helpers from main gcode class
Remove the parsing helpers from the main gcode class now that all
callers have been converted to use the parsing helpers in the
GCodeCommand class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
a68bb935df menu: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
1fd76b7393 manual_stepper: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
821df4e994 dotstar: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
a7ca0e1670 delayed_gcode: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
e9e0c374d6 temperature_fan: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
a11535fc86 servo: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
53093a7a15 output_pin: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
3c4091548e tmc5160: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
d759cc60d3 tmc2130: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
3e64093b81 tmc2660: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
8b8f591a05 tmc: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
0fd12609a6 neopixel: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
310d583413 gcode_button: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
1e992f9d16 filament_switch_sensor: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
02ee379f82 pause_resume: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
3e6f2206b3 hall_filament_width_sensor: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
e5c512c8d5 bed_tilt: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
f2688dbb33 bed_screws: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
0197fec202 delta_calibrate: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
b24465976e heater_bed: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
95919d1256 screws_tilt_adjust: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
203568b909 bltouch: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
4fd5090253 tuning_tower: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
7232014657 query_endstops: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor
d04476c82e fan: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
33c6667881 stepper_enable: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
a79096efdf pid_calibrate: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
12b20c6e77 safe_z_home: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
947569d347 endstop_phase: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
153c1cbe60 homing_override: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
1f64ca4fd9 query_adc: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
a13e681b2e gcode_macro: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
fb16e8810b idle_timeout: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
1d2bb5a412 tsl1401cl_filament_width_sensor: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
19abe2b974 force_move: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
57ca91a875 quad_gantry_level: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
d4adeda76b manual_probe: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
dce46ea053 z_tilt: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
ff6c11e827 probe: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
1746148a45 firmware_retraction: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
5fe5e21508 heaters: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
c186766708 configfile: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
9b6010dc7b extruder: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
6869611147 cartesian: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
ec0e3e710c toolhead: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
b0d9a82718 virtual_sdcard: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
48ebb6959d skew_correction: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
433c8c937a respond: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
5a0b9d1ce8 display_status: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
98c9a991a3 bed_mesh: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
c0796bc42d gcode_arcs: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
c79f135cd5 gcode: Use new GCodeCommand wrappers in command handlers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor
ddb8311890 gcode: Create new wrapper class for gcode command parameters
Instead of passing a dictionary to the command handlers, create a
wrapper class and pass that class to the command handlers.  This can
simplify the command handler code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Dushyant Ahuja
1eb2d4da90 docs: Clarify that Probe_Calibrate uses the speed variable for XY as well (#2735)
Signed-off-by: Dushyant Ahuja <dusht.ahuja@gmail.com>
2020-05-05 09:03:39 -04:00
Kevin O'Connor
9a92b346fd itersolve: Use more explicit list traversal in itersolve_generate_steps()
Avoid using doubles as flags when generating steps during "lead up to
stepper activity".  Instead, explicitly track how many inactive move
entries are skipped and only generate steps for those entries.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-04 14:00:53 -04:00
Kevin O'Connor
7843c23b8c itersolve: Fix numeric stability of flush range times
Don't assume the times passed to itersolve_gen_steps_range() are
contained within the move.  It's possible the checks in
itersolve_generate_steps() may round to different values when
converting the times to a relative move time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-04 10:24:46 -04:00
Lucio Tarantino
dac42efbd9 htu21d: Support for HTI21D family sensor on I2C bus (#2803)
Signed-off-by: Lucio Tarantino <lucio.tarantino@gmail.com>
2020-05-03 18:47:24 -04:00
Arksine
f8649b4ba9 stm32: Wait for setup complete to enable ep0 rx in usbotg.c
Endpoint 0 OUT needs to NAK everything until the core signals that the
setup stage is complete.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-03 12:00:47 -04:00
Kevin O'Connor
e93c188766 stm32: Wait for setup complete notification in usbotg.c
A setup packet is only valid after receiving the "setup complete"
notification.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-03 11:27:43 -04:00
Janne Grunau
0aa78ec76e linux: Adapt servo0 channels for beagleboard kernel 4.14.108-ti (#2746)
The beagleboard TI kernel 4.14 and 4.19 contain a commit which change
the device names ("pwm: Create device class for pwm channels") from
pwmN to pwm-${chip}:N. This commit was never merged into the upstream
kernel.

Decrease the number of pwm channels to a more reasonable 16. Increase
the number of pwm chips to 8 since the replicape servo pwm outputs are
on pwmchip4.

Update replicape code to detect appropriate channel.

Signed-off-by: Janne Grunau <janne-gh@jannau.net>
2020-05-03 11:24:42 -04:00
andryblack
db732e58db linux: change clock frequency
Increase timer resolution for linux mcu

Signed-off-by: Andrey Kunitsyn <blackicebox@gmail.com>
2020-05-02 16:38:56 -04:00
Kevin O'Connor
f4429a54a9 clocksync: Don't filter any of the initial syncronization clock messages
Add a 50ms delay from the initial clock measurement to the first
get_clock query.  Disable the prediction_variance filter on each
get_clock query so that none of those measurements are ignored.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-02 11:08:02 -04:00
Hywelmartin
07e8011f51 config: Update printer-anycubic-kossel-plus-2017.cfg (#2775)
horizontal_move_z: 20 instead of 5... there has been some support Q about this..

Signed-off-by: Martin Malmqvist <hywelmartin@gmail.com>
2020-05-02 09:31:23 -04:00
Kevin O'Connor
3aacc4d6a2 gcode: Only call position_with_transform() when printer is ready
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-02 07:35:23 -04:00
Kevin O'Connor
b6ebf5cb09 stm32: Slow ADC frequency to 4.5Mhz
There are reports that SKR mini boards have more stable ADC results
when running the ADC at a slower frequency.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-30 19:47:23 -04:00
Kevin O'Connor
1460e0d6f4 config: Add printer-sovol-sv01-2020.cfg example config
Reported by @lalek54.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-29 21:13:11 -04:00
Kevin O'Connor
5c9551dc72 test: Add printer-tronxy-p802m-2020.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-29 20:46:29 -04:00
camatthew88
81e71ce8f8 config: Create printer-tronxy-p802m-2020.cfg (#2796)
Signed-off-by: Matthew Blankenbehler <thecoolkids322@gmail.com>
2020-04-29 20:45:19 -04:00
Kevin O'Connor
8c2b62775d test: Fix commands.test so RESTART is run last
Commands after a RESTART aren't properly run on a test case, so only
run it last.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-28 22:53:12 -04:00
Kevin O'Connor
bf6f84b82d docs: Note that printer.heater got changed to printer.heaters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-26 17:30:57 -04:00
Kevin O'Connor
ced389f4f6 pid_calibrate: Fix module import
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 14:49:50 -04:00
Kevin O'Connor
17123889f6 heaters: Make heater.py an "extras" module
The heater logic is an independent module that does not need to be
treated as part of the "core" klipper code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 14:26:45 -04:00
Kevin O'Connor
d858498a53 heater: Move M105 command handling from gcode.py to heater.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 14:26:28 -04:00
Kevin O'Connor
44f868a802 klippy: Add an is_shutdown() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 12:41:44 -04:00
Kevin O'Connor
86a99cf38e gcode_button: Simplify script execution
It's no longer necessary to queue gcode scripts - gcode.run_script()
now does that automatically.

Also, make release_gcode config optional.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 12:11:49 -04:00
Kevin O'Connor
c590bf7643 probe: Rename probe_prepare/finalize to probe_prepare/finish
The probe_finalize() name is used for callbacks in both the
PrinterProbe and ProbePointsHelper classes.  Rename the PrinterProbe
callback to avoid confusion.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 12:01:52 -04:00
Kevin O'Connor
64031ab3d7 gcode: Rename respond() to respond_raw()
Rename the method to make it more clear that it is a low-level call
that should be rarely used.

Also, change gcode_button.py, hall_filament_width_sensor.py, and
tsl1401cl_filament_width_sensor.py to use respond_info() instead of
respond_raw().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 15:54:18 -04:00
Kevin O'Connor
61524542d2 gcode: Don't export respond_error()
Don't export the respond_error() method as callers should raise a
gcode.error() instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 14:59:25 -04:00
Kevin O'Connor
568a0da50e virtual_sdcard: No need to call gcode.respond_error() on disk error
Report low-level disk errors via the log and use the normal sdcard
mechanism to report end of sdcard print to gcode users.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 14:54:13 -04:00
Kevin O'Connor
ed3e6b42c7 gcode: Raise a gcode.error() from G20 command
It's important to raise an error (instead of calling respond_error() )
so that a G20 will stop a virtual_sdcard print.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 14:53:41 -04:00
Kevin O'Connor
9730be8e17 respond: Simplify M118 handling
No need to check for '#original' in params - it's always there.
Properly handle a lower case m118 command.  Don't register a help text
for the legacy M118 g-code command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 10:11:37 -04:00
Kevin O'Connor
3990d997de z_tilt: Raise a gcode.error() instead of directly calling respond_error()
Raising an error (instead of reporting an error) is important as only
a raised error will stop a print from virtual_sdcard.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 10:10:33 -04:00
Kevin O'Connor
43fa41c1af gcode_arcs: Disable E moves in absolute extrude mode
Commit 402110f6 didn't actually fix absolute extrude mode.  For now,
report an error if an extrude move is requested in absolute extrude
mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-23 10:05:05 -04:00
Kevin O'Connor
fc627ec470 gcode_arcs: Minor cleanup of planArc()
Fix linear_travel optimization.  Use "2*pi" instead of "radians(360)".
Always emit at least one segment and always end at the final target
coordinates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-22 17:58:10 -04:00
Kevin O'Connor
402110f655 gcode_arcs: Fix Z moves and E moves
Fix Z moves so that the movement is spaced out among the arc movements.

Fix extrude moves when in absolute extrude mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-22 16:30:02 -04:00
Kevin O'Connor
ff28f33967 gcode_arcs: Simplify parameter parsing
Use the normal gcode.get_float() mechanism for extracting parameters
from the g-code command.

Don't register descriptions for the G2/G3 commands as the convention
is to only use descriptions for "extended g-code commands".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-22 16:19:15 -04:00
Kevin O'Connor
120331f49a safe_z_home: Simplify check for axes to home
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-22 11:55:25 -04:00
Kevin O'Connor
8ac81fed67 lpc176x: Add support for additional i2c buses
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-21 16:11:39 -04:00
Kevin O'Connor
c5e7985740 neopixel: Make sure there is a minimum low duration after a long pulse
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-21 13:12:56 -04:00
Kevin O'Connor
9e8c4770ed rotary_delta: The get_status() method should take eventtime parameter
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-20 22:36:00 -04:00
Kevin O'Connor
0b05a38361 config: Add tmc2130 example to generic-bigtreetech-skr-v1.4.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-20 22:19:42 -04:00
Kevin O'Connor
57be62b1ca config: Remove obsolete description of menu_root in example-extras.cfg
Reported by @ld3300.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-19 14:01:20 -04:00
Kevin O'Connor
06846313fd homing: Avoid divide by zero error on PROBE at minimum Z position
Reported by @proto3.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-19 12:46:50 -04:00
Kevin O'Connor
ee9657bbf6 docs: Note __test menu removed in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-18 12:08:57 -04:00
Kevin O'Connor
0ae20421d1 neopixel: Allow host software to configure neopixel timing
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-15 13:29:43 -04:00
Kevin O'Connor
a7f7cc5075 neopixel: Use names for key timing values
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-15 12:11:57 -04:00
Kevin O'Connor
c7d6d81a4d test: Fix printer-tronxy-p802e-2020.cfg and add to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-14 22:19:08 -04:00
camatthew88
f7d7df0b46 config: Create printer-tronxy-p802e (#2674)
Signed-off-by: Matthew Blankenbehler <mablankenbehler23@whitnall.com>
2020-04-14 22:14:07 -04:00
Piotr Usewicz
939b575b01 bed_mesh: Fix typo (#2692)
Signed-off-by: Piotr Usewicz <piotr@layer22.com>
2020-04-14 22:09:28 -04:00
Kevin O'Connor
03fb7961b4 config: Use restart_method=cheetah in generic-fysetc-cheetah-v1.1.cfg
Reported by @csutcliff.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-08 12:27:01 -04:00
Kevin O'Connor
4ea7b213e2 config: Change uart addresses in generic-fysetc-cheetah-v1.1.cfg
Reported by @mihero and @Magoo0876.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-08 12:24:32 -04:00
Kevin O'Connor
931b73d498 test: Add generic-ultimaker-ultimainboard-v2 to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-08 11:28:41 -04:00
Avery Todd
1758f53b9d config: Add Ultimaker UltiMainboard v2 config. (#2696)
Adds config for the Ultimaker 2's UltiMainboard v2 board, with the 
correct pins assigned and current control for the A4988 motor
drivers.

Signed-off-by: Avery Todd <averyct@pm.me>
2020-04-08 11:26:39 -04:00
Kevin O'Connor
a028aeaf78 Revert "bltouch: No need to pause the toolhead for PWM off commands"
This reverts commit 5c8d15bbee.

The lower_probe() code was already manually optimizing the timing of
the pwm disable, and that conflicted with the optimization in commit
5c8d15bb.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-04 18:51:53 -04:00
sillyfrog
0342c50033 scripts: Update Docker file for current Klipper version (#2666)
Signed-off-by: Trent Davis <tgh@sillyfrog.com>
2020-04-02 20:19:26 -04:00
Kevin O'Connor
b2a29c6349 docs: Update BLTouch.md initial tests for users with a regular z endstop
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 17:34:15 -04:00
Kevin O'Connor
5d0658b91b docs: Add BLTouch.md section describing clone config options
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 17:34:15 -04:00
Kevin O'Connor
291fbe0801 docs: Add touch_mode sensor test to BLTouch.md
Describe how to test the sensor pin using the BLTouch touch_mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 17:34:15 -04:00
Kevin O'Connor
7a67cb86d5 config: Reword bltouch description in example-extras.cfg
The pin_up_touch_mode_reports_triggered should be set to True on all
genuine BLTouch.

Expand the description for stow_on_each_sample and state the default.

Reword the set_output_mode option to be more similar to other
descriptions.

It is no longer necessary to warn about clones being not supported.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 17:34:15 -04:00
Grigori Goronzy
6d2f3ef4f1 config: Fix reset/restart on Fysetc Cheetah v1.2
Deassert RTS for this board and enable the new Cheetah-specific reset
sequence.

Fixes #2026.

Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
2020-04-02 13:56:50 -04:00
Grigori Goronzy
0a20430e07 serial: Add Fysetc Cheetah board specific reset sequence
Fysetc Cheetah v1.2 boards require a special sequence to reset reliably.
This sequence works for me in all cases. Simpler sequences without
double reset did not work correctly. This is likely because of a weird
stateful circuitry for toggling the bootloader state.

Cheetah boards use RTS to configure bootloader triggering. By default,
pySerial sets RTS on connect, which unfortunately configures the board
to start the bootloader on reset.

Add a toggle for the RTS state to allow users to workaround. The RTS state
is set before the serial connection is opened, so there are no glitches.

Addresses #2026.

Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
2020-04-02 13:56:50 -04:00
Kevin O'Connor
5c8d15bbee bltouch: No need to pause the toolhead for PWM off commands
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor
9f2a025762 bltouch: Don't assume reset will do a pin_up in test_sensor()
Some clones don't raise the pin on a reset and the ANTClabs BL-Touch
sometimes doesn't raise the pin either.

Rework the (infrequently called) sensor test code to always issue a
pin_up command before the touch command.  Also, perform a reset and
retry if the sensor test fails.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor
2b916e79c7 bltouch: Call sync_print_time() on multi_probe_end()
Be sure to fully raise the probe prior to starting any future toolhead
movements in the multi_probe_end() case.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor
5e207d2baa bltouch: Apply reset command for a full second on a raise_probe() failure
If an error is found during the pin_up_not_triggered check, then apply
the reset command for a full second (instead of just 100ms).  This
gives the bltouch more time to check its internal state.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor
3646cc0140 bltouch: Separate out pin_up_not_triggered case in raise_probe()
Simplify raise_probe() by separating out the pin_up_not_triggered
case.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor
87bfa06b9e bltouch: Don't raise an error in verify_state()
Return the triggered state from verify_state() and update the callers
to raise the error (if needed).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor
d6034013e7 config: Add example printer-alfawise-u30-2018.cfg config
Reported by @elegos.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-30 21:29:57 -04:00
Kevin O'Connor
3c01b60a88 docs: Update FAQ with TMC2208 "standalone" mode workaround
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-29 11:08:49 -04:00
Kevin O'Connor
77177582cd extruder: step_distance must be positive on SET_EXTRUDER_STEP_DISTANCE
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-28 10:06:02 -04:00
Kevin O'Connor
336af2f28d stepper: No need to pass stepper_kinematics to set_step_dist()
Also, no need to log in stepper.py as the update is already logged in
extruder.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-28 10:06:02 -04:00
David Smith
d4bf61262e Extruder: Add g-code to set extruder step_distance (#2598)
Signed off by: David Smith <davidosmith@gmail.com>
2020-03-28 09:52:46 -04:00
Kevin O'Connor
8f8cf7ef41 config: Add example printer-twotrees-sapphire-pro-2020.cfg config
Reported by @thucar.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-26 11:53:06 -04:00
Kevin O'Connor
cb414ae914 config: Add example generic-mks-robin-nano.cfg config
Reported by @thucar.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-26 11:53:06 -04:00
Kevin O'Connor
8a3233b397 stepper: Add a config check for obvious incorrect homing_positive_dir
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-24 16:04:11 -04:00
Kevin O'Connor
302cd38217 update_mks_robin: Add script to update firmware for MKS Robin bootloader
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-24 10:30:02 -04:00
Kevin O'Connor
91a27ef083 stm32: Add support for 64KiB bootloader on stm32f103
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-24 10:02:21 -04:00
Kevin O'Connor
886530e777 stm32: Explicitly reset peripheral clocks on stm32f1
It appears some bootloaders do not properly reset some peripherals.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-24 10:00:45 -04:00
Kevin O'Connor
295fb7fc85 serialhdl: Reduce connection fail timeout from 2.5 minutes to 1.5 minutes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-24 10:00:45 -04:00
Kevin O'Connor
48237435b2 klippy: Log shutdown state in invoke_shutdown()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-24 08:37:36 -04:00
Kevin O'Connor
849cc075dc docs: Fix typo in MANUAL_STEPPER command line
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-23 15:06:32 -04:00
Jeremy Briffaut
6be552f6e6 Allow manual_stepper to run in parallel than an other stepper
Signed-off-by: Jeremy Briffaut <kakou@kakou.org>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-23 14:43:34 -04:00
Kevin O'Connor
6b7e917a8e statistics: Exit loop as soon as MemAvailable found
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-22 22:04:40 -04:00
Kevin O'Connor
6aae62542c statistics: Add system stats
Report os load, process cpu time, and system available memory to each
statistics report.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-22 20:02:51 -04:00
Kevin O'Connor
f3667fd453 util: Try to dump mcu build information on a connection error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-22 13:22:52 -04:00
Kevin O'Connor
eeee2a9a35 mcu: Shutdown if a spontaneous restart of an mcu is observed
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-22 12:20:09 -04:00
Kevin O'Connor
0c9eb519ff docs: Update Manual_Level.md Z_ENDSTOP_CALIBRATE instructions
The endstop must not be triggered at the start of Z_ENDSTOP_CALIBRATE.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-22 11:18:31 -04:00
Kevin O'Connor
7543876487 docs: Add info on S3D "extra retract distance" to Slicers.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-22 11:00:02 -04:00
Kevin O'Connor
df6ca2ea1d config: Add comment on changed Z step_distance to Ender5 config
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-22 08:44:37 -04:00
Kevin O'Connor
d3a7d992aa display: Remove unused self.lcd_type variable
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-21 12:12:29 -04:00
kakou-fr
961f68629a manual_stepper: Fix sensorless endstop for manual_stepper (#2621)
Signed-off-by: Jeremy Briffaut <kakou@kakou.org>
2020-03-20 21:11:36 -04:00
Chester
35d951dabf config: Add BigTreeTech GTR board generic config file (#2626)
This config was not yet available - I have updated all the pin defines, starting with the BTT SKR board which is the most similar board + tested it on my printer which is currently working with the TMC5160 drivers using software SPI. I have not tested it with other drivers etc but the config should work for them. 

Signed-off-by: Chester Lowrey <hilo90mhz@gmail.com>
2020-03-20 21:02:24 -04:00
Kevin O'Connor
acd165cbea stepcompress: Implement a step+dir+step filter
Some stepper motor drivers do not respond well to rapid "step +
direction change + step" events.  In particular, it is believed this
can cause "over current" events on the tmc2208 drivers when they are
in "stealthchop" mode.  Detect these events and remove them from the
generated step times.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-13 21:53:48 -04:00
Kevin O'Connor
d86bf0b927 stepcompress: Move code around in stepcompress.c
Just code movement - no code changes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-13 21:53:48 -04:00
Kevin O'Connor
5e39d346ed display: Use the active extruder in the default 16x4 screen layout
Change the default layout to show the active extruder (not always the
first extruder).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-13 21:50:38 -04:00
Kevin O'Connor
f2dd4b001d display: Use a separate display group for 16x4 multiple extruders
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-13 21:46:36 -04:00
Garth Snyder
0ba83c5b04 docs: clarify behavior of M204 with only one of P or T (#2564)
Signed-off-by: Garth Snyder <garth@garthsnyder.com>
2020-03-11 13:03:48 -04:00
Kevin O'Connor
986e9c884a display: Fix percent progress rendering on 16x4 multi-extruder layout
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:55:53 -04:00
Kevin O'Connor
3850b3d27a docs: Fix date of menu change in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:42:22 -04:00
Arksine
aa7d24b0af display: add support for multiple displays
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-03-08 17:38:24 -04:00
Kevin O'Connor
6d5ce309a5 menu: Remove the "test" menu from the default menu
It is likely only developers will be interested in testing the menu
system, so no need to have it in the default menu.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:38:24 -04:00
Kevin O'Connor
d39c4fe628 menu: Disable support for "deck" and "card" menu items
Disable support for customizing the main lcd display content via the
menu system.  Advise users to use the new display_data config sections
as a replacement.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:38:24 -04:00
Kevin O'Connor
2cf03ffa23 display: Replace hard-coded display with new config based display
Introduce a new config based system for specifying the on-screen
contents of an lcd screen.  The default screen configuration (found in
klippy/extras/display/display.cfg) is the same as the previous
hard-coded display, so this should not change behavior for existing
users.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:38:21 -04:00
Kevin O'Connor
5acc181624 display_status: Separate out M73 and M117 handling to new module
Move M73 and M117 handling from display.py to a new display_status.py
module.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:36:14 -04:00
Willy Hsiao
7fb7f0d331 config: Pin logic on MKS SGEN L generic config (#2606)
Correct TMC2130 diag1_pin logic - the diag1_pin logic should be inverted and pulled up.

Use pullup for endstops - pullups should be used here.

Signed-off-by: Wen-Jeng Hsiao <isuperwilly@gmail.com>
2020-03-08 14:36:09 -04:00
Kevin O'Connor
b3cfe55b39 clocksync: Remove no longer used get_adjusted_freq() function
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-06 16:35:02 -05:00
Kevin O'Connor
62fcc5a56f mcu: Calculate homing rest_ticks via standard print_time_to_clock() call
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-06 16:33:54 -05:00
Kevin O'Connor
a61d483e21 tmc_uart: Use nominal mcu frequency in baud calculation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-06 16:29:18 -05:00
Kevin O'Connor
e872290c47 Revert "itersolve: Implement a step+dir+step filter"
This reverts commit c9cb462f90.

The step flushing for this commit was not complete.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-05 18:37:02 -05:00
Kevin O'Connor
a074af7c87 adc_temperature: Add builtin definition for PT1000 sensors
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-05 11:46:01 -05:00
Kevin O'Connor
8d10379ad8 config: Move BME description within example-extras.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-05 11:41:38 -05:00
clearchris
f87e29c775 armcm_boot: Additional code for broken bootloaders
Explicitly disable the SysTick interrupt and explicitly set the stack
pointer, as some bootloaders aren't handling this correctly.

Signed-off-by: Chris Lombardi <clearchris@hotmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 19:50:56 -05:00
Kevin O'Connor
79e2376993 stm32: Add support for a bootloader on stm32f0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 19:50:56 -05:00
Kevin O'Connor
c9cb462f90 itersolve: Implement a step+dir+step filter
Some stepper motor drivers do not respond well to rapid "step +
direction change + step" events.  In particular, it is believed this
can cause "over current" events on the tmc2208 drivers when they are
in "stealthchop" mode.  Detect these events and remove them from the
generated step times.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 19:43:47 -05:00
Kevin O'Connor
8f8c1e2c58 itersolve: Reset bounds search on a direction change
If the stepper changes direction then the average velocity since the
last step pulse isn't a good indicator of the next step pulse.
Instead, reset the bounds checking to use a low starting guess.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 19:43:47 -05:00
Kevin O'Connor
271e412ae6 itersolve: Simplify main itersolve_gen_steps_range() loop
Reorder the loop to try and make the code flow a little simpler.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 19:43:47 -05:00
Kevin O'Connor
bc6c3ba92f stepcompress: Remove "queue append" abstraction
The queue_append system predates the iterative solver - it was useful
when many different kinematic functions directly added steps to the
step compression queues.  With the iterative solver being the only
source of step generation, it is simpler to directly add steps from
the iterative solver code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 19:43:47 -05:00
Kevin O'Connor
d6c2e24f4c tmc5160: Support setting GLOBALSCALER to fine tune current selection
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 19:40:32 -05:00
Kevin O'Connor
121249c999 stm32: Revert "stm32: performance improvement for spi on stm32f0"
This reverts commit a2c309a2b0.

The above commit is causing crashes on the stm32f103xb chip when spi
is in use.  It's unclear what the cause of the regression is, but the
optimization isn't required so revert it until the root cause can be
determined.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 18:33:34 -05:00
Kevin O'Connor
e9e0f59204 stepper: Add some comments on s->position tracking
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 14:30:41 -05:00
Kevin O'Connor
63ba7d231e docs: Minor updates to Code_Overview.md
Minor indentation change.  Update for change to stepcompress_append().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-02 21:54:22 -05:00
David Smith
c0f72a2c38 safe_z_home: Support note_z_not_homed() in kinematics (#2500)
Signed-off-by: David Smith <davidosmith@gmail.com>
2020-03-01 23:00:41 -05:00
kakou-fr
7a3cbc1e23 config: Example for MMU2S DIY (#2566)
Configuration file for MMU2S DIY

Signed-off-by: Jeremy Briffaut <kakou@kakou.org>
2020-03-01 22:08:37 -05:00
Denis Ignatenko
f84542cd20 hall_filament_width_sensor: Added virtual runout sensor (#2535)
Signed-off-by: Denis Ignatenko deniss979@gmail.com
2020-03-01 22:05:12 -05:00
Kevin O'Connor
26523d77ba docs: Minor wording change to Endstop_Phase.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-01 11:40:13 -05:00
Kevin O'Connor
31b2c3ea7a stm32: Fix broken clock setup on stm32f1
Commit bd6c25c9 introduced a typo that caused the clock divisors to
not be set correctly on stm32f1.

Reported by @brianrjones69.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-29 13:14:12 -05:00
Kevin O'Connor
1c06ea8afe toolhead: Minor comment addition to calc_junction()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-28 22:27:23 -05:00
Kevin O'Connor
c197fdb03d heater: Fix misspelling of Celsius
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-27 11:31:51 -05:00
Angelol125
16e59511c3 config: Update printer-seemecnc-rostock-max-v2-2015.cfg (#2561)
Update printer-seemecnc-rostock-max-v2-2015.cfg to include the [display] and [board_pins] sections needed for Reprap 20x4 LCD display (#2561).

Signed-off-by: Angelo Lagis <angelo_lagis@hotmail.com>
2020-02-25 15:54:49 -05:00
FanDjango
16ecf15a91 bltouch: BTLOUCH V3.0/V3.1 Enable 5V/OD mode set commands (#2540)
Signed-off-by: Mike Stiemke <fandjango@gmx.de>
2020-02-23 22:32:07 -05:00
Kevin O'Connor
245917bf03 mcu: Introduce new lookup_query_command() command wrapper
Use new mcu.lookup_query_command() for all commands that query
information from the micro-controller.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 13:24:53 -05:00
Kevin O'Connor
332038ea01 serialhdl: Convert queries to use new notify message ack system
Convert standard queries to use the acknowledgments of the sent
command to determine if the response was received or not.  This also
controls command retransmissions (should the response have been lost).

The tmc_uart.py will continue to use the old mechanism as the tmcuart
responses are not sent synchronously with the query command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 12:01:21 -05:00
Kevin O'Connor
c6c360c4e1 serialqueue: Support notification of when a command is processed
Add ability for the host code to get a notification when the ack for a
command sent to the micro-controller is received.  This is in
preparation for improved detection of message loss between mcu and
host.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 12:01:21 -05:00
Kevin O'Connor
7b90830ae5 serialqueue: Remove unused serialqueue_encode_and_send() function
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 12:01:21 -05:00
Kevin O'Connor
98c7c7603e basecmd: No need for finalize_config command to send "config" response
The host code always issues a get_config command immediately after
finalize_config, so there is no need to send the two config response
messages.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 12:01:21 -05:00
Kevin O'Connor
e03f75e758 tmc: Revert incorrect changes to TPWMTHRS setting
It's not valid to set the TPWMTHRS in a "klippy:connect" event handler
because the TMCVirtualPinHelper and TMCCommandHelper classes were
expecting that field to be set during the config reading phase.

Revert "tmc: Fix typo preventing stealthchop threshold from being set"
This reverts commit 7d76067ff9.

Revert "tmc: Query the stepper step_distance from the stepper object"
This reverts commit 67b2852249.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 11:41:35 -05:00
Kevin O'Connor
15f21be5ec manual_stepper: Support ignoring errors on STOP_ON_ENDSTOP
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-19 13:38:22 -05:00
Kevin O'Connor
804f95ebe4 homing: Don't raise a TimeoutError from home_wait()
Change home_wait() to return if the homing operation completed
succesfully or not.  This simplifies the callers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-19 12:20:00 -05:00
Kevin O'Connor
fbbbbc85cf homing: Replace notify callback with a completion
Update the endstop code to return its trigger completion object during
home_start().  Update the toolhead class to take a completion object
(instead of creating its own).  This reduces the number of
intermediate callbacks needed during a homing operation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-19 11:45:44 -05:00
Kevin O'Connor
e3a5e2d271 reactor: Support multiple waiting timers on a single completion
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-19 10:49:56 -05:00
Kevin O'Connor
0e37f8c9b3 graph_extruder: Internal updates to graph calculation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-18 12:38:45 -05:00
Kevin O'Connor
17f2b4e960 config: Fix minor typo in printer-lulzbot-taz6-2017.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-18 12:11:19 -05:00
Chris Lee
90500c331a config: Update TAZ6 configuration
Support probing the corner washers for the bed tilt using G29,
flesh out the rest of the configuration for the display, and add
support for the Aerostruder (commented out by default).

Signed-Off-By: Chris Lee <clee@mg8.org>
2020-02-18 12:10:09 -05:00
Kevin O'Connor
29c6c89327 probe: Don't allow errors to propagate from "gcode:command_error" event
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-18 11:47:04 -05:00
Matt Shirley
477b83469c config: add mesh_min to printer-wanhao-duplicator-9-2018.cfg (#2525)
This is a small change I forgot to make when copying my config to this template.

Signed-off-by: Matt Shirley <mdshw5@gmail.com>
2020-02-17 20:59:08 -05:00
Christian S
aa0a889b04 menu: Set speed for move actions (#2520)
Signed-off-by: Christian Schnellrieder <schnellrieder.cs@gmail.com>
2020-02-17 20:52:54 -05:00
Kevin O'Connor
01d985a739 docs: Recommend RPi 2 or later in Installation.md
Reported by @patrickkettner.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-17 20:49:32 -05:00
Kevin O'Connor
5304c4141c filament_switch_sensor: Query "printing" status instead of tracking it
It's simpler to query the "printing" status from the idle_timeout
module on an event than it is to track changes to the printing status.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-17 17:07:54 -05:00
Kevin O'Connor
b6368173cf filament_switch_sensor: Collapse event disable flags
Introduce min_event_systime and rework the previous start_time,
last_event_time, and event_running flags into this one state tracking
variable.

This also makes a minor change to the behavior of the event_delay - it
is now calculated from the time the command completes execution
(instead of from when the event is first detected).  This may make a
difference if there is a long running g-code command occurring during
the detection event.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-17 16:57:27 -05:00
Kevin O'Connor
6716007420 filament_switch_sensor: Minor optimization to note_filament_present()
Avoid calling into the OS to obtain the system time if the filament
state hasn't changed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-17 16:51:00 -05:00
Arksine
718da75910 filament_switch_sensor: Add a get_status() method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-02-17 16:48:43 -05:00
Arksine
9415071482 filament_switch_sensor: Execute events using reactor callbacks
This removes the possibility of re-entry to callers of  note_filament_present().

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-02-17 16:48:43 -05:00
Arksine
740c0ae636 filament_switch_sensor: Replace BaseSensor with RunoutHelper
Rather than inherit from the BaseSensor, filament sensor implementatons
may instantiate the RunoutHelper and update the filament state via its
note_filament_present method.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-02-17 16:48:43 -05:00
FanDjango
086c131bbf bltouch: Add support for stow_on_each_sample
Signed-off-by: Mike Stiemke <fandjango@gmx.de>
2020-02-15 17:58:56 -05:00
Kevin O'Connor
1dd952ac65 probe: Add multi_probe_begin() / multi_probe_end() callbacks
Add support for notifying the low-level probing handlers that a
multiple probe sequence is occurring.  This is in preparation for the
bltouch code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-15 17:52:44 -05:00
Kevin O'Connor
5bca4e6fa1 gcode: Add a "command_error" event notifier
Allow other modules to be notified if there is a gcode command error
detected.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-15 17:52:44 -05:00
Kevin O'Connor
1aa11fed8c homing: Add a "home_rails_begin" event notifier
Also, rename the "homed_rails" event to "home_rails_end".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-15 17:52:44 -05:00
Kevin O'Connor
feb15eaf2e homing: Merge home_prepare()/home_finalize() into move_begin/move_end events
Collapse the "homing:move_begin", "homing:move_end", home_prepare(),
and home_finalize() into two new events: "homing:homing_move_begin"
and "homing:homing_move_end".  This simplifies the homing code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-15 17:52:44 -05:00
Arksine
b23346a521 bme280: handle read timeout exceptions
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-02-14 17:25:08 -05:00
test3210-d
9a65a4569b hall_filament_width_sensor: Add new filament sensor
Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
2020-02-14 13:14:34 -05:00
Kevin O'Connor
049d8c2a94 config: Update description of z_hop in safe_z_home
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-14 12:42:21 -05:00
Kevin O'Connor
b5c967acd8 stm32: The stm32f1 can only reach 64Mhz when using an internal clock
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-14 12:11:50 -05:00
Kevin O'Connor
c3899cefa8 configfile: Add get_status() to export raw config file information
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-13 22:04:40 -05:00
Kevin O'Connor
fd6baa3d16 config: Minor wording change to gcode_macro rename_existing description
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-13 21:52:00 -05:00
Kevin O'Connor
79ce3ef1c5 test: Add printer-wanhao-duplicator-9-2018.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-13 20:53:30 -05:00
Matt Shirley
b0b950b7e1 config: Add Wanhao Duplicator 9 MK1 (#2497)
Also applies to the Monoprice Maker Pro MK1.
This config is based on the version from Chris Barnes (https://www.facebook.com/Jarannis)
found on https://pastebin.com/raw/wm8PQezy. This config was mostly working and I
only had to change a few things:

  - updated key names for min_point and max_point to mesh_min and mesh_max
  - enabled PID control
  - tweaked bounds to allow movement during mesh leveling
  - removed all comments
  - decreased homing speed slightly
  - sane bed mesh sample defaults

In response to Kevin O'Connor:

- remove pressure_advance setting from extruder section
- remove respond section
- remove pause_resume section

Signed-off-by: Matt Shirley <mdshw5@gmail.com>
2020-02-13 20:52:31 -05:00
Kevin O'Connor
9818055ac3 gcode_macro: Support overriding of builtin g-code commands
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-12 20:42:03 -05:00
Kevin O'Connor
0cfab84e1a gcode: Return previous handler from register_command(cmd, None)
When overriding a g-code command, allow the caller to obtain the
previous command handler.  Use this feature in homing_override and
safe_z_home.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-12 20:19:18 -05:00
Kevin O'Connor
512ad4b3a4 query_endstops: Add get_status() method that reports the last query state
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-12 19:32:48 -05:00
FanDjango
4d9a36b34f homing: Ability to set retract speed between homing moves (#2487)
On the retract move between homing moves, use a different speed (typically a faster one).

Signed-off-by: Mike Stiemke <fandjango@gmx.de>
2020-02-12 10:09:39 -05:00
FanDjango
cb042e749d homing_heaters: Turn off heaters during homing/probing (#2486)
Signed-off-by: Mike Stiemke <fandjango@gmx.de>
2020-02-12 10:08:30 -05:00
David Smith
596f5e3e3a stepper_enable: Add SET_STEPPER_ENABLE gcode command (#2463)
Signed-off-by: David Smith <davidosmith@gmail.com>
2020-02-10 22:34:11 -05:00
Kevin O'Connor
7d76067ff9 tmc: Fix typo preventing stealthchop threshold from being set
Fix typo introduced in commit 67b28522.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-09 15:38:47 -05:00
Kevin O'Connor
6f4822fe96 stm32: Fix typo that broke selection of alternate serial port pin
Fix a typo in commit aea15250.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-09 12:01:43 -05:00
Kevin O'Connor
b3a180ea77 graph_extruder: Add in older pa algorithms for reference
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-03 16:42:57 -05:00
Kevin O'Connor
2336d2d6ab config: Fix generic-fysetc-f6.cfg stepper_z cs_pin
Reported by @jourjine

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-03 15:45:46 -05:00
David Smith
b6779cc019 delayed_gcode: Fix definition reference for UPDATE_DELAYED_GCODE (#2465)
Signed-off-by: David Smith <davidosmith@gmail.com>
2020-02-03 15:32:44 -05:00
Kevin O'Connor
68e59528a4 endstop_phase: Query the stepper step_distance from the stepper object
Don't obtain the step_distance from the config, instead obtain
step_distance from the instantiated stepper object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-01 21:58:14 -05:00
Kevin O'Connor
67b2852249 tmc: Query the stepper step_distance from the stepper object
Don't obtain the step_distance from the config, instead obtain
step_distance from the instantiated stepper object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-01 21:58:11 -05:00
Kevin O'Connor
c36fe76d69 probe: Add support for configuring lift_speed
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-31 15:47:06 -05:00
Kevin O'Connor
e3dde19932 test: Add generic-bigtreetech-skr-v1.4.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-28 12:16:05 -05:00
Junliang Yan
f29022499e config: Add Skr v1.4 configuration (#2423)
Signed-off-by: John Yan <john.yan1019@gmail.com>
2020-01-28 12:13:54 -05:00
Kevin O'Connor
5ca132eafa stepcompress: Fix rounding error when interval=0
In the rare case where the step generation code finds an interval of
zero, it was possible for an integer division of a negative number to
cause an incorrect result.  Fix that by using the idiv_up() and
idiv_down() helpers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-25 14:20:44 -05:00
Kevin O'Connor
502e83725b stm32: Reset adc calibration prior to starting calibration
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-25 11:23:58 -05:00
Kevin O'Connor
bf3fa979f9 stm32: Increase adc sample time
Increase the sample time register from 3 to 4 (which adds about ~1.5us
to each adc sample).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-25 10:50:29 -05:00
Kevin O'Connor
264aac5856 scripts: Revert virtualenv workarounds
Revert "scripts: Disable "virtualenv setuptools" in install-octopi.sh script"
This reverts commit 5fc92ff6b7.

Revert "scripts: Install "virtualenv setuptools==44.0.0" in install-octopi.sh"
This reverts commit 730c7cfc20.

The online setuptools repository was fixed upstream, so it is no
longer necessary to implement a local virtualenv workaround.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-25 10:34:24 -05:00
mtw3d
2b3ea29f30 config: Add example printer-mtw-create-2015.cfg config file
Signed-off-by: Mike Payson <mike@mtw3d.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-24 09:28:03 -05:00
Kevin O'Connor
ef4710c6e0 hd44780: Increase timeout to 40us
There have been several reports that increasing the delay from 37us to
40us eliminates screen corruption on some clone hd44780 displays.
Increase the timeout value so that the standard code works on these
displays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-24 00:04:31 -05:00
Kevin O'Connor
fe76fbe820 test: Add generic-simulavr.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 23:29:32 -05:00
Kevin O'Connor
6e020123c6 test: Add printer-monoprice-mini-delta-2017.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 23:29:32 -05:00
Kevin O'Connor
196210cad2 config: Fix file permissions of generic-flyboard.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 22:25:42 -05:00
Kevin O'Connor
2ea3631222 delta: Add print_radius option to customize valid XY radius
Add ability to override the default XY move checking radius.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 21:14:09 -05:00
Kevin O'Connor
8ed0f7c5c3 kinematics: Remove support for identifying Z steppers
The caller can now determine which steppers are connected to cartesian
Z movement via the new stepper.is_active_axis() method.  It is
therefore no longer necessary for the kinematic code to identify these
steppers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 20:47:01 -05:00
Kevin O'Connor
d1972b1e9c itersolve: Add ability to query the active_flags state
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 20:47:01 -05:00
Kevin O'Connor
8bf3e56301 config: Add example generic-flyboard.cfg config file
Reported by @DJDOUBLEG.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 19:23:00 -05:00
Kevin O'Connor
fc6d045ded config: Add example generic-archim2.cfg config
Signed-off-by: Mike Payson <mike@mtw3d.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 18:32:52 -05:00
Kevin O'Connor
0160a7db9a config: Add an example generic-mks-sgenl.cfg config
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 18:07:34 -05:00
Kevin O'Connor
ff0324b0c2 config: Add generic-mightyboard.cfg
Reported by @fragginright.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 17:49:10 -05:00
Kevin O'Connor
aea15250ae stm32: Only declare alternate usart2 on stm32f0
Also, try to improve the structure of the #if/#else/#endif layout in
serial.c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 11:39:40 -05:00
Kevin O'Connor
c8a93cb3bf stm32: Don't export spi1a/spi2a on stm32f1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 11:36:28 -05:00
Arne Jansen
0cd4d5d5ea stm32: add alternate pinout for USART2
Added to both generic stm32 and stm32f0

Signed-off-by: Arne Jansen <arne@die-jansens.de>
2020-01-23 11:10:39 -05:00
Arne Jansen
5ce86bd005 stm32: add alternate pinouts for spi1/2
In addition to spi3, spi1 and spi2 also have alternate pins. Add them as
spi1a and spi2a, similar to spi3.

Signed-off-by: Arne Jansen <arne@die-jansens.de>
2020-01-23 11:10:39 -05:00
Arne Jansen
a2c309a2b0 stm32: performance improvement for spi on stm32f0
The stm32 has a small queue for spi tx/rx. The current code only uses the
spi with a single byte buffer, effectively waiting for each byte to complete
before starting the next transfer.
This patch changes the structure of spi_transfer() to make use of the queue
and achieve back-to-back transfer of bytes on spi.

Signed-off-by: Arne Jansen <arne@die-jansens.de>
2020-01-23 11:10:39 -05:00
Arne Jansen
ce35ee45d6 stm32: fix spi_transfer for stm32f0
The current code accesses the DR as 32 bit. This enabled data packing mode,
effectively adding a 00 byte between each sent byte. The receive side had
similar problems.
To prevent this, all accesses are 8 bit now, even though this is not
necessary on stmf[14].

Signed-off-by: Arne Jansen <arne@die-jansens.de>
2020-01-23 11:10:39 -05:00
akatik
b3c3b61387 lpc176x: Add support for ssp1 (#2393)
Signed-off-by: Andrey Kovalev <aka@pxe.ru>
2020-01-14 22:06:29 -05:00
Eug Krashtan
b70416167b stm32f0: Remove hal based stm32f0 implementation
Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-14 17:08:01 -05:00
Eug Krashtan
a34dbc7029 stm32: STM32F0 CAN feature
Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-14 17:05:28 -05:00
Eug Krashtan
5238c3f872 stm32: HSI selection fix; Pin swap rename; Add CAN selection
Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-14 17:05:28 -05:00
chris-hammond
dd77a2ec16 config: Adding a config file for the monoprice mini delta (#2392)
A default config file for Monoprice Mini Delta printers.
Works when firmware is flashed via ST-Link V2 and when a
10A power supply is available. Lots of comments about wanting
to try pressure advance on the FB group, so I figured it was
a good time to get this added.

Signed-off-by: Chris Hammond <chammond@georgefox.edu>
2020-01-14 10:33:38 -05:00
Arksine
b562328bd0 config: add BME280 documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-13 22:29:50 -05:00
Arksine
2159f398ea heater: add support for BME280
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-13 22:29:50 -05:00
Arksine
774371d78d bme280: initial implementation of BME280 environmental sensor
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-13 22:29:50 -05:00
Arksine
20ba396466 linux: implement i2c
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-13 22:29:50 -05:00
Arksine
5fe9dd5a50 avr: implement i2c_read
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-13 22:29:50 -05:00
Hywelmartin
b28df43b26 config: Fix thermistor association in generic-bigtreetech-skr-pro.cfg (#2390)
Signed-off-by: Martin Malmqvist <hywelmartin@gmail.com>
2020-01-13 18:23:03 -05:00
Kevin O'Connor
730c7cfc20 scripts: Install "virtualenv setuptools==44.0.0" in install-octopi.sh
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-12 18:22:14 -05:00
Kevin O'Connor
5fc92ff6b7 scripts: Disable "virtualenv setuptools" in install-octopi.sh script
The default setuptools installed by virtaulenv has dropped support for
python2.  Explicitly remove it from the installation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-12 16:51:49 -05:00
Kevin O'Connor
2f8ad5e6ac docs: Update Config_Changes.md with actual bed_mesh merge date
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-09 14:17:51 -05:00
Arksine
46d0c6bdfc docs: Update Config_Changes.md to reflect bed_mesh changes
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
97b4eff424 bed_mesh: detect incompatible mesh profiles
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
edae40c36f docs: Update documentation to reflect bed_mesh changes
Also add new bed_mesh.md documentation.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
dc51788f9a test: update sample configs and test configs with new bed_mesh options
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
8013699c45 bed_mesh: refactor print_generated_points()
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
2a2191d201 bed_mesh: fix LOAD_PROFILE
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
13d16afa0c bed_mesh: Allow the default profile to be removed
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
2c877e1729 bed_mesh: improve interpolation checks
Move interpolation checks to _init_mesh_params() so they can be done whle the config is being parsed.  Do not allow a probe_count higher than 6 for lagrange interpolation, as this typically leads to oscillation.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
a69de2be93 bed_mesh: Move BED_MESH_MAP to Bedmesh class
Don't force probing when BED_MESH_MAP is executed,  output the existing mesh.  If the user wants to probe each time before a map they can do so with a gcode_macro.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
fe929e4696 bed_mesh: Add x,y offsets to min/max points in probe_finalize
This eliminates the need for the "mesh_params" dict to have references to the x and y offsets.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
5b20ac416c bed_mesh: refactoring
Renamed some variables in set_mesh() previous called "mesh_min" and "mesh_max" to alleviate confusion with the config options.

Renamed several attributes for clarity.  The "calibrate" attribute is now bmc, "probe_params" is now "mesh_params", "probed_z_table" is now "probed_matrix", "mesh_z_table" is now "mesh_matrix".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
74892a7702 bed_mesh: improve logging of generated points
Points are now logged after the printer is ready.  The formatting is improved, printing out the point index, and its corresponding automatic and manual points.

BED_MESH_OUTPUT now includes a PGP parameter, if PGP=1 the generated points are printed to the terminal.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
914f701256 bed_mesh: add xy offsets to generated points
Rename min_point, max_point, and bed_radius to mesh_min, mesh_max, and mesh_radius respectively.  Add "mesh_origin" option, that allows round beds to specificy the center of the mesh.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Arksine
ec58b23f3b ProbePointsHelper: Optionally add xy offsets to probe points
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-01-09 14:14:13 -05:00
Kevin O'Connor
3fb0b7e4bc docs: Update Command_templates.md - numbers in gcode_macro name must be at end
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-07 20:58:39 -05:00
Kevin O'Connor
9aab58605b tuning_tower: Support tuning of traditional g-code commands
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-07 19:21:54 -05:00
Kevin O'Connor
005cfea5c3 gcode: Fix detection of some "extended" g-code commands
Fix typo that resulted in _get_extended_params() being called for all
commands.  Allow "extended" g-code commands to contain numbers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-07 19:17:20 -05:00
Kevin O'Connor
ac863a95b6 rotary_delta: Initial support for rotary delta kinematics
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:52:42 -05:00
Kevin O'Connor
a56484c98b delta_calibrate: Add support for manually entering a nozzle Z height
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:49:41 -05:00
Kevin O'Connor
2b6cf5b007 homing: Don't assume homing occurs with a constant step rate
Some kinematics do not result in a constant step rate during homing
operations.  Calculate the endstop checking rate using the total
distance traveled on the axis divided by the axis step distance.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:49:41 -05:00
Kevin O'Connor
e43ad4c953 itersolve: Export itersolve_calc_position_from_coord()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:49:41 -05:00
Kevin O'Connor
97d976fc53 stepper: Track if using units of radians instead of millimeters
The STEPPER_BUZZ command needs to know if the axis is using radians
instead of millimeters so that it can move a more appropriate
distance.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:49:41 -05:00
Kevin O'Connor
bcf10aa990 delta: Simplify DeltaCalibration state tracking
Limit the use of coordinate descent "params".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:41:09 -05:00
Kevin O'Connor
27e6b533bc delta: Move low-level delta calibration to delta.py
Move the linear delta specific calibration code from
delta_calibrate.py to delta.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:41:09 -05:00
Kevin O'Connor
fdfa26edd6 delta_calibrate: Move stable position conversion to its own class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:41:09 -05:00
Simo Apell
90bc1679a2 extruder_stepper: Initial support for synchronized extruder steppers
Signed-off-by: Simo Apell <simo.apell@live.fi>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:03:05 -05:00
David Smith
6972b6303d docs: Updates for gcode_macro naming (#2317)
Add note about numbers in macro names.  Add note about variable name case restriction. Add set variable example.

Signed-off-by: David O Smith <davidosmith@gmail.com>
2020-01-06 10:59:40 -05:00
Kevin O'Connor
baa0d2ff8c docs: Minor formatting change to Config_checks.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 10:45:53 -05:00
Kevin O'Connor
5ff45636d9 docs: Minor FAQ updates
Fix rendering of Patreon URL in FAQ.  Use same "ls" command to find
the serial port that Installation.md uses.  Note Raspberry Pi 4 is
supported.  Note problems with ModemManager.  Point to Bed_Level.md in
Z position_endstop question.  Link to Config_checks.md in "Z
screaching" FAQ.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 10:45:48 -05:00
Kevin O'Connor
e576571340 fan: Do not flush look-ahead queue on fan speed change
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-03 18:13:57 -05:00
Kevin O'Connor
8158dbcc21 toolhead: Add register_lookahead_callback() method
Add a mechanism for obtaining the print_time via a callback instead of
by flushing the look-ahead queue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-03 18:13:57 -05:00
Kevin O'Connor
4b6a65c1e0 heater: Do not flush look-ahead queue on a heater temperature update
The print_time parameter of heater.set_temp() is not currently used
and it isn't necessary to flush the look-ahead queue just get the
print_time.  Remove the parameter from heater.set_temp() to avoid
flushing the look-ahead queue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-03 18:13:57 -05:00
Kevin O'Connor
dabffcc22c kin_extruder: Convert pressure advance to use "weighted average"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-20 12:21:58 -05:00
Kevin O'Connor
54149e38f9 trapq: Limit the duration of "null" sentinal moves on the trapq
If a null move is added as the first move on the trapezoid motion
queue then it could have a very large move->move_t value.  This could
cause numerical stability issues with some advanced kinematic
formulas.  Place a limit on the move_t value to avoid this.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-20 12:13:19 -05:00
Kevin O'Connor
b921b8a1c1 docs: Document support for M204 P and T parameters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-18 16:34:45 -05:00
Tobias Weiß
61bcb6b47f config: Update generic-fysetc-s6.cfg (#2293)
SPI communication with TMC drivers is possible with hardware SPI using the "spi1" bus.

Signed-off-by: Tobias Weiß <t.weiss@bk.ru>
2019-12-18 15:54:56 -05:00
Daniel Kucera
efc3335911 gcode_arcs: use correct current position from gcode
Signed-off-by: Daniel Kucera <github@danman.eu>
2019-12-18 12:42:40 -05:00
Kevin O'Connor
0a86190bae display: Revert "display: Add ST7567 display support (#1540)"
This reverts commit 1b92af6078.

The standard "uc1701" lcd_type can now be used in place of the custom
"st7567" lcd_type.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-18 12:30:20 -05:00
BlackStump
7532e4ccea scripts: Replicape pru update start scripts (#2277)
Signed-off-by: Trevor Wilson <altocoey@hotmail.com>
2019-12-18 12:11:40 -05:00
Kevin O'Connor
f3b4173e6b test: Use more descriptive mcu chip names
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-18 11:28:56 -05:00
Kevin O'Connor
6b6879e6bc test: Add generic-fysetc-s6.cfg to printer config test cases
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-18 11:28:30 -05:00
Tobias Weiß
58abd2925e config: Fysetc S6 generic configuration (#2220)
Signed-off-by: Tobias Weiß <t.weiss@bk.ru>
2019-12-18 11:13:25 -05:00
Georgios Karnas
9c25f42f4a config: Flash instructions for printrboard (#2278)
Signed-off-by: Georgios Karnas <kargeor@gmail.com>
2019-12-17 10:03:57 -05:00
Kevin O'Connor
abf493496c mathutil: Disable queuelogger in background_coordinate_descent()
If the queuelogger was holding the lock when the process is forked
then any attempt to log from the background process would result in a
deadlock.  Attempt a workaround by disabling the queuelogger at the
start of the background process.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-17 09:51:45 -05:00
Kevin O'Connor
d9cd524aec extruder: No need to track extrude_pos locally
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-17 02:01:54 -05:00
Kevin O'Connor
46e7027bc7 extruder: Flush step generation on ACTIVATE_EXTRUDER
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-17 01:59:06 -05:00
Kevin O'Connor
9628d9b1ac config: Minor wording change in example-extras.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-16 22:54:21 -05:00
Kevin O'Connor
7c81a16bd3 config: Update example-extras.cfg - extruder.activate_gcode was removed
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-16 21:27:55 -05:00
Kevin O'Connor
f4c4de1a24 extruder: Move M104/M140 commands from gcode.py to extruder.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-16 20:16:21 -05:00
Kevin O'Connor
9654816abf heater_bed: Move M140/M190 commands from gcode.py to heater_bed.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-16 20:02:48 -05:00
Kevin O'Connor
0e2d1a190e gcode: Rename bg_temp() to wait_for_temperature()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-16 19:21:37 -05:00
Kevin O'Connor
665323eb29 heater: Use printer.command_error() instead of internal heater.error()
Use the more standard command_error to report invalid temperature
requests.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-16 19:16:58 -05:00
Kevin O'Connor
254789f4c5 neopixel: Add support for delaying updates in SET_LED command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-15 23:24:17 -05:00
Kevin O'Connor
ab5540bd34 config: Add printer-anet-a4-2018.cfg config file
Reported by @Alkarasu.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-15 22:12:58 -05:00
Kevin O'Connor
1d05a34cd7 docs: Update Kinematics.md document with "smooth pressure advance"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-13 17:52:51 -05:00
Kevin O'Connor
91bade5824 docs: Update Config_Changes.md with pointer to sample multi extruder configs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-13 12:33:13 -05:00
Simon Kühling
b1bbe97576 temperature_sensor: Add get_status() function
Provide printer.<sensor-config-name>.temperature variable to gcode macro
environment

Signed-off-by: Simon Kühling <mail@simonkuehling.de>
2019-12-13 10:45:04 -05:00
Simon Kühling
2721211456 heater: Add PrinterHeater get_status() function
Provide a list of available heater and sensor names to
gcode macro templates through the printer.heater.available_heaters
and printer.heater.available_sensors variables

Signed-off-by: Simon Kühling <mail@simonkuehling.de>
2019-12-13 10:45:04 -05:00
Kevin O'Connor
4cbbe18afd itersolve: Improve numerical stability of gen_steps_pre_active check
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-10 16:44:02 -05:00
Kevin O'Connor
04b3603a1e itersolve: Rename scan_pre/_post to gen_steps_pre/post_active
Rename the variables to make it a little more clear what they do.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-10 15:53:50 -05:00
Kevin O'Connor
cff24b0220 config: Add multi extruder sample files
Add sample-multi-extruder.cfg and sample-idex.cfg files.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-10 14:24:34 -05:00
Kevin O'Connor
fcee27fc19 gcode: Remove builtin T0/T1/T2/... command support
The builtin Tn command is not sufficiently flexible to control some
multi-extruder printers.  Remove the command and encourage users to
define individual gcode_macros for each Tn instance.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-10 14:24:32 -05:00
Kevin O'Connor
c06618193d extruder: Add an ACTIVATE_EXTRUDER command
Add support for an extended g-code command to change the currently
active extruder.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-10 14:23:13 -05:00
Kevin O'Connor
ab2d302b7e gcode: Remove support for the M206 command
The M206 command isn't particularly standardized and isn't issued by
default from 3rd party software in their standard configurations.
Encourage users to use the more powerful SET_GCODE_OFFSET command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-10 14:23:10 -05:00
David Smith
d1f4f18810 config: Add example for including a parameter in a macro call (#2251)
Add description to default_parameter of g-code macro description of method to call macro with a non-default value.

Signed-off-by: David Smith <davidosmith@gmail.com>
2019-12-10 14:01:41 -05:00
Kevin O'Connor
8663bc8192 docs: Update FAQ to emphasize checking Config_Changes.md on an upgrade
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-10 13:51:47 -05:00
Kevin O'Connor
205da598fd docs: Move upgrade instructions to the last item in the FAQ
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-10 13:39:49 -05:00
Kevin O'Connor
080ee0b512 kin_extruder: Apply pressure advance in kin_extruder.c
Implement the pressure advance calculations while performing the
definitive integral calculations.  This simplifies both the
extruder.py and kin_extruder.c code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-08 20:41:35 -05:00
Kevin O'Connor
730a6d868b kin_extruder: Move integration code from trapq.c to kin_extruder.c
Move the code that calculates the definitive integral to the
kin_extruder.c file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-08 18:30:42 -05:00
Kevin O'Connor
8b75bddc0f test: Add new delta_calibrate test case
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-05 14:48:52 -05:00
Kevin O'Connor
139274f0bb mathutil: Propagate errors from background_coordinate_descent()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-05 14:48:52 -05:00
Kevin O'Connor
72161d0405 tuning_tower: Fix typo causing tuning tower to break when homing
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-04 20:11:54 -05:00
Kevin O'Connor
10270dc7ef docs: Fix another typo in Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-04 12:26:45 -05:00
Kevin O'Connor
f82a85aad0 docs: Fix typo in Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-04 12:17:13 -05:00
Kevin O'Connor
e17f2bac96 docs: Minor "coordinate system" wording change to Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-04 12:05:31 -05:00
Kevin O'Connor
e557f2d0c0 docs: Add information on coordinate systems to Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-04 11:09:22 -05:00
Petri Honkala
98d1fee8ad tmc5160: PWMCONF is write only
Signed-off-by: Petri Honkala <cruwaller@gmail.com>
2019-12-04 09:20:39 -05:00
Kevin O'Connor
8f1753c8ce config: Update "Fysetc Mini 12864Panel" in sample-lcd.cfg
Use the more standard "lcd_type: uc1701" and reverse the encoder pins.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-04 09:13:46 -05:00
Kevin O'Connor
8e296db410 test: Add printer-wanhao-duplicator-i3-mini-2017.cfg to build tests
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-03 13:34:46 -05:00
Puffy
3c526a71f9 config: Basic config for Wanhao Duplicator i3 mini (#2238)
Signed-off-by: Grant Gordon <grant.gordon@imaginet.co.za>
2019-12-03 13:32:43 -05:00
Petri Honkala
99a74d9f07 tmc2130: use local variable instead of global Registers in MCU_TMC_SPI
Signed-off-by: Petri Honkala <cruwaller@gmail.com>
2019-12-03 12:06:37 -05:00
Kevin O'Connor
e310e5f0e8 uc1701: Add a delay after reset toggle (for displays using ResetHelper)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-03 11:13:54 -05:00
Kevin O'Connor
988ee5754e itersolve: Fix potential backwards time in itersolve_gen_steps_range()
Make sure that a newly choosen "high" bound is always greater than the
"low" bound.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-02 23:56:42 -05:00
Kevin O'Connor
a8ad1ae726 screws_tilt_adjust: Remove check for probe printer object
The probe object may not have be instantiated when the
screws_tilt_adjust object is instantiated.  Just remove the check.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-02 20:06:04 -05:00
Kevin O'Connor
8e87ab0939 gcode: Remove support for "G4 S1" style commands
The S parameter is not a standard and was not commonly used.  The P
parameter (delay specified in milliseconds) is the commonly accepted
g-code mechanism for dwelling.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-02 19:31:20 -05:00
Kevin O'Connor
2d97e0e218 uc1701: Add support for rst_pin
Add support for an optional uc1701 rst_pin.  Use the same reset pin
code handling with the SSD1306 code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-02 10:25:30 -05:00
Kevin O'Connor
2e7f38eadd hd44780: Use two separate text framebuffers
There is concern that some lcd boards that emulate the hd44780 don't
support text updates that wrap the two text framebuffers.  Update the
code to treat the two text areas as two separate framebuffers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-01 19:18:52 -05:00
Jakub Kruszona-Zawadzki
41dd53f62c config: fixes in anycubic delta plus default config file (#2176)
Signed-off-by: Jakub Kruszona-Zawadzki <acid@moosefs.com>
2019-12-01 18:51:46 -05:00
Kevin O'Connor
43bb45a1d3 docs: Minor update to Config_Changes.md
Use same "ls /dev/serial/by-id/*" command used in Installation.md.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-01 14:25:40 -05:00
Kevin O'Connor
935088ddff docs: Clarify recent usb device name change in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-01 10:29:15 -05:00
Kevin O'Connor
7bd96950cb config: Minor comment changes to example-extras.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-28 10:34:59 -05:00
Kevin O'Connor
73e84abaff atsam: Fix typo causing chipid to not be fully read
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-27 14:33:20 -05:00
Kevin O'Connor
ef2c7cb363 stm32: Fix typo in setting of SMPR1 register on stm32f103
Only the stm32f4 has a SMP18 field; it's not present on the stm32f103.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-27 11:26:17 -05:00
Kevin O'Connor
fc476f22b6 stm32: Fix typo in adc startup delay
Fix (harmless) typo and add comments on adc timing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-27 11:16:41 -05:00
Matt Baker
8d93d1a8ef uc1701: add config option for sh1106 type with up to 132 columns.
Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
2019-11-26 19:40:39 -05:00
Kevin O'Connor
43dfb3c9ad lcd_hd44780: Minor change to timing delays
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-26 09:49:43 -05:00
Kevin O'Connor
fb485e862d lcd_hd44780: Add proper timing delays around gpio updates
A fast micro-controller may update the gpio pins faster than the
hd44780 chip can handle.  Add in the appropriate delays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-26 09:37:30 -05:00
Kevin O'Connor
35de9b8e55 lpc176x: Move chip id code from usbserial.c to new file chipid.c
Add a chipid.c file - this makes the code layout more similar to the
other arm boards.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-26 08:54:40 -05:00
Kevin O'Connor
e80ced5568 usb_cdc: Report MCU type on all boards
Always report the "product id" as the MCU type (instead of as "Klipper
firmware").

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-26 08:45:20 -05:00
Kevin O'Connor
401f7a879c atsam: Enable chipid as usb serial number
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-26 08:42:14 -05:00
Kevin O'Connor
d7ec5505a6 atsamd: Enable chipid as usb serial number
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-25 19:30:31 -05:00
Kevin O'Connor
8f6efe5a7b stm32: Enable chipid as usb serial number
Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-25 19:30:31 -05:00
Kevin O'Connor
f76cb92b15 usb_cdc: Add a usb_fill_serial() helper function
Add a helper function to fill the usb serial string descriptor.  Use
it in the lpc176x code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-25 18:32:52 -05:00
Kevin O'Connor
bd6c25c9f8 stm32: Allow external crystal speed to be customized in Kconfig
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-25 14:04:26 -05:00
Kevin O'Connor
0b0e5a911e docs: Minor wording change in Pressure_Advance.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-25 11:48:41 -05:00
Kevin O'Connor
3aad25eab9 docs: Recommend normal slicer settings in Pressure_Advance.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-25 11:35:39 -05:00
Kevin O'Connor
3683273936 toolhead: Report which axes are homed via get_status()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-24 20:21:13 -05:00
Kevin O'Connor
282af0220e toolhead: Report the current extruder from the get_status() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-24 20:21:13 -05:00
Kevin O'Connor
982567a69a config: Rename avrsim.cfg to generic-simulavr.cfg
Rename the file to be more similar to the naming of other files.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-24 20:21:13 -05:00
Kevin O'Connor
86b074e1ee config: Rename example-multi-mcu.cfg to sample-multi-mcu.cfg
Rename the sample file to be more similar to the naming of other
files.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-24 20:21:13 -05:00
Justin Schuh
93f1e6dd86 FAN: Kick start fan when the increase is more than 50% (#2085)
Large increases in fan speed can suffer from acceleration lag, so this
change kick starts the fan for a change of 50% or more in the same way
that starting the fan from 0% does.

Signed-off-by: Justin Schuh <code@justinschuh.com>
2019-11-24 18:37:30 -05:00
Kevin O'Connor
05472bb8a3 virtual_sdcard: Don't wait for M25 in an SD gcode file
If an M25 is in a gcode file that is being printed from virtual SD, it
would cause a permanent hang.  Detect that case and don't wait for
those M25 commands.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-24 14:30:26 -05:00
Kevin O'Connor
ade65b90af force_move: Make sure to flush step generation queue after each move
Add toolhead.note_kinematic_activity() call and use it to force the
step generation to be flushed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-24 11:55:30 -05:00
Kevin O'Connor
c188aa982f docs: Kinematics.md updates for extruder instantaneous corner velocity
As of commit 5f5896ad Klipper will perform look-ahead between moves
even if they have significant differences in extruder flow rates.
Update Kinematics.md accordingly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-22 17:04:14 -05:00
Kevin O'Connor
00fd6223ed tuning_tower: Report start of tuning test on g-code console
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:44:02 -05:00
Kevin O'Connor
89d1ab7c04 extruder: Remove support for lookahead() method
Now that the extruder lookahead method is no longer used it can be
removed from the toolhead and extruder classes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:18:21 -05:00
Kevin O'Connor
5f5896ad71 extruder: Add support for instantaneous corner velocity
Add mechanism to perform look-ahead between moves with different
extrusion ratios.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:18:21 -05:00
Kevin O'Connor
6d0c55b6c1 extruder: Initial support for "smoothed pressure advance"
Support averaging the extruder position over a time range to "smooth
out" the velocity changes that occur during pressure advance.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:18:19 -05:00
Kevin O'Connor
da06e185fb trapq: Add trapq_find_move() function
Add support for finding a move by time in the trapezoidal velocity
move list.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:17:45 -05:00
Kevin O'Connor
a28b29993a trapq: Add code to calculate definitive integral
Support calculating the definitive integral of a cartesian axis
position over a time range of the movement queue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:17:45 -05:00
Kevin O'Connor
d00023f3bb toolhead: Support step generation in lead up to and after stepper activity
Add support for kinematic functions that calculate step times based on
a range of the motion queue.  This requires adding additional pause
times when fully flushing the motion queue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:17:45 -05:00
Kevin O'Connor
56cd39f038 itersolve: Support step generation in lead up to and after stepper activity
Add support for generating steps from kinematic functions that
calculate step times based on a range of the motion queue.  It
requires scanning for step generation during the lead up to stepper
activity (when the stepper would nominally be idle).  And it requires
scanning for step generation just after a stepper has nominally become
idle.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:17:45 -05:00
Kevin O'Connor
4dbe795ac2 trapq: Implement sentinel nodes on the trapq list
Use sentinels to make list traversal code simpler.  Also add in null
moves so that there are no time gaps in the list.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:17:45 -05:00
Kevin O'Connor
2843c85019 toolhead: Rename _full_flush() to flush_step_generation() and use globally
Update code that modifies the low-level kinematics handlers to first
call toolhead.flush_step_generation().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:17:45 -05:00
Kevin O'Connor
7c80e8d533 toolhead: No need to transition to Flushed state before entering Drip state
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 13:17:45 -05:00
Kevin O'Connor
430b8d0e52 usb_cdc: Report the MCU name instead of "Klipper firmware"
Change the "product id" from the redundant "Klipper firmware" to the
CONFIG_MCU value.  For now, only make this change on boards that have
CONFIG_HAVE_CHIPID set.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 11:56:31 -05:00
Kevin O'Connor
d8b6ff5c5e lpc176x: Minor rework of HAVE_CHIPID kconfig
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-21 11:54:46 -05:00
Matt Baker
bab27651a1 lpc176x: read chip id and use as usb serial. (#2184)
Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
2019-11-21 11:54:20 -05:00
Florian Heilmann
b0a158c271 tmc2130: Do not error if run current below hold current (#2190)
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2019-11-21 11:09:39 -05:00
Kevin O'Connor
9055e9f9b5 docs: Update SAMD51 benchmarks
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-18 12:49:05 -05:00
Lars R. Hansen
524ebbc7b3 atsamd: Add support for SAMD51 overclocking
Signed-off-by: Lars R. Hansen <popshansen@hotmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-18 12:39:04 -05:00
Kevin O'Connor
d38aed0773 cartesian: Report dual_carriage_rails from get_steppers()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-15 12:32:04 -05:00
Kevin O'Connor
e1919e3731 toolhead: Don't report buffer_time stat during homing
The buffer_time info is misleading during a homing operation - just
report zero instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-15 12:21:23 -05:00
Kevin O'Connor
503891cd0e toolhead: Don't call _process_moves() if no moves present
Don't transition to the normal movement state if there aren't any
moves actually ready to be processed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-15 11:55:15 -05:00
Petri Honkala
dd529d7ad1 msgproto: unresolved symbol fixed
Signed-off-by: Petri Honkala <cruwaller@gmail.com>
2019-11-15 11:36:54 -05:00
Kevin O'Connor
8efa5e2db4 stepper_enable: Raise an error on bad lookup_enable() call
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-14 18:05:32 -05:00
Kevin O'Connor
9ff4f1bb2f stm32f0: Initial support for i2c on stm32f0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-14 15:54:28 -05:00
Kevin O'Connor
d39142139e stepper: Remove set_commanded_position() call
Now that the only caller to set_commanded_position() is
set_position(), remove the set_commanded_position() method and pass
the set_position() call directly to the itersolve.c code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-13 19:35:26 -05:00
Kevin O'Connor
18b0749163 bltouch: No need to call get/set_commanded_position()
Now that the homing code does not call set_commanded_position(), it is
no longer necessary to save/restore the position in the bltouch code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-13 19:35:26 -05:00
Kevin O'Connor
9396431c6b stepper: Do not call itersolve_set_commanded_pos() after homing
Now that the homing code does not use get_commanded_position(), it is
no longer necessary to alter the low-level commanded position after a
homing move.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-13 19:35:26 -05:00
Kevin O'Connor
fa433c7f04 homing: Use get/set_tag_position() to determine probed position
Don't rely on get_commanded_position() to determine the final probe
point.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-13 19:35:26 -05:00
Kevin O'Connor
eed371e924 endstop_phase: Use set_tag_position() instead of set_commanded_position()
Use the new get/set_tag_position() calls to avoid altering the
low-level kinematic position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-13 19:00:23 -05:00
Kevin O'Connor
224574da4a stepper: Add get/set_tag_position() and convert calc_position()
Rename calc_position() to calc_tag_position() and have it calculate
the value of the position from the last stepper set_tag_position()
call.  This enables the calc_tag_position() code to be more flexible
as it can be run with arbitrary positions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-13 19:00:17 -05:00
Kevin O'Connor
e0e2f15498 fan: Move M106/M107 commands from gcode.py to fan.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-13 11:30:42 -05:00
Kevin O'Connor
0a39c339c7 gcode: Remove explicit active extruder tracking
There's no need to have special logic in gcode.py to track the active
extruder.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-13 11:02:26 -05:00
Kevin O'Connor
0bf4ab66da docs: Add get_status() to list of kinematics methods in Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 22:47:10 -05:00
Kevin O'Connor
e532b75e21 mcu: Minor simplification to default reset detection
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 22:15:04 -05:00
Kevin O'Connor
6116a5d48f stepper_enable: Remove ability to use a list of pins in enable_pin
Now that the tmc drivers perform automatic soft stepper enabling,
there is no need to be able to list multiple pins in the enable_pin
config setting.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 18:45:31 -05:00
Kevin O'Connor
77dff35fae tmc: Remove virtual_enable support and replace with automatic support
Automatically detect if the stepper has a dedicated enable line.  If
it does not, then automatically enable virtual enable support.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 18:45:31 -05:00
Kevin O'Connor
a4995c61c9 stepper: Remove add_to_endstop() method
Now that the PrinterStepper and MCU_stepper classes have been merged,
there is no need for the add_to_endstop() method.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 17:32:18 -05:00
Kevin O'Connor
78153ca4c3 stepper: Merge PrinterStepper and MCU_stepper classes
There's no need to track the two classes separately - just combine
them.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 17:32:18 -05:00
Kevin O'Connor
4ca190d393 stepper: Move MCU_stepper from mcu.py to stepper.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 17:32:18 -05:00
Kevin O'Connor
0204de46a6 stepper: Simplify PrinterRail init
Use add_extra_stepper() during class init.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 17:32:18 -05:00
Kevin O'Connor
0e30b862c7 stepper_enable: Move enable tracking from stepper.py to stepper_enable.py
Move the enable line tracking out of the main stepper.py code.  This
simplifies the main kinematic code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 17:32:18 -05:00
Kevin O'Connor
bfb34e0701 stepper_enable: Move motor_off() logic to stepper_enable.py
Directly disable all the stepper motors on a global motor_off() from
the StepperEnable() class in stepper_enable.py.  This simplifies the
toolhead and kinematic classes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 17:32:18 -05:00
Kevin O'Connor
f50e054bd0 stepper_enable: Add new extras module for stepper enable line tracking
Move the M18/M84 command handling from gcode.py to new stepper_enable
module.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-10 11:55:53 -05:00
Kevin O'Connor
064804b688 graphstats: Fix matplotlib import error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-10 10:18:31 -05:00
Kevin O'Connor
bdc7383e51 itersolve: Improve numerical stability of itersolve_generate_steps() loop
Minor rework of the loop to reduce the chance that numerical stability
could cause an infinite loop.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-08 14:17:35 -05:00
Kevin O'Connor
0bfb655f66 query_adc: Add a new module to help query and debug analog pins
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 19:28:27 -05:00
Kevin O'Connor
124ba12485 buttons: Only call into main thread on an adc button change
Determine the selected button (and if it has changed) in the
background thread first.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 18:49:56 -05:00
Kevin O'Connor
196a69c613 buttons: No need to check for None on min_value/max_value
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 18:42:55 -05:00
Kevin O'Connor
d40f951d6f buttons: Remove MCU_ADC_buttons debug capability
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 18:32:26 -05:00
Kevin O'Connor
2d5c761101 toolhead: Clear any pending pauses when a shutdown occurs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 18:06:46 -05:00
Kevin O'Connor
3665e9fc53 docs: Recommend safe_z_home over homing_override
Update BLTouch.md, FAQ.md, and sample-probe-as-z-endstop.cfg to
recommend using a safe_z_home config section over a homing_override
config section.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 16:50:52 -05:00
Kevin O'Connor
ed610a6600 extruder: Consistently use "extruder" for the primary extruder
No longer allow the primary extruder to be named "extruder0".  This
avoids internal and external confusion between the printer objects and
config section names.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 16:28:47 -05:00
Kevin O'Connor
29b5961d9f docs: Note gcode_arcs and firmware_retraction commands in G-Codes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 15:44:25 -05:00
Kevin O'Connor
32f61b01e9 trapq: Use C99 method for declaring struct members in trapq_append()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 11:32:53 -05:00
Kevin O'Connor
f63f68bbbb chelper: Report an error if the C host code does not compile
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 11:32:20 -05:00
Kevin O'Connor
5500538fc5 toolhead: Rename register_move_handler() to register_step_generator()
Rename the function so it is more clear what the step generation code
path is.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 10:59:35 -05:00
Kevin O'Connor
72735b4552 docs: Update Code_Overview.md with new trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 10:42:12 -05:00
Kevin O'Connor
3f338c08c1 docs: Minor micro-controller updates to Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 10:08:21 -05:00
Kevin O'Connor
2981bd601b extruder: Treat extrude with Z only movement to be an "extrude only" move
Do not apply max_extrude_cross_section check, and do apply
extrude_only_xxx checks to Z only moves that also extrude.  Some
printer start scripts will prime the extruder while moving the Z.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 09:45:36 -05:00
Kevin O'Connor
86121ff79e toolhead: Calculate and store axes_r in move class
Calculate the ratio of axis distance to total move distance (axis_d /
move_d) and store in a new member variable axes_r.  This avoids
needing to recalculate the value in other code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
257058981e toolhead: Simplify set_junction() code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
076a66f791 trapq: Use separate 'move' entries for accel, cruise, and decel phases
Only track a single acceleration movement in a 'struct move' instance.
Break the classic trapezoid movement (accel, cruise, decel) into three
separate movements.  This simplifies the calculation logic.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
7ca86f1723 toolhead: Flush trapezoid velocity queue in batches
Load all items from the look-ahead queue into the trapezoid velocity
queue, and then flush that queue by time.  This prevents the host cpu
from being starved on very long moves (which may require a large
number of steps to be generated).  It also improves the overall
performance.

With the batch flushing logic in place, it is no longer necessary to
split homing moves up.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
1acaaa98c2 trapq: Remove move_fill()
Now that all callers use the trapq system to queue moves, it is no
longer necessary to individually allocate and fill a 'struct move'.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
797dcfcb12 itersolve: Remove unused gen_steps()
Eliminate the old gen_steps() call now that all callers have been
converted to the newer trapq based generate_steps().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
bd3c8920f6 mcu: Remove set_ignore_move()
Update callers of set_ignore_move() to use the trapq system to set a
stepper to ignore moves.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
befd263260 toolhead: Remove kinematic move() call
Now that all kinematics use the trapq system, there is no need to call
into the kinematics on each g-code move.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
ef53ded6bc force_move: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
e6f713f1ce manual_stepper: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
9845d0d103 extruder: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
746b928c8b winch: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
4b5cbc18a4 polar: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
351b565728 delta: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
b792e0fdd1 corexy: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
7afac2b3af cartesian: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
f3ef9c1889 itersolve: Add support for generating steps from a trapq
Support associating a stepper_kinematics with a trapq.  Support
generating steps from a time range on the given trapq.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
d3afe4f1d8 trapq: Initial support for building a queue of trapezoidal velocity moves
Add support for building a list of moves in the trapq.c code.  Update
the toolhead code so that moves generated from the look-ahead code are
added to that list.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
c06f6943a6 list: Add additional list helper functions
Add list_is_first, list_is_last, list_last_entry, and list_prev_entry
helper functions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
fdbdb3c707 trapq: Add new trapq.c file with code for trapezoidal velocity handling
Move the "struct move" code from itersolve.c to new file trapq.c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
374eb98765 polar: Implement bed angle wrapping adjustments in chelper code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
92993c062b itersolve: Rename calc_position to calc_position_cb
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
9945cc0f46 itersolve: Fix possible infinite loop in itersolve_gen_steps()
If the kinematic position calculation function had an error in it (if
it produces sudden position changes) then it could lead to an infinite
loop in itersolve_gen_steps().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor
5eb5841eaf mcu: Contact and identify all the mcus prior to configuring them
Break up the connect phase into two phases - mcu_identify and connect.
The first phase will contact all the micro-controllers and obtain the
"identify" data dictionaries for them.  Once all the micro-controllers
have been contacted, then they can be configured.  This fixes an issue
with FIRMWARE_RESTART not working correctly on multi-mcu setups that
use restart_method=command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 10:35:24 -05:00
Kevin O'Connor
0b90337d59 config: Minor updates to printer-lulzbot-mini1-2016.cfg
Add to printers.test test case.  Don't disable the
max_extrude_cross_section check by default (users should verify they
want that safety feature off).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-05 10:57:47 -05:00
Martin
51cf244617 config: Create printer-lulzbot-mini1-2016.cfg (#2129)
Signed-off-by: Martin van Es <martin@mrvanes.com>
2019-11-05 10:54:23 -05:00
Kevin O'Connor
c11e4b74c2 config: Minor updates to printer-creality-cr20-pro-2019.cfg
Don't specify a default for pressure_advance.  Don't specify values
that are already at their default.  Add to printers.test test case.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-05 10:50:19 -05:00
bskp
0cd808cfde config: Added config for Creality CR-20 Pro (#2135)
Based on the configuration for the CR20-2018.
Added support for BLtouch, save z-homing and
automatic bed leveling.

Signed-off-by: Matthias Roggo <bskp@posteo.ch>
2019-11-05 10:47:03 -05:00
clearchris
009d14fc3e stm32: adc for new stm32f0 common code (#2120)
Derived from stm32/adc.c and stm32f0/adc.c with additional changes.

Tested on Monoprice Mini Delta (malyan) stm32f070xb board.

Signed-off-by: Chris Lombardi <clearchris@hotmail.com>
2019-11-05 10:08:32 -05:00
Kevin O'Connor
cf6e8a2eee stm32: Define PGx pins on stm32f103
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-02 11:35:27 -04:00
Kevin O'Connor
430ad0b658 virtual_sdcard: Only return from M25 after print confirmed paused
Wait in the M25 command handler until the work_handler() background
timer fully exits.  This ensures that subsequent g-code commands (such
as M27 or M24) will correctly report a paused state.

Reported by @foosel.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-31 11:36:35 -04:00
Kevin O'Connor
40e2c64c82 clocksync: Fix typo in pause() call at connect time
The initial clock measurement wasn't properly implementing a small
delay between clock queries.  Fix the pause() call so there is a small
delay between queries.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-31 11:36:35 -04:00
Kevin O'Connor
739583a21b test: Add printer-lulzbot-taz6-dual-v3-2017.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-30 12:46:03 -04:00
radensb
dcedd84fe1 config: Lulzbot TAZ6 w/ Dual v3 Toolhead Config (#2111)
Signed-off-by: Ryan Densberger <magshooterz@gmail.com>
2019-10-30 12:37:22 -04:00
Kevin O'Connor
e2f5e2871c docs: Recommend OctoPrint v1.3.12 in Installation.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-30 11:02:03 -04:00
Kevin O'Connor
d65f2e2861 docs: Minor cleanup to square_tower.scad
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-27 12:16:17 -04:00
Kevin O'Connor
43453131ac config: Only document thermistors in example.cfg
Move the common temperature amplifier config descriptions to
example-extras.cfg.

Also, minor changes to wording of some example-extra.cfg sections.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-27 12:03:59 -04:00
Kevin O'Connor
1a69f38e6e flash_usb: Pass -t $CONFIG_MCU to flash_usb on all targets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 18:48:00 -04:00
Kevin O'Connor
538d6ac3a2 flash_usb: Use "-s" option to specify flash offset on atsamd
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 18:33:00 -04:00
Kevin O'Connor
c694da3753 flash_usb: Change dfu-util to reset the board after a flash on stm32f4
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 18:06:32 -04:00
Kevin O'Connor
4b4e309e1b flash_usb: Inform user to manually reset after stm32f4 flash
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 17:46:18 -04:00
Kevin O'Connor
5131ec5eb0 stm32: Add support for flashing over usb on stm32f042
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 17:11:04 -04:00
Kevin O'Connor
2ecc8d8f62 stm32: stm32f4 usb boot check only needed when CONFIG_USBSERIAL
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 16:56:33 -04:00
Kevin O'Connor
5da6a62759 stm32f4: Add support for flashing over USB
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 13:24:59 -04:00
Kevin O'Connor
0ba5819370 tmc_uart: Don't try to configure analog pins to -1 value
Commit 6f5f2a3b incorrectly altered the analog mux pin config.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 11:33:30 -04:00
Kevin O'Connor
081c24326d atsam: sysio support is only available on sam4s
Fix sam4e build error introduced in commit f723a314.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-24 22:21:47 -04:00
Kevin O'Connor
f723a3141e atsam: Allow PB4-PB7,PB10-PB12 to be used as gpio on sam4
A separate "sysio" register must be set in order to use some port B
pins on the sam4 mcu.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-24 22:02:29 -04:00
Kevin O'Connor
6f5f2a3bc7 tmc_uart: Make sure to set analog mux pins after a restart
Don't assume the analog mux pins are in a low state at startup.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-24 22:00:58 -04:00
Kevin O'Connor
d6d2be66e4 config: The duet2 maestro uses a 2200 ohm pullup resistor
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-24 13:07:07 -04:00
Kevin O'Connor
9a11286327 stm32: Implement armcm_main() in arch specific code
Move armcm_main() to stm32f0.c, stm32f1.c, and stm32f4.c.  This gives
the arch specific code more control on the early boot setup.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-24 11:35:18 -04:00
Kevin O'Connor
faeaa54925 armcm_boot: Use armcm_main() instead of main() to start board code
The main() function has a special meaning to gcc and using it can
result in different code generation.  Use armcm_main() to avoid that.

Also, invoke SystemInit() from the board specific armcm_main() code.
This gives the board code more control over board initialization.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-24 11:16:10 -04:00
Kevin O'Connor
632ff9e55a docs: Update benchmarks for stm32f0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 21:45:07 -04:00
Kevin O'Connor
0b0c47c566 stm32: Support PA11/PA12 pin remap on stm32f042 tsop20 chip
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 21:34:48 -04:00
Kevin O'Connor
a6d90bb95e stm32: Support stm32f042 build from stm32/ directory
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 21:34:48 -04:00
Kevin O'Connor
2c535106ee stm32: Initial support for stm32f070
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 21:19:03 -04:00
Kevin O'Connor
7e090a996a lib: Add a copy of stm32f0 cmsis files from v1.10.0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 21:16:35 -04:00
Kevin O'Connor
7b792e40d5 stm32f0: Rename internal build symbol from MACH_STM32F0 to MACH_STM32F0_HAL
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 21:16:35 -04:00
Kevin O'Connor
a46244057c stm32: Support 16bit packet memory access on usbfs controller
The stm32f0 line uses 16bit packet memory reads/writes (as opposed to
the goofy 32bit accesses required on the stm32f103).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 21:16:35 -04:00
Kevin O'Connor
c2881f7d15 stm32: Be explicit in layout of gpio banks in digital_regs variable
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 21:16:35 -04:00
Kevin O'Connor
f160a3a824 docs: Reword Pressure_Advance.md paragraph on kinematic impact
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 19:50:51 -04:00
Kevin O'Connor
ccbdb6c531 docs: Pressure_Advance.md should recommend setting ADVANCE_LOOKAHEAD_TIME
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 19:34:59 -04:00
Kevin O'Connor
c794e11c67 docs: Update Pressure_Advance.md to use tuning tower
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 19:28:03 -04:00
Kevin O'Connor
b8a6160646 docs: Update example openocd config in Bootloaders.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 19:05:04 -04:00
Kevin O'Connor
f07292084b docs: Remove outdated stm32f1.md document
The stm32f103 has become popular in the "skr mini" series of boards.
As a result, the stm32f1.md document is no longer relevant.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 18:53:11 -04:00
Kevin O'Connor
e0afc74cc7 config: Fix EXP1 comment in generic-bigtreetech-skr-e3-dip.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 16:07:08 -04:00
Kevin O'Connor
b91993d6a4 config: Add generic-bigtreetech-skr-e3-dip.cfg config
Reported by @salimvanak.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 15:59:26 -04:00
Kevin O'Connor
40d076cce5 stm32: Use stm32f103xe header for stm32f103 line
Use the "e" revision so that the SPI3 device is available for use.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 15:49:00 -04:00
Kevin O'Connor
ef142af785 config: Rename config to generic-bigtreetech-skr-mini-e3-v1.0.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 15:04:15 -04:00
Kevin O'Connor
48530db50e test: Add generic-bigtreetech-skr-mini-e3-v1.2.cfg to config tests
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-23 15:01:34 -04:00
epandi
c7fe338bfb config: Skr mini e3 v1.2 template (#2069)
Signed-off-by: Eelco Pandelaar <epandi@gmail.com>
2019-10-23 14:57:00 -04:00
nhchiu
9cd6273d52 scripts: Use current username in install-ubuntu-18.04.sh
Set KLIPPER_USER to $USER instead of "octoprint".

Signed-off-by: Nathan Chiu <nhchiu2009@gmail.com>
2019-10-23 14:54:31 -04:00
Arksine
dd12c981ef temperature_fan: add get_status() function
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-10-22 22:10:13 -04:00
Arksine
d85b395a9c bed_mesh: fix error reporting
Fix invalid string formatting in the parse_pair() helper.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-10-22 22:09:33 -04:00
578 changed files with 245185 additions and 270208 deletions

31
.github/workflows/stale-issue-bot.yaml vendored Normal file
View File

@@ -0,0 +1,31 @@
# Enable the github stale issue bot tracker
name: "Close stale issues"
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: |
Hello,
It looks like there hasn't been any recent updates on this
Klipper github issue. If you created this issue and no
longer consider it open, then please login to github and
close the issue. Otherwise, if there is no further activity
on this thread then it will be automatically closed in a few
days.
Best regards,
~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
exempt-issue-labels: 'enhancement,bug'
days-before-stale: 21
days-before-close: 7

View File

@@ -1,5 +1,6 @@
# This is a travis-ci.org continuous integration configuration file.
language: c
dist: bionic
addons:
apt:

View File

@@ -66,7 +66,7 @@ $(OUT)%.o: %.c $(OUT)autoconf.h $(OUT)board-link
@echo " Compiling $@"
$(Q)$(CC) $(CFLAGS) -c $< -o $@
$(OUT)%.ld: %.lds.S $(OUT)board-link
$(OUT)%.ld: %.lds.S $(OUT)autoconf.h $(OUT)board-link
@echo " Preprocessing $@"
$(Q)$(CPP) -I$(OUT) -P -MD -MT $@ $< -o $@

81
config/example-corexz.cfg Normal file
View File

@@ -0,0 +1,81 @@
# This file serves as documentation for config parameters of corexz
# style printers. One may copy and edit this file to configure a new
# corexz printer. Only parameters unique to corexz printers are
# described here - see the "example.cfg" file for description of common
# config parameters.
# DO NOT COPY THIS FILE WITHOUT CAREFULLY READING AND UPDATING IT
# FIRST. Incorrectly configured parameters may cause damage.
# The stepper_x section is used to describe the X axis as well as the
# stepper controlling the X+Z movement.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_distance: .01
endstop_pin: ^ar3
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_distance: .01
endstop_pin: ^ar14
position_endstop: 0
position_max: 200
homing_speed: 50
# The stepper_z section is used to describe the Z axis as well as the
# stepper controlling the X-Z movement.
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_distance: .0025
endstop_pin: ^ar18
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_distance: .0022
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: ar9
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: corexz
# This option must be "corexz" for corexz printers.
max_velocity: 300
max_accel: 3000
max_z_velocity: 50
max_z_accel: 30

View File

@@ -107,6 +107,13 @@ delta_radius: 174.75
# axis towers. This parameter may also be calculated as:
# delta_radius = smooth_rod_offset - effector_offset - carriage_offset
# This parameter must be provided.
#print_radius:
# The radius (in mm) of valid toolhead XY coordinates. One may use
# this setting to customize the range checking of toolhead moves. If
# a large value is specified here then it may be possible to command
# the toolhead into a collision with a tower. The default is to use
# delta_radius for print_radius (which would normally prevent a
# tower collision).
# The delta_calibrate section enables a DELTA_CALIBRATE extended
# g-code command that can calibrate the tower endstop positions and

File diff suppressed because it is too large Load Diff

View File

@@ -3,203 +3,71 @@
# The snippets in this file may be copied into the main printer.cfg file.
# See the "example.cfg" file for description of common config parameters.
# Available menu elements:
# item - purely visual element
# command - same like 'item' but with gcode trigger
# input - same like 'command' but has value changing capabilities
# list - menu element container, with entry and exit gcode triggers
# vsdcard - same as 'list' but will append files from virtual sdcard
# deck - special container for custom screens (cards) has entry and exit gcode triggers.
# card - special content card for custom screens. Can only be used in 'deck'!
# Available options in menu Jinja2 template context:
# Read-only attributes for menu element:
# menu.width - element width (number of display columns)
# menu.ns - element namespace
# menu.event - name of the event that triggered the script
# menu.input - input value, only available in input script context
# List of actions for menu element:
# menu.back(force, update) - will execute menu back command, optional boolean parameters <force> and <update>.
# When <force> is set True then it will also stop editing. Default value is False
# When <update> is set False then parent container items are not updated. Default value is True
# menu.exit(force) - will execute menu exit command, optional boolean parameter <force> default value False
# When <force> is set True then it will also stop editing. Default value is False
#[menu item1]
#type: item
# Type will determine menu item properties and behaviours:
# Common parameters available for all menu config sections.
#[menu some_name]
#type:
# One of command, input, list, text:
# command - basic menu element with various script triggers
# input - same like 'command' but has value changing capabilities.
# Press will start/stop edit mode.
# list - it allows for menu items to be grouped together in a scrollable list.
# Add to the list by creating menu configurations
# using "some_list" as a prefix - for example: [menu some_list some_item_in_the_list]
# vsdlist - same as 'list' but will append files from virtual sdcard (will be removed in the future)
#name:
# This is mandatory attribute for every menu element.
# You can use Python output formatting for parameter and transform values.
# Quotes can be used in the beginning and end of name.
#cursor:
# It allows to change cursor character for selected menu element.
# The default is >
# This parameter is optional.
#width:
# This attribute accepts integer value. Element name is cut to this width.
# This parameter is optional.
#scroll:
# This attribute accepts static boolean value. You can use it together with 'width'.
# When this is enabled then names longer than width are scrolled back and forth.
# The default is disabled. This parameter is optional.
# Name of menu item - evaluated as a template.
#enable:
# This attribute accepts static boolean values and parameters (converted to boolean).
# It accepts multiple logical expressions. Values separated by comma will return True if all elements are true.
# Values on different lines will return True if any element is true.
# You can use logical negation by using character ! as parameter prefix.
#parameter:
# This attribute accepts float values or special variables. Multiple values are delimited by comma.
# All available parameter variables can be listed by 'MENU DO=dump' gcode, menu itself must be running.
# This value is available for output formatting as {0}..{n} Where n is count of parameters.
#transform:
# This attribute allows to transform parameters value to something else.
# More than one transformation can be added. Each transformation must be on separate line.
# These transformed values are available for output formatting as {n+1}..{x}
# Where n is count of parameters and x is count of transformations.
# In order to transform the value of a particular parameter, you must add
# an parameter index as prefix. Like this "transform: 1.choose('OFF','ON')"
# If the index is not set then the default index 0 is used.
#
# map(fromLow,fromHigh,toLow,toHigh) - interpolate re-maps a parameter value from one range to another.
# Output value type is taken from toHigh. It can be int or float.
#
# choose(e1,e2) - boolean chooser, converts the value of the parameter to the boolean type (0 and 1),
# and selects the corresponding value by the index from the list.
#
# choose(e1,e2,...) - int chooser, converts the value of the parameter to the int type
# and selects the corresponding value by the index from the list.
#
# choose({key:value,..}) - special dictionary chooser, parameter value cast type by first key type.
# Selects the corresponding value by the key from the dictionary.
#
# int(), float(), bool(), str(), abs(), bin(), hex(), oct(), days(), hours(), minutes(), seconds()
# These will convert parameter value to the special form.
# int,float,bool,str,abs,bin,hex and oct are python functions.
# days,hours,minutes,seconds will convert parameter value (it's taken as seconds) to time specific value
#
# scale(xx) - Multiplies parameter value by this xx. Pure interger or float value is excpected.
# Template that evaluates to True or False.
#index:
# Position where an item needs to be inserted in list
# By default the item is added at the end. This parameter is optional.
#[menu command1]
#type:command
#[menu some_list]
#type: list
#name:
#enable:
#[menu some_list some_command]
#type: command
#name:
#cursor:
#width:
#scroll:
#enable:
#parameter:
#transform:
#gcode:
# When menu element is clicked then gcodes on this attribute will be executed.
# Can have multiline gcode script and supports output formatting for parameter and transform values.
#action:
# Special action can be executed. Supports [back, exit] menu commands
# and [respond response_info] command. Respond command will send '// response_info' to host.
# Script to run on button click or long click. Evaluated as a template.
#[menu input1]
#[menu some_list some_input]
#type: input
#name:
#cursor:
#width:
#enable:
#transform:
#parameter:
# Value from parameter (always index 0) is taken as input value when in edit mode.
#gcode:
# This will be triggered in realtime mode, on exit from edit mode
# or in edit mode this will be triggered after click button long press (>0.8sec).
#longpress_gcode:
# In edit mode this will be triggered after click button long press (>0.8sec).
# The default is empty. This parameter is optional.
#reverse:
# This attribute accepts static boolean value.
# When enabled it will reverse increment and decrement directions for input.
# The default is False. This parameter is optional.
#readonly:
# This attribute accepts same logical expression as 'enable'.
# When true then input element is readonly like 'item' and cannot enter to edit mode.
# The default is False. This parameter is optional.
#input:
# Initial value to use when editing - evaluated as a template.
# Result must be float.
#input_min:
# Minimum value of range - evaluated as a template.
# Default -99999.
#input_max:
# Maximum value of range - evaluated as a template.
# Default 99999.
#input_step:
# Editing step - Must be a positive integer or float value.
# It has internal fast rate step. When (input_max - input_min) / input_step > 100
# then fast rate step is 10 * input_step else fast rate step is same input_step
#realtime:
# This attribute accepts static boolean value.
# When enabled it will execute gcode after each value change.
# The default is False. This parameter is optional.
#input_min:
# It accepts integer or float value. Will set minimal bound for edit value.
# The default is 2.2250738585072014e-308. This parameter is optional.
#input_max:
# It accepts integer or float value. Will set maximal bound for edit value.
# The default is 1.7976931348623157e+308. This parameter is optional.
#input_step:
# This is mandatory attribute for input.
# It accepts positive integer or float value. Will determine increment
# and decrement steps for edit value.
#input_step2:
# This is optional attribute for input.
# It accepts positive integer or float value. Will determine fast rate
# increment and decrement steps for edit value.
# The default is 0 (input_step will be used instead)
#[menu list1]
#type:list or vsdcard
#name:
#cursor:
#width:
#scroll:
#enable:
#enter_gcode:
# Will trigger gcode script when entering to this menu container.
# This parameter is optional.
#leave_gcode:
# Will trigger gcode script when leaving from this menu container.
# This parameter is optional.
#show_back:
# This attribute accepts static boolean value.
# Show back [..] as first element.
# The default is True. This parameter is optional.
#show_title:
# This attribute accepts static boolean value.
# Show container name next to back [..] element.
# The default is True. This parameter is optional.
#items:
# Menu elements listed in this container.
# Each element must be on separate line.
# Elements can be grouped on same line by separating them with comma
#
# When element name stars with . then menu system will add parent
# container config name as prefix to element name (delimited by space)
#[menu infodeck]
#type: deck
#name:
#cursor:
#width:
#scroll:
#enable:
#enter_gcode
#leave_gcode
#longpress_menu:
# Entry point to menu container. When this attribute is set then
# long press > 0.8s will initiate this menu container if not in edit mode.
# The default is disabled. This parameter is optional.
#items:
# It accepts only 'card' elements. You are able to switch between different card screens
# by using encoder or up/down buttons.
#content:
# It allows quickly define single card decks by adding content directly to deck.
# You have to remove deck item attribute and use named items in content.
# The menu functionality will then internally create one card item for this deck.
# This is optional.
#[menu card1]
#type: card
#name:
#content:
# Card screen content. Each line represents display line.
# Quotes can be used in the beginning and end of line.
# Rendered elements are available for output formatting as {0}..{x}. It's always string type.
# It's possible directly use menu item names in content by leaving items attribute out or empty
# and use menu items names directly in content as {msg,xpos|ypos}. The menu functionality will then
# internally build a item list and replace names with indexes in content.
# This is optional.
#items:
# List of elements in card. Each line represents a single index for content formatting.
# It's possible to show multiple elements in one place by separating them with comma on single line.
# If first element is integer then timed cycle is used (integer value is cycle time in seconds)
# If no integer element then first enabled element is shown.
# In cycler multiple elements can be grouped into one postition by separating them with |
# This way only simple menu items can be grouped.
# Example: 5,prt_time, prt_progress - elements prt_time and prt_progress are switched after 5s
# Example: msg,xpos|ypos - elements xpos and ypos are grouped and showed together when msg is disabled.
#use_cursor:
# This attribute accepts static boolean value.
# When enabled the menu system uses a cursor instead of blinking to visualize item selection
# and edit mode for this card. Cursor and placeholder is always added as item name prefix.
# When enabled then gcode script is run after each value change.
# The default is False. This parameter is optional.
#gcode:
# Script to run on button click, long click or value change. Evaluated as a template.
# The button click will trigger the edit mode start or end.

View File

@@ -0,0 +1,130 @@
# This file serves as documentation for config parameters of rotary
# delta style printers. One may copy and edit this file to configure a
# new delta printer. Only parameters unique to delta printers are
# described here - see the "example.cfg" file for description of
# common config parameters.
# ROTARY DELTA KINEMATICS ARE A WORK IN PROGRESS. Homing moves may
# timeout and some boundary checks are not implemented.
# The stepper_a section describes the stepper controlling the rear
# right arm (at 30 degrees). This section also controls the homing
# parameters (homing_speed, homing_retract_dist) for all arms.
[stepper_a]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_distance: 0.001963495
# On a rotary delta printer the step_distance is the amount each
# step pulse moves the upper arm in radians (for example, a directly
# connected 1.8 degree stepper with 16 micro-steps would be 2 * pi *
# (1.8 / 360) / 16 == 0.001963495). This parameter must be provided.
endstop_pin: ^ar2
homing_speed: 50
position_endstop: 252
# Distance (in mm) between the nozzle and the bed when the nozzle is
# in the center of the build area and the endstop triggers. This
# parameter must be provided for stepper_a; for stepper_b and
# stepper_c this parameter defaults to the value specified for
# stepper_a.
upper_arm_length: 170.000
# Length (in mm) of the arm connecting the "shoulder joint" to the
# "elbow joint". This parameter must be provided for stepper_a; for
# stepper_b and stepper_c this parameter defaults to the value
# specified for stepper_a.
lower_arm_length: 320.000
# Length (in mm) of the arm connecting the "elbow joint" to the
# "effector joint". This parameter must be provided for stepper_a;
# for stepper_b and stepper_c this parameter defaults to the value
# specified for stepper_a.
#angle:
# This option specifies the angle (in degrees) that the arm is at.
# The default is 30 for stepper_a, 150 for stepper_b, and 270 for
# stepper_c.
# The stepper_b section describes the stepper controlling the rear
# left arm (at 150 degrees).
[stepper_b]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_distance: 0.001963495
endstop_pin: ^ar15
# The stepper_c section describes the stepper controlling the front
# arm (at 270 degrees).
[stepper_c]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_distance: 0.001963495
endstop_pin: ^ar19
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_distance: .0022
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control: watermark
min_temp: 0
max_temp: 130
# Print cooling fan (omit section if fan not present).
#[fan]
#pin: ar9
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: rotary_delta
# This option must be "rotary_delta" for rotary delta printers.
max_velocity: 300
# Maximum velocity (in mm/s) of the toolhead relative to the
# print. This parameter must be specified.
max_accel: 3000
# Maximum acceleration (in mm/s^2) of the toolhead relative to the
# print. This parameter must be specified.
max_z_velocity: 50
# For delta printers this limits the maximum velocity (in mm/s) of
# moves with z axis movement. This setting can be used to reduce the
# maximum speed of up/down moves (which require a higher step rate
# than other moves on a delta printer). The default is to use
# max_velocity for max_z_velocity.
#minimum_z_position: 0
# The minimum Z position that the user may command the head to move
# to. The default is 0.
shoulder_radius: 33.900
# Radius (in mm) of the horizontal circle formed by the three
# shoulder joints, minus the radius of the circle formed by the
# effector joints. This parameter may also be calculated as:
# shoulder_radius = (delta_f - delta_e) / sqrt(12)
# This parameter must be provided.
shoulder_height: 412.900
# Distance (in mm) of the shoulder joints from the bed, minus the
# effector toolhead height. This parameter must be provided.
# The delta_calibrate section enables a DELTA_CALIBRATE extended
# g-code command that can calibrate the shoulder endstop positions.
[delta_calibrate]
radius: 50
#speed: 50
#horizontal_move_z: 5
# See example-delta.cfg for a description of these parameters.

View File

@@ -30,8 +30,7 @@ dir_pin: ar55
# parameter must be provided.
enable_pin: !ar38
# Enable pin (default is enable high; use ! to indicate enable
# low). Alternatively, this may be a comma separated list of pins to
# enable. If this parameter is not provided then the stepper motor
# low). If this parameter is not provided then the stepper motor
# driver must always be enabled.
step_distance: .0225
# Distance in mm that each step causes the axis to travel. This
@@ -56,12 +55,17 @@ position_max: 200
# Distance to backoff (in mm) before homing a second time during
# homing. Set this to zero to disable the second home. The default
# is 5mm.
#homing_retract_speed:
# Speed to use on the retract move after homing in case this should
# be different from the homing speed, which is the default for this
# parameter
#second_homing_speed:
# Velocity (in mm/s) of the stepper when performing the second home.
# The default is homing_speed/2.
#homing_positive_dir:
# If true, homing will cause the stepper to move in a positive
# direction (away from zero); if false, home towards zero. The
# direction (away from zero); if false, home towards zero. It is
# better to use the default than to specify this parameter. The
# default is true if position_endstop is near position_max and false
# if near position_min.
@@ -92,8 +96,7 @@ position_max: 200
# The extruder section is used to describe both the stepper
# controlling the printer extruder and the heater parameters for the
# nozzle. The stepper configuration has the same settings as the
# stepper_x section and the heater configuration has the same settings
# as the heater_bed section (described below).
# stepper_x section.
[extruder]
step_pin: ar26
dir_pin: ar28
@@ -112,6 +115,9 @@ filament_diameter: 3.500
# If a move requests an extrusion rate that would exceed this value
# it will cause an error to be returned. The default is: 4.0 *
# nozzle_diameter^2
#instantaneous_corner_velocity: 1.000
# The maximum instantaneous velocity change (in mm/s) of the
# extruder during the junction of two moves. The default is 1mm/s.
#max_extrude_only_distance: 50.0
# Maximum length (in mm of raw filament) that a retraction or
# extrude-only move may have. If a retraction or extrude-only move
@@ -121,7 +127,7 @@ filament_diameter: 3.500
#max_extrude_only_accel:
# Maximum velocity (in mm/s) and acceleration (in mm/s^2) of the
# extruder motor for retractions and extrude-only moves. These
# settings do not place any limit on normal printing moves. If not
# settings do not have any impact on normal printing moves. If not
# specified then they are calculated to match the limit an XY
# printing move with a cross section of 4.0*nozzle_diameter^2 would
# have.
@@ -131,13 +137,12 @@ filament_diameter: 3.500
# during deceleration. It is measured in millimeters per
# millimeter/second. The default is 0, which disables pressure
# advance.
#pressure_advance_lookahead_time: 0.010
# A time (in seconds) to "look ahead" at future extrusion moves when
# calculating pressure advance. This is used to reduce the
# application of pressure advance during cornering moves that would
# otherwise cause retraction followed immediately by pressure
# buildup. This setting only applies if pressure_advance is
# non-zero. The default is 0.010 (10 milliseconds).
#pressure_advance_smooth_time: 0.040
# A time range (in seconds) to use when calculating the average
# extruder velocity for pressure advance. A larger value results in
# smoother extruder movements. This parameter may not exceed 200ms.
# This setting only applies if pressure_advance is non-zero. The
# default is 0.040 (40 milliseconds).
#
# The remaining variables describe the extruder heater.
heater_pin: ar10
@@ -151,28 +156,24 @@ heater_pin: ar10
# setting may be used to limit the total power output (over extended
# periods) to the heater. The default is 1.0.
sensor_type: EPCOS 100K B57560G104F
# Type of sensor - this may be "EPCOS 100K B57560G104F", "ATC
# Semitec 104GT-2", "NTC 100K beta 3950", "Honeywell 100K
# 135-104LAG-J01", "NTC 100K MGB18-104F39050L32", "AD595", "PT100
# INA826", "MAX6675", "MAX31855", "MAX31856", or "MAX31865".
# Additional sensor types may be available - see the
# example-extras.cfg file for details. This parameter must be
# Type of sensor - common thermistors are "EPCOS 100K B57560G104F",
# "ATC Semitec 104GT-2", "NTC 100K beta 3950", "Honeywell 100K
# 135-104LAG-J01", "NTC 100K MGB18-104F39050L32",
# "SliceEngineering 450", and "TDK NTCG104LH104JT1". See the
# example-extras.cfg file for other sensors. This parameter must be
# provided.
sensor_pin: analog13
# Analog input pin connected to the sensor. This parameter must be
# provided.
#pullup_resistor: 4700
# The resistance (in ohms) of the pullup attached to the
# thermistor. This parameter is only valid when the sensor is a
# thermistor. The default is 4700 ohms.
# The resistance (in ohms) of the pullup attached to the thermistor.
# This parameter is only valid when the sensor is a thermistor. The
# default is 4700 ohms.
#inline_resistor: 0
# The resistance (in ohms) of an extra (not heat varying) resistor
# that is placed inline with the thermistor. It is rare to set this.
# This parameter is only valid when the sensor is a thermistor. The
# default is 0 ohms.
#adc_voltage: 5.0
# The ADC comparison voltage. This parameter is only valid when the
# sensor is an AD595 or "PT100 INA826". The default is 5 volts.
#smooth_time: 2.0
# A time value (in seconds) over which temperature measurements will
# be smoothed to reduce the impact of measurement noise. The default
@@ -192,6 +193,11 @@ pid_Kd: 114
#pid_integral_max:
# The maximum "windup" the integral term may accumulate. The default
# is to use the same value as max_power.
#max_delta: 2.0
# On 'watermark' controlled heaters this is the number of degrees in
# Celsius above the target temperature before disabling the heater
# as well as the number of degrees below the target before
# re-enabling the heater. The default is 2 degrees Celsius.
#pwm_cycle_time: 0.100
# Time in seconds for each software PWM cycle of the heater. It is
# not recommended to set this unless there is an electrical
@@ -212,17 +218,13 @@ max_temp: 210
# error. These parameters must be provided.
# The heater_bed section describes a heated bed (if present - omit
# section if not present).
# section if not present). It uses the same heater settings described
# in the extruder section.
[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control: watermark
#max_delta: 2.0
# On 'watermark' controlled heaters this is the number of degrees in
# Celsius above the target temperature before disabling the heater
# as well as the number of degrees below the target before
# re-enabling the heater. The default is 2 degrees Celsius.
min_temp: 0
max_temp: 110
@@ -257,8 +259,9 @@ pin: ar9
# constrained by the implementation and may be significantly
# different than the requested cycle_time. The default is False.
#kick_start_time: 0.100
# Time (in seconds) to run the fan at full speed when first enabling
# it (helps get the fan spinning). The default is 0.100 seconds.
# Time (in seconds) to run the fan at full speed when either first
# enabling or increasing it by more than 50% (helps get the fan
# spinning). The default is 0.100 seconds.
#off_below: 0.0
# The minimum input speed which will power the fan (expressed as a
# value from 0.0 to 1.0). When a speed lower than off_below is
@@ -286,15 +289,16 @@ pin_map: arduino
# default is to not enable the aliases.
#restart_method:
# This controls the mechanism the host will use to reset the
# micro-controller. The choices are 'arduino', 'rpi_usb', and
# 'command'. The 'arduino' method (toggle DTR) is common on Arduino
# boards and clones. The 'rpi_usb' method is useful on Raspberry Pi
# boards with micro-controllers powered over USB - it briefly
# disables power to all USB ports to accomplish a micro-controller
# reset. The 'command' method involves sending a Klipper command to
# the micro-controller so that it can reset itself. The default is
# 'arduino' if the micro-controller communicates over a serial port,
# 'command' otherwise.
# micro-controller. The choices are 'arduino', 'cheetah', 'rpi_usb',
# and 'command'. The 'arduino' method (toggle DTR) is common on
# Arduino boards and clones. The 'cheetah' method is a special
# method needed for some Fysetc Cheetah boards. The 'rpi_usb' method
# is useful on Raspberry Pi boards with micro-controllers powered
# over USB - it briefly disables power to all USB ports to
# accomplish a micro-controller reset. The 'command' method involves
# sending a Klipper command to the micro-controller so that it can
# reset itself. The default is 'arduino' if the micro-controller
# communicates over a serial port, 'command' otherwise.
# The printer section controls high level printer settings.
[printer]
@@ -315,8 +319,8 @@ max_accel: 3000
max_z_velocity: 25
# For cartesian printers this sets the maximum velocity (in mm/s) of
# movement along the z axis. This setting can be used to restrict
# the maximum speed of the z stepper motor on cartesian
# printers. The default is to use max_velocity for max_z_velocity.
# the maximum speed of the z stepper motor on cartesian printers.
# The default is to use max_velocity for max_z_velocity.
max_z_accel: 30
# For cartesian printers this sets the maximum acceleration (in
# mm/s^2) of movement along the z axis. It limits the acceleration

160
config/generic-archim2.cfg Normal file
View File

@@ -0,0 +1,160 @@
# This file contains common pin mappings for Ultimachine Archim2
# boards. To use this config, the firmware should be compiled for the
# SAM3x8e.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PC6
dir_pin: PC5
enable_pin: !PC9
step_distance: .0125
endstop_pin: ^PD4
position_endstop: 0
position_max: 200
homing_speed: 50
[tmc2130 stepper_x]
cs_pin: PC7
microsteps: 16
run_current: .5
sense_resistor: 0.120
diag1_pin: !PA4
spi_software_sclk_pin: PD2
spi_software_mosi_pin: PD3
spi_software_miso_pin: PD1
[stepper_y]
step_pin: PC12
dir_pin: PC11
enable_pin: !PC14
step_distance: .0125
endstop_pin: ^PD6
position_endstop: 0
position_max: 400
homing_speed: 50
[tmc2130 stepper_y]
cs_pin: PC13
microsteps: 16
run_current: .5
sense_resistor: 0.120
diag1_pin: !PC15
spi_software_sclk_pin: PD2
spi_software_mosi_pin: PD3
spi_software_miso_pin: PD1
[stepper_z]
step_pin: PC17
dir_pin: PC16
enable_pin: !PC19
step_distance: .0125
endstop_pin: ^PA7
position_endstop: 0
position_max: 400
homing_speed: 50
[tmc2130 stepper_z]
cs_pin: PC18
microsteps: 16
run_current: .5
sense_resistor: 0.120
diag1_pin: PC4
spi_software_sclk_pin: PD2
spi_software_mosi_pin: PD3
spi_software_miso_pin: PD1
[extruder]
step_pin: PB10
dir_pin: PC10
enable_pin: !PB22
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC24
sensor_type: ATC Semitec 104GT-2
sensor_pin: PB19
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
[tmc2130 extruder]
cs_pin: PC20
microsteps: 16
run_current: .5
sense_resistor: 0.120
diag1_pin: !PB23
spi_software_sclk_pin: PD2
spi_software_mosi_pin: PD3
spi_software_miso_pin: PD1
#[extruder1]
#step_pin: PB26
#dir_pin: PB24
#enable_pin: !PA11
#step_distance: .002
#nozzle_diameter: 0.400
#filament_diameter: 1.750
#heater_pin: PC23
#sensor_type: ATC Semitec 104GT-2
#sensor_pin: PB18
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
#pid_Kd: 114
#min_temp: 0
#max_temp: 250
#[tmc2130 extruder1]
#cs_pin: PA10
#microsteps: 16
#run_current: .5
#sense_resistor: 0.120
#diag1_pin: PD0
#spi_software_sclk_pin: PD2
#spi_software_mosi_pin: PD3
#spi_software_miso_pin: PD1
[heater_bed]
heater_pin: PC21
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB20
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PC26
[heater_fan nozzle_cooling_fan]
pin: PC25
[mcu]
serial: /dev/serial/by-id/usb-Klipper_sam3x8e_nnn
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PA14, EXP1_3=PA15, EXP1_5=PA0, EXP1_7=PA1, EXP1_9=<GND>,
EXP1_2=PA13, EXP1_4=PA12, EXP1_6=PA16, EXP1_8=PC2, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA25, EXP2_3=PB27, EXP2_5=PA3, EXP2_7=PB25, EXP2_9=<GND>,
EXP2_2=PA27, EXP2_4=PA29, EXP2_6=PA26, EXP2_8=<RST>, EXP2_10=<3.3V>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi0"
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@@ -0,0 +1,331 @@
# This file contains common pin mappings for the BigTreeTech GTR.
# To use this config, the firmware should be compiled for the
# STM32F407 with a "32KiB bootloader".
# The "make flash" command does not work on the GTR. Instead,
# after running "make", copy the generated "klipper/out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the GTR
# with that SD card.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PC15
dir_pin: PF0
enable_pin: !PF1
step_distance: .0125
endstop_pin: ^!PF2
position_endstop: 0
position_max: 220
homing_speed: 50
[stepper_y]
step_pin: PE3
dir_pin: PE2
enable_pin: !PE4
step_distance: .0125
endstop_pin: ^!PC13
position_endstop: 0
position_max: 250
homing_speed: 50
[stepper_z]
step_pin: PB8
dir_pin: PB7
enable_pin: !PB9
step_distance: .0025
endstop_pin: ^PE0
position_endstop: 0
position_max: 200
homing_speed: 12
second_homing_speed: 1
[extruder]
step_pin: PG12
dir_pin: PG11
enable_pin: !PG13
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB1 # Heat0
sensor_pin: PC1 # T0 Header
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 290
#[extruder1]
#step_pin: PD6
#dir_pin: PD5
#enable_pin: !PD7
#heater_pin: PA1 # Heat1
#sensor_pin: PC2 # T1
#...
#[extruder2]
#step_pin: PD1
#dir_pin: PD0
#enable_pin: !PD2
#heater_pin: PB0 # Heat2
#sensor_pin: PC3 # T2
#...
[heater_bed]
heater_pin: PA2
sensor_pin: PC0 # BED
sensor_type: ATC Semitec 104GT-2
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PE5 # FAN0
[heater_fan fan1]
pin: PE6 # FAN1
#[heater_fan fan2]
#pin: PC8 # FAN2
[mcu]
baud: 250000
restart_method: command
serial: dev/serial0
# setup for PA9, PA10 USART1_tx / rx directly connected to the RPI GPIO TX / RX pins
# These are the pins the GTR uses for its built in RPI 40 pin connector
# only connect GND, TX, RX - supply 5v power to the RPI separately
# do not cross over TX/RX - it is done internally on the GTR PCB.
# Use "sudo raspi-config" to disable the serial terminal - but enable the serial port.
# When running "make menuconfig" you must un-select the USB Serial check box
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 3000
max_z_velocity: 12
max_z_accel: 5
########################################
# TMC2208 configuration
########################################
#[tmc2208 stepper_x]
#uart_pin: PC14
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2208 stepper_y]
#uart_pin: PE1
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2208 stepper_z]
#uart_pin: PB5
#microsteps: 16
#run_current: 0.650
#hold_current: 0.450
#stealthchop_threshold: 30
#[tmc2208 extruder]
#uart_pin: PG10
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2208 extruder1]
#uart_pin: PD4
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2208 extruder2]
#uart_pin: PC12
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: PC14
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc2130 stepper_y]
#cs_pin: PE1
#microsteps: 16
#sense_resistor: 0.075
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc2130 stepper_z]
#cs_pin: PB5
#microsteps: 16
#sense_resistor: 0.075
#run_current: 0.650
#hold_current: 0.450
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc2130 extruder]
#cs_pin: PG10
#microsteps: 16
#sense_resistor: 0.075
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc2130 extruder1]
#cs_pin: PD4
#microsteps: 16
#sense_resistor: 0.075
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc2130 extruder2]
#cs_pin: PC12
#microsteps: 16
#sense_resistor: 0.075
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
########################################
# TMC5160 configuration
########################################
#[tmc5160 stepper_x]
#cs_pin: PC14
#microsteps: 16
#sense_resistor: 0.075
#interpolate: True
#run_current: 1
#hold_current: 1
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc5160 stepper_y]
#cs_pin: PE1
#microsteps: 16
#sense_resistor: 0.075
#interpolate: True
#run_current: 1
#hold_current: 1
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc5160 stepper_z]
#cs_pin: PB5
#microsteps: 16
#sense_resistor: 0.075
#interpolate: True
#run_current: 0.4
#hold_current: 0.4
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc5160 extruder]
#cs_pin: PG10
#microsteps: 16
#sense_resistor: 0.075
#interpolate: True
#run_current: 0.5
#hold_current: 0.5
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc5160 extruder1]
#cs_pin: PD4
#microsteps: 16
#sense_resistor: 0.075
#interpolate: True
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
#[tmc5160 extruder2]
#cs_pin: PC12
#microsteps: 16
#sense_resistor: 0.075
#interpolate: True
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 0
#spi_software_mosi_pin: PG15
#spi_software_miso_pin: PB6
#spi_software_sclk_pin: PB3
########################################
# EXP1 / EXP2 (display) pins
########################################
# display section not tested - pinout should be correct but my LCD did not work yet
[board_pins]
aliases:
# EXP1 header
EXP1_1=PC11, EXP1_3=PC10, EXP1_5=PG8, EXP1_7=PG6, EXP1_9=<GND>,
EXP1_2=PA15, EXP1_4=PA8, EXP1_6=PG7, EXP1_8=PG5, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB14, EXP2_3=PD10, EXP2_5=PH10, EXP2_7=PB10, EXP2_9=<GND>,
EXP2_2=PB13, EXP2_4=PB12, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=<NC>
# not sure on this: Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi2"
# See the sample-lcd.cfg file for definitions of common LCD displays.
#[display]
#lcd_type: st7920
#cs_pin: EXP1_4
#sclk_pin: EXP1_5
#sid_pin: EXP1_3
#encoder_pins: ^EXP2_5, ^EXP2_3
#click_pin: ^!EXP1_2
#kill_pin: ^!EXP2_8
#[output_pin beeper]
#pin: EXP1_1

View File

@@ -0,0 +1,168 @@
# This file contains common pin mappings for the BIGTREETECH SKR E3
# DIP. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PC13".
# The "make flash" command does not work on the SKR E3 DIP. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the SKR E3
# DIP with that SD card.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PC6
dir_pin: !PB15
enable_pin: !PC7
step_distance: .0125
endstop_pin: ^PC1
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PB13
dir_pin: !PB12
enable_pin: !PB14
step_distance: .0125
endstop_pin: ^PC0
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PB10
dir_pin: PB2
enable_pin: !PB11
step_distance: .0025
endstop_pin: ^PC15
position_endstop: 0.0
position_max: 250
[extruder]
step_pin: PB0
dir_pin: !PC5
enable_pin: !PB1
step_distance: 0.010526
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PC9
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC3
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PA8
[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
[static_digital_output usb_pullup_enable]
pins: !PC13
########################################
# TMC2208 configuration
########################################
#[tmc2208 stepper_x]
#uart_pin: PC10
#microsteps: 16
#run_current: 0.580
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2208 stepper_y]
#uart_pin: PC11
#microsteps: 16
#run_current: 0.580
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2208 stepper_z]
#uart_pin: PC12
#microsteps: 16
#run_current: 0.580
#hold_current: 0.500
#stealthchop_threshold: 30
#[tmc2208 extruder]
#uart_pin: PD2
#microsteps: 16
#run_current: 0.650
#hold_current: 0.500
#stealthchop_threshold: 5
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: PC10
#spi_bus: spi3
#microsteps: 16
#run_current: 0.580
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 stepper_y]
#cs_pin: PC11
#spi_bus: spi3
#microsteps: 16
#run_current: 0.580
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 stepper_z]
#cs_pin: PC12
#spi_bus: spi3
#microsteps: 16
#run_current: 0.580
#hold_current: 0.450
#stealthchop_threshold: 30
#[tmc2130 extruder]
#cs_pin: PD2
#spi_bus: spi3
#microsteps: 16
#run_current: 0.650
#hold_current: 0.500
#stealthchop_threshold: 5
########################################
# EXP1 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PA15, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
EXP1_2=PB6, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PB7, EXP1_10=<5V>
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@@ -43,7 +43,7 @@ homing_speed: 50
[tmc2209 stepper_y]
uart_pin: PC11
tx_pin: PC10
uart_address: 1
uart_address: 2
microsteps: 16
run_current: 0.580
hold_current: 0.500
@@ -61,7 +61,7 @@ position_max: 250
[tmc2209 stepper_z]
uart_pin: PC11
tx_pin: PC10
uart_address: 2
uart_address: 1
microsteps: 16
run_current: 0.580
hold_current: 0.500

View File

@@ -0,0 +1,121 @@
# This file contains common pin mappings for the BIGTREETECH SKR mini
# E3 v1.2. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PC13".
# The "make flash" command does not work on the SKR mini E3. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the SKR
# mini E3 with that SD card.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PB13
dir_pin: !PB12
enable_pin: !PB14
step_distance: .0125
endstop_pin: ^PC0
position_endstop: 0
position_max: 235
homing_speed: 50
[tmc2209 stepper_x]
uart_pin: PB15
microsteps: 16
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 250
[stepper_y]
step_pin: PB10
dir_pin: !PB2
enable_pin: !PB11
step_distance: .0125
endstop_pin: ^PC1
position_endstop: 0
position_max: 235
homing_speed: 50
[tmc2209 stepper_y]
uart_pin: PC6
microsteps: 16
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 250
[stepper_z]
step_pin: PB0
dir_pin: PC5
enable_pin: !PB1
step_distance: .0025
endstop_pin: ^PC2
position_endstop: 0.0
position_max: 250
[tmc2209 stepper_z]
uart_pin: PC10
microsteps: 16
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 5
[extruder]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PD2
step_distance: 0.010526
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[tmc2209 extruder]
uart_pin: PC11
microsteps: 16
run_current: 0.650
hold_current: 0.500
stealthchop_threshold: 5
[heater_bed]
heater_pin: PC9
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC3
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PA8
[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
[static_digital_output usb_pullup_enable]
pins: !PC13
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
EXP1_2=PB6, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PB7, EXP1_10=<5V>
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@@ -0,0 +1,132 @@
# This file contains common pin mappings for the BIGTREETECH SKR mini
# E3 v2.0. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PA14".
# The "make flash" command does not work on the SKR mini E3. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the SKR
# mini E3 with that SD card.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PB13
dir_pin: !PB12
enable_pin: !PB14
step_distance: .0125
endstop_pin: ^PC0
position_endstop: 0
position_max: 235
homing_speed: 50
[tmc2209 stepper_x]
uart_pin: PC11
tx_pin: PC10
uart_address: 0
microsteps: 16
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 250
[stepper_y]
step_pin: PB10
dir_pin: !PB2
enable_pin: !PB11
step_distance: .0125
endstop_pin: ^PC1
position_endstop: 0
position_max: 235
homing_speed: 50
[tmc2209 stepper_y]
uart_pin: PC11
tx_pin: PC10
uart_address: 2
microsteps: 16
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 250
[stepper_z]
step_pin: PB0
dir_pin: PC5
enable_pin: !PB1
step_distance: .0025
endstop_pin: ^PC2
position_endstop: 0.0
position_max: 250
[tmc2209 stepper_z]
uart_pin: PC11
tx_pin: PC10
uart_address: 1
microsteps: 16
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 5
[extruder]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PD2
step_distance: 0.010526
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[tmc2209 extruder]
uart_pin: PC11
tx_pin: PC10
uart_address: 3
microsteps: 16
run_current: 0.650
hold_current: 0.500
stealthchop_threshold: 5
[heater_bed]
heater_pin: PC9
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC3
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[heater_fan nozzle_cooling_fan]
pin: PC7
[fan]
pin: PC6
[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
[static_digital_output usb_pullup_enable]
pins: !PA14
[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>
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@@ -46,7 +46,7 @@ step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB1 # Heat0
sensor_pin: PF3 # T0 Header
sensor_pin: PF4 # T1 Header
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp: 22.2
@@ -60,7 +60,7 @@ max_temp: 250
#dir_pin: PE7
#enable_pin: !PA3
#heater_pin: PD14 # Heat1
#sensor_pin: PF4 # T1
#sensor_pin: PF5 # T2
#...
#[extruder2]
@@ -68,12 +68,12 @@ max_temp: 250
#dir_pin: PG9
#enable_pin: !PF0
#heater_pin: PB0 # Heat2
#sensor_pin: PF5 # T2
#sensor_pin: PF6 # T3
#...
[heater_bed]
heater_pin: PD12
sensor_pin: PF6 # T3
sensor_pin: PF3 # T0
sensor_type: ATC Semitec 104GT-2
control: watermark
min_temp: 0

View File

@@ -0,0 +1,200 @@
# This file contains common pin mappings for the BIGTREETECH SKR V1.4
# board. To use this config, the firmware should be compiled for the
# LPC1768 or LPC1769(Turbo).
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: P2.2
dir_pin: P2.6
enable_pin: !P2.1
step_distance: .0125
endstop_pin: !P1.29
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: P0.19
dir_pin: P0.20
enable_pin: !P2.8
step_distance: .0125
endstop_pin: !P1.28
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: P0.22
dir_pin: !P2.11
enable_pin: !P0.21
step_distance: .0025
endstop_pin: !P1.27
position_endstop: 0.0
position_max: 300
[extruder]
step_pin: P2.13
dir_pin: !P0.11
enable_pin: !P2.12
step_distance: .010526
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: P2.7
sensor_type: EPCOS 100K B57560G104F
sensor_pin: P0.24
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 260
#[extruder1]
#step_pin: P1.15
#dir_pin: P1.14
#enable_pin: !P1.16
#heater_pin: P2.4
#sensor_pin: P0.23
#...
[heater_bed]
heater_pin: P2.5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: P0.25
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: P2.3
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
[printer]
kinematics: cartesian
max_velocity: 400
max_accel: 500
max_z_velocity: 10
max_z_accel: 100
########################################
# TMC2208 configuration
########################################
#[tmc2208 stepper_x]
#uart_pin: P1.10
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#
#[tmc2208 stepper_y]
#uart_pin: P1.9
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#
#[tmc2208 stepper_z]
#uart_pin: P1.8
#microsteps: 16
#run_current: 0.650
#hold_current: 0.450
#stealthchop_threshold: 30
#
#[tmc2208 extruder]
#uart_pin: P1.4
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#
#[tmc2208 extruder1]
#uart_pin: P1.1
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: P1.10
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P1.17
#spi_software_sclk_pin: P0.4
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#diag1_pin: P1.29
#[tmc2130 stepper_y]
#cs_pin: P1.9
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P1.17
#spi_software_sclk_pin: P0.4
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#diag1_pin: P1.28
#[tmc2130 stepper_z]
#cs_pin: P1.8
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P1.17
#spi_software_sclk_pin: P0.4
#microsteps: 16
#run_current: 0.650
#hold_current: 0.450
#stealthchop_threshold: 30
#diag1_pin: P1.27
#[tmc2130 extruder]
#cs_pin: P1.4
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P1.17
#spi_software_sclk_pin: P0.4
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#diag1_pin: P1.26
#[tmc2130 extruder1]
#cs_pin: P1.1
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P1.17
#spi_software_sclk_pin: P0.4
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#diag1_pin: P1.25
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,
EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
# EXP2 header
EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,
EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp0"
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@@ -0,0 +1,88 @@
# This file contains pin mappings for the Creality "v4.2.7" board. To
# use this config, during "make menuconfig" select the STM32F103 with
# a "28KiB bootloader" and with "Use USB for communication" disabled.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select the
# USART3 serial port, which is broken out on the 10 pin IDC cable used
# for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PB9
dir_pin: PC2
enable_pin: !PC3
step_distance: .0125
endstop_pin: ^PA5
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PB7
dir_pin: PB8
enable_pin: !PC3
step_distance: .0125
endstop_pin: ^PA6
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PB5
dir_pin: !PB6
enable_pin: !PC3
step_distance: .0025
endstop_pin: ^PA7
position_endstop: 0.0
position_max: 250
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB3
dir_pin: PB4
enable_pin: !PC3
step_distance: 0.010752
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PA0
[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

@@ -86,7 +86,7 @@
[stepper_x]
step_pin: PD6
dir_pin: PD11
enable_pin: !PC6, tmc2660_stepper_x:virtual_enable
enable_pin: !PC6
step_distance: .0125
endstop_pin: ^PC14
position_endstop: 0
@@ -104,7 +104,7 @@ idle_current_percent: 20
[stepper_y]
step_pin: PD7
dir_pin: !PD12
enable_pin: !PC6, tmc2660_stepper_y:virtual_enable
enable_pin: !PC6
step_distance: .0125
endstop_pin: ^PA2
position_endstop: 0
@@ -122,7 +122,7 @@ idle_current_percent: 20
[stepper_z]
step_pin: PD8
dir_pin: PD13
enable_pin: !PC6, tmc2660_stepper_z:virtual_enable
enable_pin: !PC6
step_distance: .0025
endstop_pin: ^PD29
position_endstop: 0.5
@@ -140,7 +140,7 @@ sense_resistor: 0.051
[stepper_z1]
step_pin: PD0
dir_pin: PD16
enable_pin: !PC6, tmc2660_stepper_z1:virtual_enable
enable_pin: !PC6
step_distance: .0025
[tmc2660 stepper_z1]
@@ -155,7 +155,7 @@ sense_resistor: 0.051
[stepper_z2]
step_pin: PD3
dir_pin: !PD17
enable_pin: !PC6, tmc2660_stepper_z2:virtual_enable
enable_pin: !PC6
step_distance: .0025
[tmc2660 stepper_z2]
@@ -170,7 +170,7 @@ sense_resistor: 0.051
[stepper_z3]
step_pin: PD27
dir_pin: !PC0
enable_pin: !PC6, tmc2660_stepper_z3:virtual_enable
enable_pin: !PC6
step_distance: .0025
[tmc2660 stepper_z3]
@@ -182,10 +182,10 @@ run_current: 1.000
sense_resistor: 0.051
#On drive E0
[extruder0]
[extruder]
step_pin: PD5
dir_pin: PA1
enable_pin: !PC6, tmc2660_extruder0:virtual_enable
enable_pin: !PC6
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
@@ -199,7 +199,7 @@ pid_Kd: 114
min_temp: 0
max_temp: 250
[tmc2660 extruder0]
[tmc2660 extruder]
cs_pin: PC17
spi_bus: usart1
microsteps: 16
@@ -211,7 +211,7 @@ sense_resistor: 0.051
[extruder1]
step_pin: PD4
dir_pin: PD9
enable_pin: !PC6, tmc2660_extruder1:virtual_enable
enable_pin: !PC6
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
@@ -237,7 +237,7 @@ sense_resistor: 0.051
[extruder2]
step_pin: PD2
dir_pin: !PD28
enable_pin: !PC6, tmc2660_extruder2:virtual_enable
enable_pin: !PC6
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
@@ -263,7 +263,7 @@ sense_resistor: 0.051
[extruder3]
step_pin: PD1
dir_pin: !PD22
enable_pin: !PC6, tmc2660_extruder3:virtual_enable
enable_pin: !PC6
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
@@ -297,10 +297,10 @@ max_temp: 130
[fan]
pin: PC23
# Fan1 controlled by extruder0
# Fan1 controlled by extruder
[heater_fan nozzle_cooling_fan]
pin: PC26
heater: extruder0
heater: extruder
heater_temp: 45
fan_speed: 1.0

View File

@@ -6,7 +6,7 @@
[stepper_x]
step_pin: PC20
dir_pin: PC18
enable_pin: !PA1, tmc2208_stepper_x:virtual_enable
enable_pin: !PA1
step_distance: .0125
endstop_pin: ^PA24
position_endstop: 0
@@ -25,7 +25,7 @@ stealthchop_threshold: 250
[stepper_y]
step_pin: PC2
dir_pin: PA8
enable_pin: !PA1, tmc2208_stepper_y:virtual_enable
enable_pin: !PA1
step_distance: .0125
endstop_pin: ^PB6
position_endstop: 0
@@ -44,7 +44,7 @@ stealthchop_threshold: 250
[stepper_z]
step_pin: PC28
dir_pin: PB4
enable_pin: !PA1, tmc2208_stepper_z:virtual_enable
enable_pin: !PA1
step_distance: .0025
endstop_pin: ^PC10
position_endstop: 0.5
@@ -59,16 +59,22 @@ microsteps: 16
run_current: 0.800
stealthchop_threshold: 30
# Support analog sensor adjustments using VREF/VSSA pins
[adc_scaled vref_scaled]
vref_pin: PA17
vssa_pin: PA19
[extruder]
step_pin: PC4
dir_pin: PB7
enable_pin: !PA1, tmc2208_extruder:virtual_enable
enable_pin: !PA1
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: !PC1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB0
pullup_resistor: 2200
sensor_pin: vref_scaled:PB0
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
@@ -91,6 +97,7 @@ stealthchop_threshold: 5
#enable_pin: !PA1
#heater_pin: !PA16
#sensor_pin: PC30
#pullup_resistor: 2200
#...
#[tmc2208 extruder1]
#select_pins: !PC14, !PC16, PC17
@@ -107,7 +114,8 @@ stealthchop_threshold: 5
[heater_bed]
heater_pin: !PC0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA20
pullup_resistor: 2200
sensor_pin: vref_scaled:PA20
control: watermark
min_temp: 0
max_temp: 130
@@ -121,6 +129,11 @@ pin: PC23 # FAN0
#[heater_fan board_cooling_fan]
#pin: PC29 # FAN2
#[bltouch]
#sensor_pin: PC15 # Z_PROBE_IN
#control_pin: PC26 # Z_PROBE_MOD
#...
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
@@ -132,7 +145,7 @@ max_z_velocity: 5
max_z_accel: 100
[static_digital_output led]
pins: !PC26
pins: !PC26 # Z_PROBE_MOD / SERVO pin
# EXP1 / EXP2 (display) pins
[board_pins]

View File

@@ -6,7 +6,7 @@
[stepper_x]
step_pin: PD6
dir_pin: PD11
enable_pin: !PC6, tmc2660_stepper_x:virtual_enable
enable_pin: !PC6
step_distance: .0125
endstop_pin: ^PC14
position_endstop: 0
@@ -22,7 +22,7 @@ sense_resistor: 0.051
[stepper_y]
step_pin: PD7
dir_pin: !PD12
enable_pin: !PC6, tmc2660_stepper_y:virtual_enable
enable_pin: !PC6
step_distance: .0125
endstop_pin: ^PA2
position_endstop: 0
@@ -38,7 +38,7 @@ sense_resistor: 0.051
[stepper_z]
step_pin: PD8
dir_pin: PD13
enable_pin: !PC6, tmc2660_stepper_z:virtual_enable
enable_pin: !PC6
step_distance: .0025
endstop_pin: ^PD29
#endstop_pin: PD10 # E0 endstop
@@ -56,7 +56,7 @@ sense_resistor: 0.051
[extruder]
step_pin: PD5
dir_pin: PA1
enable_pin: !PC6, tmc2660_extruder:virtual_enable
enable_pin: !PC6
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
@@ -80,7 +80,7 @@ sense_resistor: 0.051
#[extruder1]
#step_pin: PD4
#dir_pin: PD9
#enable_pin: !PC6, tmc2660_extruder1:virtual_enable
#enable_pin: !PC6
#heater_pin: !PA16
#sensor_pin: PC12
#...

View File

@@ -92,6 +92,12 @@ pin: PH5
#[heater_fan nozzle_cooling_fan]
#pin: PH3
[temperature_sensor board_sensor]
sensor_pin: PF6
sensor_type: TDK NTCG104LH104JT1
min_temp: 0
max_temp: 50
[mcu]
serial: /dev/ttyACM0

295
config/generic-flyboard.cfg Normal file
View File

@@ -0,0 +1,295 @@
# This file contains common pin mappings for the 9 stepper motor
# "flymaker flyboard FLYF407ZG" board from creative3dprinter.com. To
# use this config, the firmware should be compiled for the STM32F407
# with a "32KiB bootloader".
# The "make flash" command does not work on the FLYBOARD. 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 FLYBOARD
# with that SD card.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PB9
dir_pin: PE0
enable_pin: !PE1
step_distance: .0025
endstop_pin: PC3
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: PB8
dir_pin: PG11
enable_pin: !PG12
step_distance: .0025
endstop_pin: PF2
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_z]
step_pin: PA8
dir_pin: PD6
enable_pin: !PD7
step_distance: .0125
endstop_pin: PF0
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: PC7
dir_pin: PD3
enable_pin: !PD4
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PF7 # Heat0
sensor_pin: PA0 # T1 Header
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 350
#[extruder1]
#step_pin: PC6
#dir_pin: PA15
#enable_pin: !PD0
#heater_pin: PF6 # Heat1
#sensor_pin: PC1 # T2
#...
#[extruder2]
#step_pin: PD15
#dir_pin: PG7
#enable_pin: !PG8
#heater_pin: PE6 # Heat2
#sensor_pin: PC0 # T3
#...
#[extruder3]
#step_pin: PD14
#dir_pin: PG4
#enable_pin: !PG5
#heater_pin: PE5 # Heat3
#sensor_pin: PF10 # T4
#...
#[extruder4]
#step_pin: PD13
#dir_pin: PD11
#enable_pin: !PG2
#heater_pin: PE4 # Heat4
#sensor_pin: PF5 # T5
#...
#[extruder4]
#step_pin: PD12
#dir_pin: PD8
#enable_pin: !PD9
#heater_pin: PE3 # Heat5
#sensor_pin: PF4 # T6
#...
[heater_bed]
heater_pin: PE2
sensor_pin: PF3 # T0
sensor_type: ATC Semitec 104GT-2
control: watermark
min_temp: 0
max_temp: 200
[fan]
pin: PF8
[heater_fan fan1]
pin: PF9
#[heater_fan fan2]
#pin: PA2
#[heater_fan fan3]
#pin: PA1
#[heater_fan fan4]
#pin: PE13
#[heater_fan fan5]
#pin: PB11
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
[printer]
kinematics: corexy
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# TMC2208 configuration
########################################
#[tmc2208 stepper_x]
#uart_pin: PG13
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2208 stepper_y]
#uart_pin: PG10
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2208 stepper_z]
#uart_pin: PD5
#microsteps: 16
#run_current: 0.650
#hold_current: 0.450
#stealthchop_threshold: 30
#[tmc2208 extruder]
#uart_pin: PD1
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2208 extruder1]
#uart_pin: PA14
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2208 extruder2]
#uart_pin: PG6
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2208 extruder3]
#uart_pin: PG3
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2208 extruder4]
#uart_pin: PD10
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2208 extruder5]
#uart_pin: PB12
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: PG13
##diag1_pin: PC3
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 stepper_y]
#cs_pin: PG10
##diag1_pin: PF2
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 stepper_z]
#cs_pin: PBD5
##diag1_pin: PF0
#microsteps: 16
#run_current: 0.650
#hold_current: 0.450
#stealthchop_threshold: 30
#[tmc2130 extruder]
#cs_pin: PD1
##diag1_pin: PE15
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2130 extruder1]
#cs_pin: PA14
##diag1_pin: PE10
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2130 extruder2]
#cs_pin: PG6
##diag1_pin: PC15
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2130 extruder3]
#cs_pin: PG3
##diag1_pin: PC15
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2130 extruder4]
#cs_pin: PD10
##diag1_pin: PC15
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2130 extruder5]
#cs_pin: PB12
##diag1_pin: PC15
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB10, EXP1_3=PE14, EXP1_5=PE10, EXP1_7=PE8, EXP1_9=<GND>,
EXP1_2=PE15, EXP1_4=PE12, EXP1_6=PE9, EXP1_8=PE7, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB14, EXP2_3=PC5, EXP2_5=PC4, EXP2_7=PB2, EXP2_9=<GND>,
EXP2_2=PB13, EXP2_4=PF11, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=<GND>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi2"
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@@ -41,7 +41,7 @@ homing_speed: 50
[tmc2209 stepper_y]
uart_pin: PA3
tx_pin: PA2
uart_address: 1
uart_address: 2
microsteps: 16
run_current: 0.800
hold_current: 0.500
@@ -59,7 +59,7 @@ position_max: 200
[tmc2209 stepper_z]
uart_pin: PA3
tx_pin: PA2
uart_address: 2
uart_address: 1
microsteps: 16
run_current: 0.800
hold_current: 0.500
@@ -107,6 +107,7 @@ pin: PC8
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
restart_method: cheetah
[printer]
kinematics: cartesian

View File

@@ -103,6 +103,7 @@ pin: PC8
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
restart_method: cheetah
[printer]
kinematics: cartesian

View File

@@ -181,7 +181,7 @@ pins: PB0
#stealthchop_threshold: 250
#[tmc2130 stepper_z]
#cs_pin: PJ6
#cs_pin: PJ7
#diag1_pin: PB6
#microsteps: 16
#run_current: 0.800

View File

@@ -0,0 +1,281 @@
# This file contains common pin mappings for the Fysetc S6 board.
# To use this config, the firmware should be compiled for the STM32F446.
# When calling "menuconfig", enable "extra low-level configuration setup"
# and select the "12MHz crystal" as clock reference
# For flashing, write the compiled klipper.bin to memory location 0x08000000
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PE11
dir_pin: PE10
enable_pin: !PE12
step_distance: .0125
endstop_pin: PB14 # PA1 for X-max
position_endstop: 0
position_max: 200
[stepper_y]
step_pin: PD8
dir_pin: PB12
enable_pin: !PD9
step_distance: .0125
endstop_pin: PB13 # PA2 for Y-max
position_endstop: 0
position_max: 200
[stepper_z]
step_pin: PD14
dir_pin: PD13
enable_pin: !PD15
step_distance: .0025
endstop_pin: PA0 # PA3 for Z-max (and servo)
position_endstop: 0
position_max: 400
[extruder]
step_pin: PD5
dir_pin: !PD6
enable_pin: !PD4
step_distance: .01
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
pid_Kp: 22
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 260
#[extruder1]
#step_pin: PE6
#dir_pin: !PC13
#enable_pin: !PE5
#heater_pin: PB4
#sensor_pin: PC1
#[extruder2]
#step_pin: PE2
#dir_pin: !PE4
#enable_pin: !PE3
#heater_pin: PB15
#sensor_pin: PC2
[heater_bed]
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC3
control: watermark
min_temp: 0
max_temp: 130
#fan for printed model FAN0
[fan]
pin: PB0
#fan for hotend FAN1
#[heater_fan my_nozzle_fan]
#pin: PB1
#shutdown_speed: 1
#fan for control board FAN2
#[heater_fan my_control_fan]
#pin: PB2
[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
########################################
# TMC UART configuration
########################################
# For TMC UART
# 1) Remove all jumpers below the stepper drivers.
# 2) Place a jumper on the "PDN-EN" two-pin header.
# For TMC Sensorless homing / DIAG1
# 1) Place a jumper on the two pin header near the endstop.
#[tmc2208 stepper_x]
#uart_pin: PE8
#tx_pin: PE9
#microsteps: 16
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 250
#[tmc2208 stepper_y]
#uart_pin: PE13
#tx_pin: PE14
#microsteps: 16
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 250
#[tmc2208 stepper_z]
#uart_pin: PD12
#tx_pin: PD11
#microsteps: 16
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 100
#[tmc2208 extruder]
#uart_pin: PA15
#tx_pin: PD3
#microsteps: 16
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 250
#[tmc2208 extruder1]
#uart_pin: PC5
#tx_pin: PC4
#microsteps: 16
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 250
#[tmc2208 extruder2]
#uart_pin: PE0
#tx_pin: PE1
#microsteps: 16
#run_current: 0.8
#hold_current: 0.5
#stealthchop_threshold: 250
########################################
# TMC SPI configuration
########################################
# For TMC SPI
# 1) Remove four jumpers below the stepper drivers, connecting the outermost and middle pins of each row.
# For TMC Sensorless homing / DIAG1
# 1) Place a jumper on the two pin header near the endstop.
# SPI pins:
# SCK PA5
# MISO PA6
# MOSI PA7
#[tmc2130 stepper_x]
#spi_bus: spi1
#cs_pin: PE7
#diag1_pin: PB14
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 stepper_y]
#spi_bus: spi1
#cs_pin: PE15
#diag1_pin: PB13
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 stepper_z]
#spi_bus: spi1
#cs_pin: PD10
#diag1_pin: PA0
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 extruder]
#spi_bus: spi1
#cs_pin: PD7
#diag1_pin: PA3
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 extruder1]
#spi_bus: spi1
#cs_pin: PC14
#diag1_pin: PA2
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 extruder2]
#spi_bus: spi1
#cs_pin: PC15
#diag1_pin: PA1
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
########################################
# EXP1 / EXP2 (display) pins
########################################
# These must be turned 180° when compared to the default RAMPS layout.
# The aliases below are 180° turned from what Fysetc considers pin 1,
# but visually correspond to the plugs on the board.
[board_pins]
aliases:
# EXP1 header
EXP1_1=PC9, EXP1_2=PA8,
EXP1_3=PC11, EXP1_4=PD2,
EXP1_5=PC10, EXP1_6=PC12, # Slot in the socket on this side
EXP1_7=PD0, EXP1_8=PD1,
EXP1_9=<GND>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_2=PA5,
EXP2_3=PC6, EXP2_4=PA4,
EXP2_5=PC7, EXP2_6=PA7, # Slot in the socket on this side
EXP2_7=PB10, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=<5V>
# See the sample-lcd.cfg file for definitions of common LCD displays.
########################################
# RGB header
########################################
# See the example-extras.cfg file for more information.
#[output_pin blue]
#pin: PB7
#[output_pin red]
#pin: PB6
#[output_pin green]
#pin: PB5
########################################
# Servo
########################################
# See the example-extras.cfg file for more information.
#[servo my_servo1]
#pin: PA3 # shared with ZMAX
########################################
# AUX-3 / SPI header
########################################
# <CD>, <MOSI>, SS, <RESET>
# <5V> , MISO , SCK, <GND>

View File

@@ -0,0 +1,115 @@
# This file contains common pin mappings for the Makerbot
# Mightyboard. To use this config, the firmware should be compiled for
# the Atmel atmega1280.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PF1
dir_pin: !PF0
enable_pin: !PF2
step_distance: .010387
endstop_pin: ^!PL1
position_endstop: 152
position_max: 153
position_min: -120
homing_speed: 50
[stepper_y]
step_pin: PF5
dir_pin: !PF4
enable_pin: !PF6
step_distance: .010387
endstop_pin: ^!PL3
position_endstop: 77
position_max: 78
position_min: -84
homing_speed: 50
[stepper_z]
step_pin: PK1
dir_pin: !PK0
enable_pin: !PK2
step_distance: .0025
endstop_pin: !PL6
position_endstop: 0
position_max: 230
position_min: 0
[extruder]
step_pin: PA3
dir_pin: !PA2
enable_pin: !PA4
step_distance: .010387
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PH3
sensor_type: MAX6675
sensor_pin: PE3
spi_software_miso_pin: PE5
spi_software_sclk_pin: PE2
spi_software_mosi_pin: PA1 #dummy mosi pin
control: pid
pid_Kp: 26.414
pid_Ki: 1.115
pid_Kd: 156.5054
min_temp: 0
max_temp: 260
[heater_fan extruder_fan]
pin: PH4
[fan]
pin: PL5
[heater_bed]
heater_pin: PL4
sensor_type: ATC Semitec 104GT-2
sensor_pin: PK7
control: pid
pid_Kp: 70.037
pid_Ki: 1.710
pid_Kd: 717.000
min_temp: 0
max_temp: 130
[mcu]
serial: /dev/ttyAMA0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[mcp4018 x_axis_pot]
scl_pin: PJ5
sda_pin: PF3
wiper: 0.50
scale: 0.773
[mcp4018 y_axis_pot]
scl_pin: PJ5
sda_pin: PF7
wiper: 0.50
scale: 0.773
[mcp4018 z_axis_pot]
scl_pin: PJ5
sda_pin: PK3
wiper: 0.50
scale: 0.773
[mcp4018 a_axis_pot]
scl_pin: PJ5
sda_pin: PA5
wiper: 0.50
scale: 0.773
[mcp4018 b_axis_pot]
scl_pin: PJ5
sda_pin: PJ6
wiper: 0.50
scale: 0.773

View File

@@ -0,0 +1,126 @@
# This file contains common pin mappings for MKS Robin E3 boards. To
# use this config, the firmware should be compiled for the STM32F103.
# When running "make menuconfig", enable "extra low-level
# configuration setup", select the 20KiB bootloader, disable "USB for
# communication", and select USART1 for the "Serial Port".
# 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_e3.bin
# Copy the file out/Robin_e3.bin to an SD card and then restart the
# printer with that SD card.
# MKS Robin E3 has onboard TMC2209. This config can also be used for
# MKS Robin E3D if equipped with TMC2209 stepper drivers.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PC0
dir_pin: PB2
enable_pin: !PC13
step_distance: .0125
endstop_pin: ^PA12
position_endstop: 0
position_max: 165
homing_speed: 50
[stepper_y]
step_pin: PC2
dir_pin: PB9
enable_pin: !PB12
step_distance: .0125
endstop_pin: ^PA11
position_endstop: 0
position_max: 165
homing_speed: 50
[stepper_z]
step_pin: PB7
dir_pin: !PB6
enable_pin: !PB8
step_distance: .0025
endstop_pin: ^PC6
position_endstop: 0
position_max: 200
[extruder]
step_pin: PB4
dir_pin: PB3
enable_pin: !PB5
step_distance: 0.010753
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC9
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[tmc2209 stepper_x]
uart_pin: PC7
microsteps: 16
run_current: 0.800
hold_current: 0.500
stealthchop_threshold: 250
[tmc2209 stepper_y]
uart_pin: PD2
microsteps: 16
run_current: 0.800
hold_current: 0.500
stealthchop_threshold: 250
[tmc2209 stepper_z]
uart_pin: PC12
microsteps: 16
run_current: 0.650
hold_current: 0.450
stealthchop_threshold: 30
[tmc2209 extruder]
uart_pin: PC11
microsteps: 16
run_current: 0.800
hold_current: 0.500
stealthchop_threshold: 5
[fan]
pin: PA8
#[heater_bed]
#heater_pin: PC8
#sensor_pin: PA1
#...
#[bltouch]
#sensor_pin: ^PC6
#control_pin: PA3
#...
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 1500
max_z_velocity: 5
max_z_accel: 100
# EXP1 / EXP2 (display) pins
[board_pins]
aliases:
# EXP1 header
EXP1_1=PC3, EXP1_3=PA4, EXP1_5=PA6, EXP1_7=PC4, EXP1_9=<GND>,
EXP1_2=PC1, EXP1_4=PA5, EXP1_6=PA7, EXP1_8=PC5, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB14, EXP2_3=PB11, EXP2_5=PB0, EXP2_7=PC10, EXP2_9=<GND>,
EXP2_2=PB13, EXP2_4=PA15, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=<NC>
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@@ -0,0 +1,92 @@
# This file contains common pin mappings for MKS Robin Nano (v1.2.004)
# boards. To use this config, the firmware should be compiled for the
# STM32F103. When running "make menuconfig", enable "extra low-level
# configuration setup", select the 28KiB bootloader, disable "USB for
# communication", and select USART3 for the "Serial Port".
# 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 the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PE3
dir_pin: !PE2
enable_pin: !PE4
step_distance: .01
endstop_pin: !PA15
position_endstop: 0
position_max: 200
homing_speed: 50
[stepper_y]
step_pin: PE0
dir_pin: !PB9
enable_pin: !PE1
step_distance: .01
endstop_pin: !PA12
position_endstop: 230
position_max: 230
homing_speed: 50
[stepper_z]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
step_distance: .0025
endstop_pin: !PA11
position_endstop: 0.5
position_max: 200
[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
step_distance: .0021
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC3
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC1
control: pid
pid_Kp: 14.669
pid_Ki: 0.572
pid_Kd: 94.068
min_temp: 0
max_temp: 250
#[extruder1]
#step_pin: PA6
#dir_pin: !PA1
#enable_pin: !PA3
#heater_pin: PB0
#sensor_pin: PC2
#...
[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
pid_Kp: 325.10
pid_Ki: 63.35
pid_Kd: 417.10
min_temp: 0
max_temp: 130
[fan]
pin: PB1
[mcu]
serial: /dev/ttyUSB0
restart_method: command
[printer]
kinematics: corexy
max_velocity: 250
max_accel: 4500
max_z_velocity: 25
max_z_accel: 100

View File

@@ -0,0 +1,196 @@
# This file contains common pin mappings for the MKS SGEN_L board. To
# use this config, the firmware should be compiled for the LPC1768.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: P2.2
dir_pin: !P2.3
enable_pin: !P2.1
step_distance: .0125
endstop_pin: ^P1.29 # ^P1.28 for X-max
position_endstop: 0
position_max: 320
homing_speed: 50
[stepper_y]
step_pin: P0.19
dir_pin: !P0.20
enable_pin: !P2.8
step_distance: .0125
endstop_pin: ^P1.27 # ^P1.26 for Y-max
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_z]
step_pin: P0.22
dir_pin: P2.11
enable_pin: !P0.21
step_distance: .0025
endstop_pin: ^P1.25 # ^P1.24 for Z-max
position_endstop: 0.5
position_max: 400
[extruder]
step_pin: P2.13
dir_pin: !P0.11
enable_pin: !P2.12
step_distance: .010526
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: P2.7
sensor_type: EPCOS 100K B57560G104F
sensor_pin: P0.23
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 260
#[extruder1]
#step_pin: P0.1
#dir_pin: P0.0
#enable_pin: !P0.10
#heater_pin: P2.6
#sensor_pin: P0.25
#...
[heater_bed]
heater_pin: P2.5
sensor_type: ATC Semitec 104GT-2
sensor_pin: P0.24
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: P2.4
[mcu]
serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
[printer]
kinematics: cartesian
max_velocity: 200
max_accel: 2000
max_z_velocity: 25
max_z_accel: 100
########################################
# TMC2208 configuration
########################################
#[tmc2208 stepper_x]
#uart_pin: P1.1
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2208 stepper_y]
#uart_pin: P1.8
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2208 stepper_z]
#uart_pin: P1.10
#microsteps: 16
#run_current: 0.650
#hold_current: 0.450
#stealthchop_threshold: 30
#[tmc2208 extruder]
#uart_pin: P1.15
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2208 extruder1]
#uart_pin: P1.17
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
########################################
# TMC2130 configuration
########################################
#[tmc2130 stepper_x]
#cs_pin: P1.1
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P4.28
#spi_software_sclk_pin: P0.4
##diag1_pin: ^!P1.29
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 stepper_y]
#cs_pin: P1.8
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P4.28
#spi_software_sclk_pin: P0.4
##diag1_pin: ^!P1.27
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 250
#[tmc2130 stepper_z]
#cs_pin: P1.10
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P4.28
#spi_software_sclk_pin: P0.4
##diag1_pin: ^!P1.25
#microsteps: 16
#run_current: 0.650
#hold_current: 0.450
#stealthchop_threshold: 30
#[tmc2130 extruder]
#cs_pin: P1.15
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P4.28
#spi_software_sclk_pin: P0.4
##diag1_pin: ^!P1.28
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
#[tmc2130 extruder1]
#cs_pin: P1.17
#spi_software_miso_pin: P0.5
#spi_software_mosi_pin: P4.28
#spi_software_sclk_pin: P0.4
##diag1_pin: ^!P1.26
#microsteps: 16
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 5
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=P1.31, EXP1_3=P0.18, EXP1_5=P0.15, EXP1_7=P1.0, EXP1_9=<GND>,
EXP1_2=P1.30, EXP1_4=P0.16, EXP1_6=P0.17, EXP1_8=P1.22, EXP1_10=<5V>,
# EXP2 header
EXP2_1=P0.8, EXP2_3=P3.25, EXP2_5=P3.26, EXP2_7=P0.27, EXP2_9=<GND>,
EXP2_2=P0.7, EXP2_4=P0.28, EXP2_6=P0.9, EXP2_8=<RST>, EXP2_10=<NC>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp1"
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@@ -2,9 +2,12 @@
# through D). To use this config the firmware should be compiled for
# the AVR at90usb1286.
# Note that the "make flash" command is unlikely to work on the
# Printrboard. See the RepRap Printrboard wiki page for instructions
# on flashing.
# Note that the "make flash" command will not work for Printrboard!
# To flash:
# - Connect the "BOOT" jumper.
# - Press the reset button (on board) to enter into DFU mode.
# - Connect via USB and run:
# avrdude -c flip1 -p usb1286 -U flash:w:out/klipper.elf.hex
# See the example.cfg file for a description of available parameters.

View File

@@ -134,3 +134,31 @@ pin: replicape:power_fan0
# PWM output pin controlling the servo. This parameter must be
# provided.
#...
# Providing an example of a switch filament sensor using the Linux MCU for replicape, instead of the PRU which does not have enough memory:
#[filament_switch_sensor switch_sensor]
#switch_pin: HOST_X2_STOP
# providing board pin aliases for PRU firmware
[board_pins]
aliases:
# step/dir pins
X_DIR=P8_26, X_STEP=P8_17, Y_DIR=P8_19, Y_STEP=P8_12, Z_DIR=P8_14, Z_STEP=P8_13,
E_DIR=P8_15, E_STEP=P9_12, H_DIR=P8_16, H_STEP=P8_11,
# stepper fault pins
FAULT_X=P8_10, FAULT_Y=P8_9, FAULT_Z=P9_24, FAULT_E=P8_18, FAULT_H=P8_8,
# endstops
STOP_X1=P9_25, STOP_X2=P9_11, STOP_Y1=P9_23, STOP_Y2=P9_28, STOP_Z1=P9_13, STOP_Z2=P9_18,
# enable steppers (all on one pin)
STEPPER_ENABLE=P9_41,
# servos
SERVO_0=P9_14, SERVO_1=P9_16,
[board_pins host]
aliases:
# Host aliases for Linux MCU
HOST_X2_STOP=gpio30, HOST_Y2_STOP=gpio113, HOST_Z2_STOP=gpio4
# Thermistors
THERM_E=analog4, THERM_H=analog5, THERM_BED=analog6
# D1W pin
DALLAS=gpio2

View File

@@ -1,7 +1,10 @@
# Support for internal testing with the "simulavr" program. To use
# this config, compile the firmware for an AVR atmega644p, disable the
# AVR watchdog timer, set the MCU frequency to 20000000, and set the
# serial baud rate to 250000.
# This file contains example pin mappings for testing with the
# "simulavr" program. To use this config, compile the firmware for an
# AVR atmega644p, enable "low-level configuration options", and enable
# "simulavr software emulation". Further details are in
# docs/Debugging.md.
# See the example.cfg file for a description of available parameters.
[stepper_x]
# Pins: PA5, PA4, PA1

View File

@@ -0,0 +1,123 @@
# This file contains common pin mappings for Ultimaker UltiMainboard v2
# boards. To use this config, the firmware should be compiled for the
# AVR atmega2560.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: ar25
dir_pin: !ar23
enable_pin: !ar27
step_distance: .0125
endstop_pin: ^!ar22
position_endstop: 0
position_max: 230
homing_speed: 50.0
[stepper_y]
step_pin: ar32
dir_pin: ar33
enable_pin: !ar31
step_distance: .0125
endstop_pin: ^!ar26
position_endstop: 225
position_max: 225
homing_speed: 50.0
[stepper_z]
step_pin: ar35
dir_pin: !ar36
enable_pin: !ar34
step_distance: .005
endstop_pin: ^!ar29
position_endstop: 215
position_max: 215
homing_speed: 20.0
[extruder]
step_pin: ar42
dir_pin: ar43
enable_pin: !ar37
step_distance: .003546
nozzle_diameter: 0.400
filament_diameter: 2.850
heater_pin: ar2
sensor_type: PT100 INA826
sensor_pin: analog8
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 275
# Dual extruder support.
#[extruder1]
#step_pin: ar49
#dir_pin: ar47
#enable_pin: !ar48
#step_distance: .003546
#nozzle_diameter: 0.400
#filament_diameter: 2.850
#heater_pin: ar3
#sensor_type: PT100 INA826
#sensor_pin: analog9
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
#pid_Kd: 114
#min_temp: 0
#max_temp: 275
[heater_bed]
heater_pin: ar4
sensor_type: PT100 INA826
sensor_pin: analog10
control: watermark
min_temp: 0
max_temp: 100
[fan]
pin: ar7
[mcu]
serial: /dev/ttyACM0
pin_map: arduino
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 3000
max_z_velocity: 25
max_z_accel: 30
[output_pin case_light]
pin: ar8
static_value: 1.0
# Motor current settings.
[output_pin stepper_xy_current]
pin: ar44
pwm: True
scale: 1.5
# Max power setting.
cycle_time: .000030
hardware_pwm: True
static_value: 1.200
# Power adjustment setting.
[output_pin stepper_z_current]
pin: ar45
pwm: True
scale: 1.5
cycle_time: .000030
hardware_pwm: True
static_value: 1.200
[output_pin stepper_e_current]
pin: ar46
pwm: True
scale: 1.5
cycle_time: .000030
hardware_pwm: True
static_value: 1.250

View File

@@ -129,8 +129,8 @@ sample_retract_dist: 3.0
[bed_mesh]
speed: 100
horizontal_move_z: 5
min_point: 30,30
max_point: 150,150
mesh_min: 69,41
mesh_max: 189,161
probe_count: 3,3
[homing_override]

View File

@@ -0,0 +1,87 @@
# This file contains common pin mappings for the Alfawise U30 printer.
# To use this config, the firmware should be compiled for the
# STM32F103. When running "make menuconfig", enable "extra low-level
# configuration setup", select the 64KiB bootloader, disable "USB for
# communication", and set "GPIO pins to set at micro-controller
# startup" to "!PC4,!PD12".
# The "make flash" command does not work on the Alfawise U30. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "project.bin" on an SD card and then restart the Alfawise
# with that SD card.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PB5
step_distance: .0125
endstop_pin: !PC1
position_endstop: 0
position_max: 230
homing_speed: 50
[stepper_y]
step_pin: PB7
dir_pin: PB6
enable_pin: !PB8
step_distance: .0125
endstop_pin: !PC15
position_endstop: 0
position_max: 222
homing_speed: 50
[stepper_z]
step_pin: PE0
dir_pin: !PB9
enable_pin: !PE1
step_distance: .0025
endstop_pin: !PE6
position_endstop: 0.0
position_max: 250
[extruder]
step_pin: PE3
dir_pin: PE2
enable_pin: !PE4
step_distance: 0.010526
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PD3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PA8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA1
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PA15
[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
[static_digital_output reset_display]
pins: !PC4, !PD12

View File

@@ -0,0 +1,94 @@
# This file contains common pin mappings for Anet A4 printer from
# 2018. To use this config, the firmware should be compiled for the
# AVR atmega1284p.
# Note that the "make flash" command does not work with Anet boards -
# the boards are typically flashed with this command:
# avrdude -p atmega1284p -c arduino -b 57600 -P /dev/ttyUSB0 -U out/klipper.elf.hex
# See the example.cfg file for a description of available parameters.
[stepper_a]
step_pin: PD7
dir_pin: !PC5
enable_pin: !PD6
step_distance: .01
endstop_pin: ^!PC2
position_endstop: 215
arm_length: 215
homing_speed: 50
[stepper_b]
step_pin: PC6
dir_pin: !PC7
enable_pin: !PD6
step_distance: .01
endstop_pin: ^!PC3
[stepper_c]
step_pin: PB3
dir_pin: !PB2
enable_pin: !PA5
step_distance: .01
endstop_pin: ^!PC4
homing_speed: 20
[extruder]
step_pin: PB1
dir_pin: PB0
enable_pin: !PD6
step_distance: .01045
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PD5
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA7
control: pid
pid_Kp: 30.48
pid_Ki: 2.71
pid_Kd: 85.52
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PD4
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA6
control: watermark
min_temp: 0
max_temp: 130
[fan]
pin: PB4
[mcu]
serial: /dev/ttyUSB0
[printer]
kinematics: delta
max_velocity: 300
max_accel: 1000
max_z_velocity: 20
delta_radius: 113
[delta_calibrate]
radius: 70
[display]
lcd_type: hd44780
rs_pin: PA3
e_pin: PA2
d4_pin: PD2
d5_pin: PD3
d6_pin: PC0
d7_pin: PC1
up_pin: PA1
analog_range_up_pin: 9000, 13000
down_pin: PA1
analog_range_down_pin: 800, 1300
click_pin: PA1
analog_range_click_pin: 2000, 2500
back_pin: PA1
analog_range_back_pin: 4500, 5000
#kill_pin: PA1
#analog_range_kill_pin: 400, 600

View File

@@ -0,0 +1,90 @@
# This file contains common pin mappings for Anet E16 printer from
# 2019. To use this config, the firmware should be compiled for the
# AVR atmega1284p.
# Note that the "make flash" command does not work with Anet boards -
# the boards are typically flashed with this command:
# avrdude -p atmega1284p -c arduino -b 57600 -P /dev/ttyUSB0 -U out/klipper.elf.hex
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PD7
dir_pin: PC5
enable_pin: !PD6
step_distance: .0125
endstop_pin: ^!PC2
position_endstop: -3
position_max: 300
position_min: -3
homing_speed: 50
[stepper_y]
step_pin: PC6
dir_pin: !PC7
enable_pin: !PD6
step_distance: .0125
endstop_pin: ^!PC3
position_endstop: -22
position_min: -22
position_max: 300
homing_speed: 50
[stepper_z]
step_pin: PB3
dir_pin: !PB2
enable_pin: !PA5
step_distance: .0025
endstop_pin: ^!PC4
position_endstop: 0.5
position_max: 400
homing_speed: 20
[extruder]
step_pin: PB1
dir_pin: !PB0
enable_pin: !PD6
step_distance: 0.01
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PD5
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA7
control: pid
pid_Kp: 27.0
pid_Ki: 1.3
pid_Kd: 136.09
min_temp: 10
max_temp: 250
[heater_bed]
heater_pin: PD4
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA6
control: pid
pid_Kp: 72.8
pid_Ki: 1.2
pid_Kd: 1100
min_temp: 10
max_temp: 130
[fan]
pin: PB4
[mcu]
serial: /dev/ttyUSB0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 1000
max_z_velocity: 20
max_z_accel: 1000
[display]
lcd_type: st7920
cs_pin: PA4
sclk_pin: PA1
sid_pin:PA3
encoder_pins: ^PD2, ^PD3
click_pin: ^!PC0

View File

@@ -4,8 +4,8 @@
# The Anycubic delta printers use the TriGorilla board which is an
# AVR ATmega2560 Arduino + RAMPS compatible board.
# To use this config, the firmware should be compiled for the AVR atmega2560.
# See the example.cfg file for a description of available parameters.
# See the example.cfg, example-delta.cfg and example-extras.cfg files
# for a description of available parameters.
[stepper_a]
step_pin: ar54
@@ -19,7 +19,7 @@ homing_speed: 60
# and meassure the distance from nozzle to bed.
# This value then needs to be added.
position_endstop: 295.6
arm_length: 271.50
arm_length: 269.0
[stepper_b]
step_pin: ar60
@@ -39,7 +39,7 @@ endstop_pin: ^ar19
step_pin: ar26
dir_pin: !ar28
enable_pin: !ar24
step_distance: 0.010989
step_distance: 0.0104166
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
@@ -53,13 +53,16 @@ min_extrude_temp: 150
min_temp: 0
max_temp: 275
#[heater_bed]
#heater_pin: ar8
#sensor_type: EPCOS 100K B57560G104F
#sensor_pin: analog14
#control: watermark
#min_temp: 0
#max_temp: 130
[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control: pid
pid_kp: 73.517
pid_ki: 1.132
pid_kd: 1193.728
min_temp: 0
max_temp: 130
[fan]
pin: ar9
@@ -68,6 +71,12 @@ kick_start_time: 0.200
[heater_fan extruder_cooler_fan]
pin: ar44
# if you want to use your probe for DELTA_CALIBRATE you will need that
#[probe]
#pin: ^ar18
#z_offset: 15.9
#samples: 3
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
@@ -77,23 +86,17 @@ kinematics: delta
max_velocity: 500
max_accel: 3000
max_z_velocity: 200
delta_radius: 115
delta_radius: 134.4
# if you want to DELTA_CALIBRATE you may need that
#minimum_z_position: -5
[idle_timeout]
timeout: 360
#[delta_calibrate]
#radius: 115
#manual_probe:
# If true, then DELTA_CALIBRATE will perform manual probing. If
# false, then a PROBE command will be run at each probe
# point. Manual probing is accomplished by manually jogging the Z
# position of the print head at each probe point and then issuing a
# NEXT extended g-code command to record the position at that
# point. The default is false if a [probe] config section is present
# and true otherwise.
[delta_calibrate]
radius: 115
# If the original probe is used
#horizontal_move_z: 20
# "RepRapDiscount 2004 Smart Controller" type displays
[display]

View File

@@ -0,0 +1,105 @@
# This file contains pin mappings for the Creality CR-20 Pro. To use
# this config, the firmware should be compiled for the AVR atmega2560.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
step_distance: .0125
endstop_pin: ^PE5
position_endstop: 0
position_max: 235
homing_speed: 100
[stepper_y]
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
step_distance: .0125
endstop_pin: ^PJ1
position_endstop: 0
position_max: 235
homing_speed: 100
[stepper_z]
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
step_distance: .0025
endstop_pin: probe:z_virtual_endstop
position_endstop: 0
position_max: 250
homing_speed: 10.0
position_min: -1.0
[extruder]
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
step_distance: .010526
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
[bltouch]
sensor_pin: ^PD3
control_pin: PB5
z_offset: 3.60
x_offset: 46
y_offset: 9
speed: 3.0
samples: 1
[safe_z_home]
home_xy_position: 117,117
speed: 50.0
z_hop: 10.0
z_hop_speed: 100
[bed_mesh]
speed: 100
horizontal_move_z: 8
mesh_min: 106,39
mesh_max: 281,229
probe_count: 3,3
[heater_bed]
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK6
control: pid
pid_Kp: 690.34
pid_Ki: 111.47
pid_Kd: 1068.83
min_temp: 0
max_temp: 130
[fan]
pin: PH6
[mcu]
serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK06SLT2-if00-port0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[display]
lcd_type: uc1701
cs_pin: PA3
a0_pin: PA5
encoder_pins: ^PC4, ^PC6
click_pin: ^!PC2

View File

@@ -91,3 +91,15 @@ sclk_pin: PA1
sid_pin: PC1
encoder_pins: ^PD2, ^PD3
click_pin: ^!PC0
# The print bed can move so far to the front, that the nozzle can reach the
# plastic cover of the print bed heater cable (only when the bed is moved by
# hand). By homing the Y axis before the X axis, it is ensured the nozzle will
# not melt through the plastic part.
# BEWARE: You will lose the ability to home axes individually. The printer will
# always home all axes for every G28 command.
#[homing_override]
#gcode:
# G28 Y0
# G28 X0
# G28 Z0

View File

@@ -0,0 +1,91 @@
# This file contains pin mappings for the stock 2020 Creality Ender 3
# V2. To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and with "Use USB for
# communication" disabled.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select the
# USART3 serial port, which is broken out on the 10 pin IDC cable used
# for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
step_distance: .0125
endstop_pin: ^PA5
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
step_distance: .0125
endstop_pin: ^PA6
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
step_distance: .0025
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
step_distance: 0.010752
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

@@ -0,0 +1,104 @@
# This file contains pin mappings for the stock 2020 Creality Ender 3
# Pro with the 32-bit Creality 4.2.2 board. To use this config, during
# "make menuconfig" select the STM32F103 with a "28KiB bootloader" and
# with "Use USB for communication" disabled.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select the
# USART3 serial port, which is broken out on the 10 pin IDC cable used
# for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
step_distance: .0125
endstop_pin: ^PA5
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
step_distance: .0125
endstop_pin: ^PA6
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
step_distance: .0025
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
step_distance: 0.010752
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
# Pin mappings for BL_T port
#[bltouch]
#sensor_pin: ^PB1
#control_pin: PB0
[display]
lcd_type: st7920
cs_pin: PB12
sclk_pin: PB13
sid_pin: PB15
encoder_pins: ^PB14, ^PB10
click_pin: ^!PB2

View File

@@ -13,21 +13,21 @@
[stepper_x]
step_pin: PD7
dir_pin: PC5
dir_pin: !PC5
enable_pin: !PD6
step_distance: .0125
step_distance: .012500
endstop_pin: ^PC2
position_endstop: 0
position_endstop: 235
position_max: 235
homing_speed: 30
[stepper_y]
step_pin: PC6
dir_pin: PC7
dir_pin: !PC7
enable_pin: !PD6
step_distance: .0125
step_distance: .012500
endstop_pin: ^PC3
position_endstop: 0
position_endstop: 235
position_max: 235
homing_speed: 30
@@ -35,7 +35,7 @@ homing_speed: 30
step_pin: PB3
dir_pin: !PB2
enable_pin: !PA5
step_distance: .0025
step_distance: .002500 # Use .001250 for Ender5 versions after late 2019
endstop_pin: ^PC4
position_endstop: 0.0
position_max: 300

View File

@@ -0,0 +1,99 @@
# This file contains pin mappings for the Creality Ender 5 Plus.
# Ender 5 Plus stock uses a Creality v2.2 board, similar to CR-20 Pro.
# To use this config, the firmware should be compiled for the AVR
# atmega2560.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
step_distance: .0125
endstop_pin: ^PE5
position_endstop: 350
position_max: 350
homing_speed: 100
[stepper_y]
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
step_distance: .0125
endstop_pin: ^PJ1
position_endstop: 350
position_max: 350
homing_speed: 100
[stepper_z]
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
step_distance: .001266
endstop_pin: probe:z_virtual_endstop
position_max: 400
position_min: 0
homing_speed: 10.0
[extruder]
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
step_distance: .010526
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 260
[safe_z_home]
home_xy_position: 180, 180
speed: 100
z_hop: 10
z_hop_speed: 5
[bltouch]
sensor_pin: ^PD3
control_pin: PB5
x_offset: -45
y_offset: 0
z_offset: 0
speed: 3.0
pin_up_touch_mode_reports_triggered: False
[bed_mesh]
speed: 100
horizontal_move_z: 8
mesh_min: 50, 50
mesh_max: 300,300
probe_count: 3,3
[heater_bed]
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK6
control: pid
pid_Kp: 690.34
pid_Ki: 111.47
pid_Kd: 1068.83
min_temp: 0
max_temp: 130
[fan]
pin: PH6
[mcu]
serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK06VNAB-if00-port0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 2500
max_z_velocity: 5
max_z_accel: 100

View File

@@ -0,0 +1,212 @@
#This file contains pin mappings for the Lulzbot Mini 1 using RAMBo Mini and SingleExtruder
#To use this config, the firmware should be compiled for the AVR atmega2560.
# See the example.cfg file for a description of available parameters.
#-------------------------------------------------------------------------------------------------
# LULZBOT Mini 1 SingleExtruder (RAMBoMini)
# defines are copied from Marlin pins_MINIRAMBO.h
# pin conversion was found in fastio_1280.h
#-------------------------------------------------------------------------------------------------
[stepper_x]
#define X_STEP_PIN 37
step_pin: PC0
#define X_DIR_PIN 48
dir_pin: PL1
#define X_ENABLE_PIN 29
enable_pin: !PA7
# 1/100
step_distance: .010000
#define X_MIN_PIN 12
endstop_pin: ^!PB6
position_endstop: -3
position_min: -3
position_max: 159
homing_speed: 50
homing_retract_dist: 2.0
second_homing_speed: 5
[stepper_y]
#define Y_STEP_PIN 36
step_pin: PC1
#define Y_DIR_PIN 49
dir_pin: !PL0
#define Y_ENABLE_PIN 28
enable_pin: !PA6
# 1/100
step_distance: .010000
#define Y_MIN_PIN 11
endstop_pin: ^!PB5
position_endstop: -7
position_min: -7
position_max: 173
homing_speed: 50
homing_retract_dist: 2.0
second_homing_speed: 5
[stepper_z]
#define Z_STEP_PIN 35
step_pin: PC2
#define Z_DIR_PIN 47
dir_pin: PL2
#define Z_ENABLE_PIN 27
enable_pin: !PA5
# 1/1600
step_distance: 0.000625
#define Z_MAX_PIN 23
endstop_pin: ^!PA1
# I have replaced the original nozzle with
# a hardened steel one that make the extruder
# 1-1.5mm longer, so this may be a little too low
position_endstop: 161.5
position_max: 161.5
position_min: -2.0
homing_speed: 7
homing_retract_dist: 2.0
second_homing_speed: 2
[extruder]
#define E0_STEP_PIN 34
step_pin: PC3
#define E0_DIR_PIN 43
dir_pin: !PL6
#define E0_ENABLE_PIN 26
enable_pin: !PA4
# 1/833
step_distance: 0.001200480192076831
nozzle_diameter: 0.400
filament_diameter: 2.850
#define HEATER_0_PIN 3
heater_pin: PE5
#The Extruder uses 100K thermistor - ATC Semitec 104GT-2 (#5) and PID control
sensor_type: ATC Semitec 104GT-2
# I can't explain this from Marlin
sensor_pin: PF0
control: pid
pid_Kp: 28.79
pid_Ki: 1.91
pid_Kd: 108.51
min_temp: 0
max_temp: 280
min_extrude_temp: 160
max_extrude_only_velocity: 500
max_extrude_only_accel: 2000
[heater_bed]
#define HEATER_BED_PIN 4
heater_pin: PG5
# The Heater Bed uses Honeywell 100K 135-104LAG-J01 temp sensor (#7) and PID control
sensor_type: Honeywell 100K 135-104LAG-J01
# I can't explain this from Marlin
sensor_pin: PF2
control: pid
pid_Kp: 294.0
pid_Ki: 65.0
pid_Kd: 382.0
min_temp: 0
max_temp: 130
[fan]
#define FAN_PIN 8
pin: PH5
[heater_fan nozzle_cooling_fan]
#define FAN1_PIN 6
pin: PH3
[output_pin stepper_xy_current]
#define MOTOR_CURRENT_PWM_XY_PIN 46
pin: PL3
pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.300
[output_pin stepper_z_current]
pin: PL4
pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.630
[output_pin stepper_e_current]
pin: PL5
pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.250
[static_digital_output stepper_config]
# Microstepping pins
#define X_MS1_PIN 40
#define X_MS2_PIN 41
#define Y_MS1_PIN 69
#define Y_MS2_PIN 39
#define Z_MS1_PIN 68
#define Z_MS2_PIN 67
#define E0_MS1_PIN 65
#define E0_MS2_PIN 66
pins:
PG1, PG0,
PK7, PG2,
PK6, PK5,
PK3, PK4
[static_digital_output yellow_led]
#define LED_PIN 13
pins: !PB7
[mcu]
serial: /dev/ttyACM0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 2000
max_z_velocity: 7
max_z_accel: 500
[homing_override]
gcode:
G91
G28 Z
G0 Z-5
G28 X Y
G0 X3 Y7
G90
[probe]
#define Z_MIN_PROBE_PIN 10
pin: ^!PB4
# z_offset equals washer thickness ~= 1.377
z_offset: 1.377
speed: 5.0
samples: 2
sample_retract_dist: 1.0
samples_result: average
samples_tolerance: 0.200
samples_tolerance_retries: 2
[bed_tilt]
# Enable bed tilt measurments using the probe we defined above
# Probe points using X0 Y0 offsets @ 0.01mm/step
points: -2,-6
156,-6
156,158
-2,158
speed: 75
horizontal_move_z: 2
[firmware_retraction]
retract_length: 2
retract_speed: 200
unretract_extra_length: 0
unretract_speed: 200
[gcode_macro G29]
# Preform the ABL by running G29 in the start GCODE script
gcode:
BED_TILT_CALIBRATE

View File

@@ -2,6 +2,8 @@
# use this config, the firmware should be compiled for the AVR
# atmega2560.
# For a TAZ6 with DualV3 extruder, see printer-lulzbot-taz6-dual-v3-2017.cfg.
# See the example.cfg file for a description of available parameters.
[stepper_x]
@@ -37,6 +39,7 @@ position_min: -1.5
position_max: 270
homing_speed: 1
# settings for "Tilapia" Hexagon extruder (TAZ6 standard)
[extruder]
step_pin: PC3
dir_pin: !PL6
@@ -55,19 +58,33 @@ min_temp: 0
max_temp: 300
min_extrude_temp: 140
#[extruder1]
#step_pin: PC4
#dir_pin: PL7
#enable_pin: !PA3
#heater_pin: PH4
#sensor_pin: PF1
#...
# settings for "Angelfish" Aerostruder (E3D Titan Aero V6)
#[extruder]
#step_pin: PC3
#dir_pin: !PL6
#enable_pin: !PA4
#step_distance: 0.002381
#nozzle_diameter: 0.400
#filament_diameter: 2.920
#heater_pin: PH6
#sensor_type: ATC Semitec 104GT-2
#sensor_pin: PF0
#control: pid
#pid_Kp: 21.00
#pid_Ki: 1.78
#pid_Kd: 61.93
#min_temp: 0
#max_temp: 300
#min_extrude_temp: 140
[heater_bed]
heater_pin: PE5
sensor_type: EPCOS 100K B57560G104F
sensor_type: Honeywell 100K 135-104LAG-J01
sensor_pin: PF2
control: watermark
control: pid
pid_Kp: 162.0
pid_Ki: 17.0
pid_Kd: 378.0
min_temp: 0
max_temp: 130
@@ -114,3 +131,33 @@ lcd_type: st7920
cs_pin: PG4
sclk_pin: PJ2
sid_pin: PG3
encoder_pins: ^PJ6,^PJ5
click_pin: ^!PE2
menu_timeout: 5
[probe]
pin: ^!PA0
z_offset:1.377
speed: 0.5
lift_speed: 1.5
samples: 2
sample_retract_dist: 1.0
samples_tolerance: 0.075
[bed_tilt]
points: -5,-3
290,-3
290,292
-5,292
speed: 75
horizontal_move_z: 5
[safe_z_home]
home_xy_position: -19,265
speed: 50.0
z_hop: 10.0
# Perform ABL by running G29 in START gcode
[gcode_macro G29]
gcode:
BED_TILT_CALIBRATE

View File

@@ -0,0 +1,392 @@
#This file contains pin mappings for the Lulzbot TAZ 6 circa 2017 using RAMBo and Dual v3 toolhead.
#To use this config, the firmware should be compiled for the AVR atmega2560.
# See the example.cfg file for a description of available parameters.
#-------------------------------------------------------------------------------------------------
#-------------------------------------------------------------------------------------------------
#-------------------------------------------------------------------------------------------------
# LULZBOT TAZ6 (RAMBo) with Dual v3 Extruder Master Config
#-------------------------------------------------------------------------------------------------
#-------------------------------------------------------------------------------------------------
#-------------------------------------------------------------------------------------------------
#Notes:
# - This config includes START and END gcode blocks that already factor in the Marlin X and Y
# offsets for the Dual v3 toolhead using the true 0.01mm/step (100step/mm) linear movement value
# instead of the 0.00995mm/step (100.5step/mm) value that is stock on the TAZ6 to compensate for
# material shrinkage. Material shrinkage compensation should be done in the slicer based on the
# material being used.
#
# - The START and END gcode macros use parameters that should be set using the supplied START and
# END gcode blocks. These blocks have gcode variables that have been tested with Cura
# Ultimaker Edition (UE) v4.3 and opareate based on how many extruders are active.
#
# - Pressure Advance feature has been disabled and should be tuned if enabled.
#
# - All PID values pulled from Lulzbot Marlin 1.1.9.34, however, the PID calibration procedure
# should be done to tune these values to your specific hardware.
#
#-------------------------------------------------------------------------------------------------
# LULZBOT TAZ6 Dual v3 Required Parameters
#-------------------------------------------------------------------------------------------------
[stepper_x]
step_pin: PC0
dir_pin: PL1
enable_pin: !PA7
step_distance: .010000
endstop_pin: ^PB6
position_endstop: -20
position_min: -20
position_max: 295
homing_speed: 50
second_homing_speed: 5
[stepper_y]
step_pin: PC1
dir_pin: !PL0
enable_pin: !PA6
step_distance: .010000
endstop_pin: ^PA1
position_endstop: 306
position_min: -17
position_max: 306
homing_speed: 50
second_homing_speed: 5
[stepper_z]
step_pin: PC2
dir_pin: PL2
enable_pin: !PA5
step_distance: 0.000625
endstop_pin: ^!PB4
position_endstop: 5.0
position_min: -5.8
position_max: 270
homing_speed: 10
second_homing_speed: 1
[extruder]
# This is Extruder0 on the dual v3 (all -1 index in schematic)
# The Dual v3 uses the same temp sensor as the single extruder
# The Dual v3 uses 2x SOMEstruders with modified PID values
step_pin: PC4
dir_pin: !PL7
enable_pin: !PA3
step_distance: 0.001315789473
nozzle_diameter: 0.500
filament_diameter: 2.850
heater_pin: PH4
sensor_type: ATC Semitec 104GT-2
sensor_pin: PF1
control: pid
pid_Kp: 47.45
pid_Ki: 4.83
pid_Kd: 116.63
min_temp: 0
max_temp: 300
min_extrude_temp: 120
[extruder1]
# This is Extruder1 on the dual v3 (all -0 index in schematic)
# The Dual v3 uses the same temp sensor as the single extruder
# The Dual v3 uses 2x SOMEstruders with modified PID values
step_pin: PC3
dir_pin: PL6
enable_pin: !PA4
step_distance: 0.001315789473
nozzle_diameter: 0.500
filament_diameter: 2.850
heater_pin: PH6
sensor_type: ATC Semitec 104GT-2
sensor_pin: PF0
control: pid
pid_Kp: 47.45
pid_Ki: 4.83
pid_Kd: 116.63
min_temp: 0
max_temp: 300
min_extrude_temp: 120
[heater_bed]
#The Heater Bed uses Honeywell 100K 135-104LAG-J01 temp sensor and PID control
heater_pin: PE5
sensor_type: Honeywell 100K 135-104LAG-J01
sensor_pin: PF2
control: pid
pid_Kp: 162.0
pid_Ki: 17.0
pid_Kd: 378.0
min_temp: 0
max_temp: 130
[fan]
#On Dual v3 heat break fan is connected to PH3 (part cooling fan on single extruder)
pin: PH3
[heater_fan nozzle_cooling_fan]
#On Dual v3 part fans are connected to PH5 (heat break fan on single extruder)
pin: PH5
[mcu]
serial: /dev/ttyACM0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 2
max_z_accel: 10
[ad5206 stepper_digipot]
enable_pin: PD7
scale: 2.08
# Channel 1 is E0, 2 is E1, 3 is unused, 4 is Z, 5 is X, 6 is Y
channel_1: 1.34
channel_2: 1.34
channel_4: 1.1
channel_5: 1.1
channel_6: 1.1
[static_digital_output stepper_config]
# Enable 16 micro-steps on steppers X, Y, Z, E0, E1
pins:
PG1, PG0,
PK7, PG2,
PK6, PK5,
PK3, PK4,
PK1, PK2
[static_digital_output yellow_led]
pins: !PB7
[display]
lcd_type: st7920
cs_pin: PG4
sclk_pin: PJ2
sid_pin: PG3
encoder_pins: ^PJ6,^PJ5
click_pin: ^!PE2
menu_timeout:5
[probe]
#Define the nozzle probe feature
pin: ^!PA0
#---> z_offset may vary from machine to machine. Stock is 1.377. <---
z_offset:1.350
speed: 1.0
samples: 2
samples_tolerance: 0.100
[bed_tilt]
#Enable bed tilt measurments using the probe we defined above
#Probe points using X0 Y0 offsets @ 0.01mm/step
points: -3,-6
282,-6
282,300
-3,300
speed: 75
horizontal_move_z: 5
[safe_z_home]
#Needed to lift the Z to clear homing switch on bed
# ---> WARNING! - Z_MAX limit switch not monitored in Klipper! <---
# ---> This could potentially crash the toolhead if already at the top of Z travel! <---
home_xy_position: -19,265
speed: 50.0
z_hop: 15.0
move_to_previous: False
[gcode_macro G29]
#Preform the ABL by running G29 in the START gcode script
gcode:
BED_TILT_CALIBRATE
#-------------------------------------------------------------------------------------------------
# Macros to Support TAZ6 START and END Blocks
#-------------------------------------------------------------------------------------------------
#Cura UE 4.3 (and perhaps older) has extruder enable controls that define the number of active
#extruders. These blocks use that information to control only the active extruders.
#NOTE: T0 is the default extruder, T1 is optional.
#START block for use with dual or single extrusion prints
[gcode_macro START_PRINT]
default_parameter_EXTRUDERS_ENABLED_COUNT: 1
default_parameter_MATERIAL_STANDBY_TEMPERATURE_0: 175
default_parameter_MATERIAL_STANDBY_TEMPERATURE_1: 175
default_parameter_MATERIAL_BED_TEMPERATURE_LAYER_0: 65
default_parameter_MATERIAL_PRINT_TEMPERATURE_LAYER_0_0: 210
default_parameter_MATERIAL_PRINT_TEMPERATURE_LAYER_0_1: 210
#configure the params below to tune the stage desired temperatures based on the standby temps
default_parameter_MATERIAL_SOFTEN_TEMP_OFFSET: 35
default_parameter_MATERIAL_WIPE_TEMP_OFFSET: 35
default_parameter_MATERIAL_PROBE_TEMP_OFFSET: 35
gcode:
;This profile is designed specifically for LulzBot TAZ6 3D Printer with the Yellowfin Dual running Klipper
M73 P0 ; clear GLCD progress bar
M107 ; disable fans
G90 ; absolute positioning
M104 S{MATERIAL_STANDBY_TEMPERATURE_0|int - MATERIAL_SOFTEN_TEMP_OFFSET|int} T0 ; soften filament
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
M104 S{MATERIAL_STANDBY_TEMPERATURE_1|int - MATERIAL_SOFTEN_TEMP_OFFSET|int} T1 ; soften filament
{% endif %}
M140 S{MATERIAL_BED_TEMPERATURE_LAYER_0} ; get bed heating up
G28 X Y ; home X and Y
G1 X-17 F3000 ; clear X endstop
M117 Heating... ; LCD status message
M106 S64 ; Fan On lightly
M109 S{MATERIAL_STANDBY_TEMPERATURE_0|int - MATERIAL_SOFTEN_TEMP_OFFSET|int} T0 ; wait for temp
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
M109 S{MATERIAL_STANDBY_TEMPERATURE_1|int - MATERIAL_SOFTEN_TEMP_OFFSET|int} T1 ; wait for temp
{% endif %}
M107 ; Fan Off
T0 ; return to first extruder
G28 Z ; home Z
T0 ; select this extruder first
M82 ; set extruder to absolute mode
G92 E0 ; set extruder to zero
G1 E-15 F100 ; suck up 15mm of filament
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
T1 ; switch extruders
M82 ; set extruder to absolute mode
G92 E0 ; set extruder to zero
G1 E-15 F100 ; suck up 15mm of filament
{% endif %}
M104 S{MATERIAL_STANDBY_TEMPERATURE_0|int - MATERIAL_WIPE_TEMP_OFFSET|int} T0 ; set to wipe temp
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
M104 S{MATERIAL_STANDBY_TEMPERATURE_1|int - MATERIAL_WIPE_TEMP_OFFSET|int} T1 ; set to wipe temp
{% endif %}
M106 ; Turn on fans to speed cooling
G1 X-18 Y107 F3000 ; move above wiper pad
M117 Cooling... ; LCD status message
M109 S{MATERIAL_STANDBY_TEMPERATURE_0|int - MATERIAL_WIPE_TEMP_OFFSET|int} T0 ; wait for T0 to reach temp
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
M109 S{MATERIAL_STANDBY_TEMPERATURE_1|int - MATERIAL_WIPE_TEMP_OFFSET|int} T1 ; wait for T1 to reach temp
{% endif %}
M107 ; Turn off fan
M117 Wiping... ; LCD status message
T0 ; switch extruders
G1 Z1 ; push nozzle into wiper
G1 X -18 Y107 F1000 ; slow wipe
G1 X -18 Y102 F1000 ; slow wipe
G1 X -18 Y97 F1000 ; slow wipe
G1 X -17 Y102 F1000 ; slow wipe
G1 X -18 Y92 F1000 ; slow wipe
G1 X -17 Y107 F1000 ; slow wipe
G1 X -18 Y87 F2000 ; fast wipe
G1 X -17 Y77 F2000 ; fast wipe
G1 X -18 Y82 F2000 ; fast wipe
G1 X -17 Y72 F2000 ; fast wipe
G1 X -18 Y67 F2000 ; fast wipe
G1 X -17 Y62 F2000 ; fast wipe
G1 X -18 Y52 F2000 ; fast wipe
G1 X -17 Y57 F2000 ; fast wipe
G1 X -18 Y47 F2000 ; fast wipe
G1 X -17 Y52 F2000 ; fast wipe
G1 X -18 Y82 F2000 ; fast wipe
G1 X -17 Y42 Z2 F2000 ; fast wipe
G1 X -18 Y47 F2000 ; fast wipe
G1 X -17 Y37 F2000 ; fast wipe
G1 X -18 Y42 F2000 ; fast wipe
G1 X -17 Y37 Z1.5 F1000 ; slow wipe
G1 X -18 Y35 F1000 ; slow wipe
G1 X -17 Z5 ; raise extruder
M109 S{MATERIAL_STANDBY_TEMPERATURE_0|int - MATERIAL_PROBE_TEMP_OFFSET|int} ; heat to probe temp
M117 Leveling Bed... ; LCD status message
M204 S100 ; set accel for probing
G29 ; probe sequence (for auto-leveling)
G1 Z10 ; clear Z home switch
M204 S500 ; set accel back to normal
M117 Heating... ; LCD status message
M106 S64 ; Fan On lightly
M104 S{MATERIAL_PRINT_TEMPERATURE_LAYER_0_0} T0 ; set extruder temp
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
M104 S{MATERIAL_PRINT_TEMPERATURE_LAYER_0_1} T1; set extruder temp
{% endif %}
G1 X100 Y-16 Z0.5 F3000 ; move to open space
M400 ; clear buffer
M109 S{MATERIAL_PRINT_TEMPERATURE_LAYER_0_0} T0 ; set extruder temp and wait
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
M109 S{MATERIAL_PRINT_TEMPERATURE_LAYER_0_1} T1; set extruder temp and wait
{% endif %}
M107 ; Fan Off
M117 Purging... ; LCD status message
T0 ; select this extruder first
G92 E-15 ; set extruder negative amount to purge
G1 E0 F100 ; undo retraction
G92 E-15 ; set extruder negative amount to purge
G1 E0 F100 ; purge 15mm of filament
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
T1 ; switch to second extruder
G92 E-15 ; set extruder negative amount to purge
G1 E0 F100 ; undo retraction
G92 E-15 ; set extruder negative amount to purge
G1 E0 F50 ; purge 15mm of filament
G92 E0 ; zero out T1
G1 E-15 F250 ; retract 15mm from T1 - extrude a 500mm skirt/brim to undo in initial layer
M400 ; clear buffer
M106 ; Max Fan Speed
M109 S{MATERIAL_STANDBY_TEMPERATURE_1} T1 ; wait for T1 to cool to prevent ooze
M107 ; Fan Off
{% endif %}
G1 Z0.5 ; clear bed (barely)
G1 X100 Y0 F5000 ; move above bed to shear off filament
T0 ; switch to first extruder
M190 S{MATERIAL_BED_TEMPERATURE_LAYER_0}; get bed temping up during first layer
G1 Z2 E0 F75
M400 ; clear buffer
M117 TAZ Printing... ; LCD status message
#END block for use with dual or single extrusion prints
[gcode_macro END_PRINT]
default_parameter_EXTRUDERS_ENABLED_COUNT: 1
default_parameter_MATERIAL_PART_REMOVAL_TEMPERATURE: 45
default_parameter_MATERIAL_KEEP_PART_REMOVAL_TEMPERATURE_T: 0
gcode:
M400
M104 S0 T0 ; T0 hotend off
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
M104 S0 T1 ; T1 hotend off
{% endif %}
M107 ; fans off
G91 ; relative positioning
T0
G1 E-1 F300 ; retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z20 E-5 X-20 Y-20 F3000 ; move Z up a bit and retract filament even more
G1 E6 ; re-prime extruder 1
{% if EXTRUDERS_ENABLED_COUNT|int == 2 %}
T1
G1 E-5 F300 ; retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 E5 ; re-prime extruder 2
T0
{% endif %}
M117 Cooling ... ; progress indicator message
G90 ; absolute positioning
G1 Y0 F3000 ; move to cooling position
M190 S{MATERIAL_PART_REMOVAL_TEMPERATURE} ; set bed to cool off
G1 Y280 F3000 ; present finished print
M140 S{MATERIAL_KEEP_PART_REMOVAL_TEMPERATURE_T}; keep temperature or cool downs
M84 ; steppers off
G90 ; absolute positioning
M117 Print Complete ; progress indicator message
#---------------------------------------------------------------------------------------------------
# ULTIMAKER CURA START AND END SCRIPTS - Replace default START and STOP scripts with the below GCODE
#---------------------------------------------------------------------------------------------------
#---> Dual Extrusion Printer Profiles < ---
#; LulzBot Taz6 w/ Dual Extruder Klipper START gcode script (for Cura UE, tested on v4.3)
#; First, set START_PRINT Macro variables from Cura parameters
#SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=EXTRUDERS_ENABLED_COUNT VALUE={extruders_enabled_count}
#SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=MATERIAL_STANDBY_TEMPERATURE_0 VALUE={material_standby_temperature}
#SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=MATERIAL_STANDBY_TEMPERATURE_1 VALUE={material_standby_temperature, 1}
#SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=MATERIAL_BED_TEMPERATURE_LAYER_0 VALUE={material_bed_temperature_layer_0}
#SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=MATERIAL_PRINT_TEMPERATURE_LAYER_0_0 VALUE={material_print_temperature_layer_0}
#SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=MATERIAL_PRINT_TEMPERATURE_LAYER_0_1 VALUE={material_print_temperature_layer_0, 1}
#; Execute START_PRINT GCODE defined in Klipper config file
#START_PRINT
#; LulzBot Taz6 w/ Dual Extruder v3 Klipper END gcode script (for Cura UE, tested on v4.3)
#; First, set END_PRINT Macro variables from Cura parameters
#SET_GCODE_VARIABLE MACRO=END_PRINT VARIABLE=EXTRUDERS_ENABLED_COUNT VALUE={extruders_enabled_count}
#SET_GCODE_VARIABLE MACRO=END_PRINT VARIABLE=MATERIAL_PART_REMOVAL_TEMPERATURE VALUE=45
#SET_GCODE_VARIABLE MACRO=END_PRINT VARIABLE=MATERIAL_KEEP_PART_REMOVAL_TEMPERATURE_T VALUE=0
#; Execute END_PRINT GCODE defined in Klipper config file
#END_PRINT

View File

@@ -53,7 +53,6 @@ enable_pin: !PA4
step_distance: .004242
nozzle_diameter: 0.350
filament_diameter: 1.750
pressure_advance: 0.07
heater_pin: PH6
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PF0
@@ -98,7 +97,7 @@ scale: 1.56
# Channel 1 is E0, 2 is E1, 3 is unused, 4 is Z, 5 is X, 6 is Y
channel_1: 1.0
channel_2: 0.75
channel_4: 0.82
channel_4: 0.62 # Z-motor with 30 Ohm coils and 19V power can't exceed .633 Amps
channel_5: 0.82
channel_6: 0.82

View File

@@ -0,0 +1,102 @@
# Support for Makergear M2 printers circa 2016 that have the RAMBo
# electronics along with the V4 extruder and the black and silver Z
# stepper. The electronics use Allegro A4984 stepper drivers with
# 1/16th micro-stepping. To use this config, the firmware should be
# compiled for the AVR atmega2560.
[stepper_x]
step_pin: PC0
dir_pin: !PL1
enable_pin: !PA7
step_distance: .01125
endstop_pin: ^!PB6
position_endstop: 0
position_max: 205
homing_speed: 50
[stepper_y]
step_pin: PC1
dir_pin: PL0
enable_pin: !PA6
step_distance: .01125
endstop_pin: ^!PB5
position_endstop: 0
position_max: 250
homing_speed: 50
[stepper_z]
step_pin: PC2
dir_pin: !PL2
enable_pin: !PA5
step_distance: .0025
endstop_pin: ^!PB4
position_min: 0.1
position_endstop: 0.7
position_max: 200
homing_speed: 15
homing_retract_dist: 2.0
[extruder]
step_pin: PC3
dir_pin: PL6
enable_pin: !PA4
step_distance: .00188
nozzle_diameter: 0.350
filament_diameter: 1.750
heater_pin: PH6
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PF0
control: pid
pid_kp: 26.137
pid_ki: 1.489
pid_kd: 114.675
min_temp: 0
max_temp: 275
max_extrude_only_distance: 150.0
[heater_bed]
heater_pin: PE5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PF2
control: watermark
min_temp: 0
max_temp: 90
[fan]
pin: PH5
[heater_fan nozzle_cooling_fan]
pin: PH3
[mcu]
serial: /dev/ttyACM0
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 3000
max_z_velocity: 25
max_z_accel: 100
[ad5206 stepper_digipot]
enable_pin: PD7
# Scale the config so that the channel value can be specified in amps.
scale: 2.08
# Channel 1 is E0, 2 is E1, 3 is unused, 4 is Z, 5 is X, 6 is Y
channel_1: 1.25
channel_2: 0.75
channel_4: 0.75
channel_5: 0.75
channel_6: 0.75
# Enable 16 micro-steps on steppers X, Y, Z, E0, E1
[static_digital_output stepper_config]
pins:
PG1, PG0,
PK7, PG2,
PK6, PK5,
PK3, PK4,
PK1, PK2
[static_digital_output yellow_led]
pins: !PB7

View File

@@ -0,0 +1,161 @@
# This file contains common pin mappings for the 2017 Monoprice
# Mini Delta. To use this config, the firmware should be compiled for the
# STM32F070 microcontroller with an 8MHz crystal and USB for communication
# (instead of serial).
#
# IMPORTANT: Use of Kipper with a Monoprice Mini Delta requires a power supply
# with a _minimum_ 120 W (i.e. 10 A) capacity! The stock power supply will not
# work, as it can't power the hotend and the bed at the same time.
#
# Note 1: Some controller boards only trigger the bootloader when an update file
# is "printed" from the LCD, rather than supporting bootloader triggering
# during bootup. It may be preferable to use an ST-Link V2 to flash the
# firmware instead. Follow this link for an example of the commands needed to
# do this: https://github.com/arkorobotics/MiniDeltaBootloader
#
# Note 2: Klipper does not currently support the LCD interface used on this
# printer.
#
# See the example.cfg file for a description of available parameters.
# Stepper A is the front-left tower, as originally wired. If you've rewired
# your steppers to "correct" this, you'll need to swap these values.
[stepper_a]
homing_speed: 50
step_pin: PB12
dir_pin: PB11
enable_pin: !PB10
step_distance: .0175 # This is 57.14 steps per mm
endstop_pin: ^PC14
position_endstop: 125.00
arm_length: 120.8
# Some users report better success using the following value for arm_length:
#arm_length: 121.36
[stepper_b]
step_pin: PB2
dir_pin: PB1
enable_pin: !PB10
step_distance: .0175 # This is 57.14 steps per mm
endstop_pin: ^PC15
[stepper_c]
step_pin: PB14
dir_pin: PB13
enable_pin: !PB10
step_distance: .0175 # This is 57.14 steps per mm
endstop_pin: ^PC13
[extruder]
step_pin: PA7
dir_pin: !PA6
enable_pin: !PB0
step_distance: .02062 # This is 48.50 steps per mm
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
# calibrated at 240C on stock hardware
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 300
[heater_bed]
heater_pin: PA5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA4
# calibrated at 70C on stock hardware
control: pid
pid_kp: 51.249
pid_ki: 4.437
pid_kd: 147.983
min_temp: 0
max_temp: 130
# Print cooling fan (omit section if fan not present)
[fan]
pin: PA8
[mcu]
serial: /dev/ttyACM0
restart_method: command
[printer]
kinematics: delta
max_velocity: 150
max_accel: 1200
max_z_velocity: 100
# minimum_z_position is negative to allow delta calibration to work
minimum_z_position: -10.0
delta_radius: 63.00
# Some users report better success using the following value for arm_length:
#delta_radius: 62.70
[delta_calibrate]
radius: 50
speed: 50
horizontal_move_z: 5
######################################################################
# Bed leveling support
######################################################################
[bed_mesh]
speed: 50
horizontal_move_z: 5
mesh_radius: 50
round_probe_count: 5
fade_start: 1.0
fade_end: 0.0
######################################################################
# Bed probing hardware
######################################################################
[probe]
pin: ^!PB7
x_offset: 0.0
y_offset: 0.0
z_offset: -0.1
speed: 5.0
samples: 1
sample_retract_dist: 2.0
samples_result: average
samples_tolerance: 0.100
samples_tolerance_retries: 0
######################################################################
# G-Code macros and events
######################################################################
# G-Code macros (one may define any number of sections with a
# "gcode_macro" prefix).
[gcode_macro START_PRINT]
gcode:
G90 ; switch to absolute positioning - this line was added in case Cura doesn't include it by default
M82 ; set extruder to absolute mode - this line was added in case Cura doesn't include it by default
G28 ; start from home position
BED_MESH_CALIBRATE
G1 Z15.0 F4800 ; move the nozzle up 15mm
G92 E0 ; reset extrusion distance
G1 F200 E5 ; extrude 3mm of feed stock
G92 E0 ; reset extrusion distance again
G1 F4800
[gcode_macro END_PRINT]
gcode:
M104 S0 ; turn off hotend heater
M140 S0 ; turn off bed heater
G91 ; Switch to use Relative Coordinates
G1 E-3 F700 ; retract the filament a bit before lifting the nozzle to release some of the pressure
G1 Z2 F1000 ; raise platform 2mm from current position
G1 E-2 F700 ; retract filament even more
G90 ; Switch back to using absolute coordinates
G28 X Y Z ; Return to home position. Without an X Y or Z after G28 the print completion time will not be displayed on the Mini Delta's display.
M84 ; disable motors
M107 ; turn off fan. Don't use M106 S1. Using M106 S1 may prevent the fan from turning on for the following print. Some say M107 doesn't work for them but if the hotend is below 70 degrees it should work

View File

@@ -0,0 +1,148 @@
# This file contains pin mappings for the MTW Create (circa 2015). To
# use this config, the firmware should be compiled for the AVR
# atmega2560.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PC0
dir_pin: !PL1
enable_pin: !PA7
step_distance: .01
endstop_pin: ^PB6
#endstop_pin: ^PA2
position_endstop: 0
position_max: 250
homing_speed: 50
[stepper_y]
step_pin: PC1
dir_pin: PL0
enable_pin: !PA6
step_distance: .01
endstop_pin: ^PB5
#endstop_pin: ^PA1
position_endstop: 0
position_max: 320
homing_speed: 50
[stepper_z]
step_pin: PC2
dir_pin: PL2
enable_pin: !PA5
step_distance: .00125
endstop_pin: probe:z_virtual_endstop
#endstop_pin: ^PC7
position_endstop: 0.5
position_max: 225
[extruder]
step_pin: PC3
dir_pin: PL6
enable_pin: !PA4
step_distance: .0102
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PH6
sensor_type: ATC Semitec 104GT-2
sensor_pin: PF0
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 275
#Uncomment below for dual extruder printers
#[extruder1]
#step_pin: PC4
#dir_pin: PL7
#enable_pin: !PA3
#heater_pin: PH4
#sensor_pin: PF1
#step_distance: .0102
#nozzle_diameter: 0.400
#filament_diameter: 1.750
#sensor_type: ATC Semitec 104GT-2
#sensor_pin: PF0
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
#pid_Kd: 114
#min_temp: 0
#max_temp: 275
[heater_bed]
heater_pin: PE5
sensor_type: NTC 100K beta 3950
sensor_pin: PF2
control: watermark
min_temp: 0
max_temp: 130
[bltouch]
sensor_pin: PB4
control_pin: PL5
x_offset: -17
y_offset: 37
z_offset: 2.0
[safe_z_home]
home_xy_position: 125,150
z_hop: 10
z_hop_speed: 5
[bed_mesh]
mesh_min: 5,5
mesh_max: 225,225
[fan]
pin: PH5
[heater_fan nozzle_cooling_fan]
pin: PH3
[mcu]
serial: /dev/serial/by-id/usb-UltiMachine__ultimachine.com__RAMBo_854333433343516051F1-if00
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[ad5206 stepper_digipot]
enable_pin: PD7
scale: 2.08
# Channel 1 is E0, 2 is E1, 3 is unused, 4 is Z, 5 is X, 6 is Y
channel_1: 1.34
channel_2: 1.0
channel_4: 1.1
channel_5: 1.1
channel_6: 1.1
# Enable 16 micro-steps on steppers X, Y, Z, E0, E1
[static_digital_output stepper_config]
pins:
PG1, PG0,
PK7, PG2,
PK6, PK5,
PK3, PK4,
PK1, PK2
[static_digital_output yellow_led]
pins: !PB7
# Common EXP1 / EXP2 (display) pins
[board_pins]
aliases:
# Common EXP1/EXP2 headers found on RAMBo v1.4
EXP1_1=PE6, EXP1_3=PG3, EXP1_5=PJ2, EXP1_7=PJ7, EXP1_9=<GND>,
EXP1_2=PE2, EXP1_4=PG4, EXP1_6=PJ3, EXP1_8=PJ4, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB3, EXP2_3=PJ5, EXP2_5=PJ6, EXP2_7=PD4, EXP2_9=<GND>,
EXP2_2=PB1, EXP2_4=PB0, EXP2_6=PB2, EXP2_8=PE7, EXP2_10=PH2
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi"
# See the sample-lcd.cfg file for definitions of common LCD displays.

View File

@@ -92,3 +92,25 @@ pins:
[static_digital_output yellow_led]
pins: !PB7
[display]
lcd_type: hd44780
rs_pin: EXP1_4
e_pin: EXP1_3
d4_pin: EXP1_5
d5_pin: EXP1_6
d6_pin: EXP1_7
d7_pin: EXP1_8
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2
#kill_pin: ^!EXP2_8
[board_pins]
aliases:
# Common EXP1/EXP2 headers found on RAMBo v1.4
EXP1_1=PE6, EXP1_3=PG3, EXP1_5=PJ2, EXP1_7=PJ7, EXP1_9=<GND>,
EXP1_2=PE2, EXP1_4=PG4, EXP1_6=PJ3, EXP1_8=PJ4, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB3, EXP2_3=PJ5, EXP2_5=PJ6, EXP2_7=PD4, EXP2_9=<GND>,
EXP2_2=PB1, EXP2_4=PB0, EXP2_6=PB2, EXP2_8=PE7, EXP2_10=PH2
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi"

View File

@@ -0,0 +1,88 @@
# This file contains common pin mappings for Sovol Sv01 printer. To
# use this config, the firmware should be compiled for the AVR
# atmega2560.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_distance: .0125
endstop_pin: ^ar3
position_endstop: 0
position_max: 300
homing_speed: 50
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_distance: .0125
endstop_pin: ^ar14
position_endstop: 0
position_max: 255
homing_speed: 50
[stepper_z]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
step_distance: .0025
endstop_pin: ^ar18
position_endstop: 0
position_max: 300
[extruder]
step_pin: ar26
dir_pin: !ar28
enable_pin: !ar24
step_distance: .0024
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
control: pid
pid_Kp: 31.147
pid_Ki: 2.076
pid_Kd: 116.803
min_temp: 0
max_temp: 265
[heater_bed]
heater_pin: ar8
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog14
control: pid
pid_Kp: 72.174
pid_Ki: 1.816
pid_Kd: 717.224
min_temp: 0
max_temp: 110
[filament_switch_sensor my_sensor]
switch_pin: ar2
pause_on_runout: True
[fan]
pin: ar9
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[display]
lcd_type: st7920
cs_pin: ar16
sclk_pin: ar23
sid_pin: ar17
encoder_pins: ^ar33, ^ar31
click_pin: ^!ar35

View File

@@ -119,6 +119,7 @@ gcode:
# Mesh Bed Leveling.
[bed_mesh]
min_point: 5,0
max_point: 230,210
mesh_min: 5,18
mesh_max: 230,228
probe_count: 9,9
algorithm: bicubic

View File

@@ -0,0 +1,97 @@
# Support for the green Tevo Tarantula Pro. To use this config, the firmware
# should be compiled for the AVR atmega2560.
# Note that this config file is for the "old green" Tarantula pro, with a
# MKS Gen_l 8-bit board.
# It _will not_ work out of the box for the "new orange" Tarantula pro with a
# MKS Sgen_l 32-bit board.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: ar54
dir_pin: !ar55
enable_pin: !ar38
step_distance: 0.012583
endstop_pin: ^!ar3
position_endstop: -2
position_max: 220
position_min: -2
homing_speed: 25.0
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_distance: 0.01256
endstop_pin: ^!ar14
position_endstop: 0
position_max: 220
homing_speed: 25.0
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_distance: 0.002492
endstop_pin: ^!ar18
position_endstop: 0
position_max: 200
# Enable for dual-z addon
#[stepper_z1]
#step_pin: ar36
#dir_pin: ar34
#enable_pin: !ar30
#step_distance: 0.002492
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_distance: 0.002470
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: ar10
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
control: pid
pid_Kp: 22.5
pid_Ki: 1.78
pid_Kd: 74.16
min_temp: 0
max_temp: 220
[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control: watermark
min_temp: 0
max_temp: 110
[fan]
pin: ar9
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
pin_map: arduino
[printer]
kinematics: cartesian
max_velocity: 400
max_accel: 3000
max_z_velocity: 50
max_z_accel: 100
[heater_fan nozzle_fan]
pin: ar7
[display]
lcd_type: uc1701
cs_pin: ar25
a0_pin: ar27
encoder_pins: ^!ar31, ^!ar33
click_pin: ^!ar35
kill_pin: !ar41
menu_reverse_navigation: true

View File

@@ -0,0 +1,103 @@
# This file contains common pin mappings for Tronxy P802E printer. To
# use this config, the firmware should be compiled for the AVR
# atmega1284p. The Tronxy P802M and P802MA is similar, but will need
# different position_max and position_min settings.
# Note that the "make flash" command does not work with Tronxy boards -
# the boards are typically flashed with this command:
# avrdude -p atmega1284p -c arduino -b 57600 -P /dev/ttyUSB0 -U out/klipper.elf.hex
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PD7
dir_pin: PC5
enable_pin: !PD6
step_distance: .01
endstop_pin: ^!PC2
position_endstop: -8
position_max: 220
position_min: -8
homing_speed: 50
[stepper_y]
step_pin: PC6
dir_pin: PC7
enable_pin: !PD6
step_distance: .01
endstop_pin: ^!PC3
position_endstop: 0
position_min: 0
position_max: 220
homing_speed: 50
[stepper_z]
step_pin: PB3
dir_pin: !PB2
enable_pin: !PA5
step_distance: .0025
endstop_pin: ^!PC4
position_endstop: 0
position_max: 210
homing_speed: 20
[extruder]
step_pin: PB1
dir_pin: PB0
enable_pin: !PD6
step_distance: .0105
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PD5
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA7
control: pid
pid_kp: 23.060
pid_ki: 1.025
pid_kd: 129.711
min_temp: 0
max_temp: 250
max_extrude_only_distance: 400
[heater_bed]
heater_pin: PD4
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA6
control: pid
pid_kp: 72.174
pid_ki: 1.677
pid_kd: 776.767
min_temp: 0
max_temp: 110
[fan]
pin: PB4
[mcu]
serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A96PLN7R-if00-port0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 1000
max_z_velocity: 20
max_z_accel: 100
[display]
lcd_type: hd44780
rs_pin: PA3
e_pin: PA2
d4_pin: PD2
d5_pin: PD3
d6_pin: PC0
d7_pin: PC1
up_pin: PA1
analog_range_up_pin: 9000, 13000
down_pin: PA1
analog_range_down_pin: 800, 1300
click_pin: PA1
analog_range_click_pin: 2000, 2500
back_pin: PA1
analog_range_back_pin: 4500, 5000
#kill_pin: PA1
#analog_range_kill_pin: 400, 600

View File

@@ -0,0 +1,103 @@
# This file contains common pin mappings for Tronxy P802M printer. To
# use this config, the firmware should be compiled for the AVR
# atmega1284p. The Tronxy P802MA is similar, but will need
# auto leveling configuration.
# Note that the "make flash" command does not work with Tronxy boards -
# the boards are typically flashed with this command:
# avrdude -p atmega1284p -c arduino -b 57600 -P /dev/ttyUSB0 -U out/klipper.elf.hex
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PD7
dir_pin: PC5
enable_pin: !PD6
step_distance: .01
endstop_pin: ^!PC2
position_endstop: -8
position_max: 220
position_min: -45
homing_speed: 50
[stepper_y]
step_pin: PC6
dir_pin: PC7
enable_pin: !PD6
step_distance: .01
endstop_pin: ^!PC3
position_endstop: 0
position_min: -5
position_max: 220
homing_speed: 50
[stepper_z]
step_pin: PB3
dir_pin: !PB2
enable_pin: !PA5
step_distance: .0025
endstop_pin: ^!PC4
position_endstop: 0
position_max: 230
homing_speed: 20
[extruder]
step_pin: PB1
dir_pin: PB0
enable_pin: !PD6
step_distance: .0105
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PD5
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA7
control: pid
pid_kp: 23.060
pid_ki: 1.025
pid_kd: 129.711
min_temp: 0
max_temp: 250
max_extrude_only_distance: 400
[heater_bed]
heater_pin: PD4
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA6
control: pid
pid_kp: 72.174
pid_ki: 1.677
pid_kd: 776.767
min_temp: 0
max_temp: 110
[fan]
pin: PB4
[mcu]
serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A96PLN7R-if00-port0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 1000
max_z_velocity: 20
max_z_accel: 100
[display]
lcd_type: hd44780
rs_pin: PA3
e_pin: PA2
d4_pin: PD2
d5_pin: PD3
d6_pin: PC0
d7_pin: PC1
up_pin: PA1
analog_range_up_pin: 9000, 13000
down_pin: PA1
analog_range_down_pin: 800, 1300
click_pin: PA1
analog_range_click_pin: 2000, 2500
back_pin: PA1
analog_range_back_pin: 4500, 5000
#kill_pin: PA1
#analog_range_kill_pin: 400, 600

View File

@@ -0,0 +1,136 @@
# This is a Klipper configuration for TronXY X5SA, with
# CXY-V6 motherboard.
# === FLASHING WITH STOCK BOOTLOADER ===
# You should make firmware for STM32F103 with bootloader offset
# at 0x8008800 (Chitu v6 Bootloader). Uncheck USB, and leave default
# serial settings.
#
# Use "./update_chitu.py out/klipper.bin update.cbd" to generate update.cbd.
# Put `update.cbd` onto SD card, and reboot the printer.
# It will be automatically installed, and you will be able to update it this way.
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: corexy
max_velocity: 300
max_accel: 3000
max_z_velocity: 25
max_z_accel: 30
[stepper_x]
step_pin: PE5
dir_pin: !PE6
enable_pin: !PC13
step_distance: .006275
endstop_pin: !PG10
position_endstop: -1
position_min: -1
position_max: 350
homing_speed: 50
homing_retract_dist: 10
second_homing_speed: 10.0
[stepper_y]
step_pin: PE2
dir_pin: !PE3
enable_pin: !PE4
step_distance: .006275
endstop_pin: !PA12
position_endstop: 0
position_max: 330
homing_retract_dist: 10
homing_speed: 50.0
second_homing_speed: 10.0
[stepper_z]
step_pin: PB9
dir_pin: PE0
enable_pin: !PE1
step_distance: .00125
endstop_pin: probe:z_virtual_endstop
position_max: 400
position_min: -2
[extruder]
step_pin: PB4
dir_pin: PB5
enable_pin: !PB8
step_distance: 0.0111
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PG12
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA1
control: pid
pid_Kp: 18.831
pid_Ki: 0.821
pid_Kd: 108.044
min_temp: 0
max_temp: 250
max_extrude_only_distance: 300
[heater_bed]
heater_pin: PG11
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
min_temp: 0
max_temp: 130
pid_Kp: 73.932
pid_Ki: 1.521
pid_Kd: 898.279
[heater_fan hotend_fan]
pin: PG14
fan_speed: 0.5
[fan]
pin: PG13
max_power: 0.5
[controller_fan drivers_fan]
pin: PD6
[filament_switch_sensor sentinel]
pause_on_runout: True
runout_gcode:
M25
switch_pin: PA15
[output_pin beeper]
pin: PB0
[safe_z_home]
home_xy_position: 165,165
speed: 50
z_hop: 10
z_hop_speed: 5
[bed_screws]
screw1: 5,5
screw2: 165,5
screw3: 325,5
screw4: 5,325
screw5: 165,325
screw6: 325,325
[bed_mesh]
speed: 120
probe_count: 5,5
horizontal_move_z: 5
algorithm: lagrange
mesh_min : 20,20
mesh_max : 310,310
mesh_pps: 0
[probe]
x_offset: -40
y_offset: 0
pin: !PG9
speed: 30
z_offset: 2

View File

@@ -0,0 +1,89 @@
# This file contains common pin mappings for the Two Trees Sapphire
# Pro printer from 2020. To use this config, the firmware should be
# compiled for the STM32F103. When running "make menuconfig", enable
# "extra low-level configuration setup", select the 28KiB bootloader,
# disable "USB for communication", select USART3 for the "Serial
# Port", and set "GPIO pins to set at micro-controller startup" to
# "!PC6,!PD13".
# Note that the "make flash" command does not work with the Sapphire
# Pro. After running "make", run the following command:
# ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano35.bin
# Copy the file out/Robin_nano35.bin to an SD card and then restart the
# printer with that SD card.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PE3
dir_pin: !PE2
enable_pin: !PE4
step_distance: .01
endstop_pin: !PA15
position_endstop: 0
position_max: 230
homing_speed: 50
[stepper_y]
step_pin: PE0
dir_pin: !PB9
enable_pin: !PE1
step_distance: .01
endstop_pin: !PA12
position_endstop: 230
position_max: 230
homing_speed: 50
[stepper_z]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
step_distance: .0025
endstop_pin: !PA11
position_endstop: 0.5
position_max: 230
[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
step_distance: .0021
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC3
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC1
control: pid
pid_Kp: 14.669
pid_Ki: 0.572
pid_Kd: 94.068
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
pid_Kp: 325.10
pid_Ki: 63.35
pid_Kd: 417.10
min_temp: 0
max_temp: 130
[fan]
pin: PB1
[mcu]
serial: /dev/ttyUSB0
restart_method: command
[printer]
kinematics: corexy
max_velocity: 250
max_accel: 4500
max_z_velocity: 25
max_z_accel: 100
[static_digital_output reset_display]
pins: !PC6, !PD13

View File

@@ -0,0 +1,106 @@
# This file contains pin mappings for the Wanhao Duplicator 9 MK1,
# also sold as the Monoprice Maker Pro MK1. To use this config,
# the firmware should be compiled for the AVR atmega2560.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: ar61
dir_pin: !ar62
enable_pin: !ar60
step_distance: .0125
endstop_pin: ^!ar54
position_endstop: 0
position_max: 295
homing_speed: 30.0
[stepper_y]
step_pin: ar64
dir_pin: ar65
enable_pin: !ar2
step_distance: .0125
endstop_pin: ^!ar24
position_endstop: 0
position_max: 290
homing_speed: 30.0
[stepper_z]
step_pin: ar67
dir_pin: ar69
enable_pin: !ar66
step_distance: .0025
endstop_pin: probe:z_virtual_endstop
position_endstop: 1.4
position_max: 370
position_min: -0.99
[extruder]
step_pin: ar58
dir_pin: ar59
enable_pin: !ar57
step_distance: .009980
nozzle_diameter: 0.4
filament_diameter: 1.75
heater_pin: ar4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog1
control: pid
pid_Kp: 33.41
pid_Ki: 1.47
pid_Kd: 189.27
min_temp: 0
max_temp: 315
[heater_bed]
heater_pin: ar3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control: pid
pid_Kp: 64.095903
pid_Ki: 1.649830
pid_Kd: 622.531455
min_temp: 0
max_temp: 120
[fan]
pin: ar5
[probe]
pin: !ar6
x_offset: 27
y_offset: 3
z_offset: 1.4
speed: 5.0
samples: 2
sample_retract_dist: 2.0
samples_result: average
[mcu]
serial: /dev/ttyUSB0
pin_map: arduino
[printer]
kinematics: cartesian
max_velocity: 3000
max_accel: 450
max_z_velocity: 225
max_z_accel: 30
square_corner_velocity: 15.0
[bed_mesh]
speed: 120
mesh_min: 27,3
mesh_max: 270,290
probe_count: 5,3
horizontal_move_z: 10
[bed_screws]
screw1: 5,5
screw1_name: front left screw
screw2: 295,0
screw2_name: front right screw
screw3: 295,290
screw3_name: back right screw
screw4: 0,290
screw4_name: back left screw
probe_height: 0

View File

@@ -0,0 +1,76 @@
# This file contains pin mappings for the Wanhao Duplicator i3 mini.
# (circa 2017) To use this config, the firmware should be compiled
# for the AVR atmega2560.
# Pin numbers and other parameters were extracted from the official
# Marlin source available at: https://github.com/garychen99/i3Mini
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: ar22
dir_pin: !ar23
enable_pin: !ar57
step_distance: 0.0125
endstop_pin: ^!ar19
position_endstop: 120
position_max: 120
homing_speed: 30.0
[stepper_y]
step_pin: ar25
dir_pin: ar26
enable_pin: !ar24
step_distance: 0.0125
endstop_pin: ^!ar18
position_endstop: 0
position_max: 135
homing_speed: 30.0
[stepper_z]
step_pin: ar29
dir_pin: ar39
enable_pin: !ar28
step_distance: 0.0025
endstop_pin: ^!ar38
position_endstop: 0.5
position_max: 100
[extruder]
step_pin: ar55
dir_pin: !ar56
enable_pin: !ar54
step_distance: 0.010638298
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar4
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: analog13
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 1
max_temp: 265
[fan]
pin: ar12
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
pin_map: arduino
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[display]
lcd_type: uc1701
cs_pin: ar41
a0_pin: ar40
rst_pin: ar27
click_pin: ^!ar5
encoder_pins: ^ar3, ^ar2
kill_pin: ar64

View File

@@ -76,6 +76,6 @@ max_z_velocity: 5
max_z_accel: 100
[bed_mesh]
min_point: 20,20
max_point: 190,130
mesh_min: 20,20
mesh_max: 190,130
probe_count: 4,4

View File

@@ -0,0 +1,52 @@
#Config for the BTT mot-exp
#See the example.cfg file for a description of available parameters.
[stepper_1]
step_pin: EXP2_6
dir_pin: EXP2_5
enable_pin: !EXP2_7
step_distance: .0125
position_max: 320
homing_speed: 50
[stepper_2]
step_pin: EXP2_3
dir_pin: EXP2_4
enable_pin: !EXP1_8
step_distance: .0125
position_max: 300
homing_speed: 50
[stepper_3]
step_pin: EXP2_1
dir_pin: EXP2_2
enable_pin: !EXP1_7
step_distance: .0025
position_endstop: 0.5
position_max: 400
[tmc2209 stepper_1]
uart_pin: EXP1_6
microsteps: 16
run_current: 0.800
hold_current: 0.500
stealthchop_threshold: 250
diag_pin: EXP1_5
[tmc2209 stepper_2]
uart_pin: EXP1_4
microsteps: 16
run_current: 0.800
hold_current: 0.500
stealthchop_threshold: 250
diag_pin: EXP1_3
[tmc2209 stepper_3]
uart_pin: EXP1_2
microsteps: 16
run_current: 0.650
hold_current: 0.450
stealthchop_threshold: 30
diag_pin: EXP1_1

196
config/sample-glyphs.cfg Normal file
View File

@@ -0,0 +1,196 @@
# Some alternate glyphs for use with 128x64 LCDs. These are used by adding them to your printer.cfg.
# See config/example-extras.cfg for more information about setting these up.
# ===============================
# Speedometer feedrate
# ===============================
[display_glyph feedrate]
data:
................
................
................
......******....
....**********..
...****....****.
..***........**.
.***..........*.
.**..*..........
***...*.........
**.....*........
**......**......
**......***.....
**.......**.....
................
................
# ===============================
# Blower-style fan
# ===============================
[display_glyph fan1]
data:
................
......****......
....**...***....
...*..*...*.*...
..*..........*..
..**.........*..
.**....**...*.*.
.*....*..*....*.
.*....*..*....*.
.*.*...**....**.
..*.........**..
..*..........*..
...*.*...*..*...
....***...**....
......****......
................
[display_glyph fan2]
data:
................
......****......
....**.*..**....
...*....*...*...
..*.*......*.*..
..*..........*..
.*.....**.....*.
.*.*..*..*...**.
.**...*..*..*.*.
.*.....**.....*.
..*..........*..
..*.*......*.*..
...*...*....*...
....**..*.**....
......****......
................
# ===============================
# Alternate square bed
# ===============================
[display_glyph bed]
data:
................
................
................
................
................
................
................
................
................
................
...**********...
..*..........*..
.*............*.
*..............*
****************
................
[display_glyph bed_heat1]
data:
................
......*...*.....
......*...*.....
.....*...*......
.....*...*......
......*...*.....
......*...*.....
.....*...*......
.....*...*......
................
...**********...
..*..........*..
.*............*.
*..............*
****************
................
[display_glyph bed_heat2]
data:
................
.....*...*......
.....*...*......
......*...*.....
......*...*.....
.....*...*......
.....*...*......
......*...*.....
......*...*.....
................
...**********...
..*..........*..
.*............*.
*..............*
****************
................
# ===============================
# Round bed
# ===============================
[display_glyph bed]
data:
................
................
................
................
................
................
................
.....******.....
...**......**...
..*..........*..
.*............*.
.*............*.
..*..........*..
...**......**...
.....******.....
................
[display_glyph bed_heat1]
data:
.....*..*..*....
.....*..*..*....
....*..*..*.....
....*..*..*.....
.....*..*..*....
.....*..*..*....
................
.....******.....
...**......**...
..*..........*..
.*............*.
.*............*.
..*..........*..
...**......**...
.....******.....
................
[display_glyph bed_heat2]
data:
....*..*..*.....
....*..*..*.....
.....*..*..*....
.....*..*..*....
....*..*..*.....
....*..*..*.....
................
.....******.....
...**......**...
..*..........*..
.*............*.
.*............*.
..*..........*..
...**......**...
.....******.....
................

93
config/sample-idex.cfg Normal file
View File

@@ -0,0 +1,93 @@
# This file contains a configuration snippet for a dual extruder
# printer using dual carriages (an "IDEX" printer).
# See example.cfg and example-extras.cfg for a description of
# available parameters.
# Definition for the primary carriage (holding the primary extruder)
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_distance: .0125
endstop_pin: ^ar3
position_endstop: 0
position_max: 200
homing_speed: 50
# The definition for the primary extruder
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
# Helper script to park the carriage (called from T0 and T1 macros)
[gcode_macro PARK_extruder]
gcode:
SAVE_GCODE_STATE NAME=park0
G90
G1 X0
RESTORE_GCODE_STATE NAME=park0
# Activate the primary extruder
[gcode_macro T0]
gcode:
PARK_{printer.toolhead.extruder}
ACTIVATE_EXTRUDER EXTRUDER=extruder
SET_DUAL_CARRIAGE CARRIAGE=0
SET_GCODE_OFFSET Y=0
# Definition for the secondary carriage and extruder1
[dual_carriage]
axis: x
step_pin: ar16
dir_pin: ar17
enable_pin: !ar23
step_distance: .0125
endstop_pin: ^ar2
position_endstop: 200
position_max: 200
homing_speed: 50
[extruder1]
step_pin: ar36
dir_pin: ar34
enable_pin: !ar30
step_distance: .002
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar11
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog15
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
[gcode_macro PARK_extruder1]
gcode:
SAVE_GCODE_STATE NAME=park1
G90
G1 X200
RESTORE_GCODE_STATE NAME=park1
[gcode_macro T1]
gcode:
PARK_{printer.toolhead.extruder}
ACTIVATE_EXTRUDER EXTRUDER=extruder1
SET_DUAL_CARRIAGE CARRIAGE=1
SET_GCODE_OFFSET Y=15

View File

@@ -96,12 +96,12 @@ pin: EXP1_1
######################################################################
[display]
lcd_type: st7567
lcd_type: uc1701
cs_pin: EXP1_3
a0_pin: EXP1_4
rs_pin: EXP1_5
rst_pin: EXP1_5
contrast: 63
encoder_pins: ^EXP2_3, ^EXP2_5
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2
## Some micro-controller boards may require an spi bus to be specified:
#spi_bus: spi

View File

@@ -115,3 +115,64 @@ gcode:
G91
G1 E-50 F1000
RESTORE_GCODE_STATE NAME=M600_state
######################################################################
# BME280 Environmental Sensor
######################################################################
# The macro below assumes you have a BME280 sensor_type defined in one
# of the applicable sections in printer.cfg, such as:
#
#[temperature_sensor my_sensor]
#sensor_type: BME280
#gcode_id: AMB
#
# Note the format of the parameter SENSOR in the macro below. The BME280
# sensor status can be accessed using the format "bme280 <section_name>".
# The example section above is named "my_sensor", thus the bme280 can be
# queried as follows:
#
# QUERY_BME280 SENSOR='bme280 my_sensor'
#
# Since a default parameter is defined one could simply enter QUERY_BME280
# as well.
[gcode_macro QUERY_BME280]
default_parameter_SENSOR: bme280 my_sensor
gcode:
{action_respond_info(
"Temperature: %.2f C\n"
"Pressure: %.2f hPa\n"
"Humidity: %.2f%%" % (
printer[SENSOR].temperature,
printer[SENSOR].pressure,
printer[SENSOR].humidity))}
######################################################################
# HTU21D family Environmental Sensor
######################################################################
# The macro below assumes you have a HTU21D sensor_type defined in one
# of the applicable sections in printer.cfg, such as:
#
#[temperature_sensor my_sensor]
#sensor_type: HTU21D
#
# Note the format of the parameter SENSOR in the macro below. The HTU21D
# sensor status can be accessed using the format "htu21d <section_name>".
# The example section above is named "my_sensor", thus the htu21d can be
# queried as follows:
#
# QUERY_HTU21D SENSOR='htu21d my_sensor'
#
# Since a default parameter is defined one could simply enter QUERY_HTU21D
# as well.
[gcode_macro QUERY_HTU21D]
default_parameter_SENSOR: htu21d my_sensor
gcode:
{action_respond_info(
"Temperature: %.2f C\n"
"Humidity: %.2f%%" % (
printer[SENSOR].temperature,
printer[SENSOR].humidity))}

823
config/sample-mmu2s-diy.cfg Normal file
View File

@@ -0,0 +1,823 @@
# Configuration for DIY MMU2S based on SKR-MINI
# Jeremy Briffaut kakou@kakou.org
# More info : https://www.thingiverse.com/thing:3910546
#
#
# config inspired from https://github.com/mwr666/klipper/blob/sunbeam2.0c_multi_mcu_mmu2/config/printer-protodev-corexy-multi-mcu-mmu2.cfg
########################################
#
# Configuration for a SKR MINI board with 3 TMC2208 UART
# and 2 1.7A stepper motor at 1/16
# current for a 24V power
#
########################################
[mcu mmboard]
serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_33FFD8054E48363008771743-if00
[respond]
default_type: command
# E0 : MMU2S 5mm road with the 5 gears
[manual_stepper gear_stepper]
step_pin: mmboard:PC5
dir_pin: !mmboard:PB0
enable_pin: !mmboard:PC4
# 140 : mk8 gear
#step_distance: .007142
# 165 : fystec gear for mmu2s
step_distance: .00606
velocity: 20
accel: 10
endstop_pin: ^mmboard:PC2 # PINDA X+
[tmc2208 manual_stepper gear_stepper]
uart_pin: mmboard:PC14
microsteps: 16
run_current: 1.000
hold_current: 0.600
interpolate: True
sense_resistor: 0.110
# Y : MMU2S idler with the 5 ball bearings
[manual_stepper idler_stepper]
step_pin: mmboard:PB13
dir_pin: mmboard:PB14
enable_pin: !mmboard:PB12
step_distance: .040000
velocity: 100
accel: 80
[tmc2209 manual_stepper idler_stepper]
uart_pin: mmboard:PB7
microsteps: 16
run_current: 0.800
hold_current: 0.800
interpolate: True
sense_resistor: 0.110
stealthchop_threshold: 250
# X : MMU2S color selector
[manual_stepper selector_stepper]
step_pin: mmboard:PC6
dir_pin: mmboard:PC7
enable_pin: !mmboard:PB15
# 80 step/mm
step_distance: .0025
velocity: 35
accel: 100
endstop_pin: !mmboard:PC0 # switch endstop on the left Z-
[tmc2209 manual_stepper selector_stepper]
uart_pin: mmboard:PC12
microsteps: 16
run_current: 1.000
hold_current: 0.400
interpolate: True
sense_resistor: 0.110
stealthchop_threshold: 250
#IR
[filament_switch_sensor ir_sensor]
pause_on_runout: False
switch_pin: !P1.28 # P1.28 for X-max
################################
#
# PARAMETER TO ADAPT TO YOUR SETUP
#
# variable_timeout_pause : timeout of the MMU2S pause when user intervention is needed
# variable_disable_heater : timeout of the heater during pause (temperature is saved and restored before resuming)
# variable_bowden_load_length1 : length of the bowden between the selector and the entry of the extruder (quick MOVE)
# variable_bowden_load_length2 : length of the bowden between the entry of the extruder and the extruder gear (slow MOVE)
# variable_bowden_unload_length : length between the the extruder gear and the PINDA
# variable_pinda_load_length : length between the MMU2S and the PINDA during loading
# variable_pinda_unload_length : length to retract the filament into the MMU2S from the PINDA during unloading
# variable_colorselector : the 5 positions of the color selector
# variable_idler : the 5 positions of the idler bearing ball
# variable_idler_home_position : the homing position of the idler
# variable_pause_x : x position when MMU2S need intervention and the printer is paused
# variable_pause_y : y position when MMU2S need intervention and the printer is paused
# variable_pause_z : z lift when MMU2S need intervention and the printer is paused
# variable_min_temp_extruder : minimal required heater temperature to load/unload filament from the extruder gear to the nozzle
# variable_extruder_eject_temp : heater temperature used to eject filament during home if the filament is already loaded
# variable_enable_5in1 : pass from MMU2S standart (0) to MMU2S-5in1 mode with splitter
#
################################
[gcode_macro VAR_MMU2S]
variable_timeout_pause: 36000
variable_disable_heater: 600
variable_bowden_load_length1: 770
variable_bowden_load_length2: 790
variable_bowden_unload_length: 830
variable_pinda_load_length: 120
variable_pinda_unload_length: 15
variable_colorselector = [71,57,43,29,16]
variable_idler = [5,20,35,50,65]
variable_idler_home_position: 85
variable_pause_x: 0
variable_pause_y: 300
variable_pause_z: 10
variable_min_temp_extruder: 180
variable_extruder_eject_temp: 200
variable_enable_5in1: 0
gcode:
# MMU2S SPLITTER
# variable_bowden_load_length1: 0
# variable_bowden_load_length2: 102
# variable_bowden_unload_length: 120
# MMU2S STANDARD
# variable_bowden_load_length1: 770
# variable_bowden_load_length2: 790
# variable_bowden_unload_length: 830
###############################
###############################
# END OF PARAMETER TO ADAPT TO YOUR SETUP
###############################
###############################
###############################
#
# MMU2S endstop status : IR extruder, PINDA, selector switch
# 0 : open, 1 : TRIGGERED
#
###############################
# Display the last queried status
[gcode_macro ENDSTOPS_STATUS]
gcode:
M118 Enstop status :
M118 Extruder : {printer["filament_switch_sensor ir_sensor"].filament_detected}
M118 PINDA : {printer.query_endstops.last_query["manual_stepper gear_stepper"]}
M118 Selector : {printer.query_endstops.last_query["manual_stepper selector_stepper"]}
# Query and display the status
[gcode_macro infos]
gcode:
QUERY_ENDSTOPS
ENDSTOPS_STATUS
###############################
#
# PAUSE MACROS
# PAUSE_MMU is called when an human intervention is needed
# use MMU_UNLOCK to park the idler and start the manual intervention
# and use RESUME when the invention is ended to resume the current print
#
###############################
[pause_resume]
#recover_velocity: 50.
# park the idler, stop the delayed stop of the heater
[gcode_macro MMU_UNLOCK]
gcode:
M118 Resume print
SET_GCODE_VARIABLE MACRO=PAUSE_MMU VARIABLE=is_paused VALUE=0
UPDATE_DELAYED_GCODE ID=disable_heater DURATION=0
HOME_IDLER
M109 S{printer["gcode_macro PAUSE_MMU"].extruder_temp}
[delayed_gcode disable_heater]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int != 0 %}
M118 Disable extruder heater
M104 S0
{% endif %}
# Pause the MMU, park the extruder at the parking position
# Save the current state and start the delayed stop of the heated
# modify the timeout of the printer acorrdly to timeout_pause
[gcode_macro PAUSE_MMU]
variable_is_paused: 0
variable_extruder_temp: 0
gcode:
SET_GCODE_VARIABLE MACRO=PAUSE_MMU VARIABLE=extruder_temp VALUE={printer.extruder.temperature}
SET_GCODE_VARIABLE MACRO=PAUSE_MMU VARIABLE=is_paused VALUE=1
SAVE_GCODE_STATE NAME=PAUSE_MMU_state
SET_IDLE_TIMEOUT TIMEOUT={printer["gcode_macro VAR_MMU2S"].timeout_pause}
UPDATE_DELAYED_GCODE ID=disable_heater DURATION={printer["gcode_macro VAR_MMU2S"].disable_heater}
M118 START PAUSE
bip
bip
bip
PAUSE
G91
G1 Z{printer["gcode_macro VAR_MMU2S"].pause_z}
G90
G1 X{printer["gcode_macro VAR_MMU2S"].pause_x} Y{printer["gcode_macro VAR_MMU2S"].pause_y} F3000
bip
bip
bip
M118 END PAUSE
RESTORE_GCODE_STATE NAME=PAUSE_MMU_state
############################################
#
# T0, T1, ..., T4 : Change extruder MACRO
# if th new extruder is different from the current extruder :
# eject the filament if needed
# load the new one
#
############################################
[gcode_macro T0]
gcode:
{% if printer["gcode_macro SELECT_TOOL"].color_selected|int != 0 %}
M117 Change Tool T0
UT
LT VALUE=0
{% endif %}
[gcode_macro T1]
gcode:
{% if printer["gcode_macro SELECT_TOOL"].color_selected|int != 1 %}
M117 Change Tool T1
UT
LT VALUE=1
{% endif %}
[gcode_macro T2]
gcode:
{% if printer["gcode_macro SELECT_TOOL"].color_selected|int != 2 %}
M117 Change Tool T2
UT
LT VALUE=2
{% endif %}
[gcode_macro T3]
gcode:
{% if printer["gcode_macro SELECT_TOOL"].color_selected|int != 3 %}
M117 Change Tool T3
UT
LT VALUE=3
{% endif %}
[gcode_macro T4]
gcode:
{% if printer["gcode_macro SELECT_TOOL"].color_selected|int != 4 %}
M117 Change Tool T4
UT
LT VALUE=4
{% endif %}
############################################
#
# Unloading/Loading Macros
#
############################################
# Load filament from MMU2S to nozzle
[gcode_macro LT]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
M118 LT {params.VALUE|int} ...
SELECT_TOOL VALUE={params.VALUE|int}
LOAD_FILAMENT_TO_EXTRUDER
LOAD_FILAMENT_IN_EXTRUDER
{% endif %}
# Unload filament from nozzle to MMU2S
[gcode_macro UT]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro SELECT_TOOL"].color_selected|int != -1 %}
M118 UT {printer["gcode_macro SELECT_TOOL"].color_selected|int} ...
UNLOAD_FILAMENT_IN_EXTRUDER
SELECT_TOOL VALUE={printer["gcode_macro SELECT_TOOL"].color_selected|int}
UNLOAD_FILAMENT_FROM_EXTRUDER
{% endif %}
{% endif %}
############################################
#
# Select/Unselect a tool
# move the idler and the color selector (if needed) to the requested tool (0-4)
#
############################################
# Select a tool. move the idler and then move the color selector (if needed)
[gcode_macro SELECT_TOOL]
variable_tool_selected: -1
variable_color_selected: -1
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro HOME_MMU"].home != -1 %}
M118 Select Tool {params.VALUE} ...
MANUAL_STEPPER STEPPER=idler_stepper MOVE={printer["gcode_macro VAR_MMU2S"].idler[params.VALUE|int]}
{% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %}
MANUAL_STEPPER STEPPER=selector_stepper MOVE={printer["gcode_macro VAR_MMU2S"].colorselector[params.VALUE|int]}
{% endif %}
SET_GCODE_VARIABLE MACRO=SELECT_TOOL VARIABLE=tool_selected VALUE={params.VALUE}
SET_GCODE_VARIABLE MACRO=SELECT_TOOL VARIABLE=color_selected VALUE={params.VALUE}
M118 Tool {params.VALUE} Enabled
{% else %}
M118 Could not select tool, MMU is not homed
{% endif %}
{% endif %}
# Unselect a tool, only park the idler
[gcode_macro UNSELECT_TOOL]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro HOME_MMU"].home != -1 %}
MANUAL_STEPPER STEPPER=idler_stepper MOVE={printer["gcode_macro VAR_MMU2S"].idler_home_position}
SET_GCODE_VARIABLE MACRO=SELECT_TOOL VARIABLE=tool_selected VALUE=-1
{% else %}
M118 Could not unselect tool, MMU is not homed
{% endif %}
{% endif %}
############################################
#
# Loading/Unloading part FROM/TO EXTRUDER TO/FROM NOZZLE
# During loading, if the IR sensor does not detect the filament, it tries 3 times to reinsert it
#
############################################
# Try to reinsert the filament into the extruder
# Called when the IR sensor does not detect the filament
# the MMU2S push the filament of 10mm
# and the extruder gear try to insert it into the nozzle
[gcode_macro RETRY_LOAD_FILAMENT_IN_EXTRUDER]
gcode:
{% if printer["filament_switch_sensor ir_sensor"].filament_detected == False %}
M118 Retry loading ....
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer.extruder.temperature > printer["gcode_macro VAR_MMU2S"].min_temp_extruder %}
M118 Loading Filament...
G91
SELECT_TOOL VALUE={printer["gcode_macro SELECT_TOOL"].color_selected|int}
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=gear_stepper MOVE=10 SPEED=30
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
G1 E10 F600
UNSELECT_TOOL
G1 E10 F1800
G1 E22 F1393
G1 E10 F614
G92 E0
G90
{% endif %}
{% endif %}
{% endif %}
# Load the filament into the extruder
# the MMU2S push the filament of 20mm
# and the extruder gear try to insert it into the nozzle
# if the filament is not detected by the IR, call RETRY_LOAD_FILAMENT_IN_EXTRUDER 3 times
#
# Call PAUSE_MMU if the filament is not detected by the IR sensor
[gcode_macro LOAD_FILAMENT_IN_EXTRUDER]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer.extruder.temperature > printer["gcode_macro VAR_MMU2S"].min_temp_extruder %}
M118 Loading Filament...
G91
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=gear_stepper MOVE=20 SPEED=30
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
G1 E10 F600
UNSELECT_TOOL
G1 E10 F1800
G1 E22 F1393
G1 E10 F614
G92 E0
G90
RETRY_LOAD_FILAMENT_IN_EXTRUDER
RETRY_LOAD_FILAMENT_IN_EXTRUDER
RETRY_LOAD_FILAMENT_IN_EXTRUDER
IS_FILAMENT_IN_EXTRUDER
M118 Load Complete
{% else %}
M118 Extruder too cold
PAUSE_MMU
{% endif %}
{% endif %}
# Retry unload, try correct misalignement of bondtech gear
[gcode_macro RETRY_UNLOAD_FILAMENT_IN_EXTRUDER]
gcode:
{% if printer["filament_switch_sensor ir_sensor"].filament_detected == True %}
M118 Retry unloading ....
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer.extruder.temperature > printer["gcode_macro VAR_MMU2S"].min_temp_extruder %}
M118 Unloading Filament...
G91
G92 E0
G1 E10 F500
G1 E-20 F500
G1 E-60 F3000
G92 E0
G90
{% endif %}
{% endif %}
{% endif %}
# Unload the filament from the nozzle (without RAMMING !!!)
# Retract the filament from the nozzle to the out of the extruder gear
#
# Call PAUSE_MMU if the IR sensor detects the filament after the ejection
[gcode_macro UNLOAD_FILAMENT_IN_EXTRUDER]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer.extruder.temperature > printer["gcode_macro VAR_MMU2S"].min_temp_extruder %}
{% if printer["gcode_macro SELECT_TOOL"].tool_selected|int == -1 %}
M118 Unloading Filament...
G91
G1 E-20 F500
G1 E-30 F3000
G90
G92 E0
G4 P1000
RETRY_UNLOAD_FILAMENT_IN_EXTRUDER
RETRY_UNLOAD_FILAMENT_IN_EXTRUDER
RETRY_UNLOAD_FILAMENT_IN_EXTRUDER
IS_FILAMENT_STUCK_IN_EXTRUDER
M118 Filament removed
{% else %}
M118 Tool selected, UNSELECT it
PAUSE_MMU
{% endif %}
{% else %}
M118 Extruder too cold
PAUSE_MMU
{% endif %}
{% endif %}
# Ramming process for standart PLA, code extracted from slic3r gcode
[gcode_macro RAMMING_SLICER]
gcode:
G91
G92 E0
G1 E0.6873 F165
G1 E0.7007 F168
G1 E0.7376 F177
G1 E0.7879 F189
G1 E0.8214 F197
G1 E0.8483 F204
G1 E0.9019 F216
G1 E0.9757 F234
G1 E1.0260 F246
G1 E1.0427 F250
G1 E-15.000 F6000.0
G1 E-24.5000 F5400.0
G1 E-7.0000 F2700.0
G1 E-3.5000 F1620.0
G1 E20.000 F180.0
G1 E-20.000 F160.0
G1 E20.000 F140.0
G1 E-20.000 F120.0
G1 E-50.0000 F2000
G92 E0
# Unload from extruder with ramming
[gcode_macro UNLOAD_FILAMENT_IN_EXTRUDER_WITH_RAMMING]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer.extruder.temperature > printer["gcode_macro VAR_MMU2S"].min_temp_extruder %}
{% if printer["gcode_macro SELECT_TOOL"].tool_selected|int == -1 %}
M118 Ramming and Unloading Filament...
G91
RAMMING_SLICER
UNLOAD_FILAMENT_IN_EXTRUDER
M118 Filament rammed and removed
{% else %}
M118 Tool selected, UNSELECT it
PAUSE_MMU
{% endif %}
{% else %}
M118 Extruder too cold
PAUSE_MMU
{% endif %}
{% endif %}
############################################
#
# Loading/Unloading MACROS from MMU2S to the enter of the extruder gear
#
############################################
# Load filament until the PINDA detect it and push it 10mm more to be sure is well detected
#
# PAUSE_MMU is called if the PINDA does not detect the filament
[gcode_macro LOAD_FILAMENT_TO_PINDA]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro SELECT_TOOL"].tool_selected|int != -1 %}
M118 Loading filament to PINDA ...
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=gear_stepper MOVE={printer["gcode_macro VAR_MMU2S"].pinda_load_length} STOP_ON_ENDSTOP=2
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=gear_stepper MOVE=10
IS_FILAMENT_IN_PINDA
M118 Loading done to PINDA
{% else %}
M118 Cannot load to PINDA, tool not selected !!
{% endif %}
{% endif %}
# Load from the PINDA to the extruder gear
[gcode_macro LOAD_FILAMENT_FROM_PINDA_TO_EXTRUDER]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro SELECT_TOOL"].tool_selected|int != -1 %}
M118 Loading filament from PINDA to extruder ...
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=gear_stepper MOVE={printer["gcode_macro VAR_MMU2S"].bowden_load_length1} SPEED=120 ACCEL=80
MANUAL_STEPPER STEPPER=gear_stepper MOVE={printer["gcode_macro VAR_MMU2S"].bowden_load_length2} SPEED=60 ACCEL=80
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
M118 Loading done from PINDA to extruder
{% else %}
M118 Cannot load to extruder, tool not selected !!
{% endif %}
{% endif %}
# Load from MMU2S to extruder gear by calling LOAD_FILAMENT_TO_PINDA and next LOAD_FILAMENT_FROM_PINDA_TO_EXTRUDER
#
# PAUSE_MMU is called if the PINDA does not detect the filament
[gcode_macro LOAD_FILAMENT_TO_EXTRUDER]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro SELECT_TOOL"].tool_selected|int != -1 %}
M118 Loading filament from MMU to extruder ...
{% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %}
LOAD_FILAMENT_TO_PINDA
{% endif %}
LOAD_FILAMENT_FROM_PINDA_TO_EXTRUDER
M118 Loading done from MMU to extruder
{% else %}
M118 Cannot load to extruder, tool not selected !!
{% endif %}
{% endif %}
# Unload filament until the PINDA detect it and push it -10mm more to be sure is well not detected
#
# PAUSE_MMU is called if the PINDA does detect the filament
[gcode_macro UNLOAD_FILAMENT_FROM_PINDA]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro SELECT_TOOL"].tool_selected|int != -1 %}
M118 Unloading filament from PINDA ...
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=gear_stepper MOVE=-{printer["gcode_macro VAR_MMU2S"].pinda_unload_length}
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=gear_stepper MOVE=-10
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
IS_FILAMENT_STUCK_IN_PINDA
SET_GCODE_VARIABLE MACRO=SELECT_TOOL VARIABLE=color_selected VALUE=-1
M118 Unloading done from PINDA
{% else %}
M118 Cannot unload from PINDA, tool not selected !!
{% endif %}
{% endif %}
# Unload from extruder gear to the PINDA
[gcode_macro UNLOAD_FILAMENT_FROM_EXTRUDER_TO_PINDA]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro SELECT_TOOL"].tool_selected|int != -1 %}
M118 Unloading filament from extruder to PINDA ...
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
{% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %}
MANUAL_STEPPER STEPPER=gear_stepper MOVE=-{printer["gcode_macro VAR_MMU2S"].bowden_unload_length} SPEED=120 ACCEL=80 STOP_ON_ENDSTOP=-2
IS_FILAMENT_STUCK_IN_PINDA
{% else %}
MANUAL_STEPPER STEPPER=gear_stepper MOVE=-{printer["gcode_macro VAR_MMU2S"].bowden_unload_length} SPEED=120 ACCEL=80
{% endif %}
M118 Unloading done from PINDA to extruder
{% else %}
M118 Cannot unload from extruder to PINDA, tool not selected !!
{% endif %}
{% endif %}
# Unload from the extruder gear to the MMU2S by calling UNLOAD_FILAMENT_FROM_EXTRUDER_TO_PINDA and next UNLOAD_FILAMENT_FROM_PINDA
[gcode_macro UNLOAD_FILAMENT_FROM_EXTRUDER]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro SELECT_TOOL"].tool_selected|int != -1 %}
M118 Unloading filament from extruder to MMU ...
UNLOAD_FILAMENT_FROM_EXTRUDER_TO_PINDA
{% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %}
UNLOAD_FILAMENT_FROM_PINDA
{% endif %}
M118 Unloading done from extruder to MMU
{% else %}
M118 Cannot unload from extruder to MMU, tool not selected !!
{% endif %}
{% endif %}
############################################
#
# Endstop check MACROS
# Verify the state of the PINDA or the IR sensor
#
############################################
# Call PAUSE_MMU if the filament is not detected by the IR sensor
[gcode_macro IS_FILAMENT_IN_EXTRUDER]
gcode:
{% if printer["filament_switch_sensor ir_sensor"].filament_detected == True %}
M118 Filament in extruder
{% else %}
M118 Filament not in extruder
PAUSE_MMU
{% endif %}
# Call PAUSE_MMU if the filament is not detected by the PINDA
[gcode_macro IS_FILAMENT_IN_PINDA]
gcode:
QUERY_ENDSTOPS
IS_IN_PINDA
[gcode_macro IS_IN_PINDA]
gcode:
{% if printer.query_endstops.last_query["manual_stepper gear_stepper"] == 1 %}
M118 Filament in PINDA
{% else %}
M118 Filament not in PINDA
PAUSE_MMU
{% endif %}
# Call PAUSE_MMU if the filament is detected by the IR sensor
[gcode_macro IS_FILAMENT_STUCK_IN_EXTRUDER]
gcode:
{% if printer["filament_switch_sensor ir_sensor"].filament_detected == True %}
M118 Filament stuck in extruder
PAUSE_MMU
{% else %}
M118 Filament not in extruder
{% endif %}
# Call PAUSE_MMU if the filament is detected by the PINDA
[gcode_macro IS_FILAMENT_STUCK_IN_PINDA]
gcode:
QUERY_ENDSTOPS
IS_STUCK_IN_PINDA
[gcode_macro IS_STUCK_IN_PINDA]
gcode:
{% if printer.query_endstops.last_query["manual_stepper gear_stepper"] == 1 %}
M118 Filament stuck in PINDA
PAUSE_MMU
{% else %}
M118 Filament not in PINDA
{% endif %}
############################################
#
# M702 macro called by the end-gcode to eject the filament at the end of the print
#
############################################
# Eject the filament with ramming from the extruder nozzle to the MMU2S
[gcode_macro EJECT_RAMMING]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["gcode_macro SELECT_TOOL"].color_selected|int != -1 %}
M118 UT {printer["gcode_macro SELECT_TOOL"].color_selected|int} ...
UNLOAD_FILAMENT_IN_EXTRUDER_WITH_RAMMING
SELECT_TOOL VALUE={printer["gcode_macro SELECT_TOOL"].color_selected|int}
UNLOAD_FILAMENT_FROM_EXTRUDER
{% endif %}
{% endif %}
# M702 first part
# unload filament if inserted into the IR sensor
[gcode_macro M702]
gcode:
UT
QUERY_ENDSTOPS
END_M702
# M702 second part
# Unselect the current tool
[gcode_macro END_M702]
gcode:
{% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %}
{% if printer.query_endstops.last_query["manual_stepper gear_stepper"] != 1 %}
UNSELECT_TOOL
M118 M702 ok ...
{% else %}
M118 M702 Error !!!
{% endif %}
{% else %}
UNSELECT_TOOL
SET_GCODE_VARIABLE MACRO=SELECT_TOOL VARIABLE=color_selected VALUE=-1
M118 M702 ok ...
{% endif %}
############################################
#
# MACROS called during homing to try to eject the filament if loaded
#
############################################
# Preheat the heater if needed and unload the filament with ramming
# eject from nozlle to extruder gear out
[gcode_macro EJECT_FROM_EXTRUDER]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
{% if printer["filament_switch_sensor ir_sensor"].filament_detected == True %}
M118 Filament in extruder, trying to eject it ..
M118 Preheat Nozzle
M109 S{printer["gcode_macro VAR_MMU2S"].extruder_eject_temp}
UNLOAD_FILAMENT_IN_EXTRUDER_WITH_RAMMING
M104 S0
{% else %}
M118 Filament not in extruder
{% endif %}
{% endif %}
# Eject from extruder gear to MMU2S
[gcode_macro EJECT_BEFORE_HOME]
gcode:
M118 Eject Filament if loaded ...
{% if printer["filament_switch_sensor ir_sensor"].filament_detected == True %}
EJECT_FROM_EXTRUDER
IS_FILAMENT_STUCK_IN_EXTRUDER
{% endif %}
{% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %}
{% if printer.query_endstops.last_query["manual_stepper gear_stepper"] == 1 %}
UNLOAD_FILAMENT_FROM_EXTRUDER
IS_FILAMENT_STUCK_IN_PINDA
M118 Filament ejected !
{% else %}
M118 Filament already ejected !
{% endif %}
{% else %}
M118 Filament already ejected !
{% endif %}
############################################
#
# Homing MACROS
# HOME_MMU must be called before using the MMU2S
#
############################################
# Home the MMU
# eject filament if loaded with EJECT_BEFORE_HOME
# next home the mmu with HOME_MMU_ONLY
[gcode_macro HOME_MMU]
variable_home: -1
gcode:
SET_FILAMENT_SENSOR SENSOR=ir_sensor ENABLE=0
SET_GCODE_VARIABLE MACRO=HOME_MMU VARIABLE=home VALUE=1
M118 Homing MMU ...
QUERY_ENDSTOPS
EJECT_BEFORE_HOME
HOME_MMU_ONLY
# Home the idler
[gcode_macro HOME_IDLER]
gcode:
M118 Homing idler
MANUAL_STEPPER STEPPER=idler_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=idler_stepper MOVE=7
MANUAL_STEPPER STEPPER=idler_stepper MOVE=-95
MANUAL_STEPPER STEPPER=idler_stepper SET_POSITION=2
MANUAL_STEPPER STEPPER=idler_stepper MOVE={printer["gcode_macro VAR_MMU2S"].idler_home_position}
# Home the MMU :
# 1) home the idler
# 2) home the color selector (if needed)
# 3) try to load filament 0 to PINDA and then unload it. Used to verify the MMU2S gear
#
# if all is ok, the MMU2S is ready to be used
[gcode_macro HOME_MMU_ONLY]
gcode:
{% if printer["gcode_macro PAUSE_MMU"].is_paused|int == 0 %}
HOME_IDLER
{% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %}
M118 Homing selector
MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=selector_stepper MOVE=-76 STOP_ON_ENDSTOP=1
MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0
{% endif %}
MANUAL_STEPPER STEPPER=idler_stepper MOVE=0
SET_GCODE_VARIABLE MACRO=SELECT_TOOL VARIABLE=tool_selected VALUE=-1
SET_GCODE_VARIABLE MACRO=SELECT_TOOL VARIABLE=color_selected VALUE=-1
M118 Test load filament 0
SELECT_TOOL VALUE=0
{% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %}
LOAD_FILAMENT_TO_PINDA
G4 P1000
UNLOAD_FILAMENT_FROM_PINDA
{% else %}
SET_GCODE_VARIABLE MACRO=SELECT_TOOL VARIABLE=color_selected VALUE=-1
{% endif %}
UNSELECT_TOOL
SET_GCODE_VARIABLE MACRO=HOME_MMU VARIABLE=home VALUE=1
M118 Homing MMU ended ...
{% else %}
M118 Homing MMU failed, MMU is paused, unlock it ...
{% endif %}
###############################################

View File

@@ -0,0 +1,61 @@
# This file contains a configuration snippet for a printer using two
# extruders that are selected by a servo.
# See example.cfg and example-extras.cfg for a description of
# available parameters.
# The primary extruder
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_distance: .004242
nozzle_diameter: 0.500
filament_diameter: 3.500
heater_pin: ar10
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 210
# Script to change back to the main extruder
[gcode_macro T0]
gcode:
SET_SERVO SERVO=extruder_servo angle=100 # Lift secondary extruder
SET_GCODE_OFFSET Z=0 MOVE=1 # Adjust z-height
SET_GCODE_OFFSET X=0 # Clear X offset
ACTIVATE_EXTRUDER EXTRUDER=extruder
# Secondary extruder
[extruder1]
step_pin: ar36
dir_pin: ar34
enable_pin: !ar30
step_distance: .004242
nozzle_diameter: 0.500
filament_diameter: 3.500
heater_pin: ar9
sensor_pin: analog15
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 210
# Script to activate second extruder
[gcode_macro T1]
gcode:
SET_GCODE_OFFSET Z=0.100 MOVE=1 # Adjust z-height
SET_SERVO SERVO=extruder_servo angle=100 # Position second extruder
SET_GCODE_OFFSET X=5 # Account for different X offset
ACTIVATE_EXTRUDER EXTRUDER=extruder1
# Servo definition
[servo extruder_servo]
pin: ar7

View File

@@ -20,16 +20,12 @@ endstop_pin: probe:z_virtual_endstop
position_min: -2 # The Z carriage may need to travel below the Z=0
# homing point if the bed has a significant tilt.
# The homing_override section modifies the default G28 behavior
[homing_override]
set_position_z: 0
axes: z
gcode:
G90
; G1 Z2 F600 ; Uncomment to blindly lift the Z 2mm at start
G28 X0 Y0
G1 X100 Y100 F3600
G28 Z0
# The safe_z_home section modifies the default G28 behavior
[safe_z_home]
home_xy_position: 100,100
speed: 50
z_hop: 15
z_hop_speed: 5
# Example bed_tilt config section
[bed_tilt]
@@ -46,6 +42,6 @@ points:
# Example bed_mesh config section
[bed_mesh]
min_point: 20,20
max_point: 200,200
mesh_min: 20,20
mesh_max: 200,200
probe_count: 4,4

View File

@@ -0,0 +1,45 @@
# This file contains an example configuration with RPi as secondary mcu
# See both the example.cfg and example-extras.cfg file for a
# description of available parameters.
# The rpi microcontroller is used as secondary.
# Typically, both the X and Y axes
# are connected to the main micro-controller. The rpi microcontroller is used
# on non time-critical functions such as enclosure sensors, additional fan or
# light sources
[mcu host]
serial: /tmp/klipper_host_mcu
# Example1: A led strip controlled by the GPIO20 on the RPi
[output_pin caselight]
pin: host:gpio20
# You can also write the pin in extended form by specifying
# the reference gpiochip.
#pin: host:gpiochip0/gpio20
[gcode_macro TOGGLE_CASELIGHT]
gcode:
SET_PIN PIN=caselight VALUE={(not printer['output_pin caselight'].value)|int}
# Example2: Using the i2c bus of the RPi to read a sensor
[temperature_sensor enclosure_temp]
sensor_type: HTU21D
i2c_mcu: host
i2c_bus: i2c.1
htu21d_hold_master: False
[gcode_macro QUERY_ENCLOSURE]
default_parameter_SENSOR: htu21d enclosure_temp
gcode:
{action_respond_info(
"Temperature: %.2f C\n"
"Humidity: %.2f%%" % (
printer[SENSOR].temperature,
printer[SENSOR].humidity))}
# Example 3:Using a pin on another gpiochip connected to the RPi
# (in this case on an MCP23017)
[fan]
pin: host:gpiochip2/gpio7

295
docs/API_Server.md Normal file
View File

@@ -0,0 +1,295 @@
This document describes Klipper's Application Programmer Interface
(API). This interface enables external applications to query and
control the Klipper host software.
Enabling the API socket
=======================
In order to use the API server, the klippy.py host software must be
started with the `-a` parameter. For example:
```
~/klippy-env/bin/python ~/klipper/klippy/klippy.py ~/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log
```
This causes the host software to create a Unix Domain Socket. A client
can then open a connection on that socket and send commands to
Klipper.
Request format
==============
Messages sent and received on the socket are JSON encoded strings
terminated by an ASCII 0x03 character:
```
<json_object_1><0x03><json_object_2><0x03>...
```
Klipper contains a `scripts/whconsole.py` tool that can perform the
above message framing. For example:
```
~/klipper/scripts/whconsole.py /tmp/klippy_uds
```
This tool can read a series of JSON commands from stdin, send them to
Klipper, and report the results. The tool expects each JSON command to
be on a single line, and it will automatically append the 0x03
terminator when transmitting a request. (The Klipper API server does
not have a newline requirement.)
API Protocol
============
The command protocol used on the communication socket is inspired by
[json-rpc](https://www.jsonrpc.org/).
A request might look like:
`{"id": 123, "method": "info", "params": {}}`
and a response might look like:
`{"id": 123, "result": {"state_message": "Printer is ready",
"klipper_path": "/home/pi/klipper", "config_file":
"/home/pi/printer.cfg", "software_version": "v0.8.0-823-g883b1cb6",
"hostname": "octopi", "cpu_info": "4 core ARMv7 Processor rev 4
(v7l)", "state": "ready", "python_path":
"/home/pi/klippy-env/bin/python", "log_file": "/tmp/klippy.log"}}`
Each request must be a JSON dictionary. (This document uses the Python
term "dictionary" to describe a "JSON object" - a mapping of key/value
pairs contained within `{}`.)
The request dictionary must contain a "method" parameter that is the
string name of an available Klipper "endpoint".
The request dictionary may contain a "params" parameter which must be
of a dictionary type. The "params" provide additional parameter
information to the Klipper "endpoint" handling the request. Its
content is specific to the "endpoint".
The request dictionary may contain an "id" parameter which may be of
any JSON type. If "id" is present then Klipper will respond to the
request with a response message containing that "id". If "id" is
omitted (or set to a JSON "null" value) then Klipper will not provide
any response to the request. A response message is a JSON dictionary
containing "id" and "result". The "result" is always a dictionary -
its contents are specific to the "endpoint" handling the request.
If the processing of a request results in an error, then the response
message will contain an "error" field instead of a "result" field. For
example, the request:
`{"id": 123, "method": "gcode/script", "params": {"script": "G1
X200"}}`
might result in an error response such as:
`{"id": 123, "error": {"message": "Must home axis
first: 200.000 0.000 0.000 [0.000]", "error": "WebRequestError"}}`
Klipper will always start processing requests in the order that they
are received. However, some request may not complete immediately,
which could cause the associated response to be sent out of order with
respect to responses from other requests. A JSON request will never
pause the processing of future JSON requests.
Subscriptions
=============
Some Klipper "endpoint" requests allow one to "subscribe" to future
asynchronous update messages.
For example:
`{"id": 123, "method": "gcode/subscribe_output", "params":
{"response_template":{"key": 345}}}`
may initially respond with:
`{"id": 123, "result": {}}`
and cause Klipper to send future messages similar to:
`{"params": {"response": "ok B:22.8 /0.0 T0:22.4 /0.0"}, "key": 345}`
A subscription request accepts a "response_template" dictionary in the
"params" field of the request. That "response_template" dictionary is
used as a template for future asynchronous messages - it may contain
arbitrary key/value pairs. When sending these future asynchronous
messages, Klipper will add a "params" field containing a dictionary
with "endpoint" specific contents to the response template and then
send that template. If a "response_template" field is not provided
then it defaults to an empty dictionary (`{}`).
Available "endpoints"
=====================
By convention, Klipper "endpoints" are of the form
`<module_name>/<some_name>`. When making a request to an "endpoint",
the full name must be set in the "method" parameter of the request
dictionary (eg, `{"method"="gcode/restart"}`).
### info
The "info" endpoint is used to obtain system and version information
from Klipper. It is also used to provide the client's version
information to Klipper. For example:
`{"id": 123, "method": "info", "params": { "client_info": { "version":
"v1"}}}`
If present, the "client_info" parameter must be a dictionary, but that
dictionary may have arbitrary contents. Clients are encouraged to
provide the name of the client and its software version when first
connecting to the Klipper API server.
### emergency_stop
The "emergency_stop" endpoint is used to instruct Klipper to
transition to a "shutdown" state. It behaves similarly to the G-Code
`M112` command. For example:
`{"id": 123, "method": "emergency_stop"}`
### objects/list
This endpoint queries the list of available printer "objects" that one
may query (via the "objects/query" endpoint). For example:
`{"id": 123, "method": "objects/list"}`
might return:
`{"id": 123, "result": {"objects":
["webhooks", "configfile", "heaters", "gcode_move", "query_endstops",
"idle_timeout", "toolhead", "extruder"]}}`
### objects/query
This endpoint allows one to query information from printer objects.
For example:
`{"id": 123, "method": "objects/query", "params": {"objects":
{"toolhead": ["position"], "webhooks": null}}}`
might return:
`{"id": 123, "result": {"status": {"webhooks": {"state": "ready",
"state_message": "Printer is ready"}, "toolhead": {"position":
[0.0, 0.0, 0.0, 0.0]}}, "eventtime": 3051555.377933684}}`
The "objects" parameter in the request must be a dictionary containing
the printer objects that are to be queried - the key contains the
printer object name and the value is either "null" (to query all
fields) or a list of field names.
The response message will contain a "status" field containing a
dictionary with the queried information - the key contains the printer
object name and the value is a dictionary containing its fields. The
response message will also contain an "eventtime" field containing the
timestamp from when the query was taken.
Available fields are documented in the
[Command Template](Command_Templates.md#the-printer-variable)
document.
### objects/subscribe
This endpoint allows one to query and then subscribe to information
from printer objects. The endpoint request and response is identical
to the "objects/query" endpoint. For example:
`{"id": 123, "method": "objects/subscribe", "params":
{"objects":{"toolhead": ["position"], "webhooks": ["state"]},
"response_template":{}}}`
might return:
`{"id": 123, "result": {"status": {"webhooks": {"state": "ready"},
"toolhead": {"position": [0.0, 0.0, 0.0, 0.0]}},
"eventtime": 3052153.382083195}}`
and result in subsequent asynchronous messages such as:
`{"params": {"status": {"webhooks": {"state": "shutdown"}},
"eventtime": 3052165.418815847}}`
### gcode/help
This endpoint allows one to query available G-Code commands that have
a help string defined. For example:
`{"id": 123, "method": "gcode/help"}`
might return:
`{"id": 123, "result": {"RESTORE_GCODE_STATE": "Restore a previously
saved G-Code state", "PID_CALIBRATE": "Run PID calibration test",
"QUERY_ADC": "Report the last value of an analog pin", ...}}`
### gcode/script
This endpoint allows one to run a series of G-Code commands. For example:
`{"id": 123, "method": "gcode/script", "params": {"script": "G90"}}`
If the provided G-Code script raises an error, then an error response
is generated. However, if the G-Code command produces terminal output,
that terminal output is not provided in the response. (Use the
"gcode/subscribe_output" endpoint to obtain G-Code terminal output.)
If there is a G-Code command being processed when this request is
received, then the provided script will be queued. This delay could be
significant (eg, if a G-Code wait for temperature command is running).
The JSON response message is sent when the processing of the script
fully completes.
### gcode/restart
This endpoint allows one to request a restart - it is similar to
running the G-Code "RESTART" command. For example:
`{"id": 123, "method": "gcode/restart"}`
As with the "gcode/script" endpoint, this endpoint only completes
after any pending G-Code commands complete.
### gcode/firmware_restart
This is similar to the "gcode/restart" endpoint - it implements the
G-Code "FIRMWARE_RESTART" command. For example:
`{"id": 123, "method": "gcode/firmware_restart"}`
As with the "gcode/script" endpoint, this endpoint only completes
after any pending G-Code commands complete.
### gcode/subscribe_output
This endpoint is used to subscribe to G-Code terminal messages that
are generated by Klipper. For example:
`{"id": 123, "method": "gcode/subscribe_output", "params":
{"response_template":{}}}`
might later produce asynchronous messages such as:
`{"params": {"response": "// Klipper state: Shutdown"}}`
This endpoint is intended to support human interaction via a "terminal
window" interface. Parsing content from the G-Code terminal output is
discouraged. Use the "objects/subscribe" endpoint to obtain updates on
Klipper's state.
### pause_resume/cancel
This endpoint is similar to running the "PRINT_CANCEL" G-Code command.
For example:
`{"id": 123, "method": "pause_resume/cancel"}`
As with the "gcode/script" endpoint, this endpoint only completes
after any pending G-Code commands complete.
### pause_resume/pause
This endpoint is similar to running the "PAUSE" G-Code command. For
example:
`{"id": 123, "method": "pause_resume/pause"}`
As with the "gcode/script" endpoint, this endpoint only completes
after any pending G-Code commands complete.
### pause_resume/resume
This endpoint is similar to running the "RESUME" G-Code command. For
example:
`{"id": 123, "method": "pause_resume/resume"}`
As with the "gcode/script" endpoint, this endpoint only completes
after any pending G-Code commands complete.
### query_endstops/status
This endpoint will query the active endpoints and return their status.
For example:
`{"id": 123, "method": "query_endstops/status"}`
might return:
`{"id": 123, "result": {"y": "open", "x": "open", "z": "TRIGGERED"}}`
As with the "gcode/script" endpoint, this endpoint only completes
after any pending G-Code commands complete.

View File

@@ -20,24 +20,20 @@ control_pin: P1.26
If the BL-Touch will be used to home the Z axis then set `endstop_pin:
probe:z_virtual_endstop` in the `[stepper_z]` config section and add a
`[homing_override]` config section to raise the z-axis, home the
x/y-axis, move to the center of the bed, and home the z-axis. For
example:
`[safe_z_home]` config section to raise the z axis, home the xy axes,
move to the center of the bed, and home the z axis. For example:
```
[homing_override]
gcode:
G90 ; Use absolute position mode
G1 Z10 ; Move up 10mm
G28 X Y
G1 X166 Y120 F6000 ; Change the X and Y coordinates to the center of your print bed
G28 Z
set_position_z: 0.0
[safe_z_home]
home_xy_position: 100,100 # Change coordinates to the center of your print bed
speed: 50
z_hop: 10 # Move up 10mm
z_hop_speed: 5
```
It's important that the initial Z upwards movement in the
homing_override is high enough that the probe doesn't hit anything
even if the probe pin happens to be in its lowest state.
It's important that the z_hop movement in safe_z_home is high enough
that the probe doesn't hit anything even if the probe pin happens to
be in its lowest state.
Initial tests
=============
@@ -52,24 +48,156 @@ the probe should be lit. If there are any errors, for example the
probe is flashing red or the pin is down instead of up, please turn
off the printer and check the wiring and configuration.
If the above is looking good, it's time to test that the probe
responds to commands from the firmware. First run `BLTOUCH_DEBUG
COMMAND=pin_down` in your printer terminal. Verify that the pin moves
down, and that the red LED on the probe turns off. If not, check your
wiring and configuration again. Next issue a `BLTOUCH_DEBUG
COMMAND=pin_up`, verify that the pin moves up, and that the red light
turns on again. If it's flashing then there's some problem.
If the above is looking good, it's time to test that the control pin
is working correctly. First run `BLTOUCH_DEBUG COMMAND=pin_down` in
your printer terminal. Verify that the pin moves down and that the red
LED on the probe turns off. If not, check your wiring and
configuration again. Next issue a `BLTOUCH_DEBUG COMMAND=pin_up`,
verify that the pin moves up, and that the red light turns on
again. If it's flashing then there's some problem.
Now, it's time to test homing with a twist. Instead of letting the
probe pin touch the print bed, let it touch the nail on your
finger. So issue a `G28`, wait until it starts to move down, and stop
the movement by very gently touching the pin with your nail. You
probably have to do it twice, since the default configuration makes it
probe twice. But be prepared to turn off the printer, to avoid damage,
if it doesn't stop when you touch the pin.
The next step is to confirm that the sensor pin is working correctly.
Run `BLTOUCH_DEBUG COMMAND=pin_down`, verify that the pin moves down,
run `BLTOUCH_DEBUG COMMAND=touch_mode`, run `QUERY_PROBE`, and verify
that command reports "probe: open". Then while gently pushing the pin
up slightly with the nail of your finger run `QUERY_PROBE` again.
Verify the command reports "probe: TRIGGERED". If either query does
not report the correct message then check your wiring and
configuration again. At the completion of this test run `BLTOUCH_DEBUG
COMMAND=pin_up` and verify that the pin moves up.
If that was successful, do another `G28` but this time let it touch
the bed as it should.
After completing the BL-Touch control pin and sensor pin tests, it is
now time to test probing, but with a twist. Instead of letting the
probe pin touch the print bed, let it touch the nail on your finger.
Position the toolhead far from the bed, issue a `G28` (or `PROBE` if
not using probe:z_virtual_endstop), wait until the toolhead starts to
move down, and stop the movement by very gently touching the pin with
your nail. You may have to do it twice, since the default homing
configuration probes twice. Be prepared to turn off the printer if it
doesn't stop when you touch the pin.
If that was successful, do another `G28` (or `PROBE`) but this time
let it touch the bed as it should.
BL-Touch gone bad
=================
Once the BL-Touch is in inconsistent state, it starts blinking red.
You can force it to leave that state by issuing:
BLTOUCH_DEBUG COMMAND=reset
This may happen if its calibration is interrupted by the probe being
blocked from being extracted.
However, the BL-Touch may also not be able to calibrate itself
anymore. This happens if the screw on its top is in the wrong position
or the magnetic core inside the probe pin has moved. If it has moved
up so that it sticks to the screw, it may not be able to lower its pin
anymore. With this behavior you need to open the screw and use a
ball-point pen to push it gently back into place. Re-Insert the pin
into the BL-Touch so that it falls into the extracted position.
Carefully readjust the headless screw into place. You need to find the
right position so it is able to lower and raise the pin and the red
light turns on and of. Use the `reset`, `pin_up` and `pin_down`
commands to achieve this.
BL-Touch "clones"
=================
Many BL-Touch "clone" devices work correctly with Klipper using the
default configuration. However, some "clone" devices may require
configuration of `pin_up_reports_not_triggered` or
`pin_up_touch_mode_reports_triggered`.
Important! Do not configure `pin_up_reports_not_triggered` or
`pin_up_touch_mode_reports_triggered` to False without first following
these directions. Do not configure either of these to False on a
genuine BL-Touch. Incorrectly setting these to False can increase
probing time and can increase the risk of damaging the printer.
Some "clone" devices are unable to perform Klipper's internal sensor
verification test. On these devices, attempts to home or probe can
result in Klipper reporting a "BLTouch failed to verify sensor state"
error. If this occurs, then manually run the steps to confirm the
sensor pin is working as described in the
[initial tests section](#initial-tests). If the `QUERY_PROBE` commands
in that test always produce the expected results and "BLTouch failed
to verify sensor state" errors still occur, then it may be necessary
to set `pin_up_touch_mode_reports_triggered` to False in the Klipper
config file.
A rare number of old "clone" devices are unable to report when they
have successfully raised their probe. On these devices Klipper will
report a "BLTouch failed to raise probe" error after every home or
probe attempt. One can test for these devices - move the head far from
the bed, run `BLTOUCH_DEBUG COMMAND=pin_down`, verify the pin has
moved down, run `QUERY_PROBE`, verify that command reports "probe:
open", run `BLTOUCH_DEBUG COMMAND=pin_up`, verify the pin has moved
up, and run `QUERY_PROBE`. If the pin remains up, the device does not
enter an error state, and the first query reports "probe: open" while
the second query reports "probe: TRIGGERED" then it indicates that
`pin_up_reports_not_triggered` should be set to False in the Klipper
config file.
BL-Touch v3
===========
Some BL-Touch v3.0 and BL-Touch 3.1 devices may require configuring
`probe_with_touch_mode` in the printer config file.
If the BL-Touch v3.0 has its signal wire connected to an endstop pin
(with a noise filtering capacitor), then the BL-Touch v3.0 may not be
able to consistently send a signal during homing and probing. If the
`QUERY_PROBE` commands in the [initial tests section](#initial-tests)
always produce the expected results, but the toolhead does not always
stop during G28/PROBE commands, then it is indicative of this issue. A
workaround is to set `probe_with_touch_mode: True` in the config file.
The BL-Touch v3.1 may incorrectly enter an error state after a
successful probe attempt. The symptoms are an occasional flashing
light on the BL-Touch v3.1 that lasts for a couple of seconds after it
successfully contacts the bed. Klipper should clear this error
automatically and it is generally harmless. However, one may set
`probe_with_touch_mode` in the config file to avoid this issue.
Important! Some "clone" devices and the BL-Touch v2.0 (and earlier)
may have reduced accuracy when `probe_with_touch_mode` is set to True.
Setting this to True also increases the time it takes to deploy the
probe. If configuring this value on a "clone" or older BL-Touch
device, be sure to test the probe accuracy before and after setting
this value (use the `PROBE_ACCURACY` command to test).
Multi-probing without stowing
=============================
By default, Klipper will deploy the probe at the start of each probe
attempt and then stow the probe afterwards. This repetitive deploying
and stowing of the probe may increase the total time of calibration
sequences that involve many probe measurements. Klipper supports
leaving the probe deployed between consecutive probes, which can
reduce the total time of probing. This mode is enabled by configuring
`stow_on_each_sample` to False in the config file.
Important! Setting `stow_on_each_sample` to False can lead to Klipper
making horizontal toolhead movements while the probe is deployed. Be
sure to verify all probing operations have sufficient Z clearance
prior to setting this value to False. If there is insufficient
clearance then a horizontal move may cause the pin to catch on an
obstruction and result in damage to the printer.
Important! It is recommended to use `probe_with_touch_mode` configured
to True when using `stow_on_each_sample` configured to False. Some
"clone" devices may not detect a subsequent bed contact if
`probe_with_touch_mode` is not set. On all devices, using the
combination of these two settings simplifies the device signaling,
which can improve overall stability.
Note, however, that some "clone" devices and the BL-Touch v2.0 (and
earlier) may have reduced accuracy when `probe_with_touch_mode` is set
to True. On these devices it is a good idea to test the probe accuracy
before and after setting `probe_with_touch_mode` (use the
`PROBE_ACCURACY` command to test).
Calibrating the BL-Touch offsets
================================
@@ -86,49 +214,41 @@ far above the nozzle as possible to avoid it touching printed parts.
If an adjustment is made to the probe position, then rerun the probe
calibration steps.
BL-Touch gone bad
=================
BL-Touch output mode
====================
Once the BL-Touch is in inconsistent state, it starts blinking
red. You can force it to leave that state by issuing:
* A BL-Touch V3.0 supports setting a 5V or OPEN-DRAIN output mode,
a BL-Touch V3.1 supports this too, but can also store this in its
internal EEPROM. If your controller board needs the fixed 5V high
logic level of the 5V mode you may set the 'set_output_mode'
parameter in the [bltouch] section of the printer config file to
"5V".
BLTOUCH_DEBUG COMMAND=reset
*** Only use the 5V mode if your controller boards input line is
5V tolerant. This is why the default configuration of these BL-Touch
versions is OPEN-DRAIN mode. You could potentially damage your
controller boards CPU ***
This may happen if its calibration is interrupted by the probe being
blocked from being extracted.
So therefore:
If a controller board NEEDs 5V mode AND it is 5V tolerant on its
input signal line AND if
However, the BL-Touch may also not be able to calibrate itself
anymore. This happens if the screw on its top is in the wrong position
or the magnetic core inside the probe pin has moved. If it has moved
up so that it sticks to the screw, it may not be able to lower its pin
anymore. With this behavior you need to open the screw and use a
ball-point pen to push it gently back into place. Re-Insert the pin
into the BL-Touch so that it falls into the extracted
position. Carefully readjust the headless screw into place. You need
to find the right position so it is able to lower and raise the pin
and the red light turns on and of. Use the `reset`, `pin_up` and
`pin_down` commands to achieve this.
- you have a BL-Touch Smart V3.0, you need the use 'set_output_mode: 5V'
parameter to ensure this setting at each startup, since the probe
cannot remember the needed setting.
- you have a BL-Touch Smart V3.1, you have the choice of using
'set_output_mode: 5V' or storing the mode once by use of a
'BLTOUCH_STORE MODE=5V' command manually and NOT using the parameter
'set_output_mode:'.
- you have some other probe: Some probes have a trace on the circuit board
to cut or a jumper to set in order to (permanently) set the output mode.
In that case, omit the 'set_output_mode' parameter completely.
Troubleshooting
===============
* If you are sure the wiring of the BL-Touch is correct and every
attempt to probe with the BL-Touch reports "BLTouch failed to verify
sensor state" then it may be necessary to add
`pin_up_touch_mode_reports_triggered: False` to the bltouch config
section. The BL-Touch v3 and many clones require this setting.
* A BL-Touch v3 may not work correctly when its signal wire is
connected to the Z end-stop pin on some printer boards. The symptoms
of this problem are: the BL-Touch probe deploys, the printer
descends, the probe contacts a surface, the BL-Touch raises the
probe, the BL-Touch does not successfully notify the
micro-controller, and the printer continues to descend. The Z
end-stop pin on some printer boards have a capacitor to filter the
signal which the BL-Touch v3 may not support. The simplest solution
is to connect the BL-Touch v3 sensor wire to an available pin on the
printer board that is not associated with an end-stop (and thus is
unlikely to have a capacitor). An alternative solution is to
physically alter the printer board to disable the given end-stop
capacitor or to add a hardware "pull up resistor" to the BL-Touch v3
sensor wire.
If you have a V3.1, do not automate or repeat storing the output mode to
avoid wearing out the EEPROM of the probe.The BLTouch EEPROM is good for
about 100.000 updates. 100 stores per day would add up to about 3 years
of operation prior to wearing it out. Thus, storing the output mode in a
V3.1 is designed by the vendor to be a complicated operation (the factory
default being a safe OPEN DRAIN mode) and is not suited to be repeatedly
issued by any slicer, macro or anything else, it is preferably only to be
used when first integrating the probe into a printers electronics.

382
docs/Bed_Mesh.md Normal file
View File

@@ -0,0 +1,382 @@
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
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
the probing process.
Prior to Mesh Calibration you will need to be sure that your Probe's
Z-Offset is calibrated. If using an endstop for Z homing it will need
to be calibrated as well. See [Probe_Calibrate](Probe_Calibrate.md)
and Z_ENDSTOP_CALIBRATE in [Manual_Level](Manual_Level.md) for more
information.
## Basic Configuration
### Rectangular Beds
This example assumes a printer with a 250 mm x 220 mm rectangular
bed and a probe with an x-offset of 24 mm and y-offset of 5 mm.
```
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 35,6
mesh_max: 240, 198
probe_count: 5,3
```
- `speed: 120`\
_Default Value: 50_\
The speed in which the tool moves between points.
- `horizontal_move_z: 5`\
_Default Value: 5_\
The Z coordinate the probe rises to prior to traveling between points.
- `mesh_min: 35,6`\
_Required_\
The first probed coordinate, nearest to the origin. This coordinate
is relative to the probe's location.
- `mesh_max: 240,198`\
_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
the probe's location.
- `probe_count: 5,3`\
_Default Value: 3,3_\
The number of points to probe on each axis, specified as x,y integer
values. In this example 5 points will be probed along the X axis, with
3 points along the Y axis, for a total of 15 probed points. Note that
if you wanted a square grid, for example 3x3, this could be specified
as a single integer value that is used for both axes, ie `probe_count: 3`.
Note that a mesh requires a minimum probe_count of 3 along each axis.
The illustration below demonstrates how the `mesh_min`, `mesh_max`, and
`probe_count` options are used to generate probe points. The arrows indicate
the direction of the probing procedure, beginning at `mesh_min`. For reference,
when the probe is at `mesh_min` the nozzle will be at (11, 1), and when the probe
is at `mesh_max`, the nozzle will be at (206, 193).
![bedmesh_rect_basic](img/bedmesh_rect_basic.svg)
### Round beds
This example assumes a printer equipped with a round bed radius of 100mm.
We will use the same probe offsets as the rectangular example, 24 mm on X
and 5 mm on Y.
```
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_radius: 75
mesh_origin: 0,0
round_probe_count: 5
```
- `mesh_radius: 75`\
_Required_\
The radius of the probed mesh in mm, relative to the `mesh_origin`. Note
that the probe's offsets limit the size of the mesh radius. In this example,
a radius larger than 76 would move the tool beyond the range of the printer.
- `mesh_origin: 0,0`\
_Default Value: 0,0_\
The center point of the mesh. This coordinate is relative to the probe's
location. While the default is 0,0, it may be useful to adjust the origin
in an effort to probe a larger portion of the bed. See the illustration
below.
- `round_probe_count: 5`\
_Default Value: 5_\
This is an integer value that defines the maximum number of probed points
along the X and Y axes. By "maximum", we mean the number of points probed
along the mesh origin. This value must be an odd number, as it is required
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
of 85.
![bedmesh_round_basic](img/bedmesh_round_basic.svg)
## Advanced Configuration
Below the more advanced configuration options are explained in detail. Each
example will build upon the basic rectangular bed configuration shown above.
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
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,
attempting to simulate the material properties of the bed. Bed Mesh offers
lagrange and bicubic interpolation to accomplish this.
```
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 35,6
mesh_max: 240, 198
probe_count: 5,3
mesh_pps: 2,3
algorithm: bicubic
bicubic_tension: 0.2
```
- `mesh_pps: 2,3`\
_Default Value: 2,2_\
The `mesh_pps` option is shorthand for Mesh Points Per Segment. This
option specifies how many points to interpolate for each segment along
the x and y axes. Consider a 'segment' to be the space between each
probed point. Like `probe_count`, `mesh_pps` is specified as an x,y
integer pair, and also may be specified a single integer that is applied
to both axes. In this example there are 4 segments along the X axis
and 2 segments along the Y axis. This evaluates to 8 interpolated
points along X, 6 interpolated points along Y, which results in a 13x8
mesh. Note that if mesh_pps is set to 0 then mesh interpolation is
disabled and the probed matrix will be sampled directly.
- `algorithm: lagrange`\
_Default Value: lagrange_\
The algorithm used to interpolate the mesh. May be `lagrange` or `bicubic`.
Lagrange interpolation is capped at 6 probed points as oscillation tends to
occur with a larger number of samples. Bicubic interpolation requires a
minimum of 4 probed points along each axis, if less than 4 points are
specified then lagrange sampling is forced. If `mesh_pps` is set to 0 then
this value is ignored as no mesh interpolation is done.
- `bicubic_tension: 0.2`\
_Default Value: 0.2_\
If the `algorithm` option is set to bicubic it is possible to specify the
tension value. The higher the tension the more slope is interpolated. Be
careful when adjusting this, as higher values also create more overshoot,
which will result in interpolated values higher or lower than your probed
points.
The illustration below shows how the options above are used to generate an
interpolated mesh.
![bedmesh_interpolated](img/bedmesh_interpolated.svg)
### Move Splitting
Bed Mesh works by intercepting gcode move commands and applying a transform
to their Z coordinate. Long moves must be and split into smaller moves
to correctly follow the shape of the bed. The options below control the
splitting behavior.
```
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 35,6
mesh_max: 240, 198
probe_count: 5,3
move_check_distance: 5
split_delta_z: .025
```
- `move_check_distance: 5`\
_Default Value: 5_\
The minimum distance to check for the desired change in Z before performing
a split. In this example, a move longer than 5mm will be traversed by the
algorithm. Each 5mm a mesh Z lookup will occur, comparing it with the Z
value of the previous move. If the delta meets the threshold set by
`split_delta_z`, the move will be split and traversal will continue. This
process repeats until the end of the move is reached, where a final
adjustment will be applied. Moves shorter than the `move_check_distance`
have the correct Z adjustment applied directly to the move without
traversal or splitting.
- `split_delta_z: .025`\
_Default Value: .025_\
As mentioned above, this is the minimum deviation required to trigger a
move split. In this example, any Z value with a deviation +/- .025mm
will trigger a split.
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.
### Mesh Fade
When "fade" is enabled Z adjustment is phased out over a distance defined
by the configuration. This is accomplished by applying small adjustments
to the layer height, either increasing or decreasing depending on the shape
of the bed. When fade has completed, Z adjustment is no longer applied,
allowing the top of the print to be flat rather than mirror the shape of the
bed. Fade also may have some undesirable traits, if you fade too quickly it
can result in visible artifacts on the print. Also, if your bed is
significantly warped, fade can shrink or stretch the Z height of the print.
As such, fade is disabled by default.
```
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 35,6
mesh_max: 240, 198
probe_count: 5,3
fade_start: 1
fade_end: 10
fade_target: 0
```
- `fade_start: 1`\
_Default Value: 1_\
The Z height in which to start phasing out adjustment. It is a good idea
to get a few layers down before starting the fade process.
- `fade_end: 10`\
_Default Value: 0_\
The Z height in which fade should complete. If this value is lower than
`fade_start` then fade is disabled. This value may be adjusted depending
on how warped the print surface is. A significantly warped surface should
fade out over a longer distance. A near flat surface may be able to reduce
this value to phase out more quickly. 10mm is a sane value to begin with if
using the default value of 1 for `fade_start`.
- `fade_target: 0`\
_Default Value: The average Z value of the mesh_\
The `fade_target` can be thought of as an additional Z offset applied to the
entire bed after fade completes. Generally speaking we would like this value
to be 0, however there are circumstances where it should not be. For
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
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
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.
```
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 35,6
mesh_max: 240, 198
probe_count: 5,3
relative_reference_index: 7
```
- `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.
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.
## Bed Mesh Gcodes
### Calibration
`BED_MESH_CALIBRATE METHOD=[manual | automatic] [<probe_parameter>=<value>]
[<mesh_parameter>=<value>]`\
_Default Method: automatic if a probe is detected, otherwise manual_
Initiates the probing procedure for Bed Mesh Calibration. If `METHOD=manual`
is selected then manual probing will occur. When switching between automatic
and manual probing the generated mesh points will automatically be adjusted.
It is possible to specify mesh parameters to modify the probed area. The
following parameters are available:
- Rectangular beds (cartesian):
- `MESH_MIN`
- `MESH_MAX`
- `PROBE_COUNT`
- Round beds (delta):
- `MESH_RADIUS`
- `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`
After a BED_MESH_CALIBRATE has been performed, it is possible to save the
current mesh state into a named profile. This makes it possible to load
a mesh without re-probing the bed. After a profile has been saved using
`BED_MESH_PROFILE SAVE=name` the `SAVE_CONFIG` gcode may be executed
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:
`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.
### Output
`BED_MESH_OUTPUT PGP=[0 | 1]`
Outputs the current mesh state to the terminal. Note that the mesh itself
is output
The PGP parameter is shorthand for "Print Generated Points". If `PGP=1` is
set, the generated probed points will be output to the terminal:
```
// bed_mesh: generated points
// Index | Tool Adjusted | Probe
// 0 | (11.0, 1.0) | (35.0, 6.0)
// 1 | (62.2, 1.0) | (86.2, 6.0)
// 2 | (113.5, 1.0) | (137.5, 6.0)
// 3 | (164.8, 1.0) | (188.8, 6.0)
// 4 | (216.0, 1.0) | (240.0, 6.0)
// 5 | (216.0, 97.0) | (240.0, 102.0)
// 6 | (164.8, 97.0) | (188.8, 102.0)
// 7 | (113.5, 97.0) | (137.5, 102.0)
// 8 | (62.2, 97.0) | (86.2, 102.0)
// 9 | (11.0, 97.0) | (35.0, 102.0)
// 10 | (11.0, 193.0) | (35.0, 198.0)
// 11 | (62.2, 193.0) | (86.2, 198.0)
// 12 | (113.5, 193.0) | (137.5, 198.0)
// 13 | (164.8, 193.0) | (188.8, 198.0)
// 14 | (216.0, 193.0) | (240.0, 198.0)
```
The "Tool Adjusted" points refer to the nozzle location for each point, and
the "Probe" points refer to the probe location. Note that when manually
probing the "Probe" points will refer to both the tool and nozzle locations.
### Clear Mesh State
`BED_MESH_CLEAR`
This gcode may be used to clear the internal mesh state.

View File

@@ -203,20 +203,20 @@ The test was last run on commit `b161a69e` with gcc version `pru-gcc
The following configuration sequence is used on the STM32F042:
```
allocate_oids count=3
config_stepper oid=0 step_pin=PA0 dir_pin=PA1 min_stop_interval=0 invert_step=0
config_stepper oid=1 step_pin=PA2 dir_pin=PA3 min_stop_interval=0 invert_step=0
config_stepper oid=2 step_pin=PA6 dir_pin=PA7 min_stop_interval=0 invert_step=0
config_stepper oid=0 step_pin=PA1 dir_pin=PA2 min_stop_interval=0 invert_step=0
config_stepper oid=1 step_pin=PA3 dir_pin=PA2 min_stop_interval=0 invert_step=0
config_stepper oid=2 step_pin=PB8 dir_pin=PA2 min_stop_interval=0 invert_step=0
finalize_config crc=0
```
The test was last run on commit `c105adc8` with gcc version
`arm-none-eabi-gcc (GNU Tools 7-2018-q3-update) 7.3.1`.
The test was last run on commit `0b0c47c5` with gcc version
`arm-none-eabi-gcc (Fedora 9.2.0-1.fc30) 9.2.0`.
| stm32f042 | ticks |
| ---------------- | ----- |
| 1 stepper | 308 |
| 2 stepper | 638 |
| 3 stepper | 1021 |
| 1 stepper | 247 |
| 2 stepper | 328 |
| 3 stepper | 558 |
### STM32F103 step rate benchmark ###
@@ -333,26 +333,53 @@ micro-controller.
The following configuration sequence is used on the SAMD51:
```
allocate_oids count=4
allocate_oids count=5
config_stepper oid=0 step_pin=PA22 dir_pin=PA20 min_stop_interval=0 invert_step=0
config_stepper oid=1 step_pin=PA22 dir_pin=PA21 min_stop_interval=0 invert_step=0
config_stepper oid=2 step_pin=PA22 dir_pin=PA19 min_stop_interval=0 invert_step=0
config_stepper oid=3 step_pin=PA22 dir_pin=PA18 min_stop_interval=0 invert_step=0
config_stepper oid=4 step_pin=PA23 dir_pin=PA17 min_stop_interval=0 invert_step=0
finalize_config crc=0
```
The test was last run on commit `8d4a5c16` with gcc version
`arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0` on a SAMD51G19A
The test was last run on commit `524ebbc7` with gcc version
`arm-none-eabi-gcc (Fedora 9.2.0-1.fc30) 9.2.0` on a SAMD51J19A
micro-controller.
| samd51 | ticks |
| -------------------- | ----- |
| 1 stepper | 516 |
| 2 stepper | 520 |
| 3 stepper | 519 |
| 4 stepper | 655 |
| 1 stepper (no delay) | 41 |
| 3 stepper (no delay) | 197 |
| 3 stepper | 520 |
| 4 stepper | 631 |
| 1 stepper (200Mhz) | 839 |
| 2 stepper (200Mhz) | 838 |
| 3 stepper (200Mhz) | 838 |
| 4 stepper (200Mhz) | 838 |
| 5 stepper (200Mhz) | 891 |
| 1 stepper (no delay) | 42 |
| 3 stepper (no delay) | 194 |
### Linux MCU step rate benchmark ###
The following configuration sequence is used on a Raspberry Pi:
```
allocate_oids count=3
config_stepper oid=0 step_pin=gpio2 dir_pin=gpio3 min_stop_interval=0 invert_step=0
config_stepper oid=1 step_pin=gpio4 dir_pin=gpio5 min_stop_interval=0 invert_step=0
config_stepper oid=2 step_pin=gpio6 dir_pin=gpio7 min_stop_interval=0 invert_step=0
finalize_config crc=0
```
The test was last run on commit `06437c58` with gcc version `gcc
(Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516` on a Raspberry Pi 3
(revision a22082).
| Linux (RPi3) | ticks |
| -------------------- | ----- |
| 1 stepper | 340 |
| 2 stepper | 356 |
| 3 stepper | 450 |
## Command dispatch benchmark ##

View File

@@ -193,9 +193,8 @@ 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).
To flash a bootloader with OpenOCD use a chip config similar to:
To flash a bootloader with OpenOCD use the following chip config:
```
set CHIPNAME at91samd21g18
source [find target/at91samdXX.cfg]
```
Obtain a bootloader - for example:
@@ -231,9 +230,8 @@ SAMD51 micro-controllers (Adafruit Metro-M4 and similar)
Like the SAMD21, the SAMD51 bootloader is flashed via the ARM Serial
Wire Debug (SWD) interface. To flash a bootloader with
[OpenOCD on a Raspberry Pi](#running-openocd-on-the-raspberry-pi) use
a chip config similar to:
the following chip config:
```
set CHIPNAME at91samd51g19
source [find target/atsame5x.cfg]
```
Obtain a bootloader - several bootloaders are available from
@@ -301,6 +299,126 @@ bootloader is still active (the bootloader will flash a board led
while it is running). Alternatively, set the "boot 0" pin to low and
"boot 1" pin to high to stay in the bootloader after a reset.
## STM32F103 with HID bootloader ##
The [HID bootloader](https://github.com/Serasidis/STM32_HID_Bootloader) is a
compact, driverless bootloader capable of flashing over USB. Also available
is a [fork with builds specific to the SKR Mini E3 1.2](
https://github.com/Arksine/STM32_HID_Bootloader/releases/tag/v0.5-beta).
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
section above, substituting the file name for the desired hid bootloader binary
(ie: hid_generic_pc13.bin for the blue pill).
It is not possible to use stm32flash for the SKR Mini E3 as the boot0 pin is
tied directly to ground and not broken out via header pins. It is recommended
to use a STLink V2 with STM32Cubeprogrammer to flash the bootloader. If you
don't have access to a STLink it is also possible to use a [Raspberry Pi and
OpenOCD](#running-openocd-on-the-raspberry-pi) with the following chip config:
```
source [find target/stm32f1x.cfg]
```
If you wish you can make a backup of the current flash with the following
command. Note that it may take some time to complete:
```
flash read_bank 0 btt_skr_mini_e3_backup.bin
```
finally, you can flash with commands similar to:
```
stm32f1x mass_erase 0
program hid_btt_skr_mini_e3.bin verify 0x08000000
```
NOTES:
- The example above erases the chip then programs the bootloader. Regardless
of the method chosen to flash it is recommended to erase the chip prior to
flashing.
- Prior flashing the SKR Mini E3 with this bootloader you should be aware
that you will no longer be able to update firmware via the sdcard.
- You may need to hold down the reset button on the board while launching
OpenOCD. It should display something like:
```
Open On-Chip Debugger 0.10.0+dev-01204-gc60252ac-dirty (2020-04-27-16:00)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter speed' not 'adapter_khz'
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG and SWD modes enabled
Info : clock speed 40 kHz
Info : SWD DPIDR 0x1ba01477
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : stm32f1x.cpu: external reset detected
Info : starting gdb server for stm32f1x.cpu on 3333
Info : Listening on port 3333 for gdb connections
```
After which you can release the reset button.
This bootloader requires 2KiB of flash space (the application
must be compiled with a start address of 2KiB).
The hid-flash program is used to upload a binary to the bootloader. You
can install this software with the following commands:
```
sudo apt install libusb-1.0
cd ~/klipper/lib/hidflash
make
```
If the bootloader is running you can flash with something like:
```
~/klipper/lib/hidflash/hid-flash ~/klipper/out/klipper.bin
```
alternatively, you can use `make flash` to flash klipper directly:
```
make flash FLASH_DEVICE=1209:BEBA
```
OR if klipper has been previously flashed:
```
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
the SKR Mini E3's "PIN" document. There is a ground pin next to PA2
which you can use to pull PA2 low.
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
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
based boards should the user prefer flashing over USB over using the sdcard.
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/tag/v0.5-beta).
Unless your board is DFU capable the most accessable 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:
```
wget https://github.com/Arksine/STM32_HID_Bootloader/releases/download/v0.5-beta/hid_bootloader_SKR_PRO.bin
stm32flash -w hid_bootloader_SKR_PRO.bin -v -g 0 /dev/ttyAMA0
```
This bootloader requires 16Kib of flash space on the STM32F4 (the application
must be compiled with a start address of 16KiB).
As with the STM32F1, the STM32F4 uses the hid-flash tool to upload binaries to
the MCU. See the instructions above for details on how to build and use
hid-flash.
It may be necessary to manually enter the bootloader, this can be done by
setting "boot 0" low, "boot 1" high and plugging in the device. After
programming is complete unplug the device and set "boot 1" back to low
so the application will be loaded.
LPC176x micro-controllers (Smoothieboards)
==========================================
@@ -361,15 +479,18 @@ bcm2835gpio_swd_nums 25 24
bcm2835gpio_srst_num 18
transport select swd
# Set the chip (at91samd51j19 in this example)
set CHIPNAME at91samd51j19
# Use hardware reset wire for chip resets
reset_config srst_only
adapter_nsrst_delay 100
adapter_nsrst_assert_width 100
# Specify the chip type
source [find target/atsame5x.cfg]
# Set the adapter speed
adapter_khz 40
adapter_nsrst_delay 100
adapter_nsrst_assert_width 100
# Connect to chip
init
targets
reset halt

View File

@@ -5,8 +5,8 @@ Directory Layout
================
The **src/** directory contains the C source for the micro-controller
code. The **src/avr/**, **src/sam3/**, **src/samd21/**,
**src/lpc176x/**, **src/stm32f1/**, **src/pru/**, and **src/linux/**
code. The **src/atsam/**, **src/atsamd/**, **src/avr/**,
**src/linux/**, **src/lpc176x/**, **src/pru/**, and **src/stm32/**
directories contain architecture specific micro-controller code. The
**src/simulator/** contains code stubs that allow the micro-controller
to be test compiled on other architectures. The **src/generic/**
@@ -50,10 +50,11 @@ DECL_TASK() macro.
One of the main task functions is command_dispatch() located in
**src/command.c**. This function is called from the board specific
input/output code (eg, **src/avr/serial.c**) and it runs the command
functions associated with the commands found in the input
stream. Command functions are declared using the DECL_COMMAND() macro
(see the [protocol](Protocol.md) document for more information).
input/output code (eg, **src/avr/serial.c**,
**src/generic/serial_irq.c**) and it runs the command functions
associated with the commands found in the input stream. Command
functions are declared using the DECL_COMMAND() macro (see the
[protocol](Protocol.md) document for more information).
Task, init, and command functions always run with interrupts enabled
(however, they can temporarily disable interrupts if needed). These
@@ -67,10 +68,10 @@ function to be called at the requested clock time. Timer interrupts
are initially handled in an architecture specific interrupt handler
(eg, **src/avr/timer.c**) which calls sched_timer_dispatch() located
in **src/sched.c**. The timer interrupt leads to execution of schedule
timer functions. Timer functions always run with interrupts
disabled. The timer functions should always complete within a few
micro-seconds. At completion of the timer event, the function may
choose to reschedule itself.
timer functions. Timer functions always run with interrupts disabled.
The timer functions should always complete within a few micro-seconds.
At completion of the timer event, the function may choose to
reschedule itself.
In the event an error is detected the code can invoke shutdown() (a
macro which calls sched_shutdown() located in **src/sched.c**).
@@ -124,19 +125,26 @@ of a typical move command. The [kinematics](Kinematics.md) document
provides further information on the mechanics of moves.
* Processing for a move command starts in gcode.py. The goal of
gcode.py is to translate G-code into internal calls. Changes in
origin (eg, G92), changes in relative vs absolute positions (eg,
G90), and unit changes (eg, F6000=100mm/s) are handled here. The
code path for a move is: `process_data() -> process_commands() ->
cmd_G1()`. Ultimately the ToolHead class is invoked to execute the
actual request: `cmd_G1() -> ToolHead.move()`
gcode.py is to translate G-code into internal calls. A G1 command
will invoke cmd_G1() in klippy/extras/gcode_move.py. The
gcode_move.py code handles changes in origin (eg, G92), changes in
relative vs absolute positions (eg, G90), and unit changes (eg,
F6000=100mm/s). The code path for a move is: `_process_data() ->
_process_commands() -> cmd_G1()`. Ultimately the ToolHead class is
invoked to execute the actual request: `cmd_G1() -> ToolHead.move()`
* The ToolHead class (in toolhead.py) handles "look-ahead" and tracks
the timing of printing actions. The codepath for a move is:
the timing of printing actions. The main codepath for a move is:
`ToolHead.move() -> MoveQueue.add_move() -> MoveQueue.flush() ->
Move.set_junction() -> Move.move()`.
Move.set_junction() -> ToolHead._process_moves()`.
* ToolHead.move() creates a Move() object with the parameters of the
move (in cartesian space and in units of seconds and millimeters).
* The kinematics class is given the opportunity to audit each move
(`ToolHead.move() -> kin.check_move()`). The kinematics classes are
located in the klippy/kinematics/ directory. The check_move() code
may raise an error if the move is not valid. If check_move()
completes successfully then the underlying kinematics must be able
to handle the move.
* MoveQueue.add_move() places the move object on the "look-ahead"
queue.
* MoveQueue.flush() determines the start and end velocities of each
@@ -147,48 +155,42 @@ provides further information on the mechanics of moves.
phase, followed by a constant deceleration phase. Every move
contains these three phases in this order, but some phases may be of
zero duration.
* When Move.move() is called, everything about the move is known -
its start location, its end location, its acceleration, its
start/cruising/end velocity, and distance traveled during
acceleration/cruising/deceleration. All the information is stored in
the Move() class and is in cartesian space in units of millimeters
and seconds.
The move is then handed off to the kinematics classes: `Move.move()
-> kin.move()`
* The goal of the kinematics classes is to translate the movement in
cartesian space to movement on each stepper. The kinematics classes
are located in the klippy/kinematics/ directory. The kinematic class
is given a chance to audit the move (`ToolHead.move() ->
kin.check_move()`) before it goes on the look-ahead queue, but once
the move arrives in *kin*.move() the kinematic class is required to
handle the move as specified. Note that the extruder is handled in
its own kinematic class. Since the Move() class specifies the exact
movement time and since step pulses are sent to the micro-controller
with specific timing, stepper movements produced by the extruder
class will be in sync with head movement even though the code is
kept separate.
* When ToolHead._process_moves() is called, everything about the
move is known - its start location, its end location, its
acceleration, its start/cruising/end velocity, and distance traveled
during acceleration/cruising/deceleration. All the information is
stored in the Move() class and is in cartesian space in units of
millimeters and seconds.
* Klipper uses an
[iterative solver](https://en.wikipedia.org/wiki/Root-finding_algorithm)
to generate the step times for each stepper. For efficiency reasons,
the stepper pulse times are generated in C code. The code flow is:
`kin.move() -> MCU_Stepper.step_itersolve() ->
itersolve_gen_steps()` (in klippy/chelper/itersolve.c). The goal of
the iterative solver is to find step times given a function that
calculates a stepper position from a time. This is done by
repeatedly "guessing" various times until the stepper position
formula returns the desired position of the next step on the
stepper. The feedback produced from each guess is used to improve
future guesses so that the process rapidly converges to the desired
time. The kinematic stepper position formulas are located in the
klippy/chelper/ directory (eg, kin_cart.c, kin_corexy.c,
kin_delta.c, kin_extruder.c).
the stepper pulse times are generated in C code. The moves are first
placed on a "trapezoid motion queue": `ToolHead._process_moves() ->
trapq_append()` (in klippy/chelper/trapq.c). The step times are then
generated: `ToolHead._process_moves() ->
ToolHead._update_move_time() -> MCU_Stepper.generate_steps() ->
itersolve_generate_steps() -> itersolve_gen_steps_range()` (in
klippy/chelper/itersolve.c). The goal of the iterative solver is to
find step times given a function that calculates a stepper position
from a time. This is done by repeatedly "guessing" various times
until the stepper position formula returns the desired position of
the next step on the stepper. The feedback produced from each guess
is used to improve future guesses so that the process rapidly
converges to the desired time. The kinematic stepper position
formulas are located in the klippy/chelper/ directory (eg,
kin_cart.c, kin_corexy.c, kin_delta.c, kin_extruder.c).
* Note that the extruder is handled in its own kinematic class:
`ToolHead._process_moves() -> PrinterExtruder.move()`. Since
the Move() class specifies the exact movement time and since step
pulses are sent to the micro-controller with specific timing,
stepper movements produced by the extruder class will be in sync
with head movement even though the code is kept separate.
* After the iterative solver calculates the step times they are added
to an array: `itersolve_gen_steps() -> queue_append()` (in
klippy/chelper/stepcompress.c). The array (struct
to an array: `itersolve_gen_steps_range() -> stepcompress_append()`
(in klippy/chelper/stepcompress.c). The array (struct
stepcompress.queue) stores the corresponding micro-controller clock
counter times for every step. Here the "micro-controller clock
counter" value directly corresponds to the micro-controller's
@@ -219,11 +221,11 @@ provides further information on the mechanics of moves.
runs the following, 'count' times: `do_step(); next_wake_time =
last_wake_time + interval; interval += add;`
The above may seem like a lot of complexity to execute a
movement. However, the only really interesting parts are in the
ToolHead and kinematic classes. It's this part of the code which
specifies the movements and their timings. The remaining parts of the
processing is mostly just communication and plumbing.
The above may seem like a lot of complexity to execute a movement.
However, the only really interesting parts are in the ToolHead and
kinematic classes. It's this part of the code which specifies the
movements and their timings. The remaining parts of the processing is
mostly just communication and plumbing.
Adding a host module
====================
@@ -329,16 +331,17 @@ Useful steps:
seconds) to a cartesian coordinate (in millimeters), and then
calculate the desired stepper position (in millimeters) from that
cartesian coordinate.
4. Implement the `calc_position()` method in the new kinematics class.
This method calculates the position of the toolhead in cartesian
coordinates from the current position of each stepper. It does not
need to be efficient as it is typically only called during homing
and probing operations.
5. Other methods. Implement the `move()`, `check_move()`, `home()`,
`motor_off()`, `set_position()`, and `get_steppers()` methods.
These functions are typically used to provide kinematic specific
checks. However, at the start of development one can use
boiler-plate code here.
4. Implement the `calc_tag_position()` method in the new kinematics
class. This method calculates the position of the toolhead in
cartesian coordinates from the position of each stepper (as
returned by `stepper.get_tag_position()`). It does not need to be
efficient as it is typically only called during homing and probing
operations.
5. Other methods. Implement the `check_move()`, `get_status()`,
`get_steppers()`, `home()`, and `set_position()` methods. These
functions are typically used to provide kinematic specific checks.
However, at the start of development one can use boiler-plate code
here.
6. Implement test cases. Create a g-code file with a series of moves
that can test important cases for the given kinematics. Follow the
[debugging documentation](Debugging.md) to convert this g-code file
@@ -398,6 +401,93 @@ Useful steps:
the micro-controller with the main klippy.py program.
9. Consider adding build test cases in the test/ directory.
Coordinate Systems
==================
Internally, Klipper primarily tracks the position of the toolhead in
cartesian coordinates that are relative to the coordinate system
specified in the config file. That is, most of the Klipper code will
never experience a change in coordinate systems. If the user makes a
request to change the origin (eg, a `G92` command) then that effect is
obtained by translating future commands to the primary coordinate
system.
However, in some cases it is useful to obtain the toolhead position in
some other coordinate system and Klipper has several tools to
facilitate that. This can be seen by running the GET_POSITION
command. For example:
```
Send: GET_POSITION
Recv: // mcu: stepper_a:-2060 stepper_b:-1169 stepper_c:-1613
Recv: // stepper: stepper_a:457.254159 stepper_b:466.085669 stepper_c:465.382132
Recv: // kinematic: X:8.339144 Y:-3.131558 Z:233.347121
Recv: // toolhead: X:8.338078 Y:-3.123175 Z:233.347878 E:0.000000
Recv: // gcode: X:8.338078 Y:-3.123175 Z:233.347878 E:0.000000
Recv: // gcode base: X:0.000000 Y:0.000000 Z:0.000000 E:0.000000
Recv: // gcode homing: X:0.000000 Y:0.000000 Z:0.000000
```
The "mcu" position (`stepper.get_mcu_position()` in the code) is the
total number of steps the micro-controller has issued in a positive
direction minus the number of steps issued in a negative direction
since the micro-controller was last reset. The value reported is only
valid after the stepper has been homed. If the robot is in motion when
the query is issued then the reported value includes moves buffered on
the micro-controller, but does not include moves on the look-ahead
queue.
The "stepper" position (`stepper.get_commanded_position()`) is the
position of the given stepper as tracked by the kinematics code. This
generally corresponds to the position (in mm) of the carriage along
its rail, relative to the position_endstop specified in the config
file. (Some kinematics track stepper positions in radians instead of
millimeters.) If the robot is in motion when the query is issued then
the reported value includes moves buffered on the micro-controller,
but does not include moves on the look-ahead queue. One may use the
`toolhead.flush_step_generation()` or `toolhead.wait_moves()` calls to
fully flush the look-ahead and step generation code.
The "kinematic" position (`stepper.set_tag_position()` and
`kin.calc_tag_position()`) is the cartesian position of the toolhead
as derived from the "stepper" position and is relative to the
coordinate system specified in the config file. This may differ from
the requested cartesian position due to the granularity of the stepper
motors. If the robot is in motion when `stepper.set_tag_position()` is
issued then the reported value includes moves buffered on the
micro-controller, but does not include moves on the look-ahead
queue. One may use the `toolhead.flush_step_generation()` or
`toolhead.wait_moves()` calls to fully flush the look-ahead and step
generation code.
The "toolhead" position (`toolhead.get_position()`) is the last
requested position of the toolhead in cartesian coordinates relative
to the coordinate system specified in the config file. If the robot is
in motion when the query is issued then the reported value includes
all requested moves (even those in buffers waiting to be issued to the
stepper motor drivers).
The "gcode" position is the last requested position from a `G1` (or
`G0`) command in cartesian coordinates relative to the coordinate
system specified in the config file. This may differ from the
"toolhead" position if a g-code transformation (eg, bed_mesh,
bed_tilt, skew_correction) is in effect. This may differ from the
actual coordinates specified in the last `G1` command if the g-code
origin has been changed (eg, `G92`, `SET_GCODE_OFFSET`, `M221`). The
`M114` command (`gcode_move.get_status()['gcode_position']`) will
report the last g-code position relative to the current g-code
coordinate system.
The "gcode base" is the location of the g-code origin in cartesian
coordinates relative to the coordinate system specified in the config
file. Commands such as `G92`, `SET_GCODE_OFFSET`, and `M221` alter
this value.
The "gcode homing" is the location to use for the g-code origin (in
cartesian coordinates relative to the coordinate system specified in
the config file) after a `G28` home command. The `SET_GCODE_OFFSET`
command can alter this value.
Time
====

View File

@@ -1,6 +1,14 @@
This document provides information on implementing G-Code command
sequences in gcode_macro (and similar) config sections.
### G-Code Macro Naming
Case is not important for the G-Code macro name - MY_MACRO and
my_macro will evaluate the same and may be called in either upper or
lower case. If any numbers are used in the macro name then they must
all be at the end of the name (eg, TEST_MACRO25 is valid, but
MACRO25_TEST3 is not).
### Formatting of G-Code in the config
Indentation is important when defining a macro in the config file. To
@@ -111,47 +119,165 @@ other macros, as the called macro is evaluated when it is invoked
By convention, the name immediately following `printer` is the name of
a config section. So, for example, `printer.fan` refers to the fan
object created by the `[fan]` config section. There are some
exceptions to this rule - notably the `gcode` and `toolhead` objects.
If the config section contains spaces in it, then one can access it
via the `[ ]` accessor - for example:
exceptions to this rule - notably the `gcode_move` and `toolhead`
objects. If the config section contains spaces in it, then one can
access it via the `[ ]` accessor - for example:
`printer["generic_heater my_chamber_heater"].temperature`.
Some printer objects allow one to alter the state of the printer. By
convention, these objects use an `action_` prefix. For example,
`printer.gcode.action_emergency_stop()` would cause the printer to go
into a shutdown state. These actions are taken at the time that the
macro is evaluated, which may be a significant amount of time before
the generated commands are executed.
The following are common printer attributes:
- `printer.fan.speed`: The fan speed as a float between 0.0 and 1.0.
- `printer.gcode.action_respond_info(msg)`: Write the given `msg` to
the /tmp/printer pseudo-terminal. Each line of `msg` will be sent
with a "// " prefix.
- `printer.gcode.action_respond_error(msg)`: Write the given `msg` to
the /tmp/printer pseudo-terminal. The first line of `msg` will be
sent with a "!! " prefix and subsequent lines will have a "// "
prefix.
- `printer.gcode.action_emergency_stop(msg)`: Transition the printer
to a shutdown state. The `msg` parameter is optional, it may be
useful to describe the reason for the shutdown.
- `printer.gcode.gcode_position`: The current position of the toolhead
relative to the current G-Code origin. It is possible to access the
x, y, z, and e components of this position (eg,
`printer.gcode.gcode_position.x`).
This is also available on "heater_fan" and "fan_generic" config
sections (eg, `printer["fan_generic my_fan"].speed`).
- `printer.gcode_move.gcode_position`: The current position of the
toolhead relative to the current G-Code origin. That is, positions
that one might directly send to a `G1` command. It is possible to
access the x, y, z, and e components of this position (eg,
`printer.gcode_move.gcode_position.x`).
- `printer.gcode_move.position`: The last commanded position of the
toolhead using the coordinate system specified in the config
file. It is possible to access the x, y, z, and e components of this
position (eg, `printer.gcode_move.position.x`).
- `printer.gcode_move.homing_origin`: The origin of the gcode
coordinate system (relative to the coordinate system specified in
the config file) to use after a `G28` command. The
`SET_GCODE_OFFSET` command can alter this position. It is possible
to access the x, y, and z components of this position (eg,
`printer.gcode_move.homing_origin.x`).
- `printer.gcode_move.speed`: The last speed set in a `G1` command (in
mm/s).
- `printer.gcode_move.speed_factor`: The "speed factor override" as
set by an `M220` command. This is a floating point value such
that 1.0 means no override and, for example, 2.0 would double
requested speed.
- `printer.gcode_move.extrude_factor`: The "extrude factor override"
as set by an `M221` command. This is a floating point value such
that 1.0 means no override and, for example, 2.0 would double
requested extrusions.
- `printer.gcode_move.absolute_coordinates`: This returns True if in
`G90` absolute coordinate mode or False if in `G91` relative mode.
- `printer.gcode_move.absolute_extrude`: This returns True if in `M82`
absolute extrude mode or False if in `M83` relative mode.
- `printer["gcode_macro <macro_name>"].<variable>`: The current value
of a gcode_macro variable.
- `printer.<heater>.temperature`: The last reported temperature (in
Celsius as a float) for the given heater. Available heaters are:
`heater_bed` and `heater_generic <config_name>`.
Celsius as a float) for the given heater. Example heaters are:
`extruder`, `extruder1`, `heater_bed`, `heater_generic
<config_name>`.
- `printer.<heater>.target`: The current target temperature (in
Celsius as a float) for the given heater.
- `printer.idle_timeout.state`: The current state of the printer as
tracked by the idle_timeout module. It is one of the following
strings: "Idle", "Printing", "Ready".
- `printer.idle_timeout.printing_time`: The amount of time (in
seconds) the printer has been in the "Printing" state (as tracked by
the idle_timeout module).
- `printer.pause_resume.is_paused`: Returns true if a PAUSE command
has been executed without a corresponding RESUME.
- `printer.toolhead.position`: The last commanded position of the
toolhead relative to the coordinate system specified in the config
file. It is possible to access the x, y, z, and e components of this
position (eg, `printer.toolhead.position.x`).
- `printer.toolhead.extruder`: The name of the currently active
extruder. For example, one could use
`printer[printer.toolhead.extruder].target` to get the target
temperature of the current extruder.
- `printer.toolhead.homed_axes`: The current cartesian axes considered
to be in a "homed" state. This is a string containing one or more of
"x", "y", "z".
- `printer.toolhead.max_velocity`, `printer.toolhead.max_accel`,
`printer.toolhead.max_accel_to_decel`,
`printer.toolhead.square_corner_velocity`: The current printing
limits that are in effect. This may differ from the config file
settings if a `SET_VELOCITY_LIMIT` (or `M204`) command alters them
at run-time.
- `printer.heaters.available_heaters`: Returns a list of all currently
available heaters by their full config section names,
e.g. `["extruder", "heater_bed", "heater_generic my_custom_heater"]`.
- `printer.heaters.available_sensors`: Returns a list of all currently
available temperature sensors by their full config section names,
e.g. `["extruder", "heater_bed", "heater_generic my_custom_heater",
"temperature_sensor electronics_temp"]`.
- `printer.query_endstops.last_query["<endstop>"]`: Returns True if
the given endstop was reported as "triggered" during the last
QUERY_ENDSTOP command. Note, due to the order of template expansion
(see above), the QUERY_ENDSTOP command must be run prior to the
macro containing this reference.
- `printer.probe.last_query`: Returns True if the probe was reported
as "triggered" during the last QUERY_PROBE command. Note, due to the
order of template expansion (see above), the QUERY_PROBE command
must be run prior to the macro containing this reference.
- `printer.configfile.config["<section>"]["<option>"]`: Returns the
given config file setting as read by Klipper during the last
software start or restart. (Any settings changed at run-time will
not be reflected here.) All values are returned as strings (if math
is to be performed on the value then it must be converted to a
Python number).
- `printer["gcode_macro <macro_name>"].<variable>`: The current value
of a [gcode_macro variable](#variables).
- `printer.webhooks.state`: Returns a string indicating the current
Klipper state. Possible values are: "ready", "startup", "shutdown",
"error".
- `printer.webhooks.state_message`: A human readable string giving
additional context on the current Klipper state.
- `printer.display_status.progress`: The progress value of the last
`M73` G-Code command (or `printer.virtual_sdcard.progress` if no
recent `M73` received).
- `printer.display_status.message`: The message contained in the last
`M117` G-Code command.
- `printer["filament_switch_sensor <config_name>"].enabled`: Returns
True if the switch sensor is currently enabled.
- `printer["filament_switch_sensor <config_name>"].filament_detected`:
Returns True if the sensor is in a triggered state.
- `printer.virtual_sdcard.is_active`: Returns True if a print from
file is currently active.
- `printer.virtual_sdcard.progress`: An estimate of the current print
progress (based of file size and file position).
- `printer.virtual_sdcard.file_position`: The current position (in
bytes) of an active print.
- `printer.print_stats.filename`,
`printer.print_stats.total_duration`,
`printer.print_stats.print_duration`,
`printer.print_stats.filament_used`, `printer.print_stats.state`,
`printer.print_stats.message`: Estimated information about the
current print when a virtual_sdcard print is active.
- `printer.firmware_retraction.retract_length`,
`printer.firmware_retraction.retract_speed`,
`printer.firmware_retraction.unretract_extra_length`,
`printer.firmware_retraction.unretract_speed`: The current settings
for the firmware_retraction module. These settings may differ from
the config file if a `SET_RETRACTION` command alters them.
- `printer["bme280 <sensor_name>"].temperature`,
`printer["bme280 <sensor_name>"].humidity`,
`printer["bme280 <sensor_name>"].pressure`: The last read values
from the sensor.
- `printer["htu21d <sensor_name>"].temperature`,
`printer["htu21d <sensor_name>"].humidity`: The last read values
from the sensor.
- `printer["lm75 <sensor_name>"].temperature`: The last read
temperature from the sensor.
- `printer["temperature_sensor <config_name>"].temperature`: The last read
temperature from the sensor.
- `printer["temperature_sensor <config_name>"].measured_min_temp`,
`printer["temperature_sensor <config_name>"].measured_max_temp`: The
lowest and highest temperature seen by the sensor since the Klipper
host software was last restarted.
- `printer["temperature_fan <config_name>"].temperature`: The last read
temperature from the sensor.
- `printer["temperature_fan <config_name>"].target`: The target
temperature for the fan.
- `printer["output_pin <config_name>"].value`: The "value" of the pin,
as set by a `SET_PIN` command.
- `printer["servo <config_name>"].value`: The last setting of the PWM
pin (a value between 0.0 and 1.0) associated with the servo.
- `printer.bed_mesh.profile_name`, `printer.bed_mesh.mesh_min`,
`printer.bed_mesh.mesh_max`, `printer.bed_mesh.probed_matrix`,
`printer.bed_mesh.mesh_matrix`: Information on the currently active
bed_mesh.
- `printer.hall_filament_width_sensor.is_active`: Returns True if the
sensor is currently active.
- `printer.hall_filament_width_sensor.Diameter`,
`printer.hall_filament_width_sensor.Raw`: The last read values from
the sensor.
The above list is subject to change - if using an attribute be sure to
review the [Config Changes document](Config_Changes.md) when upgrading
@@ -160,10 +286,31 @@ attributes may be available (via `get_status()` methods defined in the
software). However, undocumented attributes may change without notice
in future Klipper releases.
### Actions
There are some commands available that can alter the state of the
printer. For example, `{ action_emergency_stop() }` would cause the
printer to go into a shutdown state. Note that these actions are taken
at the time that the macro is evaluated, which may be a significant
amount of time before the generated g-code commands are executed.
Available "action" commands:
- `action_respond_info(msg)`: Write the given `msg` to the
/tmp/printer pseudo-terminal. Each line of `msg` will be sent with a
"// " prefix.
- `action_raise_error(msg)`: Abort the current macro (and any calling
macros) and write the given `msg` to the /tmp/printer
pseudo-terminal. The first line of `msg` will be sent with a "!! "
prefix and subsequent lines will have a "// " prefix.
- `action_emergency_stop(msg)`: Transition the printer to a shutdown
state. The `msg` parameter is optional, it may be useful to describe
the reason for the shutdown.
### Variables
The SET_GCODE_VARIABLE command may be useful for saving state between
macro calls. For example:
macro calls. Variable names may not contain any upper case characters.
For example:
```
[gcode_macro start_probe]
@@ -232,11 +379,8 @@ the gcode option:
[delayed_gcode report_temp]
initial_duration: 2.
gcode:
{printer.gcode.action_respond_info(
"Extruder Temp: %.1f" %
(printer.extruder0.temperature))}
{action_respond_info("Extruder Temp: %.1f" % (printer.extruder0.temperature))}
UPDATE_DELAYED_GCODE ID=report_temp DURATION=2
```
The above delayed_gcode will send "// Extruder Temp: [ex0_temp]" to

View File

@@ -6,6 +6,136 @@ All dates in this document are approximate.
# Changes
20201020: Klipper v0.9.0 released.
20200902: The RTD resistance-to-temperature calculation for MAX31865
converters has been corrected to not read low. If you are using such a
device, you should recalibrate your print temperature and PID settings.
20200816: The gcode macro `printer.gcode` object has been renamed to
`printer.gcode_move`. Several undocumented variables in
`printer.toolhead` and `printer.gcode` have been removed. See
docs/Command_Templates.md for a list of available template variables.
20200816: The gcode macro "action_" system has changed. Replace any
calls to `printer.gcode.action_emergency_stop()` with
`action_emergency_stop()`, `printer.gcode.action_respond_info()` with
`action_respond_info()`, and `printer.gcode.action_respond_error()`
with `action_raise_error()`.
20200809: The menu system has been rewritten. If the menu has been
customized then it will be necessary to update to the new
configuration. See config/example-menu.cfg for configuration details
and see klippy/extras/display/menu.cfg for examples.
20200731: The behavior of the `progress` attribute reported by
the `virtual_sdcard` printer object has changed. Progress is no
longer reset to 0 when a print is paused. It will now always report
progress based on the internal file position, or 0 if no file is
currently loaded.
20200725: The servo `enable` config parameter and the SET_SERVO
`ENABLE` parameter have been removed. Update any macros to use
`SET_SERVO SERVO=my_servo WIDTH=0` to disable a servo.
20200608: The LCD display support has changed the name of some
internal "glyphs". If a custom display layout was implemented it may
be necessary to update to the latest glyph names (see
klippy/extras/display/display.cfg for a list of available glyphs).
20200606: The pin names on linux mcu have changed. Pins now have names
of the form `gpiochip<chipid>/gpio<gpio>`. For gpiochip0 you can also
use a short `gpio<gpio>`. For example, what was previously referred
to as `P20` now becomes `gpio20` or `gpiochip0/gpio20`.
20200603: The default 16x4 LCD layout will no longer show the
estimated time remaining in a print. (Only the elapsed time will be
shown.) If the old behavior is desired one can customize the menu
display with that information (see the description of display_data in
config/example-extras.cfg for details).
20200531: The default USB vendor/product id is now 0x1d50/0x614e.
These new ids are reserved for Klipper (thanks to the openmoko
project). This change should not require any config changes, but the
new ids may appear in system logs.
20200524: The default value for the tmc5160 pwm_freq field is now zero
(instead of one).
20200425: The gcode_macro command template variable `printer.heater`
was renamed to `printer.heaters`.
20200313: The default lcd layout for multi-extruder printers with a
16x4 screen has changed. The single extruder screen layout is now the
default and it will show the currently active extruder. To use the
previous display layout set "display_group: _multiextruder_16x4" in
the [display] section of the printer.cfg file.
20200308: The default `__test` menu item was removed. If the config
file has a custom menu then be sure to remove all references to this
`__test` menu item.
20200308: The menu "deck" and "card" options were removed. To
customize the layout of an lcd screen use the new display_data config
sections (see config/example-extras.cfg for the details).
20200109: The bed_mesh module now references the probe's location
in for the mesh configuration. As such, some configuration options
have been renamed to more accurately reflect their intended
functionality. For rectangular beds, `min_point` and `max_point`
have been renamed to `mesh_min` and `mesh_max` respectively. For
round beds, `bed_radius` has been renamed to `mesh_radius`. A new
`mesh_origin` option has also been added for round beds. Note that
these changes are also incompatible with previously saved mesh profiles.
If an incompatible profile is detected it will be ignored and scheduled
for removal. The removal process can be completed by issuing the
SAVE_CONFIG command. The user will need to re-calibrate each profile.
20191218: The display config section no longer supports "lcd_type:
st7567". Use the "uc1701" display type instead - set "lcd_type:
uc1701" and change the "rs_pin: some_pin" to "rst_pin: some_pin". It
may also be necessary to add a "contrast: 60" config setting.
20191210: The builtin T0, T1, T2, ... commands have been removed. The
extruder activate_gcode and deactivate_gcode config options have been
removed. If these commands (and scripts) are needed then define
individual [gcode_macro T0] style macros that call the
ACTIVATE_EXTRUDER command. See the config/sample-idex.cfg and
sample-multi-extruder.cfg files for examples.
20191210: Support for the M206 command has been removed. Replace with
calls to SET_GCODE_OFFSET. If support for M206 is needed, add a
[gcode_macro M206] config section that calls SET_GCODE_OFFSET. (For
example "SET_GCODE_OFFSET Z=-{params.Z}".)
20191202: Support for the undocumented "S" parameter of the "G4"
command has been removed. Replace any occurrences of S with the
standard "P" parameter (the delay specified in milliseconds).
20191126: The USB names have changed on micro-controllers with native
USB support. They now use a unique chip id by default (where
available). If an "mcu" config section uses a "serial" setting that
starts with "/dev/serial/by-id/" then it may be necessary to update
the config. Run "ls /dev/serial/by-id/*" in an ssh terminal to
determine the new id.
20191121: The pressure_advance_lookahead_time parameter has been
removed. See example.cfg for alternate configuration settings.
20191112: The tmc stepper driver virtual enable capability is now
automatically enabled if the stepper does not have a dedicated stepper
enable pin. Remove references to tmcXXXX:virtual_enable from the
config. The ability to control multiple pins in the stepper
enable_pin config has been removed. If multiple pins are needed then
use a multi_pin config section.
20191107: The primary extruder config section must be specified as
"extruder" and may no longer be specified as "extruder0". Gcode
command templates that query the extruder status are now accessed via
"{printer.extruder}".
20191021: Klipper v0.8.0 released
20191003: The move_to_previous option in [safe_z_homing] now defaults
to False. (It was effectively False prior to 20190918.)

View File

@@ -12,8 +12,8 @@ config file is successfully loaded.
### Verify temperature
Start by verifying that temperatures are being properly
reported. Navigate to the Octoprint temperature tab.
Start by verifying that temperatures are being properly reported.
Navigate to the Octoprint temperature tab.
![octoprint-temperature](img/octoprint-temperature.png)
@@ -85,7 +85,7 @@ 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
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
@@ -162,3 +162,6 @@ consider calibrating [pressure advance](Pressure_Advance.md).
It may be necessary to perform other types of detailed printer
calibration - a number of guides are available online to help with
this (for example, do a web search for "3d printer calibration").
As an example, if you experience the effect called ringing,
you may try following [resonance compensation](Resonance_Compensation.md)
tuning guide.

View File

@@ -35,7 +35,7 @@ Mailing list
============
There is a mailing list for general discussions on Klipper. In order
to send am email to the list, one must first subscribe:
to send an email to the list, one must first subscribe:
https://www.freelists.org/list/klipper . Once subscribed, emails may
be sent to `klipper@freelists.org`.

View File

@@ -91,7 +91,7 @@ with Klippy, and send it to Klipper running in simulavr (see
python virtual environment):
```
~/klippy-env/bin/python ./klippy/klippy.py config/avrsim.cfg -i test.gcode -v
~/klippy-env/bin/python ./klippy/klippy.py config/generic-simulavr.cfg -i test.gcode -v
```
Using simulavr with gtkwave

View File

@@ -30,6 +30,13 @@ automatic probe has a bias of more than 25 microns (.025mm) then use
manual probing instead. Manual probing only takes a few minutes and it
eliminates error introduced by the probe.
If using a probe that is mounted on the side of the hotend (that is,
it has an X or Y offset) then note that performing delta calibration
will invalidate the results of probe calibration. These types of
probes are rarely suitable for use on a delta (because minor effector
tilt will result in a probe location bias). If using the probe anyway,
then be sure to rerun probe calibration after any delta calibration.
Basic delta calibration
=======================
@@ -228,3 +235,15 @@ Additional notes
errors elsewhere in the hardware. For example, small differences in
arm length may result in a tilt to the effector and some of that
tilt may be accounted for by adjusting the arm length parameters.
Using Bed Mesh on a Delta
=========================
It is possible to use [bed mesh](Bed_Mesh.md) on a delta. However, it
is important to obtain good delta calibration prior to enabling a bed
mesh. Running bed mesh with poor delta calibration will result in
confusing and poor results.
Note that performing delta calibration will invalidate any previously
obtained bed mesh. After performing a new delta calibration be sure to
rerun BED_MESH_CALIBRATE.

View File

@@ -13,16 +13,16 @@ precision.
The stepper phase adjusted endstop mechanism can use the precision of
the stepper motors to improve the precision of the endstop switches.
When a stepper motor moves it cycles through a series of phases until
in completes four "full steps". So, a stepper motor using 16
micro-steps would have 64 phases and when moving in a positive
direction it would cycle through phases: 0, 1, 2, ... 61, 62, 63, 0,
1, 2, etc. Crucially, when the stepper motor is at a particular
position on a linear rail it should always be at the same stepper
phase. Thus, when a carriage triggers the endstop switch the stepper
controlling that carriage should always be at the same stepper motor
phase. Klipper's endstop phase system combines the stepper phase with
the endstop trigger to improve the accuracy of the endstop.
A stepper motor moves by cycling through a series of phases until in
completes four "full steps". So, a stepper motor using 16 micro-steps
would have 64 phases and when moving in a positive direction it would
cycle through phases: 0, 1, 2, ... 61, 62, 63, 0, 1, 2, etc.
Crucially, when the stepper motor is at a particular position on a
linear rail it should always be at the same stepper phase. Thus, when
a carriage triggers the endstop switch the stepper controlling that
carriage should always be at the same stepper motor phase. Klipper's
endstop phase system combines the stepper phase with the endstop
trigger to improve the accuracy of the endstop.
In order to use this functionality it is necessary to be able to
identify the phase of the stepper motor. If one is using Trinamic

View File

@@ -19,13 +19,17 @@ Frequently asked questions
16. [When I set "restart_method=command" my AVR device just hangs on a restart](#when-i-set-restart_methodcommand-my-avr-device-just-hangs-on-a-restart)
17. [Will the heaters be left on if the Raspberry Pi crashes?](#will-the-heaters-be-left-on-if-the-raspberry-pi-crashes)
18. [How do I convert a Marlin pin number to a Klipper pin name?](#how-do-i-convert-a-marlin-pin-number-to-a-klipper-pin-name)
19. [How do I cancel an M109/M190 "wait for temperature" request?](#how-do-i-cancel-an-m109m190-wait-for-temperature-request)
20. [How do I upgrade to the latest software?](#how-do-i-upgrade-to-the-latest-software)
19. [Do I have to wire my device to a specific type of micro-controller pin?](#do-i-have-to-wire-my-device-to-a-specific-type-of-micro-controller-pin)
20. [How do I cancel an M109/M190 "wait for temperature" request?](#how-do-i-cancel-an-m109m190-wait-for-temperature-request)
21. [Can I find out whether the printer has lost steps?](#can-i-find-out-whether-the-printer-has-lost-steps)
22. [Why does Klipper report errors? I lost my print!](#why-does-klipper-report-errors-i-lost-my-print)
23. [How do I upgrade to the latest software?](#how-do-i-upgrade-to-the-latest-software)
24. [How do I uninstall klipper?](#how-do-i-uninstall-klipper)
### How can I donate to the project?
Thanks. Kevin has a Patreon page at: https://www.patreon.com/koconnor
Thanks. Kevin has a Patreon page at:
[https://www.patreon.com/koconnor](https://www.patreon.com/koconnor)
### How do I calculate the step_distance parameter in the printer config file?
@@ -49,11 +53,11 @@ units of "inverse millimeters" is felt to be quirky and unnecessary.
### Where's my serial port?
The general way to find a USB serial port is to run `ls -l
/dev/serial/by-id/` from an ssh terminal on the host machine. It will
The general way to find a USB serial port is to run `ls
/dev/serial/by-id/*` from an ssh terminal on the host machine. It will
likely produce output similar to the following:
```
lrwxrwxrwx 1 root root 13 Jun 1 21:12 usb-1a86_USB2.0-Serial-if00-port0 -> ../../ttyUSB0
/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
```
The name found in the above command is stable and it is possible to
@@ -75,7 +79,7 @@ above as the name will be different for each printer.
If you are using multiple micro-controllers and they do not have
unique ids (common on boards with a CH340 USB chip) then follow the
directions above using the directory `/dev/serial/by-path/` instead.
directions above using the command `ls /dev/serial/by-path/*` instead.
### When the micro-controller restarts the device changes to /dev/ttyUSB1
@@ -135,30 +139,49 @@ bootloaders.
### Can I run Klipper on something other than a Raspberry Pi 3?
The recommended hardware is a Raspberry Pi 2 or a Raspberry
Pi 3.
The recommended hardware is a Raspberry Pi 2, Raspberry Pi 3, or
Raspberry Pi 4.
Klipper will run on a Raspberry Pi 1 and on the Raspberry Pi Zero, but
these boards don't have enough processing power to run OctoPrint
well. It's not uncommon for print stalls to occur on these slower
machines (the printer may move faster than OctoPrint can send movement
commands) when printing directly from OctoPrint. If you wish to run on
one one of these slower boards anyway, consider using the
"virtual_sdcard" feature (see
well. It is common for print stalls to occur on these slower machines
when printing directly from OctoPrint. (The printer may move faster
than OctoPrint can send movement commands.) If you wish to run on one
one of these slower boards anyway, consider using the "virtual_sdcard"
feature when printing (see
[config/example-extras.cfg](https://github.com/KevinOConnor/klipper/tree/master/config/example-extras.cfg)
for details) when printing.
for details).
For running on the Beaglebone, see the
[Beaglebone specific installation instructions](beaglebone.md).
Klipper has been run on other machines. The Klipper host software
only requires Python running on a Linux (or similar)
computer. However, if you wish to run it on a different machine you
will need Linux admin knowledge to install the system prerequisites
for that particular machine. See the
Klipper has been run on other machines. The Klipper host software only
requires Python running on a Linux (or similar) computer. However, if
you wish to run it on a different machine you will need Linux admin
knowledge to install the system prerequisites for that particular
machine. See the
[install-octopi.sh](https://github.com/KevinOConnor/klipper/tree/master/scripts/install-octopi.sh)
script for further information on the necessary Linux admin steps.
If you are looking to run the Klipper host software on a low-end chip,
then be aware that, at a minimum, a machine with "double precision
floating point" hardware is required.
If you are looking to run the Klipper host software on a shared
general-purpose desktop or server class machine, then note that
Klipper has some real-time scheduling requirements. If, during a
print, the host computer also performs an intensive general-purpose
computing task (such as defragmenting a hard drive, 3d rendering,
heavy swapping, etc.), then it may cause Klipper to report print
errors.
Note: If you are not using an OctoPi image, be aware that several
Linux distributions enable a "ModemManager" (or similar) package that
can disrupt serial communication. (Which can cause Klipper to report
seemingly random "Lost communication with MCU" errors.) If you install
Klipper on one of these distributions you may need to disable that
package.
### Can I run multiple instances of Klipper on the same host machine?
It is possible to run multiple instances of the Klipper host software,
@@ -211,9 +234,10 @@ the desired movement to the "custom g-code" section of your slicer.
If the printer requires some additional movement as part of the homing
process itself (or fundamentally does not have a homing process) then
consider using a homing_override section in the config file. If you
need to move a stepper for diagnostic or debugging purposes then
consider adding a force_move section to the config file. See
consider using a safe_z_home or homing_override section in the config
file. If you need to move a stepper for diagnostic or debugging
purposes then consider adding a force_move section to the config
file. See
[example-extras.cfg](https://github.com/KevinOConnor/klipper/tree/master/config/example-extras.cfg)
for further details on these options.
@@ -226,34 +250,15 @@ this reduces the potential for bed collisions). However, if one must
home towards the bed then it is recommended to position the endstop so
it triggers when the nozzle is still a small distance away from the
bed. This way, when homing the axis, it will stop before the nozzle
touches the bed.
Almost all mechanical switches can still move a small distance
(eg, 0.5mm) after they are triggered. So, for example, if the
position_endstop is set to 0.5mm then one may still command the
printer to move to Z0.2. The position_min config setting (which
defaults to 0) is used to specify the minimum Z position one may
command the printer to move to.
Note, the Z position_endstop specifies the distance from the nozzle to
the bed when the nozzle and bed (if applicable) are hot. It is typical
for thermal expansion to cause nozzle expansion of around .1mm, which
is also the typical thickness of a sheet of printer paper. Thus, it is
common to use the "paper test" to confirm calibration of the Z
height - check that the bed and nozzle are at room temperature, check
that there is no plastic on the head or bed, home the printer, place a
piece of paper between the nozzle and bed, and repeatedly command the
head to move closer to the bed checking each time if you feel a small
amount of friction when sliding the paper between bed and nozzle - if
all is calibrated well a small amount of friction would be felt when
the height is at Z0.
touches the bed. See the [bed level document](Bed_Level.md) for more
information.
### I converted my config from Marlin and the X/Y axes work fine, but I just get a screeching noise when homing the Z axis
Short answer: Try reducing the max_z_velocity setting in the printer
config. Also, if the Z stepper is moving in the wrong direction, try
inverting the dir_pin setting in the config (eg, "dir_pin: !xyz"
instead of "dir_pin: xyz").
Short answer: First, make sure you have verified the stepper
configuration as described in the
[config check document](Config_checks.md). If the problem persists,
try reducing the max_z_velocity setting in the printer config.
Long answer: In practice Marlin can typically only step at a rate of
around 10000 steps per second. If it is requested to move at a speed
@@ -266,46 +271,11 @@ configured in Marlin.
### My TMC motor driver turns off in the middle of a print
Short answer: Do not use the TMC2208 driver in "standalone mode" with
Klipper! Do not use the TMC2224 driver in "stealthchop standalone
mode" with Klipper!
Long answer: Klipper implements very precise timing.
![tmc2208](img/tmc2208.svg.png)
In the above picture, if Klipper is requested to move along the red
line and if each black line represents the nominal location to step a
stepper, then in the middle of that movement Klipper will arrange to
take a step, change the step direction, and then step back. Klipper
can perform this step, direction change, and step back in a very small
amount of time.
It is our current understanding that the TMC2208 and TMC2224 will
react poorly to this when they are in "stealthchop" mode. (It is not
believed any other TMC drivers are impacted.) It is believed that when
the driver sees the two step requests in a small time frame that it
dramatically increases current in anticipation of high acceleration.
That high current can trip the driver's internal "over current"
detection which causes the driver to disable itself.
This pattern of steps can occur on all stepper motors and on all
robot kinematics.
The TMC2208 and TMC2224 do work well with Klipper when run-time
configuration mode is used (that is, when a wire is routed from the
micro-controller to the PDN-UART pin and the printer config file has a
corresponding [tmc2208] config section). When using run-time
configuration, either configure the drivers to use "spreadcycle mode"
or configure them to use "stealthchop mode" with a reasonable
"stealthchop threshold". If one wishes to exclusively use
"stealthchop" mode with run-time UART configuration then make sure the
stealthchop_threshold is no more than about 10% greater than the
maximum velocity of the given axis. It is speculated that with a
reasonable stealthchop threshold, then if Klipper sends a "step,
direction change, step back" sequence, the driver will briefly
transition from stealthchop mode, to spreadcycle mode, and back to
stealthchop mode, which should be harmless.
If using the TMC2208 (or TMC2224) driver in "standalone mode" then
make sure to use the
[latest version of Klipper](#how-do-i-upgrade-to-the-latest-software). A
workaround for a TMC2208 "stealthchop" driver problem was added to
Klipper in mid-March of 2020.
### I keep getting random "Lost communication with MCU" errors
@@ -430,6 +400,41 @@ support these custom pin numbers - check Marlin's fastio headers (see
above) to translate these pin numbers to their standard hardware
names.
### Do I have to wire my device to a specific type of micro-controller pin?
It depends on the type of device and type of pin:
ADC pins (or Analog pins): For thermistors and similar "analog"
sensors, the device must be wired to an "analog" or "ADC" capable pin
on the micro-controller. If you configure Klipper to use a pin that is
not analog capable, Klipper will report a "Not a valid ADC pin" error.
PWM pins (or Timer pins): Klipper does not use hardware PWM by default
for any device. So, in general, one may wire heaters, fans, and
similar devices to any general purpose IO pin. However, fans and
output_pin devices may be optionally configured to use `hardware_pwm:
True`, in which case the micro-controller must support hardware PWM on
the pin (otherwise, Klipper will report a "Not a valid PWM pin"
error). Note that hardware PWM is currently only supported on the avr,
atsam, samd21, and linux micro-controllers.
IRQ pins (or Interrupt pins): Klipper does not use hardware interrupts
on IO pins, so it is never necessary to wire a device to one of these
micro-controller pins.
SPI pins: When using hardware SPI it is necessary to wire the pins to
the micro-controller's SPI capable pins. However, most devices can be
configured to use "software SPI", in which case any general purpose IO
pins may be used.
I2C pins: When using I2C it is necessary to wire the pins to the
micro-controller's I2C capable pins.
Other devices may be wired to any general purpose IO pin. For example,
steppers, heaters, fans, Z probes, servos, LEDs, common hd44780/st7920
LCD displays, the Trinamic UART control line may be wired to any
general purpose IO pin.
### How do I cancel an M109/M190 "wait for temperature" request?
Navigate to the OctoPrint terminal tab and issue an M112 command in
@@ -441,9 +446,64 @@ terminal tab and issue a FIRMWARE_RESTART command to clear the Klipper
error state. After completing this sequence, the previous heating
request will be canceled and a new print may be started.
### Can I find out whether the printer has lost steps?
In a way, yes. Home the printer, issue a `GET_POSITION` command, run
your print, home again and issue another `GET_POSITION`. Then compare
the values in the `mcu:` line.
This might be helpful to tune settings like stepper motor currents,
accelerations and speeds without needing to actually print something
and waste filament: just run some high-speed moves in between the
`GET_POSITION` commands.
Note that endstop switches themselves tend to trigger at slightly
different positions, so a difference of a couple of microsteps is
likely the result of endstop inaccuracies. A stepper motor itself can
only lose steps in increments of 4 full steps. (So, if one is using 16
microsteps, then a lost step on the stepper would result in the "mcu:"
step counter being off by a multiple of 64 microsteps.)
### Why does Klipper report errors? I lost my print!
Short answer: We want to know if our printers detect a problem so that
the underlying issue can be fixed and we can obtain great quality
prints. We definitely do not want our printers to silently produce low
quality prints.
Long answer: Klipper has been engineered to automatically workaround
many transient problems. For example, it automatically detects
communication errors and will retransmit; it schedules actions in
advance and buffers commands at multiple layers to enable precise
timing even with intermittent interference. However, should the
software detect an error that it can not recover from, if it is
commanded to take an invalid action, or if it detects it is hopelessly
unable to perform its commanded task, then Klipper will report an
error. In these situations there is a high risk of producing a
low-quality print (or worse). It is hoped that alerting the user will
empower them to fix the underlying issue and improve the overall
quality of their prints.
There are some related questions: Why doesn't Klipper pause the print
instead? Report a warning instead? Check for errors before the print?
Ignore errors in user typed commands? etc? Currently Klipper reads
commands using the G-Code protocol, and unfortunately the G-Code
command protocol is not flexible enough to make these alternatives
practical today. There is developer interest in improving the user
experience during abnormal events, but it is expected that will
require notable infrastructure work (including a shift away from
G-Code).
### How do I upgrade to the latest software?
The general way to upgrade is to ssh into the Raspberry Pi and run:
The first step to upgrading the software is to review the latest
[config changes](Config_Changes.md) document. On occasion, changes are
made to the software that require users to update their settings as
part of a software upgrade. It is a good idea to review this document
prior to upgrading.
When ready to upgrade, the general method is to ssh into the Raspberry
Pi and run:
```
cd ~/klipper
@@ -475,29 +535,22 @@ sudo service klipper restart
If after using this shortcut the software warns about needing to
reflash the micro-controller or some other unusual error occurs, then
follow the full upgrade steps outlined above. Note that the RESTART
and FIRMWARE_RESTART g-code commands do not load new software - the
above "sudo service klipper restart" and "make flash" commands are
needed for a software change to take effect.
follow the full upgrade steps outlined above.
When upgrading the software, be sure to check the
[config changes](Config_Changes.md) document for information on
software changes that may require updates to your printer.cfg file.
If any errors persist then double check the
[config changes](Config_Changes.md) document, as you may need to
modify the printer configuration.
### Can I find out whether the printer has lost steps?
Note that the RESTART and FIRMWARE_RESTART g-code commands do not load
new software - the above "sudo service klipper restart" and "make
flash" commands are needed for a software change to take effect.
In a way, yes. Home the printer, issue a `GET_POSITION` command, run
your print, home again and issue another `GET_POSITION`. Then compare
the values in the `mcu:` line.
### How do I uninstall Klipper?
This might be helpful to tune settings like stepper motor currents,
accelerations and speeds without needing to actually print something
and waste filament: just run some high-speed moves in between the
`GET_POSITION` commands.
On the firmware end, nothing special needs to happen. Just follow the flashing directions for the new firmware.
Note that endstop switches themselves tend to trigger at slightly
different positions, so a difference of a couple of microsteps is
likely the result of endstop inaccuracies. A stepper motor itself can
only lose steps in increments of 4 full steps. (So, if one is using 16
microsteps, then a lost step on the stepper would result in the "mcu:"
step counter being off by a multiple of 64 microsteps.)
On the raspberry pi end, an uninstall script is available in [`scripts/klipper-uninstall.sh`](https://github.com/KevinOConnor/klipper/blob/master/scripts/klipper-uninstall.sh). Assuming you cloned `klipper` to `$HOME`
```
sudo ~/klipper/scripts/klipper-uninstall.sh
rm -rf ~/klippy-env ~/klipper
```

View File

@@ -13,8 +13,8 @@ Klipper has several compelling features:
movement translates to 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 an old 8bit AVR
micro-controller can obtain rates over 175K steps per second. On
rates on both new and old micro-controllers. Even old 8bit
micro-controllers can obtain rates over 175K steps per second. On
more recent micro-controllers, rates over 500K steps per second are
possible. Higher stepper rates enable higher print velocities. The
stepper event timing remains precise even at high speeds which
@@ -34,6 +34,23 @@ Klipper has several compelling features:
is stored in a standard config file which can be easily edited. This
makes it easier to setup and maintain the hardware.
* Klipper supports "Smooth Pressure Advance" - a mechanism to account
for the effects of pressure within an extruder. This reduces
extruder "ooze" and improves the quality of print corners. Klipper's
implementation does not introduce instantaneous extruder speed
changes, which improves overall stability and robustness.
* Klipper supports "Input Shaping" to reduce the impact of vibrations
on print quality. This can reduce or eliminate "ringing" (also known
as "ghosting", "echoing", or "rippling") in prints. It may also
allow one to obtain faster printing speeds while still maintaining
high print quality.
* Klipper uses an "iterative solver" to calculate precise step times
from simple kinematic equations. This makes porting Klipper to new
types of robots easier and it keeps timing precise even with complex
kinematics (no "line segmentation" is needed).
* Portable code. Klipper works on ARM, AVR, and PRU based
micro-controllers. Existing "reprap" style printers can run Klipper
without hardware modification - just add a Raspberry Pi. Klipper's
@@ -45,19 +62,21 @@ Klipper has several compelling features:
heating and thermistor algorithms, etc. are all written in Python.
This makes it easier to develop new functionality.
* Klipper uses an "iterative solver" to calculate precise step times
from simple kinematic equations. This makes porting Klipper to new
types of robots easier and it keeps timing precise even with complex
kinematics (no "line segmentation" is needed).
* Custom programmable macros. New G-Code commands can be defined in
the printer config file (no code changes are necessary). Those
commands are programmable - allowing them to produce different
actions depending on the state of the printer.
* Builtin API server. In addition to the standard G-Code interface,
Klipper supports a rich JSON based application interface. This
enables programmers to build external applications with detailed
control of the printer.
Additional features
===================
Klipper supports many standard 3d printer features:
* Klipper implements the "pressure advance" algorithm for extruders.
When properly tuned, pressure advance reduces extruder ooze.
* Works with Octoprint. This allows the printer to be controlled using
a regular web-browser. The same Raspberry Pi that runs Klipper can
also run Octoprint.
@@ -69,13 +88,14 @@ Klipper supports many standard 3d printer features:
* Support for multiple extruders. Extruders with shared heaters and
extruders on independent carriages (IDEX) are also supported.
* Support for cartesian, delta, and corexy style printers.
* Support for cartesian, delta, corexy, corexz, rotary delta, polar,
and cable winch style printers.
* Automatic bed leveling support. Klipper can be configured for basic
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 servo activated probes.
including BL-Touch probes and servo activated probes.
* Automatic delta calibration support. The calibration tool can
perform basic height calibration as well as an enhanced X and Y
@@ -83,9 +103,9 @@ Klipper supports many standard 3d printer features:
probe or via manual probing.
* Support for common temperature sensors (eg, common thermistors,
AD595, AD849x, PT100, MAX6675, MAX31855, MAX31856, MAX31865). Custom
thermistors and custom analog temperature sensors can also be
configured.
AD595, AD597, AD849x, PT100, PT1000, MAX6675, MAX31855, MAX31856,
MAX31865, BME280, HTU21D, and LM75). Custom thermistors and custom
analog temperature sensors can also be configured.
* Basic thermal heater protection enabled by default.
@@ -98,7 +118,8 @@ Klipper supports many standard 3d printer features:
AD5206, MCP4451, MCP4728, MCP4018, and PWM pins.
* Support for common LCD displays attached directly to the printer. A
default menu is also available.
default menu is also available. The contents of the display and menu
can be fully customized via the config file.
* Constant acceleration and "look-ahead" support. All printer moves
will gradually accelerate from standstill to cruising speed and then
@@ -111,6 +132,9 @@ Klipper supports many standard 3d printer features:
improve the accuracy of typical endstop switches. When properly
tuned it can improve a print's first layer bed adhesion.
* Support for measuring and recording acceleration using an adxl345
accelerometer.
* Support for limiting the top speed of short "zigzag" moves to reduce
printer vibration and noise. See the [kinematics](Kinematics.md)
document for more information.
@@ -141,7 +165,7 @@ represent total number of steps per second on the micro-controller.
| Smoothieboard (LPC1769) | 661K | 661K |
| Beaglebone PRU | 680K | 680K |
| Duet2 Wifi/Eth (SAM4E8E) | 686K | 686K |
| Adafruit Metro M4 (SAMD51) | 733K | 694K |
| Adafruit Metro M4 (SAMD51) | 761K | 692K |
| BigTreeTech SKR Pro (STM32F407) | 922K | 711K |
On AVR platforms, the highest achievable step rate is with just one

View File

@@ -9,13 +9,15 @@ Klipper supports the following standard G-Code commands:
- Move to origin: `G28 [X] [Y] [Z]`
- Turn off motors: `M18` or `M84`
- Wait for current moves to finish: `M400`
- Select tool: `T<index>`
- Use absolute/relative distances for extrusion: `M82`, `M83`
- Use absolute/relative coordinates: `G90`, `G91`
- Set position: `G92 [X<pos>] [Y<pos>] [Z<pos>] [E<pos>]`
- Set speed factor override percentage: `M220 S<percent>`
- Set extrude factor override percentage: `M221 S<percent>`
- Set acceleration: `M204 S<value>`
- Set acceleration: `M204 S<value>` OR `M204 P<value> T<value>`
- Note: If S is not specified and both P and T are specified, then
the acceleration is set to the minimum of P and T. If only one of
P or T is specified, the command has no effect.
- Get extruder temperature: `M105`
- Set extruder temperature: `M104 [T<index>] [S<temperature>]`
- Set extruder temperature and wait: `M109 [T<index>] S<temperature>`
@@ -43,8 +45,8 @@ possible G-Code command. Instead, Klipper prefers human readable
If one requires a less common G-Code command then it may be possible
to implement it with a custom Klipper gcode_macro (see
[example-extras.cfg](https://github.com/KevinOConnor/klipper/tree/master/config/example-extras.cfg)
for details). For example, one might use this to implement: `G10`,
`G11`, `G12`, `G29`, `G30`, `G31`, `M42`, `M80`, `M81`, etc.
for details). For example, one might use this to implement: `G12`,
`G29`, `G30`, `G31`, `M42`, `M80`, `M81`, `T1`, etc.
## G-Code SD card commands
@@ -58,6 +60,25 @@ Klipper also supports the following standard G-Code commands if the
- Set SD position: `M26 S<offset>`
- Report SD print status: `M27`
In addition, the following extended commands are availble when the
"virtual_sdcard" config section is enabled.
- Load a file and start SD print: `SDCARD_PRINT_FILE FILENAME=<filename>`
- Unload file and clear SD state: `SDCARD_RESET_FILE`
## G-Code arcs
The following standard G-Code commands are available if a "gcode_arcs"
config section is enabled:
- Controlled Arc Move (G2 or G3): `G2 [X<pos>] [Y<pos>] [Z<pos>]
[E<pos>] [F<speed>] I<value> J<value>`
## G-Code firmware retraction
The following standard G-Code commands are available if a
"firmware_retraction" config section is enabled:
- Retract: `G10`
- Unretract: `G11`
## G-Code display commands
The following standard G-Code commands are available if a "display"
@@ -69,8 +90,6 @@ config section is enabled:
The following standard G-Code commands are currently available, but
using them is not recommended:
- Offset axes: `M206 [X<offset>] [Y<offset>] [Z<offset>]` (Use
SET_GCODE_OFFSET instead.)
- Get Endstop Status: `M119` (Use QUERY_ENDSTOPS instead.)
# Extended G-Code Commands
@@ -87,6 +106,11 @@ The following standard commands are supported:
- `QUERY_ENDSTOPS`: Probe the axis endstops and report if they are
"triggered" or in an "open" state. This command is typically used to
verify that an endstop is working correctly.
- `QUERY_ADC [NAME=<config_name>] [PULLUP=<value>]`: Report the last
analog value received for a configured analog pin. If NAME is not
provided, the list of available adc names are reported. If PULLUP is
provided (as a value in Ohms), the raw analog value along with the
equivalent resistance given that pullup is reported.
- `GET_POSITION`: Return information on the current location of the
toolhead.
- `SET_GCODE_OFFSET [X=<pos>|X_ADJUST=<adjust>]
@@ -136,10 +160,25 @@ The following standard commands are supported:
- `SET_HEATER_TEMPERATURE HEATER=<heater_name> [TARGET=<target_temperature>]`:
Sets the target temperature for a heater. If a target temperature is
not supplied, the target is 0.
- `ACTIVATE_EXTRUDER EXTRUDER=<config_name>`: In a printer with
multiple extruders this command is used to change the active
extruder.
- `SET_PRESSURE_ADVANCE [EXTRUDER=<config_name>] [ADVANCE=<pressure_advance>]
[ADVANCE_LOOKAHEAD_TIME=<pressure_advance_lookahead_time>]`:
Set pressure advance parameters. If EXTRUDER is not specified, it
defaults to the active extruder.
[SMOOTH_TIME=<pressure_advance_smooth_time>]`: Set pressure advance
parameters. If EXTRUDER is not specified, it defaults to the active
extruder.
- `SET_EXTRUDER_STEP_DISTANCE [EXTRUDER=<config_name>] [DISTANCE=<distance>]`:
Set a new value for the provided extruder's step_distance. Value is
not retained on Klipper reset. Use with caution, small changes can
result in excessive pressure between extruder and hot end. Do proper
calibration steps with filament before use. If 'DISTANCE' value is
not included command will return current step distance.
- `SET_STEPPER_ENABLE STEPPER=<config_name> ENABLE=[0|1]`: Enable or
disable only the given stepper. This is a diagnostic and debugging
tool and must be used with care. Disabling an axis motor does not
reset the homing information. Manually moving a disabled stepper may
cause the machine to operate the motor outside of safe limits. This
can lead to damage to axis components, hot ends, and print surface.
- `STEPPER_BUZZ STEPPER=<config_name>`: Move the given stepper forward
one mm and then backward one mm, repeated 10 times. This is a
diagnostic tool to help verify stepper connectivity.
@@ -168,6 +207,12 @@ The following standard commands are supported:
adjustment will only be made every BAND millimeters of z height - in
that case the formula used is `value = start + factor *
((floor(z_height / band) + .5) * band)`.
- `SET_DISPLAY_GROUP [DISPLAY=<display>] GROUP=<group>`: Set the
active display group of an lcd display. This allows to define
multiple display data groups in the config,
e.g. `[display_data <group> <elementname>]` and switch between them
using this extended gcode command. If DISPLAY is not specified it
defaults to "display" (the primary display).
- `SET_IDLE_TIMEOUT [TIMEOUT=<timeout>]`: Allows the user to set the
idle timeout (in seconds).
- `RESTART`: This will cause the host software to reload its config
@@ -197,26 +242,40 @@ is enabled:
The following command is available when an "output_pin" config section
is enabled:
- `SET_PIN PIN=config_name VALUE=<value>`
- `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.
## Manually Controlled Fans Commands
The following command is available when a "fan_generic" config section
is enabled:
- `SET_FAN_SPEED FAN=config_name SPEED=<speed>` This command sets
the speed of a fan. <speed> must be between 0.0 and 1.0.
## Neopixel and Dotstar Commands
The following command is available when "neopixel" or "dotstar" config
sections are enabled:
- `SET_LED LED=<config_name> INDEX=<index> RED=<value> GREEN=<value>
BLUE=<value>`: This sets the LED output. Each color <value> must be
between 0.0 and 1.0. If multiple LED chips are daisy-chained then
one may specify INDEX to alter the color of just the given chip (1
for the first chip, 2 for the second, etc.). If INDEX is not
provided then all LEDs in the daisy-chain will be set to the
provided color.
- `SET_LED LED=<config_name> RED=<value> GREEN=<value> BLUE=<value>
[INDEX=<index>] [TRANSMIT=0]`: This sets the LED output. Each color
<value> must be between 0.0 and 1.0. If multiple LED chips are
daisy-chained then one may specify INDEX to alter the color of just
the given chip (1 for the first chip, 2 for the second, etc.). If
INDEX is not provided then all LEDs in the daisy-chain will be set
to the provided color. If TRANSMIT=0 is specified then the color
change will only be made on the next SET_LED command that does not
specify TRANSMIT=0; this may be useful in combination with the INDEX
parameter to batch multiple updates in a daisy-chain.
## Servo Commands
The following commands are available when a "servo" config section is
enabled:
- `SET_SERVO SERVO=config_name [WIDTH=<seconds>] [ENABLE=<0|1>]`
- `SET_SERVO SERVO=config_name [ANGLE=<degrees>] [ENABLE=<0|1>]`
- `SET_SERVO SERVO=config_name [ANGLE=<degrees> | WIDTH=<seconds>]`:
Set the servo position to the given angle (in degrees) or pulse
width (in seconds). Use `WIDTH=0` to disable the servo output.
## Manual stepper Commands
@@ -224,23 +283,37 @@ The following command is available when a "manual_stepper" config
section is enabled:
- `MANUAL_STEPPER STEPPER=config_name [ENABLE=[0|1]]
[SET_POSITION=<pos>] [SPEED=<speed>] [ACCEL=<accel>]
[MOVE=<pos> [STOP_ON_ENDSTOP=1]]`: This command will alter the state
of the stepper. Use the ENABLE parameter to enable/disable the
stepper. Use the SET_POSITION parameter to force the stepper to
think it is at the given position. Use the MOVE parameter to request
a movement to the given position. If SPEED and/or ACCEL is specified
then the given values will be used instead of the defaults specified
in the config file. If an ACCEL of zero is specified then no
acceleration will be preformed. If STOP_ON_ENDSTOP is specified then
the move will end early should the endstop report as triggered (use
STOP_ON_ENDSTOP=-1 to stop early should the endstop report not
triggered).
[MOVE=<pos> [STOP_ON_ENDSTOP=[1|2|-1|-2]] [SYNC=0]]`: This command
will alter the state of the stepper. Use the ENABLE parameter to
enable/disable the stepper. Use the SET_POSITION parameter to force
the stepper to think it is at the given position. Use the MOVE
parameter to request a movement to the given position. If SPEED
and/or ACCEL is specified then the given values will be used instead
of the defaults specified in the config file. If an ACCEL of zero is
specified then no acceleration will be performed. If
STOP_ON_ENDSTOP=1 is specified then the move will end early should
the endstop report as triggered (use STOP_ON_ENDSTOP=2 to complete
the move without error even if the endstop does not trigger, use -1
or -2 to stop when the endstop reports not triggered). Normally
future G-Code commands will be scheduled to run after the stepper
move completes, however if a manual stepper move uses SYNC=0 then
future G-Code movement commands may run in parallel with the stepper
movement.
## Extruder stepper Commands
The following command is available when an "extruder_stepper" config
section is enabled:
- `SYNC_STEPPER_TO_EXTRUDER STEPPER=<extruder_stepper config_name>
[EXTRUDER=<extruder config_name>]`: This command will cause the given
STEPPER to become synchronized to the given EXTRUDER, overriding
the extruder defined in the "extruder_stepper" config section.
## Probe
The following commands are available when a "probe" config section is
enabled:
- `PROBE [PROBE_SPEED=<mm/s>] [SAMPLES=<count>]
- `PROBE [PROBE_SPEED=<mm/s>] [LIFT_SPEED=<mm/s>] [SAMPLES=<count>]
[SAMPLE_RETRACT_DIST=<mm>] [SAMPLES_TOLERANCE=<mm>]
[SAMPLES_TOLERANCE_RETRIES=<count>]
[SAMPLES_RESULT=median|average]`: Move the nozzle downwards until
@@ -261,7 +334,9 @@ enabled:
helper script useful for calibrating the probe's z_offset. See the
PROBE command for details on the optional probe parameters. See the
MANUAL_PROBE command for details on the SPEED parameter and the
additional commands available while the tool is active.
additional commands available while the tool is active. Please note,
the PROBE_CALIBRATE command uses the speed variable to move in XY direction
as well as Z.
## BLTouch
@@ -269,7 +344,14 @@ The following command is available when a "bltouch" config section is
enabled:
- `BLTOUCH_DEBUG COMMAND=<command>`: This sends a command to the
BLTouch. It may be useful for debugging. Available commands are:
pin_down, touch_mode, pin_up, self_test, reset.
`pin_down`, `touch_mode`, `pin_up`, `self_test`, `reset`,
(*1): `set_5V_output_mode`, `set_OD_output_mode`, `output_mode_store`
*** Note that the commands marked by (*1) are solely supported
by a BL-Touch V3.0 or V3.1(+)
- `BLTOUCH_STORE MODE=<output_mode>`: This stores an output mode in the
EEPROM of a BLTouch V3.1 Available output_modes are: `5V`, `OD`
See [Working with the BL-Touch](BLTouch.md) for more details.
@@ -303,7 +385,8 @@ section is enabled:
The following commands are available when the "bed_mesh" config
section is enabled:
- `BED_MESH_CALIBRATE [METHOD=manual] [<probe_parameter>=<value>]`:
- `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
@@ -311,15 +394,15 @@ section is enabled:
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_OUTPUT`: This command outputs the current probed z values
and current mesh values to the terminal.
- `BED_MESH_MAP`: This command probes the bed in a similar fashion
to BED_MESH_CALIBRATE, however no mesh is generated. Instead,
the probed z values are serialized to json and output to the
terminal. This allows octoprint plugins to easily capture the
data and generate maps approximating the bed's surface. Note
that although no mesh is generated, any currently stored mesh
will be cleared.
- `BED_MESH_OUTPUT PGP=[<0:1>]`: This command outputs the current probed
z values and current mesh values to the terminal. If PGP=1 is specified
the x,y coordinates generated by bed_mesh, along with their associated
indices, will be output to the terminal.
- `BED_MESH_MAP`: Like to BED_MESH_OUTPUT, this command prints the current
state of the mesh to the terminal. Instead of printing the values in a
human readable format, the state is serialized in json format. This allows
octoprint plugins to easily capture the data and generate height maps
approximating the bed's surface.
- `BED_MESH_CLEAR`: This command clears the mesh and removes all
z adjustment. It is recommended to put this in your end-gcode.
- `BED_MESH_PROFILE LOAD=<name> SAVE=<name> REMOVE=<name>`: This
@@ -409,13 +492,15 @@ section is enabled:
the given distance (in mm) at the given constant velocity (in
mm/s). If ACCEL is specified and is greater than zero, then the
given acceleration (in mm/s^2) will be used; otherwise no
acceleration is performed. No boundary checks are performed; no
kinematic updates are made; other parallel steppers on an axis will
not be moved. Use caution as an incorrect command could cause
damage! Using this command will almost certainly place the low-level
kinematics in an incorrect state; issue a G28 afterwards to reset
the kinematics. This command is intended for low-level diagnostics
and debugging.
acceleration is performed. If acceleration is not performed then it
can lead to the micro-controller reporting "No next step" errors
(avoid these errors by specifying an ACCEL value or use a very low
VELOCITY). No boundary checks are performed; no kinematic updates
are made; other parallel steppers on an axis will not be moved. Use
caution as an incorrect command could cause damage! Using this
command will almost certainly place the low-level kinematics in an
incorrect state; issue a G28 afterwards to reset the kinematics.
This command is intended for low-level diagnostics and debugging.
- `SET_KINEMATIC_POSITION [X=<value>] [Y=<value>] [Z=<value>]`: Force
the low-level kinematic code to believe the toolhead is at the given
cartesian position. This is a diagnostic and debugging command; use
@@ -530,3 +615,80 @@ been enabled:
delay duration for the identified [delayed_gcode] and starts the timer
for gcode execution. A value of 0 will cancel a pending delayed gcode
from executing.
## Resonance compensation
The following command is enabled if an [input_shaper] config section has
been enabled:
- `SET_INPUT_SHAPER [SHAPER_FREQ_X=<shaper_freq_x>]
[SHAPER_FREQ_Y=<shaper_freq_y>] [DAMPING_RATIO_X=<damping_ratio_x>]
[DAMPING_RATIO_Y=<damping_ratio_y>] [SHAPER_TYPE=<shaper>]
[SHAPER_TYPE_X=<shaper_type_x>] [SHAPER_TYPE_Y=<shaper_type_y>]`: Modify
input shaper parameters. Note that SHAPER_TYPE parameter resets input shaper
for both X and Y axes even if different shaper types have been configured
in [input_shaper] section. SHAPER_TYPE cannot be used together with either
of SHAPER_TYPE_X and SHAPER_TYPE_Y parameters. See
[example-extras.cfg](https://github.com/KevinOConnor/klipper/tree/master/config/example-extras.cfg)
for more details on each of these parameters.
## Temperature Fan Commands
The following command is available when a "temperature_fan" config
section is enabled:
- `SET_TEMPERATURE_FAN_TARGET temperature_fan=<temperature_fan_name>
[target=<target_temperature>]`: Sets the target temperature for a
temperature_fan. If a target is not supplied, it is set to the
specified temperature in the config file.
## Adxl345 Accelerometer Commands
The following commands are available when an "adxl345" config section is
enabled:
- `ACCELEROMETER_MEASURE [CHIP=<config_name>] [RATE=<value>]
[NAME=<value>]`: Starts accelerometer measurements at the requested
number of samples per second. If CHIP is not specified it defaults
to "default". Valid rates are 25, 50, 100, 200, 400, 800, 1600,
and 3200. The command works in a start-stop mode: when executed for
the first time, it starts the measurements, next execution stops them.
If RATE is not specified, then the default value is used (either from
`printer.cfg` or `3200` default value). The results of measurements
are written to a file named `/tmp/adxl345-<name>.csv` where "<name>"
is the optional NAME parameter. If NAME is not specified it defaults
to the current time in "YYYYMMDD_HHMMSS" format.
- `ACCELEROMETER_QUERY [CHIP=<config_name>] [RATE=<value>]`: queries
accelerometer for the current value. If CHIP is not specified it
defaults to "default". If RATE is not specified, the default value is
used. This command is useful to test the connection to the ADXL345
accelerometer: one of the returned values should be a free-fall
acceleration (+/- some noise of the chip).
## Resonance Testing Commands
The following commands are available when a "resonance_tester" config section
is enabled:
- `MEASURE_AXES_NOISE`: Measures and outputs the noise for all axes of all
enabled accelerometer chips.
- `TEST_RESONANCES AXIS=<axis> OUTPUT=<resonances,raw_data> [NAME=<name>]
[FREQ_START=<min_freq>] [FREQ_END=<max_freq>] [HZ_PER_SEC=<hz_per_sec>]`:
Runs the resonance test in all configured probe points for the requested
axis (X or Y) and measures the acceleration using the accelerometer chips
configured for the respective axis. `OUTPUT` parameter is a comma-separated
list of which outputs will be written. If `raw_data` is requested, then the
raw accelerometer data is written into a file or a series of files
`/tmp/raw_data_<axis>_[<point>_]<name>.csv` with (`<point>_` part of
the name generated only if more than 1 probe point is configured). If
`resonances` is specified, the frequency response is calculated (across
all probe points) and written into `/tmp/resonances_<axis>_<name>.csv`
file. If unset, OUTPUT defaults to `resonances`, and NAME defaults to
the current time in "YYYYMMDD_HHMMSS" format.
- `SHAPER_CALIBRATE [AXIS=<axis>] [NAME=<name>]
[FREQ_START=<min_freq>] [FREQ_END=<max_freq>] [HZ_PER_SEC=<hz_per_sec>]`:
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 Y axes if `AXIS` parameter is unset). The results of the
tuning are printed to the console, and the 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.

View File

@@ -0,0 +1,122 @@
This document describes Filament Width Sensor host module. Hardware used for developing this host module is based on Two Hall liniar sensors (ss49e for example). Sensors in the body are located opposite sides. Principle of operation : two hall sensors work in differential mode, temperature drift same for sensor. Special temperature compensation not needed. You can find designs at [thingiverse.com](https://www.thingiverse.com/thing:4138933)
[Hall based filament width sensor assembly video](https://www.youtube.com/watch?v=TDO9tME8vp4)
## How does it work?
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
## Configuration
[hall_filament_width_sensor]
adc1: analog11
adc2: analog12
# adc1 and adc2 channels select own pins Analog input pins on 3d printer board
# Sensor power supply can be 3.3v or 5v
Cal_dia1: 1.50 # Reference diameter point 1 (mm)
Cal_dia2: 2.00 # Reference diameter point 2 (mm)
# The measurement principle provides for two-point calibration
# In calibration process you must use rods of known diameter
# I use drill rods as the base diameter.
# nominal filament diameter must be between Cal_dia1 and Cal_dia2
# Your size may differ from the indicated ones, for example 2.05
Raw_dia1:10630 # Raw sensor value for reference point 1
Raw_dia2:8300 # Raw sensor value for reference point 2
# Raw value of sensor in units
# can be readed by command QUERY_RAW_FILAMENT_WIDTH
default_nominal_filament_diameter: 1.75 # This parameter is in millimeters (mm)
max_difference: 0.15
# Maximum allowed filament diameter difference in millimeters (mm)
# If difference between nominal filament diameter and sensor output is more
# than +- max_difference, extrusion multiplier set back to %100
measurement_delay: 70
# The distance from sensor to the melting chamber/hot-end in millimeters (mm).
# The filament between the sensor and the hot-end will be treated as the default_nominal_filament_diameter.
# Host module works with FIFO logic. It keeps each sensor value and position in
# an array and POP them back in correct position.
#enable:False
# Sensor enabled or disabled after power on. Disabled by default
# measurement_interval:10
# Sensor readings done with 10 mm intervals by default. If necessary you are free to change this setting
#logging: False
# Out diameter to terminal and klipper.log
# can be turn on|of by command
#Virtual filament_switch_sensor suppurt. Create sensor named hall_filament_width_sensor.
#
#min_diameter:1.0
#Minimal diameter for trigger virtual filament_switch_sensor.
#use_current_dia_while_delay: False
# Use the current diameter instead of the nominal diamenter while the measurement delay has not run through.
#
#Values from filament_switch_sensor. See the "filament_switch_sensor" section for information on these parameters.
#
#pause_on_runout: True
#runout_gcode:
#insert_gcode:
#event_delay: 3.0
#pause_delay: 0.5
## Commands
**QUERY_FILAMENT_WIDTH** - Return the current measured filament width as result
**RESET_FILAMENT_WIDTH_SENSOR** – Clear all sensor readings. Can be used after filament change.
**DISABLE_FILAMENT_WIDTH_SENSOR** – Turn off the filament width sensor and stop using it to do flow control
**ENABLE_FILAMENT_WIDTH_SENSOR** - Turn on the filament width sensor and start using it to do flow control
**QUERY_RAW_FILAMENT_WIDTH** Return the current ADC channel values and RAW sensor value for calibration points
**ENABLE_FILAMENT_WIDTH_LOG** - Turn on diameter logging
**DISABLE_FILAMENT_WIDTH_LOG** - Turn off diameter logging
## Menu variables
**hall_filament_width_sensor.Diameter** current measured filament width in mm
**hall_filament_width_sensor.Raw** current raw measured filament width in units
**hall_filament_width_sensor.is_active** Sensor on or off
## Template for menu variables
[menu __main __filament __width_current]
type: command
enable: {'hall_filament_width_sensor' in printer}
name: Dia: {'%.2F' % printer.hall_filament_width_sensor.Diameter}
index: 0
[menu __main __filament __raw_width_current]
type: command
enable: {'hall_filament_width_sensor' in printer}
name: Raw: {'%4.0F' % printer.hall_filament_width_sensor.Raw}
index: 1
## Calibration procedure
Insert first calibration rod (1.5 mm size) get first raw sensor value
To get raw sensor value you can use menu item or **QUERY_RAW_FILAMENT_WIDTH** command in terminal
Insert second calibration rod (2.0 mm size) get second raw sensor value
Save raw values in config
## How to enable sensor
After power on by default sensor disabled.
Enable sensor in start g-code by command **ENABLE_FILAMENT_WIDTH_SENSOR** or change enable parameter in config
## Logging
After power on by default diameter Logging disabled.
Data to log added on every measurement interval (10 mm by default)

View File

@@ -1,7 +1,6 @@
These instructions assume the software will run on a Raspberry Pi
computer in conjunction with OctoPrint. It is recommended that a
Raspberry Pi 2 or Raspberry Pi 3 computer be used as the host machine
(see the
Raspberry Pi 2, 3, or 4 computer be used as the host machine (see the
[FAQ](FAQ.md#can-i-run-klipper-on-something-other-than-a-raspberry-pi-3)
for other machines).
@@ -14,11 +13,11 @@ Prepping an OS image
====================
Start by installing [OctoPi](https://github.com/guysoft/OctoPi) on the
Raspberry Pi computer. Use OctoPi v0.16.0 or later - see the
Raspberry Pi computer. Use OctoPi v0.17.0 or later - see the
[octopi releases](https://github.com/guysoft/OctoPi/releases) for
release information. One should verify that OctoPi boots and that the
OctoPrint web server works. After connecting to the OctoPrint web
page, follow the prompt to upgrade OctoPrint to v1.3.11 or later.
page, follow the prompt to upgrade OctoPrint to v1.4.2 or later.
After installing OctoPi and upgrading OctoPrint, it will be necessary
to ssh into the target machine to run a handful of system commands. If

View File

@@ -92,10 +92,6 @@ desired speed that a 90° corner should have (the "square corner
velocity"), and the junction speeds for other angles are derived from
that.
Klipper implements look-ahead between moves that have similar extruder
flow rates. Other moves are relatively rare and implementing
look-ahead between them is unnecessary.
Key formula for look-ahead:
```
end_velocity^2 = start_velocity^2 + 2*accel*move_distance
@@ -268,35 +264,37 @@ through the nozzle orifice (as in
key idea is that the relationship between filament, pressure, and flow
rate can be modeled using a linear coefficient:
```
stepper_position = requested_e_position + pressure_advance_coefficient * nominal_extruder_velocity
pa_position = nominal_position + pressure_advance_coefficient * nominal_velocity
```
See the [pressure advance](Pressure_Advance.md) document for
information on how to find this pressure advance coefficient.
Once configured, Klipper will push in an additional amount of filament
during acceleration. The higher the desired filament flow rate, the
more filament must be pushed in during acceleration to account for
pressure. During head deceleration the extra filament is retracted
(the extruder will have a negative velocity).
The basic pressure advance formula can cause the extruder motor to
make sudden velocity changes. Klipper implements "smoothing" of the
extruder movement to avoid this.
![pressure-advance](img/pressure-advance.svg.png)
![pressure-advance](img/pressure-velocity.png)
One may notice that the pressure advance algorithm can cause the
extruder motor to make sudden velocity changes. This is tolerated
based on the idea that the majority of the inertia in the system is in
changing the extruder pressure. As long as the extruder pressure does
not change rapidly the sudden changes in extruder motor velocity are
tolerated.
The above graph shows an example of two extrusion moves with a
non-zero cornering velocity between them. Note that the pressure
advance system causes additional filament to be pushed into the
extruder during acceleration. The higher the desired filament flow
rate, the more filament must be pushed in during acceleration to
account for pressure. During head deceleration the extra filament is
retracted (the extruder will have a negative velocity).
One area where sudden velocity changes become problematic is during
small changes in head speed due to cornering.
The "smoothing" is implemented using a weighted average of the
extruder position over a small time period (as specified by the
`pressure_advance_smooth_time` config parameter). This averaging can
span multiple g-code moves. Note how the extruder motor will start
moving prior to the nominal start of the first extrusion move and will
continue to move after the nominal end of the last extrusion move.
![pressure-cornering](img/pressure-cornering.svg.png)
To prevent this, the Klipper pressure advance code utilizes the move
look-ahead queue to detect intermittent speed changes. During a
deceleration event the code finds the maximum upcoming head speed
within a configurable time window. The pressure is then only adjusted
to this found maximum. This can greatly reduce (or even completely
eliminate) pressure changes during cornering.
Key formula for "smoothed pressure advance":
```
smooth_pa_position(t) =
( definitive_integral(pa_position(x) * (smooth_time/2 - abs(t - x)) * dx,
from=t-smooth_time/2, to=t+smooth_time/2)
/ (smooth_time/2)^2 )
```

View File

@@ -133,15 +133,13 @@ This section lists some commonly used config commands.
see the description of the 'set_pwm_out' and 'config_digital_out'
commands for parameter description.
* `config_soft_pwm_out oid=%c pin=%u cycle_ticks=%u value=%c
* `config_soft_pwm_out oid=%c pin=%u value=%c
default_value=%c max_duration=%u` : This command creates an internal
micro-controller object for software implemented PWM. Unlike
hardware pwm pins, a software pwm object does not require any
special hardware support (other than the ability to configure the
pin as a digital output GPIO). Because the output switching is
implemented in the micro-controller software, it is recommended that
the cycle_ticks parameter correspond to a time of 10ms or greater.
See the description of the 'set_pwm_out' and 'config_digital_out'
pin as a digital output GPIO). See the description of
the 'set_pwm_out' and 'config_digital_out'
commands for parameter description.
* `config_analog_in oid=%c pin=%u` : This command is used to configure
@@ -203,9 +201,13 @@ only of interest to developers looking to gain insight into Klipper.
a hardware PWM output pin. See the 'schedule_digital_out' and
'config_pwm_out' commands for more info.
* `schedule_soft_pwm_out oid=%c clock=%u on_ticks=%u` : Schedules a
change to a software PWM output pin. See the 'schedule_digital_out'
and 'config_soft_pwm_out' commands for more info.
* `schedule_soft_pwm_out oid=%c clock=%u on_ticks=%u off_ticks=%u` : Schedules a
change to a software PWM output pin. The parameters 'on_ticks' and 'off_ticks'
define for how many ticks the pin will be on and off, respectively.
Because the output switching is implemented in the micro-controller software,
it is recommended that the sum of on_ticks and off_ticks parameters
corresponds to a time of 10ms or greater. See the 'schedule_digital_out' and
'config_soft_pwm_out' commands for more info.
* `query_analog_in oid=%c clock=%u sample_ticks=%u sample_count=%c
rest_ticks=%u min_value=%hu max_value=%hu` : This command sets up a

View File

@@ -11,9 +11,11 @@ limiting factor. If one is using Trinamic stepper motor drivers then
consider enabling [endstop phase](Endstop_Phase.md) detection to
improve the accuracy of the switch.
To perform a Z endstop calibration, home the printer, move the head to
a position near the center of the bed, navigate to the OctoPrint
terminal tab, and run:
To perform a Z endstop calibration, home the printer, command the head
to move to a Z position that is at least five millimeters above the
bed (if it is not already), command the head to move to an XY position
near the center of the bed, then navigate to the OctoPrint terminal
tab and run:
```
Z_ENDSTOP_CALIBRATE
```
@@ -142,8 +144,8 @@ This is another way to calibrate the bed level using the bed probe. To
use it you must have a Z probe (BL Touch, Inductive sensor, etc).
To enable this feature, one would determine the nozzle coordinates
near the screws and add them to the config file. For example, it might
look like:
such that the Z probe is above the screws, and then add them to the
config file. For example, it might look like:
```
[screws_tilt_adjust]
@@ -183,3 +185,9 @@ This means that:
Repeat the process several times until you get a good level bed -
normally when all adjustments are below 6 minutes.
If using a probe that is mounted on the side of the hotend (that is,
it has an X or Y offset) then note that adjusting the bed tilt will
invalidate any previous probe calibration that was performed with a
tilted bed. Be sure to run [probe calibration](Probe_Calibrate.md)
after the bed screws have been adjusted.

View File

@@ -0,0 +1,348 @@
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).
Installation instructions
===========================
## Wiring
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
and **will not work**. The recommended connection scheme:
| ADXL345 pin | RPi pin | RPi pin name |
|:--:|:--:|:--:|
| 3V3 (or VCC) | 01 | 3.3v DC power |
| GND | 06 | Ground |
| CS | 24 | GPIO08 (SPI0_CE0_N) |
| SDO | 21 | GPIO09 (SPI0_MISO) |
| SDA | 19 | GPIO10 (SPI0_MOSI) |
| SCL | 23 | GPIO11 (SPI0_SCLK) |
Fritzing wiring diagrams for some of the ADXL345 boards:
![ADXL345-Rpi](img/adxl345-fritzing.png)
Double-check your wiring before powering up the Raspberry Pi to prevent
damaging it or the accelerometer.
## Mounting the accelerometer
The accelerometer must be attached to the toolhead. One needs to design a proper
mount that fits their own 3D printer. It is better to align the axes of the
accelerometer with the printer's axes (but if it makes it more convenient,
axes can be swapped - i.e. no need to align X axis with X and so forth - it
should be fine even if Z axis of accelerometer is X axis of the printer, etc.).
An example of mounting ADXL345 on the SmartEffector:
![ADXL345 on SmartEffector](img/adxl345-mount.jpg)
Note that on a bed slinger printer one must design 2 mounts: one for the
toolhead and one for the bed, and run the measurements twice.
## Software installation
Note that resonance measurements and shaper auto-calibration require additional
software dependencies not installed by default. You will have to run on your
Raspberry Pi
```
$ ~/klippy-env/bin/pip install -v numpy
```
to install `numpy` package. Note that, depending on the performance of the
CPU, it may take *a lot* 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.
If installing prerequisites takes too much time or fail for whatever reason,
there is, in principle, another possibility to run a stand-alone script to
automatically tune the input shapers (will be covered later in the guide).
In order to run stand-alone scripts, one must run the following command to
install the required dependencies (either on Raspberry Pi, or on host,
depending on where the scripts will be executed):
```
$ sudo apt install python-numpy python-matplotlib
```
Afterwards, follow the instructions in the
[RPi Microcontroller document](RPi_microcontroller.md) to setup the
"linux mcu" on the Raspberry Pi.
Make sure the Linux SPI driver is enabled by running `sudo
raspi-config` and enabling SPI under the "Interfacing options" menu.
Add the following to the printer.cfg file:
```
[mcu rpi]
serial: /tmp/klipper_host_mcu
[adxl345]
cs_pin: rpi:None
[resonance_tester]
accel_chip: adxl345
probe_points:
100,100,20 # an example
```
It is advised to start with 1 probe point, in the middle of the print bed,
slightly above it.
Restart Klipper via the `RESTART` command.
Measuring the resonances
===========================
## Checking the setup
Now you can test a connection. In Octoprint, run `ACCELEROMETER_QUERY`. You
should see the current measurements from the accelerometer, including the
free-fall acceleration, e.g.
```
Recv: // adxl345 values (x, y, z): 470.719200, 941.438400, 9728.196800
```
Try running `MEASURE_AXES_NOISE` in Octoprint, you should get some baseline
numbers for the noise of accelerometer on the axes (should be somewhere
in the range of ~1-100). Note that this feature will not be available if
`numpy` package was not installed (see
[Software installation](#software-installation) for more details).
## Measuring the resonances
Now you can run some real-life tests. In `printer.cfg` add or replace the
following values:
```
[printer]
max_accel: 7000
max_accel_to_decel: 7000
```
(after you are done with the measurements, revert these values to their old,
or the newly suggested values). Also, if you have enabled input shaper already,
you will need to disable it prior to this test as follows:
```
SET_INPUT_SHAPER SHAPER_FREQ_X=0 SHAPER_FREQ_Y=0
```
as it is not valid to run the resonance testing with the input shaper enabled.
Run the following command:
```
TEST_RESONANCES AXIS=X
```
Note that it will create vibrations on X axis. If that works, run for Y axis
as well:
```
TEST_RESONANCES AXIS=Y
```
This will generate 2 CSV files (`/tmp/resonances_x_*.csv` and
`/tmp/resonances_y_*.csv`).
Note that the commands above require `numpy` to be installed installed. If you
haven't installed it, you can instead pass `OUTPUT=raw_data` argument to the
above commands (2 files `/tmp/raw_data_x_*.csv` and `/tmp/raw_data_y_*.csv`
will be written). One can then run stand-alone scripts on Raspberry Pi
(specify the correct file name on the command line):
```
$ ~/klipper/scripts/graph_accelerometer.py /tmp/raw_data_x_*.csv -o /tmp/resonances_x.png
$ ~/klipper/scripts/calibrate_shaper.py /tmp/raw_data_x_*.csv -o /tmp/shaper_calibrate_x.png
```
or copy the data to the host and run the scripts there. See
[Offline processing of the accelerometer data](#offline-processing-of-the-accelerometer-data)
section for more details.
**Attention!** Be sure to observe the printer for the first time, to make sure
the vibrations do not become too violent (`M112` command can be used to abort
the test in case of emergency; hopefully it will not come to this though).
If the vibrations do get too strong, you can attempt to specify a lower than the
default value for `accel_per_hz` parameter in `[resonance_tester]` section, e.g.
```
[resonance_tester]
accel_chip: adxl345
accel_per_hz: 50 # default is 75
probe_points: ...
```
Generated CSV files show power spectral density of the vibrations depending on the
frequency. Usually, the charts generated from these CSV files are relatively easy
to read, with the peaks corresponding to the resonance frequencies:
![Resonances](img/test-resonances-x.png)
The chart above shows the resonances for X axis at approx. 50 Hz, 56 Hz, 63 Hz,
80 Hz and 104 Hz and one cross-resonance for Y axis at ~ 56 Hz. From this, one
can derive that a good input shaper config in this case could be `2hump_ei` at
around `shaper_freq_y = 45` (Hz):
|![2-hump EI shaper](img/2hump_ei_65hz.png)|
|:--:|
|Input Shaper response to vibrations, lower is better.|
Note that the smaller resonance at 104 Hz requires less of vibration suppression
(if at all).
## Input Shaper auto-calibration
Besides manually choosing the appropriate parameters for the input shaper
feature, it is also possible to run an experimental auto-tuning for the
input shaper.
In order to attempt to measure the resonance frequencies and automatically
determine the best parameters for `[input_shaper]`, run the following command
via Octoprint terminal:
```
SHAPER_CALIBRATE
```
This will test all frequencies in range 5 Hz - 120 Hz and generate
the csv output (`/tmp/calibration_data_*.csv` by default) for the frequency
response and the suggested input shapers. You will also get the suggested
frequencies for each input shaper, as well as which input shaper is recommended
for your setup, on Octoprint console. For example:
![Resonances](img/calibrate-y.png)
```
Fitted shaper 'zv' frequency = 56.7 Hz (vibrations = 23.2%)
Fitted shaper 'mzv' frequency = 52.9 Hz (vibrations = 10.9%)
Fitted shaper 'ei' frequency = 62.0 Hz (vibrations = 8.9%)
Fitted shaper '2hump_ei' frequency = 59.0 Hz (vibrations = 4.9%)
Fitted shaper '3hump_ei' frequency = 65.0 Hz (vibrations = 3.3%)
Recommended shaper_type_y = 2hump_ei, shaper_freq_y = 59.0 Hz
```
If you agree with the suggested parameters, you can execute `SAVE_CONFIG`
now to save them and restart the Klipper.
If your printer is a bed slinger printer, you will need to repeat the
measurements twice: 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). In this case, you can specify the axis you want to run the
test for (by default the test is performed for both axes):
```
SHAPER_CALIBRATE AXIS=Y
```
You can execute `SAVE_CONFIG` twice - after calibrating each axis.
However, you can 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:
```
[adxl345 adxl345_x]
# Assuming adxl345_x is connected to an RPi
cs_pin: rpi:None
[adxl345 adxl345_y]
# Assuming adxl345_y is connected to a printer MCU board
cs_pin: ... # Printer board SPI chip select (CS) pin
[resonance_tester]
accel_chip_x: adxl345_x
accel_chip_y: adxl345_y
probe_points: ...
```
then one can simply run `SHAPER_CALIBRATE` without specifying an axis to
calibrate the input shaper for both axes in one go.
After the autocalibration is finished, you will still need to choose the
`max_accel` value that does not create too much smoothing in the printed
parts. Follow [this](Resonance_Compensation.md#selecting-max_accel) part of
the input shaper tuning guide and print the test model.
## Input Shaper re-calibration
`SHAPER_CALIBRATE` command can be also used to re-calibrate the input shaper in
the future, especially if some changes to the printer that can affect its
kinematics are made. One can either re-run the full calibration using
`SHAPER_CALIBRATE` command, or restrict the auto-calibration to a single axis by
supplying `AXIS=` parameter, like
```
SHAPER_CALIBRATE AXIS=X
```
**Warning!** It is not advisable to run the shaper autocalibration very
frequently (e.g. before every print, or every day). In order to determine
resonance frequencies, autocalibration 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
increased risk of some parts unscrewing or becoming loose. Always check that
all parts of the printer (including the ones that may normally not move) are
securely fixed in place after each auto-tuning.
Also, due to some noise in measurements, it is possible the the tuning results
will be slightly different from one calibration run to another one. Still, it
is not expected that the resulting print quality will be affected too much.
However, it is still advised to double-check the suggested parameters, and
print some test prints before using them to confirm they are good.
## Offline processing of the accelerometer data
It is possible to generate the raw accelerometer data and process it offline
(e.g. on a host machine), for example to find resonances. In order to do so,
run the following command via Octoprint terminal:
```
TEST_RESONANCES AXIS=X OUTPUT=raw_data
```
(specify the desired test axis and the desired template for the raw
accelerometer output, the data will be written into `/tmp` directory).
The raw data can also be obtained by running the command `ACCELEROMETER_MEASURE`
command twice during some normal printer activity - first to start the
measurements, and then to stop them and write the output file. Refer to
[G-Codes](G-Codes.md#adxl345-accelerometer-commands) for more details.
The data can be processed later by the following scripts:
`scripts/graph_accelerometer.py` and `scripts/calibrate_shaper.py`. Both
of them accept one or several raw csv files as the input depending on the
mode. The graph_accelerometer.py script supports several modes of operation:
* plotting raw accelerometer data (use `-r` parameter), only 1 input is
supported;
* plotting a frequency response (no extra parameters required), if multiple
inputs are specified, the average frequency response is computed;
* comparison of the frequency response between several inputs (use `-c`
parameter); you can additionally specify which accelerometer axis to
consider via `-a x`, `-a y` or `-a z` parameter (if none specified,
the sum of vibrations for all axes is used);
* plotting the spectrogram (use `-s` parameter), only 1 input is supported;
you can additionally specify which accelerometer axis to consider via
`-a x`, `-a y` or `-a z` parameter (if none specified, the sum of vibrations
for all axes is used).
For example,
```
$ ~/klipper/scripts/graph_accelerometer.py /tmp/raw_data_x_*.csv -o /tmp/resonances_x.png -c -a z
```
will plot the comparison of several `/tmp/raw_data_x_*.csv` files for Z axis to
`/tmp/resonances_x.png` file.
The shaper_calibrate.py script accepts 1 or several inputs and can run automatic
tuning of the input shaper and suggest the best parameters that work well for
all provided inputs. It prints the suggested parameters to the console, and can
additionally generate the chart if `-o output.png` parameter is provided, or
the CSV file if `-c output.csv` parameter is specified.
Providing several inputs to shaper_calibrate.py script can be useful if running
some advanced tuning of the input shapers, for example:
* Running `TEST_RESONANCES AXIS=X OUTPUT=raw_data` (and `Y` axis) for a single
axis twice on a bed slinger printer with the accelerometer attached to the
toolhead the first time, and the accelerometer attached to the bed the
second time in order to detect axes cross-resonances and attempt to cancel
them with input shapers.
* Running `TEST_RESONANCES AXIS=Y OUTPUT=raw_data` twice on a bed slinger with
a glass bed and a magnetic surfaces (which is lighter) to find the input
shaper parameters that work well for any print surface configuration.
* Combining the resonance data from multiple test points.
* Combining the resonance data from 2 axis (e.g. on a bed slinger printer
to configure X-axis input_shaper from both X and Y axes resonances to
cancel vibrations of the *bed* in case the nozzle 'catches' a print when
moving in X axis direction).

View File

@@ -29,6 +29,10 @@ communication with the Klipper developers.
similar).
- [Endstop phase](Endstop_Phase.md): Stepper assisted Z endstop
positioning.
- [Resonance compensation](Resonance_Compensation.md): A tool to
reduce ringing in prints.
- [Measuring resonances](Measuring_Resonances.md): Information on
using adxl345 accelerometer hardware to measure resonance.
- [Pressure advance](Pressure_Advance.md): Calibrate extruder
pressure.
- [Slicers](Slicers.md): Configure "slicer" software for Klipper.
@@ -48,6 +52,8 @@ communication with the Klipper developers.
implements motion.
- [Protocol](Protocol.md): Information on the low-level messaging
protocol between host and micro-controller.
- [API Server](API_Server.md): Information on Klipper's command and
control API.
- [MCU commands](MCU_Commands.md): A description of low-level commands
implemented in the micro-controller software.
- [Debugging](Debugging.md): Information on how to test and debug
@@ -60,12 +66,13 @@ communication with the Klipper developers.
# Device Specific Documents
- [Bootloaders](Bootloaders.md): Developer information on
micro-controller flashing.
- [stm32f1](stm32f1.md): Information on the STM32F1 micro-controller
port.
- [Raspberry Pi as Micro-controller](RPi_microcontroller.md): Details
for controlling devices wired to the GPIO pins of a Raspberry Pi.
- [Beaglebone](beaglebone.md): Details for running Klipper on the
Beaglebone PRU.
- [Bootloaders](Bootloaders.md): Developer information on
micro-controller flashing.
- [stm32f0](stm32f0_CAN.md): Information on the STM32F0 micro-controller
port.
- [TSL1401CL filament width sensor](TSL1401CL_Filament_Width_Sensor.md)
- [Hall filament width sensor](HallFilamentWidthSensor.md)

View File

@@ -13,58 +13,65 @@ uses the second feature (reducing blobbing during cornering) as a
mechanism for tuning.
In order to calibrate pressure advance the printer must be configured
and operational. The tuning test involves printing objects and
inspecting the differences between objects. It is a good idea to read
this document in full prior to running the test.
and operational as the tuning test involves printing and inspecting a
test object. It is a good idea to read this document in full prior to
running the test.
Use a slicer to generate g-code for the large hollow square found in
[docs/prints/square.stl](prints/square.stl). Use a high speed (eg,
100mm/s) and a coarse layer height (the layer height should be around
75% of the nozzle diameter). It is fine to use a low infill (eg, 10%).
[docs/prints/square_tower.stl](prints/square_tower.stl). Use a high
speed (eg, 100mm/s), zero infill, and a coarse layer height (the layer
height should be around 75% of the nozzle diameter). Make sure any
"dynamic acceleration control" is disabled in the slicer.
Prepare for the test by issuing the following G-Code commands:
`SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500` and
`SET_PRESSURE_ADVANCE ADVANCE_LOOKAHEAD_TIME=0`. These commands make
the nozzle travel slower through corners and they emphasize the
effects of extruder pressure.
Prepare for the test by issuing the following G-Code command:
```
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500
```
This command makes the nozzle travel slower through corners to
emphasize the effects of extruder pressure. Then for printers with a
direct drive extruder run the command:
```
TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005
```
For long bowden extruders use:
```
TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.020
```
Then print the object. When fully printed the test print looks like:
For the first print use a pressure advance of zero by running
`SET_PRESSURE_ADVANCE ADVANCE=0.000`. Then print at least 10 layers of
the test object. While the object is printing, make a note of which
direction the head is moving during external perimeters. What many
people see here is blobbing occurring at the corners - extra filament
at the corner in the direction the head travels followed by a possible
lack of filament on the side immediately after that corner:
![tuning_tower](img/tuning_tower.jpg)
![corner-blob](img/corner-blob.jpg)
The above TUNING_TOWER command instructs Klipper to alter the
pressure_advance setting on each layer of the print. Higher layers in
the print will have a larger pressure advance value set. Layers below
the ideal pressure_advance setting will have blobbing at the corners,
and layers above the ideal setting can lead to rounded corners and
poor extrusion leading up to the corner.
This blobbing is the result of pressure in the extruder being released
as a blob when the head slows down to corner.
One can cancel the print early if one observes that the corners are no
longer printing well (and thus one can avoid printing layers that are
known to be above the ideal pressure_advance value).
The next step is to increase pressure advance (start with
`SET_PRESSURE_ADVANCE ADVANCE=0.050`) and reprint the test object.
With pressure advance, the extruder will retract when the head slows
down, thus countering the pressure buildup and ideally eliminate the
blobbing.
Inspect the print and then use a digital calipers to find the height
that has the best quality corners. When in doubt, prefer a lower
height.
If a test run is done with a pressure advance setting that is too
high, one typically sees a dimple in the corner followed by possible
blobbing after the corner (too much filament is retracted during slow
down and then too much filament is extruded during the following speed
up after cornering):
![tune_pa](img/tune_pa.jpg)
![corner-dimple](img/corner-dimple.jpg)
The pressure_advance value can then be calculated as `pressure_advance
= <start> + <measured_height> * <factor>`. (For example, `0 + 12.90 *
.020` would be `.258`.)
The goal is to find the smallest pressure advance value that results
in good quality corners:
![corner-good](img/corner-good.jpg)
It is possible to choose custom settings for START and FACTOR if that
helps identify the best pressure advance setting. When doing this, be
sure to issue the TUNING_TOWER command at the start of each test
print.
Typical pressure advance values are between 0.050 and 1.000 (the high
end usually only with bowden extruders). If there is no significant
improvement after gradually increasing pressure advance to 1.000, then
pressure advance is unlikely to improve the quality of prints. Return
to a default configuration with pressure advance disabled.
improvement with a pressure advance up to 1.000, then pressure advance
is unlikely to improve the quality of prints. Return to a default
configuration with pressure advance disabled.
Although this tuning exercise directly improves the quality of
corners, it's worth remembering that a good pressure advance
@@ -72,8 +79,8 @@ configuration also reduces ooze throughout the print.
At the completion of this test, update the extruder's pressure_advance
setting in the configuration file and issue a RESTART command. The
RESTART command will also return the acceleration, cornering speeds,
and look-ahead times to their normal values.
RESTART command will clear the test state and return the acceleration
and cornering speeds to their normal values.
Important Notes
===============
@@ -85,26 +92,31 @@ Important Notes
pressure advance on each printer and with each spool of filament.
* Printing temperature and extrusion rates can impact pressure
advance. Be sure to tune the extruder
advance. Be sure to tune the extruder
[E steps](http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide#E_steps)
and
[nozzle temperature](http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide#Nozzle_Temperature)
prior to tuning pressure advance.
* It is not unusual for one corner of the test print to be
consistently different than the other three corners. This typically
occurs when the slicer arranges to always change Z height at that
corner. If this occurs, then ignore that corner and tune pressure
advance using the other three corners.
* The test print is designed to run with a high extruder flow rate,
but otherwise "normal" slicer settings. A high flow rate is obtained
by using a high printing speed (eg, 100mm/s) and a coarse layer
height (typically around 75% of the nozzle diameter). Other slicer
settings should be similar to their defaults (eg, perimeters of 2 or
3 lines, normal retraction amount). It can be useful to set the
external perimeter speed to be the same speed as the rest of the
print, but it is not a requirement.
* Check for warping at the corners during the test prints (the corners
detaching from the bed and rising a small distance upwards during
the print). If one corner appears warped then ignore that corner
when tuning. If significant warping is seen throughout the test then
typical solutions are to reduce the slicer's first layer speed,
adjust the bed temperature, and/or to use the slicer's brim feature.
Pressure advance itself is unlikely to impact warping, but this
tuning test is sensitive to it.
* It is common for the test print to show different behavior on each
corner. Often the slicer will arrange to change layers at one corner
which can result in that corner being significantly different from
the remaining three corners. If this occurs, then ignore that corner
and tune pressure advance using the other three corners. It is also
common for the remaining corners to vary slightly. (This can occur
due to small differences in how the printer's frame reacts to
cornering in certain directions.) Try to choose a value that works
well for all the remaining corners. If in doubt, prefer a lower
pressure advance value.
* If a high pressure advance value (eg, over 0.200) is used then one
may find that the extruder skips when returning to the printer's
@@ -115,17 +127,6 @@ Important Notes
enough torque to push the required filament. If this occurs, either
use a lower acceleration value or disable pressure advance.
* The pressure_advance_lookahead_time parameter controls how far in
advance to check if a head slow-down is immediately followed by a
speed-up - it reduces pointless pressure changes in the head. It is
recommended to follow the steps above so that it is set to zero
during tuning and to use the default (0.010) during normal prints.
It is possible to tune this setting - higher values will reduce the
amount of pressure change in the nozzle during cornering, but
setting it too high can cause blobbing during cornering. (Tuning
this value is unlikely to impact ooze.) The default of 10ms should
work well on most printers.
* Once pressure advance is tuned in Klipper, it may still be useful to
configure a small retract value in the slicer (eg, 0.75mm) and to
utilize the slicer's "wipe on retract option" if available. These
@@ -134,10 +135,12 @@ Important Notes
plastic). It is recommended to disable the slicer's "z-lift on
retract" option.
* Configuring pressure advance results in extra extruder movement
during move acceleration and deceleration. That extra movement is
not further constrained by any other other configuration parameter.
The pressure advance settings only impact extruder movement; they do
not alter toolhead XYZ movement or look-ahead calculations. A change
in pressure advance will not change the path or timing of the
toolhead nor will it change the overall printing time.
* The pressure advance system does not change the timing or path of
the toolhead. A print with pressure advance enabled will take the
same amount of time as a print without pressure advance. Pressure
advance also does not change the total amount of filament extruded
during a print. Pressure advance results in extra extruder movement
during move acceleration and deceleration. A very high pressure
advance setting will result in a very large amount of extruder
movement during acceleration and deceleration, and no configuration
setting places a limit on the amount of that movement.

View File

@@ -70,6 +70,21 @@ results to the config file with:
SAVE_CONFIG
```
Note that if a change is made to the printer's motion system, hotend
position, or probe location then it will invalidate the results of
PROBE_CALIBRATE.
If the probe has an X or Y offset and the bed tilt is changed (eg, by
adjusting bed screws, running DELTA_CALIBRATE, running Z_TILT_ADJUST,
running QUAD_GANTRY_LEVEL, or similar) then it will invalidate the
results of PROBE_CALIBRATE. After making any of the above adjustments
it will be necessary to run PROBE_CALIBRATE again.
If the results of PROBE_CALIBRATE are invalidated, then any previous
[bed mesh](Bed_Mesh.md) results that were obtained using the probe are
also invalidated - it will be necessary to rerun BED_MESH_CALIBRATE
after recalibrating the probe.
# Repeatability check
After calibrating the probe X, Y, and Z offsets it is a good idea to
@@ -98,19 +113,20 @@ Recv: // probe accuracy results: maximum 2.519448, minimum 2.506948, range 0.012
Ideally the tool will report an identical maximum and minimum value.
(That is, ideally the probe obtains an identical result on all ten
probes.) However, it's normal for the minimum and maximum values
to differ by one Z step_distance or up to 5 microns (.005mm).
The distance between the minimum and the maximum value is called the
range. So, in the above example, since the printer uses a
Z step_distance of .0125, a range of 0.012500 would be considered normal.
probes.) However, it's normal for the minimum and maximum values to
differ by one Z step_distance or up to 5 microns (.005mm). The
distance between the minimum and the maximum value is called the
range. So, in the above example, since the printer uses a Z
step_distance of .0125, a range of 0.012500 would be considered
normal.
If the results of the test show a range value that is greater than
25 microns (.025mm) then the probe does not have sufficient accuracy
for typical bed leveling procedures. It may be possible to tune the
probe speed and/or probe start height to improve the repeatability
of the probe. The `PROBE_ACCURACY` command allows one to run tests
with different parameters to see their impact - see
the [G-Codes document](G-Codes.md) for further details. If the probe
If the results of the test show a range value that is greater than 25
microns (.025mm) then the probe does not have sufficient accuracy for
typical bed leveling procedures. It may be possible to tune the probe
speed and/or probe start height to improve the repeatability of the
probe. The `PROBE_ACCURACY` command allows one to run tests with
different parameters to see their impact - see the
[G-Codes document](G-Codes.md) for further details. If the probe
generally obtains repeatable results but has an occasional outlier,
then it may be possible to account for that by using multiple samples
on each probe - read the description of the probe `samples` config
@@ -138,9 +154,9 @@ This is a common issue with probes on delta printers, however it can
occur on all printers.
One can check for a location bias by using the `PROBE_CALIBRATE`
command to measuring the probe z_offset at various X and Y
locations. Ideally, the probe z_offset would be a constant value at
every printer location.
command to measuring the probe z_offset at various X and Y locations.
Ideally, the probe z_offset would be a constant value at every printer
location.
For delta printers, try measuring the z_offset at a position near the
A tower, at a position near the B tower, and at a position near the C

155
docs/RPi_microcontroller.md Normal file
View File

@@ -0,0 +1,155 @@
This document describes the process of running Klipper on a RPi
and use the same RPi as secondary mcu.
Why use RPi as a secondary MCU?
===============================
Often the MCUs dedicated to controlling 3D printers have a limited and
pre-configured number of exposed pins to manage the main printing
functions (thermal resistors, extruders, steppers ...).
Using the RPi where Klipper is installed as a secondary MCU gives the
possibility to directly use the GPIOs and the buses (i2c, spi) of the RPi
inside klipper without using Octoprint plugins (if used) or external
programs giving the ability to control everything within the print GCODE.
**Warning**: If your platform is a _Beaglebone_ and you have correctly followed the installation steps, the linux mcu is already installed and configured for your system.
Install the rc script
=====================
If you want to use the host as a secondary MCU the klipper_mcu process 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
```
Building the micro-controller code
==================================
To compile the Klipper micro-controller code, start by configuring it
for the "Linux process":
```
cd ~/klipper/
make menuconfig
```
To build and install the new micro-controller code, run:
```
sudo service klipper stop
make flash
sudo service klipper start
```
If klippy.log reports a "Permission denied" error when attempting to connect
to `/tmp/klipper_host_mcu` then you need to add your user to the tty group.
The following command will add the "pi" user to the tty group:
```
sudo usermod -a -G tty pi
```
Remaining configuration
=======================
Complete the installation by configuring Klipper secondary MCU
following the instructions in
[RaspberryPi sample config](../config/sample-raspberry-pi.cfg) and
[Multi MCU sample config](../config/sample-multi-mcu.cfg).
Optional: Identify the correct gpiochip
=======================================
On Rasperry and on many clones the pins exposed on the GPIO belong to the first gpiochip. They can therefore be used on klipper simply by referring them with the name `gpio0..n`.
However, there are cases in which the exposed pins belong to gpiochips other than the first. For example in the case of some OrangePi models or if a Port Expander is used. In these cases it is useful to use the commands to access the _Linux GPIO character device_ to verify the configuration.
To install the _Linux GPIO character device - binary_ on a debian based distro like octopi run:
```
sudo apt-get install gpiod
```
To check available gpiochip run:
```
gpiodetect
```
To check the pin number and the pin availability tun:
```
gpioinfo
```
The chosen pin can thus be used within the configuration as `gpiochip<n>/gpio<o>` where **n** is the chip number as seen by the `gpiodetect` command and **o** is the line number seen by the` gpioinfo` command.
***Warning:*** only gpio marked as `unused` can be used. It is not possible for a _line_ to be used by multiple processes simultaneously.
For example on a RPi 3B+ where klipper use the GPIO20 for a switch:
```
$ gpiodetect
gpiochip0 [pinctrl-bcm2835] (54 lines)
gpiochip1 [raspberrypi-exp-gpio] (8 lines)
$ gpioinfo
gpiochip0 - 54 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed "klipper" output active-high [used]
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed "led0" output active-high [used]
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
line 32: unnamed unused input active-high
line 33: unnamed unused input active-high
line 34: unnamed unused input active-high
line 35: unnamed unused input active-high
line 36: unnamed unused input active-high
line 37: unnamed unused input active-high
line 38: unnamed unused input active-high
line 39: unnamed unused input active-high
line 40: unnamed unused input active-high
line 41: unnamed unused input active-high
line 42: unnamed unused input active-high
line 43: unnamed unused input active-high
line 44: unnamed unused input active-high
line 45: unnamed unused input active-high
line 46: unnamed unused input active-high
line 47: unnamed unused input active-high
line 48: unnamed unused input active-high
line 49: unnamed unused input active-high
line 50: unnamed unused input active-high
line 51: unnamed unused input active-high
line 52: unnamed unused input active-high
line 53: unnamed unused input active-high
gpiochip1 - 8 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed "led1" output active-low [used]
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
```

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