From 651f74b016d783e00fb8b845159463ec7c593866 Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Fri, 10 Mar 2023 21:30:20 +0100 Subject: [PATCH] ercf: switch to Ercf Easy Brd Can --- ercf.cfg | 7 ++++++ ercf/hardware.cfg | 64 +++++++++++++++++++++-------------------------- ercf/software.cfg | 2 +- printer.cfg | 3 +-- 4 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 ercf.cfg diff --git a/ercf.cfg b/ercf.cfg new file mode 100644 index 0000000..2d9a09a --- /dev/null +++ b/ercf.cfg @@ -0,0 +1,7 @@ +[include ercf/hardware.cfg] +[include ercf/software.cfg] + +[mcu ercf] +# serial: /dev/serial/by-id/usb-Klipper_samd21g18a_D3EB9B384134555020312E30171117FF-if00 +canbus_uuid: 092fcd32b788 + diff --git a/ercf/hardware.cfg b/ercf/hardware.cfg index 18907f5..4f0ac54 100644 --- a/ercf/hardware.cfg +++ b/ercf/hardware.cfg @@ -2,80 +2,74 @@ # This config sample assume you set the two J6 jumpers on 1-2 and 4-5, i.e. [..].[..] -[mcu ercf] -serial: /dev/serial/by-id/usb-Klipper_samd21g18a_D3EB9B384134555020312E30171117FF-if00 - # Carrot Feeder 5mm D-cut shaft [manual_stepper gear_stepper] -step_pin: ercf:PA4 -dir_pin: !ercf:PA10 -enable_pin: !ercf:PA2 +step_pin: ercf:gpio7 +dir_pin: !ercf:gpio8 +enable_pin: !ercf:gpio6 rotation_distance: 22.6789511 # Bondtech 5mm Drive Gears gear_ratio: 80:20 microsteps: 16 full_steps_per_rotation: 200 velocity: 35 accel: 100 -endstop_pin: ^ercf:PA7 +endstop_pin: ercf:gpio13 [tmc2209 manual_stepper gear_stepper] # Adapt accordingly to your setup and desires # The default values are tested with the BOM NEMA14 motor -uart_pin: ercf:PA8 # shared with selector_stepper -uart_address: 0 +uart_pin: ercf:gpio9 interpolate: True run_current: 0.6 hold_current: 0.1 sense_resistor: 0.110 stealthchop_threshold: 500 - -[tmc2209 manual_stepper selector_stepper] -uart_pin: ercf:PA8 # shared with gear_stepper -uart_address: 1 -run_current: 0.55 -hold_current: 0.4 -interpolate: True -sense_resistor: 0.110 -stealthchop_threshold: 5000 -# 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 +# diag_pin: ercf:gpio23 [manual_stepper selector_stepper] -step_pin: ercf:PA9 -dir_pin: !ercf:PB8 -enable_pin: !ercf:PA11 +step_pin: ercf:gpio2 +dir_pin: !ercf:gpio1 +enable_pin: !ercf:gpio3 microsteps: 16 rotation_distance: 40 full_steps_per_rotation: 200 velocity: 200 homing_speed: 100 accel: 600 -endstop_pin: ^ercf:PB9 +# Select the endstop you want depending if you are using sensorless homing +# endstop_pin: ^ercf:PB9 +endstop_pin: ercf:gpio20 +#endstop_pin: tmc2209_selector_stepper:virtual_endstop +#endstop_pin: tmc5160_selector_stepper:virtual_endstop + +[tmc2209 manual_stepper selector_stepper] +uart_pin: ercf:gpio0 +run_current: 0.55 +hold_current: 0.4 +interpolate: True +sense_resistor: 0.110 +stealthchop_threshold: 5000 +# Uncomment the lines below if you want to use sensorless homing for the selector +# diag_pin: ^ercf:gpio22 # 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: ercf:PA5 +pin: ercf:gpio21 maximum_servo_angle: 180 minimum_pulse_width: 0.00085 maximum_pulse_width: 0.00215 [duplicate_pin_override] -pins: ercf:PA6 +pins: ercf:gpio15 # 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: ^ercf:PA6 +switch_pin: ^ercf:gpio15 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: ^PG12 -# runout_gcode: -# M118 toolhead filament removed -# insert_gcode: -# M118 toolhead filament inserted diff --git a/ercf/software.cfg b/ercf/software.cfg index 5ddf8c2..4fc6e2c 100644 --- a/ercf/software.cfg +++ b/ercf/software.cfg @@ -4,7 +4,7 @@ [ercf] # Encoder -encoder_pin: ercf:PA6 # easy brd +encoder_pin: ercf:gpio15 # easy brd # encoder_resolution: 1.365188 # in mm encoder_resolution: 1.349528 # from `ercf_calibrate_encoder` # Speeds and accels diff --git a/printer.cfg b/printer.cfg index b95b015..1b5349f 100644 --- a/printer.cfg +++ b/printer.cfg @@ -64,8 +64,7 @@ path: /home/pi/printer_data/gcodes [include fans.cfg] [include input_shaper.cfg] # [include resonance_test.cfg] -[include ercf/hardware.cfg] -[include ercf/software.cfg] +[include ercf.cfg] #####################################################################