Issue configuring Klipper on Ender 5+ and Duet 3 mini

Hi all,

After several months using Klipper on a Artillery X1 I decided to convert my Ender 5+ from RRF to Klipper but I’m facing some issues as I’m unable to successfully home the printer, the motors are making a hell of a lot of noise like if someone was scrapping metal, the BL Touch id not probing either.

I’m using a Duet 3 mini and using the generic configuration as guide but not using the same GPIO pins, as an example I’m using for X ends stop: IO1:PB30, Y End stop IO2:PD8 and for the BL Touch IO3:PB7

I’m definitively doing something wrong and also missing something here, if any one could have a look and please point me in the right direction to sort this out I will be very grateful.

Here’s my config and the logs files, thanks in advance for taking the time to help me out:

 Pins for reference:
# Driver Step Pins - 0:PC26, 1:PC25, 2:PC24, 3:PC19, 4:PC16, 5:PC30, 6:PC18
# Driver Dir pins - 0:PB3, 1:PB29, 2:PB28, 3:PD20, 4:PD21, 5:PB0, 6:PA27
# Driver Enable - !PC28
# Uart addresses - 0:0 1:1 2:2 3:3 4:!0 5:!1 6:!2 | "!" is for inverted select pin
# Thermistor Pins - T0:PC0, T1:PC1, T2:PC2
# Vssa Sense:PB4 | Vref Sense:PB5
# Current Sense resistor for drivers - .076ohm
# SPI lines:{PD11, PC7} -> Shared SerCom#7, SPIMosi:PC12, SPIMiso:PC15, SPISCLK:PC13
# Vin Monitor:PC3, uses 11:1 voltage divider
# LED's - Diag:PA31, Act:PA30
# 12864 LCD - LCDCSPIN:PC6, ENCA:PC11, ENCB:PD1, ENCSW:PB9, LCD A0:PA2, LCDBeep:PA9, LCD Neopixel Out:PB12 (shared with IO3.out)
# Neopixel Out - PA8
# Serial0 - TX:PB25, RX:PB24 (USB)
# Serial1 - TX:PB31, RX:PB30
# SBC SPISS pin:PA6, SBCTfrReady:PA3, SerComPins:{PA4, PA5, PA6, PA7}
# CAN Pins - TX:PB14 RX:PB15
# Heaters, Fan outputs - {Out0:PB17 Out1:PC10 Out2:PB13 Out3:PB11 Out4:PA11, Out5:PB2, Out6:PB1} | Out6 is shared with VFD_Out
# GPIO_out - {IO1:PB31 IO2:PD9 IO3:PB12 IO4:PD10} IO4 is shared with PSON
# GPIO_in - {IO1:PB30 IO2:PD8 IO3:PB7 IO4:PC5 IO5:PC4 IO6:PC31}
# Driver Diag - {D0:PA10, D1:PB8, D2:PA22, D3:PA23, D4:PC21, D5:PB10, D6:PA27}
# Mux Pin - PD0
# EXP headers only support 12864 LCD's

[stepper_x]
#driver0
step_pin: PC26
dir_pin: !PB3
enable_pin: !PC28
microsteps: 16
rotation_distance: 40
endstop_pin: ^PB30
position_endstop: 350
position_max: 350
homing_speed: 100

[tmc2209 stepper_x]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 0
run_current: 1
sense_resistor: 0.056

[stepper_y]
#driver1
step_pin: PC25
dir_pin: !PB29
enable_pin: !PC28
microsteps: 16
rotation_distance: 40
endstop_pin: ^PD8
position_endstop: 350
position_max: 350
homing_speed: 100

[tmc2209 stepper_y]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 1
run_current: 1
sense_resistor: 0.056

[stepper_z]
#driver2
step_pin: PC24
dir_pin: PB28
enable_pin: !PC28
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
position_min: 0
position_max: 400
homing_speed: 10.0


[tmc2209 stepper_z]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 2
run_current: 1
sense_resistor: 0.056

[adc_scaled vref_scaled]
vref_pin: PB5
vssa_pin: PB4

[extruder]
#driver4
step_pin: PC16
dir_pin: PD21
enable_pin: !PC28
microsteps: 16
rotation_distance: 7.823960880195599
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB13 # out2
sensor_type: ATC Semitec 104GT-2
pullup_resistor: 2200
sensor_pin: vref_scaled:PC1
control: pid
pid_Kp: 30.089
pid_Ki: 2.229
pid_Kd: 101.550
min_temp: 0
max_temp: 285

[tmc2209 extruder]
uart_pin: PA1
tx_pin: PA0
uart_address: 3
select_pins: PD0
run_current: 1
sense_resistor: 0.056

