Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Documentation/ERCF_Manual.pdf
Binary file not shown.
1,384 changes: 1,078 additions & 306 deletions Klipper_Files/Extra module/ercf.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Klipper_Files/client_macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ gcode:
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
{% if printer["gcode_macro _ERCF_PAUSE"].is_paused|int != 0 %}
{% if printer.ercf.is_paused|int == 1 %}
M118 You can't resume the print without unlocking the ERCF first.
M118 Run ERCF_UNLOCK and solve any issue before hitting Resume again
{% else %}
RESTORE_GCODE_STATE NAME=PAUSE_state
G90
{% if printer["gcode_macro _ERCF_VAR"].clog_detection|int == 1 %}
{% if printer.ercf.clog_detection|int == 1 %}
SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=1
{% endif %}
BASE_RESUME
Expand Down
70 changes: 37 additions & 33 deletions Klipper_Files/ercf_hardware.cfg
Original file line number Diff line number Diff line change
@@ -1,78 +1,82 @@
## Enraged Rabbit : Carrot Feeder V1.1 hardware config file
# Values are an example for voron 2.4 with 2 SKR1.4
[mcu ercf]
serial: /dev/serial/by-id/usb-Klipper_samd21g18a_F6EE357D3432585020312E3545150FFF-if00

# Carrot Feeder 5mm D-cut shaft
# Example for an SKR 1.4 Board (E1 on the XY mcu)
[manual_stepper gear_stepper]
step_pin: P1.15
dir_pin: P1.14
enable_pin: !P1.16
rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears
step_pin: ercf:PA4
dir_pin: !ercf:PA10
enable_pin: !ercf:PA2
rotation_distance: 22.554216869 #Bondtech 5mm Drive Gears
gear_ratio: 80:20
microsteps: 16 # Please do not go higher than 16, this can cause 'MCU Timer too close' issues under Klipper
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
velocity: 35
accel: 150
#Right now no pin is used for the endstop, but we need to define one for klipper. So just use a random, not used pin
endstop_pin: P0.10
endstop_pin: ^ercf:PA7

[tmc2209 manual_stepper gear_stepper]
# Adapt accordingly to your setup and desires
# The default values are tested with the BOM NEMA14 motor
# Please adapt those values to the motor you are using
# Example : for NEMA17 motors, you'll usually set the stealthchop_threshold to 0
# and use higher current
uart_pin: P1.1
uart_pin: ercf:PA8
uart_address: 0
interpolate: True
run_current: 0.40
hold_current: 0.1
sense_resistor: 0.110
hold_current: 0.3
sense_resistor: 0.150
stealthchop_threshold: 500

[tmc2209 manual_stepper selector_stepper]
uart_pin: P1.8
run_current: 0.55
interpolate: True
sense_resistor: 0.110
stealthchop_threshold: 500
# Uncomment the lines below if you want to use sensorless homing for the selector
#diag_pin: ^P1.27 # Set to MCU pin connected to TMC DIAG pin
#driver_SGTHRS: 75 # 255 is most sensitive value, 0 is least sensitive

# Carrot Feeder selector
# Example for an SKR 1.4 Board (Z1 on the XY mcu)
[manual_stepper selector_stepper]
step_pin: P0.22
dir_pin: P2.11
enable_pin: !P0.21
microsteps: 16 # Please do not go higher than 16, this can cause 'MCU Timer too close' issues under Klipper
step_pin: ercf:PA9
dir_pin: !ercf:PB8
enable_pin: !ercf:PA11
# step_pin: PE1
# dir_pin: !PE0
# enable_pin: PC5
rotation_distance: 40
microsteps: 16 # Please do not go higher than 16, this can cause 'MCU Timer too close' issues under Klipper
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
velocity: 200
accel: 600
# Select the endstop you want depending if you are using sensorless homing for the selector or not
endstop_pin: P1.25
#endstop_pin: tmc2209_selector_stepper:virtual_endstop
endstop_pin: ^ercf:PB9

[tmc2209 manual_stepper selector_stepper]
uart_pin: ercf:PA8
uart_address: 1
# uart_pin: PD11
run_current: 0.40
hold_current: 0.2
interpolate: True
# sense_resistor: 0.150
sense_resistor: 0.110
stealthchop_threshold: 500
# Uncomment the lines below if you want to use sensorless homing for the selector
#diag_pin: ^P1.27 # Set to MCU pin connected to TMC DIAG pin
#driver_SGTHRS: 75 # 255 is most sensitive value, 0 is least sensitive

# Values are for the MG90S servo
[servo ercf_servo]
pin: P1.26
pin: ercf:PA5
maximum_servo_angle: 180
minimum_pulse_width: 0.00085
maximum_pulse_width: 0.00215

