Stepper Motor overheating tmc2660 Duet WiFi

I’m having trouble with steppers overheating with my default values from my Duet config. Here’s what I had them set to in Duet M906 X1700:1700 Y1800.00 Z1400:1400:1400:1400 E1000.00 I40 ; Set motor currents (mA) and motor.

When I tried that in the Klipper config my steppers ran really hot. I dialed them back 1.2 which helps but I have a large 600x600x670mm printer and I’m afraid of layer shifting. I’m using LDO 42STH60-2004AH steppers, 4v, 2 amp, 2 ohms. These are large steppers. Duet WiFi tmc2660. Also my stepper_z runs warmer than my other z steppers. Does anyone know why I had to dial my current back so much? Thank you.
Here is my tuned back Klipper config.

#__________________________ X ON DRIVE X ____________________________

[stepper_x]

step_pin: PD6

dir_pin: PD11

enable_pin: !PC6

microsteps: 16

rotation_distance: 32

full_steps_per_rotation: 200

endstop_pin: ^PC14

position_endstop: 0

position_max: 610

homing_speed: 75.0

homing_retract_dist: 5.0

#second_homing_speed: 10

[tmc2660 stepper_x]

cs_pin: PD14 # X_SPI_EN Required for communication

spi_bus: usart1 # All TMC2660 drivers are connected to USART1

interpolate: True # 1/16 micro-steps interpolated to 1/256

run_current: 1.2

sense_resistor: 0.051

idle_current_percent: 20

#__________________________ X1 ON DRIVE E1 ____________________________

[stepper_x1]

step_pin: PD4

dir_pin: PD9

enable_pin: !PC6

microsteps: 16

rotation_distance: 32

full_steps_per_rotation: 200

[tmc2660 stepper_x1]

cs_pin: PC25 # X_SPI_EN Required for communication

spi_bus: usart1 # All TMC2660 drivers are connected to USART1

interpolate: True # 1/16 micro-steps interpolated to 1/256

run_current: 1.2

sense_resistor: 0.051

idle_current_percent: 20

#__________________________ ON DRIVE Y ____________________________

[stepper_y]

step_pin: PD7

dir_pin: !PD12

enable_pin: !PC6

microsteps: 16

rotation_distance: 32

full_steps_per_rotation: 200

endstop_pin: ^PA2

position_endstop: 0

position_max: 610

homing_speed: 75.0

homing_retract_dist: 5.0

#second_homing_speed: 10

[tmc2660 stepper_y]

cs_pin: PC9

spi_bus: usart1

interpolate: True

run_current: 1.2

sense_resistor: 0.051

idle_current_percent: 20

####################################################################

############################ Z Axis ################################

####################################################################

#__________________________ Z ON DRIVE E3 ____________________________

[stepper_z]

step_pin: PD1

dir_pin: !PD22

enable_pin: !PC6

microsteps: 16

rotation_distance: 4

full_steps_per_rotation: 200

gear_ratio: 40:16

endstop_pin: probe:z_virtual_endstop

position_max: 670

position_min: -1

[tmc2660 stepper_z]

cs_pin: PD24

spi_bus: usart1

interpolate: True

run_current: 1

sense_resistor: 0.051

idle_current_percent: 20

#_________________________ Z1 ON DRIVE E4 ___________________________

[stepper_z1]

step_pin: PD0

dir_pin: !PD16

enable_pin: !PC6

microsteps: 16

rotation_distance: 4

full_steps_per_rotation: 200

gear_ratio: 40:16

[tmc2660 stepper_z1]

cs_pin: PD25

spi_bus: usart1

interpolate: True

run_current: 1

sense_resistor: 0.051

idle_current_percent: 20

#_________________________ Z2 ON DRIVE E5 ___________________________

[stepper_z2]

step_pin: PD3

dir_pin: !PD17

enable_pin: !PC6

microsteps: 16

rotation_distance: 4

full_steps_per_rotation: 200

gear_ratio: 40:16

[tmc2660 stepper_z2]

cs_pin: PD26

spi_bus: usart1

interpolate: True

run_current: 1

sense_resistor: 0.051

idle_current_percent: 20

#_________________________ Z3 ON DRIVE E6 ___________________________

[stepper_z3]

step_pin: PD27

dir_pin: !PC0

enable_pin: !PC6

microsteps: 16

rotation_distance: 4

full_steps_per_rotation: 200

gear_ratio: 40:16

[tmc2660 stepper_z3]

cs_pin: PB14

spi_bus: usart1

interpolate: True

run_current: 1

sense_resistor: 0.051

idle_current_percent: 20

See Hold_current and run_current -- TMC2209 - #5 by Sineos

Thanks, I’m really glad I asked. I think I have the current figured out but not the second part. I’m guessing the peak current is the same as the phase current in the specs which are phase 2amp. 2 x .707 x .85 = 1.2019 so current setting is 1.2.
The second part went way over my head. Does it have to do with the sense_resistor: 0.051 ? Or do I need to do any other configuration. I’m using the default from the Klipper Duet config.

Matching TMC driver

  • The drivers do some black magic aka IRUN current scale to achieve optimal microstep resolution
  • This can only efficiently do its work when the current requirements of the stepper matches the driver and the driver’s R-Sense value
  • A 2209 with the typical R-Sense of 0.11 Ohm has an ideal RMS working current between ~1.92 A ( VSENSE = 0) and ~0.97 A ( VSENSE = 1)
  • Klipper does an internal VSENSE switching to achieve higher accuracy at current scaling. IIRC, VSENSE = 1 is the optimal working condition

Disclaimer: This is only my understanding and it is very hard to get reliable information on this topic.
The power rating of the TMC drivers depend on their sense resistor.
The driver are kind of intelligent and try to find the best working point of a stepper. As such the TMC driver and chosen sense resistor should half-way match to the stepper motor or this “intelligence” is limited. Prominent example would be a small NEMA14 stepper on a 5160 with >3A power setting.

Maybe an analogy would be a 400 Watt power supply to drive a single LED with 0.5 Watt. While it will work, the power supply will work very inefficient and the internal losses in the power supply be much greater than the load of the LED

The sense_resistor setting should match what’s on the physical board (or stepstick). One can verify the resistance of the physical “sense resistor” by reviewing the board (or stepstick) schematics. The sense_resistor config value isn’t tuned - it’s should be set according to the physical description of the actual sense resistor on the board.

The VSENSE setting is an internal attribute of the tmc driver that is setup when configuring the driver current. That, and the internal tmc driver IRUN setting, are automatically set by Klipper to match the configured run_current specified in the user’s printer.cfg file.

I expect most users coming from other software may be confused by the fact that some other software uses peak coil current while Klipper uses RMS current. To convert from peak current to RMS current, divide the peak current by 1.414 .

-Kevin

1 Like