Help needed with Duet 3 6hc TMC5160 StealthChop config
-
My klipper config:
[mcu] serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_340041000B504D3256313820-if00 [printer] kinematics: corexy max_velocity: 200 max_accel: 1500 #2800 max_z_velocity: 25 max_z_accel: 1400 [stepper_x] step_pin: PE9 dir_pin: PF1 enable_pin: !PF2 step_distance: .005 endstop_pin: PB10 position_endstop: -33 position_max: 310 homing_speed: 50 position_min: -33 [stepper_y] step_pin: PE11 dir_pin: PE8 enable_pin: !PD7 step_distance: .005 endstop_pin: PE12 position_endstop: 338 position_max: 338 homing_speed: 50 position_min: -25 [stepper_z] step_pin: PE13 dir_pin: PC2 enable_pin: !PC0 step_distance: .0025 #endstop_pin: !PG8 endstop_pin: probe:z_virtual_endstop position_endstop: 0.5 position_max: 300 homing_speed: 15 [stepper_z1] step_pin: !PD13 dir_pin: PG9 enable_pin: !PF0 step_distance: .0025 [extruder] step_pin: PE14 dir_pin: PA0 enable_pin: !PC3 step_distance: .002428571428571428 nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PB1 # Heat0 sensor_pin: PF4 # T0 Header sensor_type: ATC Semitec 104GT-2 min_temp: 0 max_temp: 290 #control: pid [tmc5160 extruder] cs_pin: PB3 spi_bus: spi3a #diag1_pin: PE15 microsteps: 16 run_current: 0.800 hold_current: 0.500 stealthchop_threshold: 70 [heater_bed] heater_pin: PD12 sensor_pin: PF3 # Bed sensor_type: EPCOS 100K B57560G104F #control: pid min_temp: 0 max_temp: 130 [fan] pin: PE5 max_power: .7 kick_start_time: 0.100 off_below: 0.1 [heater_fan fan1] pin: PC8 heater_temp: 60.0 [bltouch] sensor_pin: PG8 control_pin: PA1 z_offset: 3.0 #2.55 x_offset: 26.9 y_offset: -4.4 pin_up_touch_mode_reports_triggered: False # 0 = no high-speed # 1 = simultaneous stow and toolhead raise # 2 = no intermediate deploy and stow + (1) high_speed_mode: 2 # you can specify an absolute minimum cmd time min_cmd_time: 0.150 # set this to false if probe does not support it test_sensor_before_use: True # use SW Mode if you want instead of normal mode use_sw_mode: True stow_on_each_sample: False [safe_z_home] home_xy_position: 128.1,159.4 # Change coordinates to the center of your print bed speed: 50 z_hop: 10 # Move up 10mm z_hop_speed: 15 [z_tilt] z_positions: -70,153 355,153 points: -23,153 270,153 speed: 60 horizontal_move_z: 10 retries: 5 retry_tolerance: 0.005 [bed_screws] screw1: 35,35 screw1_name: front left screw2: 275,35 screw2_name: front right screw3: 275,275 screw3_name: rear right screw4: 35,275 screw4_name: rear left horizontal_move_z: 10 probe_height: 0 speed: 60 probe_speed: 15 [screws_tilt_adjust] screw1: 8.1,39.4 screw1_name: front left screw screw2: 248.1,39.4 screw2_name: front right screw screw3: 248.1,279.4 screw3_name: rear right screw screw4: 8.1,279.4 screw4_name: rear left screw horizontal_move_z: 10.0 speed: 60 screw_thread: CW-M4 [bed_mesh] speed: 60 horizontal_move_z: 5 mesh_min: 10,10 mesh_max: 300,300 probe_count: 5,5 algorithm: bicubic [gcode_macro G32] gcode: G28 Z_TILT_ADJUST G28 G0 X-16.9 Y14.4 F3000 BED_MESH_CALIBRATE G0 X-30 Y-10 Z50 F3000 ###### Standard ##### [tmc5160 stepper_x] cs_pin: PA15 spi_bus: spi3a microsteps: 16 run_current: 1.600 hold_current: 0.800 stealthchop_threshold: 110 #70 sense_resistor: 0.075 ######### New Testing #driver_pwm_freq: 2 # try 2 here orig 1 #driver_tpfd: 4 # try to increase that from 4 #driver_SGT: 4 # try to play with theese. It enables coolstep too, which helps with noise driver_PWM_OFS: 30 # regarding 0.9 Stepper motors driver_TOFF: 4 ##################### ###### Standard ##### [tmc5160 stepper_y] cs_pin: PB8 spi_bus: spi3a microsteps: 16 run_current: 1.600 hold_current: 0.800 stealthchop_threshold: 110 #70 sense_resistor: 0.075 ######### New Testing #driver_pwm_freq: 2 # try 2 here orig 1 #driver_tpfd: 4 # try to increase that that from 4 #driver_SGT: 4 # try to play with theese. It enables coolstep too, which helps with noise driver_PWM_OFS: 30 # regarding 0.9 Stepper motors driver_TOFF: 4 ##################### [tmc2208 stepper_z] uart_pin: PE1 microsteps: 16 run_current: 0.650 hold_current: 0.450 stealthchop_threshold: 30 [tmc2208 stepper_z1] uart_pin: PD6 microsteps: 16 run_current: 0.650 hold_current: 0.450 stealthchop_threshold: 30 [safe_z_home] home_xy_position: 128.1,159.4 # Change coordinates to the center of your print bed speed: 50 z_hop: 10 # Move up 10mm z_hop_speed: 15 ###################################################################### # Fysetc Mini 12864Panel v2.1 (with neopixel backlight leds) ###################################################################### [display] lcd_type: uc1701 cs_pin: EXP1_3 a0_pin: EXP1_4 rst_pin: EXP1_5 contrast: 60 encoder_pins: ^EXP2_5, ^EXP2_3 click_pin: ^!EXP1_2 [output_pin beeper] pin: EXP1_1 [neopixel fysetc_mini12864] pin: EXP1_6 chain_count: 3 color_order_GRB: False initial_RED: 0.4 initial_GREEN: 0.4 initial_BLUE: 0.4 ######################################## # EXP1 / EXP2 (display) pins ######################################## [board_pins] aliases: # EXP1 header EXP1_1=PG4, EXP1_3=PD11, EXP1_5=PG2, EXP1_7=PG6, EXP1_9=<GND>, EXP1_2=PA8, EXP1_4=PD10, EXP1_6=PG3, EXP1_8=PG7, EXP1_10=<5V>, # EXP2 header EXP2_1=PB14, EXP2_3=PG10, EXP2_5=PF11, EXP2_7=PF12, EXP2_9=<GND>, EXP2_2=PB13, EXP2_4=PB12, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=PF13 # 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. #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [extruder] #*# pid_kp = 19.938 #*# pid_ki = 0.923 #*# pid_kd = 107.667 #*# control = pid #*# #*# [heater_bed] #*# pid_kp = 47.433 #*# pid_ki = 0.303 #*# pid_kd = 1855.210 #*# control = pid
the driver output with klipper:
0:06:15.865: #DUMP_TMC STEPPER=stepper_x 0:06:15.867: // ========== Write-only registers ========== 0:06:15.867: // TPWMTHRS: 00000022 TPWMTHRS=34 0:06:15.868: // COOLCONF: 00000000 0:06:15.868: // GLOBALSCALER: 00000086 GLOBALSCALER=134 0:06:15.868: // IHOLD_IRUN: 00061f0f IHOLD=15 IRUN=31 IHOLDDELAY=6 0:06:15.869: // PWMCONF: c40d001e PWM_OFS=30 pwm_freq=1 pwm_autoscale=1 pwm_autograd=1 PWM_REG=4 PWM_LIM=12 0:06:15.870: // TPOWERDOWN: 0000000a TPOWERDOWN=10 0:06:15.870: // ========== Queried registers ========== 0:06:15.873: // GCONF: 00000004 en_pwm_mode=1 0:06:15.875: // CHOPCONF: 14410154 toff=4 hstrt=5 hend=2 tbl=2 tpfd=4 MRES=4(16usteps) intpol=1 0:06:15.876: // GSTAT: 00000000 0:06:15.878: // DRV_STATUS: 800f4000 stealth=1 CSACTUAL=15 stst=1 0:06:15.879: // FACTORY_CONF: 0000000b FACTORY_CONF=11 0:06:15.880: // IOIN: 30000052 REFR_DIR=1 DRV_ENN=1 SD_MODE=1 VERSION=0x30 0:06:15.882: // LOST_STEPS: 00000000 0:06:15.883: // MSCNT: 00000218 MSCNT=536 0:06:15.885: // MSCURACT: 010b01db CUR_A=-37 CUR_B=-245 0:06:15.886: // OTP_READ: 0000000b OTP_FCLKTRIM=11 0:06:15.888: // PWM_SCALE: 00000013 PWM_SCALE_SUM=19 0:06:15.890: // PWM_AUTO: 001b0026 PWM_OFS_AUTO=38 PWM_GRAD_AUTO=27 0:06:15.891: // TSTEP: 000fffff TSTEP=1048575 0:06:15.891: ok 0:06:19.485: #DUMP_TMC STEPPER=stepper_y 0:06:19.486: // ========== Write-only registers ========== 0:06:19.486: // TPWMTHRS: 00000022 TPWMTHRS=34 0:06:19.487: // COOLCONF: 00000000 0:06:19.487: // GLOBALSCALER: 00000086 GLOBALSCALER=134 0:06:19.487: // IHOLD_IRUN: 00061f0f IHOLD=15 IRUN=31 IHOLDDELAY=6 0:06:19.487: // PWMCONF: c40d001e PWM_OFS=30 pwm_freq=1 pwm_autoscale=1 pwm_autograd=1 PWM_REG=4 PWM_LIM=12 0:06:19.487: // TPOWERDOWN: 0000000a TPOWERDOWN=10 0:06:19.487: // ========== Queried registers ========== 0:06:19.489: // GCONF: 00000004 en_pwm_mode=1 0:06:19.490: // CHOPCONF: 14410154 toff=4 hstrt=5 hend=2 tbl=2 tpfd=4 MRES=4(16usteps) intpol=1 0:06:19.491: // GSTAT: 00000000 0:06:19.492: // DRV_STATUS: 800f4000 stealth=1 CSACTUAL=15 stst=1 0:06:19.492: // FACTORY_CONF: 0000000b FACTORY_CONF=11 0:06:19.493: // IOIN: 30000050 DRV_ENN=1 SD_MODE=1 VERSION=0x30 0:06:19.494: // LOST_STEPS: 00000000 0:06:19.495: // MSCNT: 00000398 MSCNT=920 0:06:19.496: // MSCURACT: 00c7016d CUR_A=-147 CUR_B=199 0:06:19.497: // OTP_READ: 0000000b OTP_FCLKTRIM=11 0:06:19.497: // PWM_SCALE: 00000015 PWM_SCALE_SUM=21 0:06:19.498: // PWM_AUTO: 001c002b PWM_OFS_AUTO=43 PWM_GRAD_AUTO=28 0:06:19.499: // TSTEP: 000fffff TSTEP=1048575 0:06:19.499: ok
-
Do you realize the speeds are in mm/min?
So F119 is very slow -
yes like I wrote.
all above 119mm/min goes to spreadcycle
also with V34 (110mm/s) parameter in M569.
and I can not understand why, it looks like the V parameter does not realy change the tpwmthrs.
but when I check this with m569 P0 as example it gives me
Drive 0 runs in reverse, active low enable, step timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, hstart/hend/hdec 5/0/0, pos 56, tpwmthrs 34 (110.3 mm/sec) , thigh 200 (18.8 mm/sec)
so it sould be on 110mm/sec and not 2mm (120mm/min) /sec
I have still not understand what the H parameter (thigh 200 (18.8 mm/sec)) means maby someone can explain it.
I have tried higher H and lover H parameter nothing changed for me.
when I search for "stealthchop" in the Forum it looks like some others has the same problem, but not found a solution for. -
has some bring StealthChop running on a Duet 3?
when I search here in the forum it looks like only problems with a maestro was fixed the issues with the duet 3 looks all
still open.
has someone the maestro running with RR 3?
@dc42 do you have some tips that I can try or what is wrong with my configuration? -
I am not aware of any bugs in this area, but have added this to my list of things to test prior to the 3.01 release of RRF.
-
@dc42 this means I have nothing wrong in my config?
I was hoping that I have done something wrong. -
I don't see anything wrong with your config, and M569 P0 says the threshold speed for changing to spreadCycle should be around 110mm/sec. That speed won't be exactly right because it depends on the accuracy of the 12MHz clock in the TMC5160.
-
@dc42 ok then I have to wait for your tests and hope we can find a solution.
let me know when I can help here with testing etc. -
From my reading of the datasheet, you should always have THIGH < TPWMTHRS. Have you tried setting THIGH to values below 34?
-
@dc42 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
THIGH
I think I had done is the H parameter right?
I will try again. -
@danym21 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
@dc42 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
THIGH
I think I had done is the H parameter right?
I will try again.Yes. Use M569 with just a P parameter to check that you have set it.
-
@dc42 I have tried with H10 for X and Y achses (P0.0 and P0.1) nothing changed, StealthChop only works below F119 all above only Spreadcycle from the noise.
M569 P0.0 Drive 0 runs in reverse, active low enable, step timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, hstart/hend/hdec 5/0/0, pos 548, tpwmthrs 34 (110.3 mm/sec), thigh 10 (375.0 mm/sec) M569 P0.1 Drive 1 runs in reverse, active low enable, step timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, hstart/hend/hdec 5/0/0, pos 884, tpwmthrs 34 (110.3 mm/sec), thigh 10 (375.0 mm/sec)
to be sure also tested :
; Drives M569 P0.0 S0 D3 V34 H50 ; physical drive 0 goes forwards D2=Spread cycle (x-achses) M569 P0.1 S0 D3 V34 H50 ; physical drive 1 goes forwards D2=Spread cycle (y-achses)
13.5.2020, 22:17:07 M569 P0.1 Drive 1 runs in reverse, active low enable, step timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, hstart/hend/hdec 5/0/0, pos 972, tpwmthrs 34 (110.3 mm/sec), thigh 50 (75.0 mm/sec) 13.5.2020, 22:17:01 M569 P0.0 Drive 0 runs in reverse, active low enable, step timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, hstart/hend/hdec 5/0/0, pos 540, tpwmthrs 34 (110.3 mm/sec), thigh 50 (75.0 mm/sec) 13.5.2020, 22:16:07 G0 X130 Y130 F90 13.5.2020, 22:15:51 G0 X135 Y135 F90
now also G0 X130 Y130 F90 runs only in SpreadCycle
-
@dc42 was you able to test?
I have also tried to change the D settings on a test print to hear some changes, but nearly nothing has changed only on D0 (constant off-time)
he goes a little bit louder but not much. D1 (random off-time) is not supported by TMC5160.
can it be that my board is faulty or that the Firmware has a Bug and only shows the corect mode but not send to the stepper drivers? -
I have seen the source code "/src/Movement/StepperDrivers/TMC51xx.cpp"
constexpr float SenseResistor = 0.050;
when I right on other firmware´s I use 0.075, can this create a difference?
Is it possible to play with over the M569 command or is it needed to compile new, have not found in the Duet documentation. -
I'm experiencing the same thing @danym21.
-
Are there any updates on this?
-
@cjackson234
still not -
I'm sorry for the delay. This is still on my list to continue investigating. As it's a noise issue not a functionality issue, it has lower priotity then some others on my list.
-
Hello! The same thing on my CoreXY using Duet3. Does anyone have found a solution?
-
no sorry