[heater_bed]
heater_pin: PB17 #out1
sensor_type: Generic 3950
sensor_pin: vref_scaled:PC0
control: pid
pullup_resistor: 2200
pid_Kp: 61.049
pid_Ki: 2.339
pid_Kd: 398.344
min_temp: 0
max_temp: 100

[heater_fan heatbreak_fan]
pin: PB2

[fan]
pin: PB1

[bltouch]
sensor_pin: PB7
control_pin: PB12
x_offset: -44
y_offset: -0
z_offset: 2.525
samples: 2
samples_result:average
probe_with_touch_mode: true
stow_on_each_sample: false

[bed_mesh]
speed: 100
horizontal_move_z: 8
mesh_min: 50, 50
mesh_max: 300, 300
probe_count: 3, 3

[safe_z_home]
home_xy_position: 180,180 # Change coordinates to the center of your print bed
speed: 100
z_hop: 20                 # Move up 10mm
z_hop_speed: 20

[mcu]
serial: /dev/ttyACM0

[filament_switch_sensor filament_sensor]
switch_pin:PD10

[virtual_sdcard]
path: ~/gcode_files

[pause_resume]

[printer]
kinematics: cartesian
max_velocity: 350
max_accel: 3000
max_z_velocity: 20
max_z_accel: 100

moonraker (1).log (280.9 KB)
klippy (2).log (1.6 MB)

Hi all,

Any ideas anyone??

If I can add some context, prior to changing the firmware to Klipper, it was running RRF, without any issue, and prior to that the printer was runinng a Duet 3 6HC also running RRF without any issues.

I’ll try to post a small video later today

Is this a new conversion to the Duet, or was this printer running this board with RRF previously? I ask because motors are not all wired the same, and if you haven’t used these motors with this board, you should check the coil pairs and make sure they match the board. You might need to swap a couple wires.

Is it every motor or only Z? For the Ender 5 leadscrew, max_z_velocity 20 is pretty optimistic. Try something between 5 and 8.

Hi,

It’s a new conversion to Klipper but the printer was previously running a duet 3 6hc prior running RRF.
I checked the coils as per your advise and found that one of them was not making contact so to be on the safe side I cut the cable recheck each coil and proceed to crimp the cables.

I ran a new test but still having the same issue, here’s a link to a small video of the issue:

https://vimeo.com/720009130

Hi Sineos,

All of them, that said, the Z axis has it’s own issue, but that’s clearly due to the printer.cfg file missing the second driver in the config file, I need to completely review de config file.

When you talk about max_z_velocity, are you referring to the safe_z_home section??

Thanks

I think he refers to the [printer] section.
And to the [safe_z_home] too.

Thanks for that, I’ll modify it.

1 Like

Hi all,

I’ve managed to make some progress, the printer is no longer making a lot of noise, there’s still a slight whistling sound that I haven’t yet found where is coming from but will find out, the sound feels like if the motors were overpowered.

Now after successfully homing X and Y, I have a problem with the Z axis, only one motor is moving, so as the printer.cfg file posted previously had one motor declared, I added the below but I still get only one Z motor moving:

[stepper_z1]
#driver3
step_pin: PC19
dir_pin: PD20
enable_pin: !PC28
microsteps: 16
rotation_distance: 8

[tmc2209 stepper_z1]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 3
run_current: 1
sense_resistor: 0.056

So now my printer.cfg file looks like this:

 # Mainsail settings
[include mainsail.cfg]

# Other settings


# This file contains common pin mappings for the Duet3 Mini 5+. To use
# this config, the firmware should be compiled for the ATSAMD51P20
# with a "25Mhz crystal", "16KiB bootloader", and USB communication.

# To flash the board, double tap the board's reset button to enter the
# bootloader and then run: make flash FLASH_DEVICE=/dev/ttyACM0

# See docs/Config_Reference.md for a description of parameters.