[duplicate_pin_override]
pins: P1.0
pins: ercf:PA6
# Put there the pin used by the encoder and the filament_motion_sensor
# It has to be the same pin for those 3

[filament_motion_sensor encoder_sensor]
switch_pin: ^P1.0
switch_pin: ^ercf:PA6
pause_on_runout: False
detection_length: 10.0
extruder: extruder
# runout_gcode: _ERCF_ENCODER_MOTION_ISSUE

[filament_switch_sensor toolhead_sensor]
pause_on_runout: False
switch_pin: ^P1.27
runout_gcode: ERCF_ENCODER_RUNOUT
72 changes: 72 additions & 0 deletions Klipper_Files/ercf_parameters.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[ercf]
# Encoder setup
# The encoder_pin must match the pin defined in ercf_hardware
# The encoder resolution is determined by running the ERCF_CALIBRATE_ENCODER
# See the manual for details on both settings
encoder_pin: ^ercf:PA6
encoder_resolution: 1.333156

# Speeds and accels
# Long moves are faster than the small ones
# 100mm/s should be "quiet" with the NEMA14 motor or a NEMA17 pancake, but you can go lower if your really want it to be low noise
# Tested without any issue at 200mm/s, but it's noisy. I'm running mine at 170mm/s for long moves and 50mm/s for short moves.
long_moves_speed: 100 # mm/s. Default value is 100mm/s.
long_moves_accel: 400 # mm/s². Default value is 400mm/s²
short_moves_speed: 25 # mm/s. Default value is 25mm/s.
short_moves_accel: 400 # mm/s². Default value is 400mm/s²

# Logging
# log_level can be set to one of (0 = off, 1 = info, 2 = debug, 3 = trace).
# Info is a good level for day to day usage, with debug and trace being useful for identifying problems
# or seeking help in discord. Setting this to off will supress all ERCF messages, including pauses and other important messages
log_level: 1
# log_statistics set to 1 will log print statistics on each tool change
# These statistics include things like the number of swaps completed, as well as time spent swapping
log_statistics: 1

# Servo Configuration
# Default values:
# MG90S servo: Up=30, Down=140
# SAVOX SH0255MG: Up=140, Down=30
servo_up_angle: 140
servo_down_angle: 65
extra_servo_dwell_up: 0 # Additional dwell time in ms to apply to dwell prior to turning off the servo
extra_servo_dwell_down: 0 # Additional dwell time in ms to apply to dwell prior to turning off the servo

# Base value for the loading length used by the auto-calibration macro
# Please use a value SMALLER than the real reverse bowden length (like 50mm less)
# This is only used during calibration, and has no impact on normal running
calibration_bowden_length: 880

# The position of each tool on the selector. See the manual for setting these values
colorselector: 2.3, 23.2, 44.0, 69.6, 91.2, 112.8, 138.4, 160.0, 180.0

# Distance between the end of the bowden tube and the nozzle
# This value can be determined by manually inserting filament at the very beginning of your
# extruder, and advancing it 1-2mm at a time until it starts to extrude from the nozzle.
# Subtract 1-2mm from that distance distance to get this value. If you have large gaps
# in your purge tower, increase this value. If you have blobs, reduce this value.
# This value will depend on your extruder, hotend and nozzle setup.
end_of_bowden_to_nozzle: 72

# if you are getting "timer too close" errors, increase the number of moves used during loading and unloading
num_moves: 2 # Number of moves to make when loading or unloading

# Features
sensorless_selector: 0 # 0 = use an endstop, 1 = use sensorless homing
enable_clog_detection: 0 # 0 = do not use clog detection, 1 = use clog detection
enable_endless_spool: 0 # 0 = do not use endless spool, 1 = use endless spool
# if endless spool is turned on, you must define a list of EndlessSpool groups here, one entry for each tool in your ERCF
# when filament runs out on a tool, it will switch to the next tool with the same group number
# for example, if set to 1, 2, 3, 1, 2, 3, 1, 2, 3 on a 9 cart ERCF, and a runout occurs on tool #0
# the ERCF will switch to using tool #3.
endless_spool_groups: 1, 2, 3, 1, 2, 3, 1, 2, 3

# configurable, but fairly fixed values
gear_stepper_accel: 0 # The acceleration value applied to the gear stepper on moves, standard is to use 0
timeout_pause: 72000 # Time out used by the ERCF_PAUSE
disable_heater: 600 # Delay after which the hotend heater is disabled in the ERCF_PAUSE state
min_temp_extruder: 180 # Temp used during the auto-calibration macro, to ensure we can move the extruder (but not really extruding)
unload_buffer:50 # The amount, in mm, to reduce the unload so that the more accurate encoder unload has room to operate
extruder_homing_max: 50 # the maximum distance to advance in order to attempt to home the extruder
extruder_homing_step: 2 # the step size to use when homing the extruder
Loading