# Pins for reference:
# Driver Step Pins - 0:PC26, 1:PC25, 2:PC24, 3:PC19, 4:PC16, 5:PC30, 6:PC18
# Driver Dir pins - 0:PB3, 1:PB29, 2:PB28, 3:PD20, 4:PD21, 5:PB0, 6:PA27
# Driver Enable - !PC28
# Uart addresses - 0:0 1:1 2:2 3:3 4:!0 5:!1 6:!2 | "!" is for inverted select pin
# Thermistor Pins - T0:PC0, T1:PC1, T2:PC2
# Vssa Sense:PB4 | Vref Sense:PB5
# Current Sense resistor for drivers - .076ohm
# SPI lines:{PD11, PC7} -> Shared SerCom#7, SPIMosi:PC12, SPIMiso:PC15, SPISCLK:PC13
# Vin Monitor:PC3, uses 11:1 voltage divider
# LED's - Diag:PA31, Act:PA30
# 12864 LCD - LCDCSPIN:PC6, ENCA:PC11, ENCB:PD1, ENCSW:PB9, LCD A0:PA2, LCDBeep:PA9, LCD Neopixel Out:PB12 (shared with IO3.out)
# Neopixel Out - PA8
# Serial0 - TX:PB25, RX:PB24 (USB)
# Serial1 - TX:PB31, RX:PB30
# SBC SPISS pin:PA6, SBCTfrReady:PA3, SerComPins:{PA4, PA5, PA6, PA7}
# CAN Pins - TX:PB14 RX:PB15
# Heaters, Fan outputs - {Out0:PB17 Out1:PC10 Out2:PB13 Out3:PB11 Out4:PA11, Out5:PB2, Out6:PB1} | Out6 is shared with VFD_Out
# GPIO_out - {IO1:PB31 IO2:PD9 IO3:PB12 IO4:PD10} IO4 is shared with PSON
# GPIO_in - {IO1:PB30 IO2:PD8 IO3:PB7 IO4:PC5 IO5:PC4 IO6:PC31}
# Driver Diag - {D0:PA10, D1:PB8, D2:PA22, D3:PA23, D4:PC21, D5:PB10, D6:PA27}
# Mux Pin - PD0
# EXP headers only support 12864 LCD's

[stepper_x]
#driver0
step_pin: PC26
dir_pin: PB3
enable_pin: !PC28
microsteps: 16
rotation_distance: 40
endstop_pin: PB30
position_endstop: 350
position_max: 350
homing_speed: 100

[tmc2209 stepper_x]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 0
run_current: 1
sense_resistor: 0.056

[stepper_y]
#driver1
step_pin: PC25
dir_pin: !PB29
enable_pin: !PC28
microsteps: 16
rotation_distance: 40
endstop_pin: PD8
position_endstop: 350
position_max: 350
homing_speed: 100

[tmc2209 stepper_y]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 1
run_current: 1
sense_resistor: 0.056

[stepper_z]
#driver2
step_pin: PC24
dir_pin: PB28
enable_pin: !PC28
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
position_min: 0
position_max: 400
homing_speed: 10.0


[tmc2209 stepper_z]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 2
run_current: 1
sense_resistor: 0.056

[stepper_z1]
#driver3
step_pin: PC19
dir_pin: PD20
enable_pin: !PC28
microsteps: 16
rotation_distance: 8

[tmc2209 stepper_z1]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 3
run_current: 1
sense_resistor: 0.056

[adc_scaled vref_scaled]
vref_pin: PB5
vssa_pin: PB4

[extruder]
#driver4
step_pin: PC16
dir_pin: PD21
enable_pin: !PC28
microsteps: 16
rotation_distance: 7.823960880195599
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC10 # out1
sensor_type: ATC Semitec 104GT-2
pullup_resistor: 2200
sensor_pin: vref_scaled:PC1
control: pid
pid_Kp: 30.089
pid_Ki: 2.229
pid_Kd: 101.550
min_temp: 0
max_temp: 285

[tmc2209 extruder]
uart_pin: PA1
tx_pin: PA0
uart_address: 3
select_pins: PD0
run_current: 1
sense_resistor: 0.056

[heater_bed]
heater_pin: PB17 #out1
sensor_type: Generic 3950
sensor_pin: vref_scaled:PC0
control: pid
pullup_resistor: 2200
pid_Kp: 61.049
pid_Ki: 2.339
pid_Kd: 398.344
min_temp: 0
max_temp: 100

[heater_fan heatbreak_fan]
pin: PB2

[fan]
pin: PB1

[bltouch]
sensor_pin: PB7
control_pin: PB12
x_offset: -44
y_offset: -0
z_offset: 2.525
samples: 2
samples_result:average
probe_with_touch_mode: true
stow_on_each_sample: false

[bed_mesh]
speed: 100
horizontal_move_z: 8
mesh_min: 50, 50
mesh_max: 300, 300
probe_count: 3, 3

[safe_z_home]
home_xy_position: 180,180 # Change coordinates to the center of your print bed
speed: 100
z_hop: 20                 # Move up 10mm
z_hop_speed: 5

[mcu]
serial: /dev/ttyACM0

[filament_switch_sensor filament_sensor]
switch_pin:PD10

[virtual_sdcard]
path: ~/gcode_files

[pause_resume]

[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 6
max_z_accel: 100


I’ve tried several modifications to the uart address but none are working as I either get this as I’m sharing the uart address:

Shared TMC uarts need unique address or select_pins polarity

or

this: Unable to parse option ‘uart_address’ in section ‘tmc2209 stepper_z1’

Any idea of what I’ve done wrong this time around?

Thanks

Hi all,

I’ve looking around but still haven’t get around what I need to modify on my printer.cfg file to get the Z axis to home correctly and no longer have the uart address error message. I’ve read several times the both the wiring documentation and the klipper configuration documentation and have reviewed the file but still nothing.

I’ve been looking into this so much that I’m definetively missing something obvious, I problably need to drop it for a few days and get back into it then.

Unfortunately I do not really have the time to review your printer.cfg, but I am happy to share with you my current configuration from my (very heavily) modified CR-10S Pro. It is very well documented in terms of what IO is used where, etc. Please have a look at the stepper configuration. Also keep in mind that I tend to continuously experiment with some settings so the file includes many lines that are commented out.

printer-4.cfg (28.3 KB)

The Mini can be a little bit of a challenge to configure at first because it uses a shared UART for all stepper drivers. TMC2209 can only have only one of four UART “addresses”, so driver groups 0-3 are differentiated from 4-6 are selected by inverting the state of the select_pins.

The hissing or whistling noise that you hear are likely the stepper motor coils when powered in spread cycle mode. This is normal to some degree and can be reduced somewhat by fine-tuning the spread cycle drive parameters.

The initial issue you had with no movement sounded like incorrect coil wiring, as someone already pointed out. Creality unfortunately uses (at least on my printer) different stepper wiring from the more typical arrangement and, particularly when switching stepper motors, this can lead to issues. Creality uses the following sequence (roughly) on the stepper connector: A+ n/c B+ A- n/c B-, while “normal” steppers are wired as follows: `A+ n/c A- B+ n/c B-’. But you did not indicate that you replaced the steppers and you also indicated that you used 6HC, so this should not affect you…

1 Like

You Sir, are my hero!

Thanks a million for sharing your config file, it help me not only to get the printer back moving perfectly fine so now all axis home without any issue but to also understand what I was doing wrong on my config.

I still do find that the motor are noisier that when using the 6HC previously, when the Z axis is homing it sounds like if I was back to the original motherboard; I was surely not expecting that, but it can be that the 5160 are quieter than the 2209.

I also find that the stepper motors are burning hot to the touch but I can’t says if that’s a new issue or not as I honestly can’t remember the last time I touch them to feel how hot they were.

I know I still have a lot of fine tuning to do to get the printer back to the same level it was before but thanks again for getting me back in the right track. :smiley:

Glad you got it going!

Spread Cycle will never be silent and there will always be some level of noise from the steppers when using it. This will largely depend on the steppers and also on the level of chopper fine tuning that you can and are able to do. When you get a significant noise increase while the motors are moving, it is possible that you are hitting a resonant step frequency of the stepper(s). This is something that cannot be avoided, but you can minimize it by avoiding the linear speed that induces the resonance. On my printer I had Y resonance occurring during homing that made the printer sound very unhealthy. All I did is I changed the movement rate for homing a little bit and the noise reduced by an order of magnitude.

If your steppers are running very hot, you likely have incorrect run current specified. It is critical that each [tmc2209 stepper_] section of your configuration has the correct value of sense_resistor: 0.056 and that you specify the correct run current for your given stepper. If you are using OEM Creality steppers, using the values that I use will overload your steppers since I use 2A Moons’ steppers for all motion except the Orbiter 2 extruder. It is important to remember that Klipper uses RMS current for steppers, so if you have 2A steppers the maximum run_current you could specify is 1.4A. Since 1.4A RMS ~ 2.0A peak. Creality OEM steppers have substantially lower ratings and you should normally be using 80% of the rated stepper current as a starting point.

So, for example, since I use 2A (peak) steppers, a good starting point for running current would be 80% of 2A / sqrt(2) = 0.8 * 2.0 / 1.414 = 1.13. Creality steppers are all rated well below 2A peak, and my CR-10S Pro shipped with approximately 0.75A RMS settings on the X, Y & E axes steppers…

Hello,

Thank you, I confirm that the sense_resistor are set to 0.056 and the run current is set to 1, I might need to review as from what I see with those values they’re hot :fire:!

Hi all,

Just wanted to report back on how things are going.

I’ve made progress and after at lot of reading in different posts and checking some YT video, I found the correct current value for my stepper motors which is 0.680 for X,Y and a bit higher for Z and the extruder at 0.700 they’re now way less hot than previously; I’mm still playing around with the settings so not completely done yet.

Also found out that the noise of the motors was due to the absence of the “stealthchop_threshold: 999999” parameter missing, now the motors move silently I can only hear the fans.

I have some other minor issues which I’m working on getting sorted.

Thanks again all

I just switched my ender 5?plus to a silent board can you share your config ?

This thread is pretty old and the thread starter had a Duet 3 mini installed.
So his config is custom and not working with your printer.

Open a new thread and ask for help or check the Klipper github.

2 Likes