Help needed with Duet 3 6hc TMC5160 StealthChop config
-
I have read through the documentation and will test and report it.
-
@N3XT3D this is exact the same problem that I have from the beginning with the duets boards.
duet wifi 2 (sorry a clone) and a original duet 3. Which Motors you are using?
when I use a SKR GTR board with klipper and TMC5160 it is much quiter, but I had skipped layers when it switch between
steahltshcoop and coolstep.
@dc42 I have still no answare how I can test with a different RSens parameter, all other firmwares use 0.075Ω only the duets use 0.050Ω can be this the difference? -
@dc42 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
Both TMC5160 and TMC2209 have stealthChop. It's a little more complicated to configure on the TMC5160 because that chip also has coolStep. Also, stall detection doesn't work in stealthChop mode, so you have to switch to spreadCycle while doing stall detect homing.
TMC2209 is a little different because it doesn't have coolStep and because stall detection only works in stealthChop mode.
In both cases there are some limitations:
- stealthChop doesn't work well at high speeds. That's why there is a changeover speed defined. Above that speed, the driver switches over to spreadCycle. Unfortunately there is a jolt when that happens. The higher the changeover speed, the worse the jolt.
- stealthChop can't react quickly to changes in load. So if your printer is executing a travel move and the nozzle hits a blob or overhang, it is likely to skip steps if the driver is in stealthChop mode.
The TMC2130 drivers used on the Prusa Mk3 with the Einsy board are similar to the TMC5160 drivers but without external mosfets. Prusa defines two printing modes: fast and quiet. My guess is that in quiet mode, they reduce the speed of travel moves so that the drivers can operate in stealthChop mode throughout.
So my suggestion is to use one of the following configurations:
- StealthChop changing over to spreadCycle a very low speed. Compared to running in spreadCycle always, this reduces standstill noise with some motors.
- StealthChop changing over to spreadCycle at a little over your normal maximum printing speed. It will switch to spreadCycle for travel moves, except very short ones. This will only be viable if the jerk at switchover is tolerable.
- Limit your travel speed so that you can keep the printer in stealthChop mode always.
This could also be programmed for the Duet 3 board. The two Printing Modes like Prusa.
The two speed mode.This is very interesting.
What exactly is the speed limit for StealthChop?You can tell us the exact Speed values ?
Or it is probably different for each stepper Motor ?I have 0.9 stepper drivers on a Delta printer.
StealthChop will certainly not be able to do this. At the high speeds. -
This post is deleted! -
@dc42 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
Did you adjust the homing procedure to meet the stealthChop tuning requirements, as I explained in a previous post?
btw in the imminent RRF 3.2beta you will be able to read out the values of the PWM_SCALE and PWM_AUTO registers, to see the result of stealthChop tuning.
Hi,
sorry i was absont for some time now, as I got father and time was somehow limited.
In the meantime is added dampers, which helped a lot in the standardconfig (=spreadcycle) mode and changed all plastic parts for metal parts from the BLV cube project. (Metal parts are now available)
Are there any news in general?
I will work now though the configuration and tests several cases.I saw also, that the RRF3.2beta is already available.
Is the "read out" of values for the stealthchop already integrated?
Could be some help for "debugging"?I will come for sure with more questions soon....
Thanks
-
@dc42 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
TMC5160
Could this be somehow connected to our problem?
-
@dc42
XY-Core Setup.
So, i tried now the following:
--------------------------------1------------------------------------ config.g (set everything up at spreadcycle)
"M569 P0.0 S0 ; physical drive 0.0 goes forwards
M569 P0.1 S0 ; physical drive 0.1 goes forwards
M906 X1000 Y1000 Z1000 E550 I30" - homeall.g (homing and than stealchop setting)
"G1 H2 Z0.01 F3000 ; lift Z relative to current position
G4 P250;
G1 H2 Z0.01 F3000 ; lift Z relative to current position
G4 P250;
G1 H2 Z10 F3000 ; lift Z relative to current position
G1 H2 X0.01 y0.00 F3000 ;
G4 P250;
G1 H2 X0.02 y0.02 F3000 ;
G4 P250;
G1 H2 X0.00 y0.4 F3000 ;
G4 P250;
--> And now setting stealhchop after the "initialization"
M569 P0.0 S0 D3 H1 v1 ; physical drive 0.0 goes forwards
M915 P0.0 T1
M569 P0.1 S0 D3 H1 v1 ; physical drive 0.1 goes forwards
M915 P0.1 T1
--------------------------------2-----------------------------------
config.g
M569 P0.0 S0 D3 H1 v1 ; physical drive 0.2 goes forwards
M915 P0.0 T1
M569 P0.1 S0 D3 H1 v1 ; physical drive 0.2 goes forwards
M915 P0.1 T1
homeall.g
"G1 H2 Z0.01 F3000 ; lift Z relative to current position
G4 P250;
G1 H2 Z0.01 F3000 ; lift Z relative to current position
G4 P250;
G1 H2 Z10 F3000 ; lift Z relative to current position
G1 H2 X0.01 y0.00 F3000 ;
G4 P250;
G1 H2 X0.02 y0.02 F3000 ;
G4 P250;
G1 H2 X0.00 y0.4 F3000 ;
G4 P250;
Both way do not seems to change something on the sound level. (the printer is not extremly loud as before, because i use now dampers, but nevertheless, even with dampers I should hear a difference between spreadycycle and stealchop???)
Any other way suggested??
- config.g (set everything up at spreadcycle)
-
@dc42 Any news on this point?
"btw in the imminent RRF 3.2beta you will be able to read out the values of the PWM_SCALE and PWM_AUTO registers, to see the result of stealthChop tuning."
-
Absolutly no feedback on that topic?
Is this topic closed for posting, hidden or something, or does really nobody has any input (@dc42 )
I would appreciate at least a: no solution or a "bug" reply, that I know what is fact. -
@empi00 hang tight.
-
@Phaedrux
Thanks a reply.
How could I interpretate this reply?
There will be some more input/software modification/bugfix (If there is a big)/whatever from your side, but you need some more time?
Perfectly fine for me, but I (we) should know that something is ongoing.Right now I don't know if I have the wrong setup(steppers, PSU,...), if I configured something wrong or if you can do here anything on the software side.
I am looking at the moment to test a SKR1.4 with RRF for LPC and TMC2209s, to see if this gives better results. (I have all hardware here)
If there will come some solution from your side, I will wait and not invest this hours of testing/setup... -
@empi00 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
How could I interpretate this reply?
Interpret it as in I don't think DC42 has had a chance to see your message yet. I've brought it to his attention and hopefully by tomorrow he will have been able to reply. Thanks for your patience.
-
@empi00 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
@dc42 Any news on this point?
"btw in the imminent RRF 3.2beta you will be able to read out the values of the PWM_SCALE and PWM_AUTO registers, to see the result of stealthChop tuning."
Yes that was implemented. M569 will report the steathChop parameters if the driver is in stealthChop mode:
m569 p0 Drive 0 runs forwards, active low enable, step timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, hstart/hend/hdec 5/0/0, pos 8, tpwmthrs 5 (93.8 mm/sec), thigh 5 (93.8 mm/sec), pwmScaleSum 19, pwmScaleAuto 0, pwmOfsAuto 29, pwmGradAuto 0
Here's a macro I am using to test stealthChop tuning on my CoreXY printer. This printer uses stall detect homing, which doesn't work in stealthChop mode, so it's a little more complicated than it would normally be.
; StealthChop tuning on CoreXY T-1 ; ensure no tool selected G28 ; home G1 X-150 Y-150 ; put head in a safe place ready for +X +Y movement M18 ; motors off M915 P0 T5 ; set coolstep threshold (disables stall detection) M915 P1 T5 ; set coolstep threshold (disables stall detection) M569 P0 D3 H5 V5 ; set stealthChop mode, set tpwmthrs and thigh M569 P1 D3 H5 V5 ; set stealthChop mode, set tpwmthrs and thigh M569 P0 ; read out motor parameters M569 P1 ; read out motor parameters G1 H2 X0.02 ; small move to energise motors G4 P250 ; pause G1 H2 X150 Y150 F3000 ; tuning move M569 P0 ; read out parameters again M569 P1 ; read out parameters again
Here is a result:
13/10/2020, 08:59:30 Drive 0 runs forwards, active low enable, step timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, hstart/hend/hdec 5/0/0, pos 200, tpwmthrs 5 (93.8 mm/sec), thigh 5 (93.8 mm/sec), pwmScaleSum 24, pwmScaleAuto 5, pwmOfsAuto 29, pwmGradAuto 0 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 408, tpwmthrs 5 (1500.0 mm/sec), thigh 5 (1500.0 mm/sec), pwmScaleSum 43, pwmScaleAuto 16, pwmOfsAuto 27, pwmGradAuto 13/10/2020, 08:59:16 M98 P"0:/macros/Tune XY" Drive 0 runs forwards, active low enable, step timing fast, mode stealthChop, ccr 0x08053, toff 3, tblank 1, hstart/hend/hdec 5/0/0, pos 200, tpwmthrs 5 (93.8 mm/sec), thigh 5 (93.8 mm/sec), pwmScaleSum 23, pwmScaleAuto 4, pwmOfsAuto 29, pwmGradAuto 0 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 902, tpwmthrs 5 (1500.0 mm/sec), thigh 5 (1500.0 mm/sec), pwmScaleSum 33, pwmScaleAuto 4, pwmOfsAuto 29, pwmGradAuto
You can see that pwmScaleAuto and pwmOfsAuto change as a result of the tuning. The pwmGradAuto readout is unfortunately getting truncated; I will fix that in the next beta.
-
Hello,
thank you for the feedback.
Ok, so i will upgrade the System to the Beta and let you know the result after I tried this! -
@dc42 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:
I found time to do a little more work on this. I find that even in spreadCycle mode, with interpolation to x256 enabled the motors are very quiet, although I can just hear them around the speed that i think corresponds to mid-band resonance. So for these tests, I reduced microstepping to x8 and disabled interpolation.
These are the conditions you need for the drivers to run in stealthChop mode:
- tpwmthrs low enough for the speed you are using. This is set by the M569 V parameter. Lower values increase the speed at which the driver will switch over to spreadCycle. M569 with just a P parameter will translate the existing tpwmthrs to mm/sec belt speed for you.
I understandi this but Im facing problems at this point. If I try to use a value aroung 150, that gives me 96mm/s os belt speed wich is around of what I want to print using stealhchop. Is that possible? At the begining of the post that was the desired speed.
-
thigh low enough for the speed you are using. This is set by the M569 H parameter. The units are the same as for tpwmthrs. M569 with just a P parameter will translate the existing thigh to mm/sec belt speed for you.
-
tcoolthrs low enough for the speed you are using. This is set by the M915 T parameter. The units are the same as for the M569 H and V parameters. Although M915 with P and/or axis parameters sets the value correctly, there is a bug in firmware 3.1.x when you use M915 with just a drive and/or axis parameter. The bug is that the value reported as "coolstep" should be the existing T parameter, but isn't. The value of tcoolthrs defaults to 2000, which is usually too high if you want to use stealthChop. The reason it is this high is to allow stall detection to work. Stall detection is not compatible with stealthChop on the TMC5160.
I dont understand this point. I read the documentation, but the T parameter stated says ti is for coolstep and I dont have nothing more about that. Could you elaborate a little more? Because setting M915 X Y .... T50 or T10, it doesnt make any change in the config. When I issue a M915, I still get collstep with a cero value.
- You must execute the proper tuning sequence after switching to stealthChop. This means: apply motor current, pause for more than 130ms, then execute a move at reasonable speed. Here is an extract from the TMC5160 datasheet:
This is something I believe super important and if you could give us more instruction for us the noobs, you will help a lot of more people. I know that probably the info you provided is ver clear and detailed, but can you elaborate a little more about this tunning sequence and how to be sure it is working?
Can you provide a clean a checked tunning routine to be included in our homing files? It is not clear to me if the tunning move can be the same one used for homing. For example. After I do the very small movement to energize the motors (0.02mm is OK?), Can I go for homing move and that move will used also as tunning move? Because if It cant be used, then the movement you use in your example could be wrong under certain circunstances: moving to X150 Y150, could take the head outside allowed area if the heat was not in the center of the print area when you issied this movement.Here is valuable information . Could you provide some more details and a routine to be sure we completed the solution a or B? It is not clear to me how to do that
- You must enable stealthChop using M569 P# D3.
I have this enabled in my config.g file with no extra parameters so far, but by doing so what I get is stealhchop is only available at 7 mm/s and after that seems spreadcicle activates!
- stealthChop cannot function properly at speeds high enough that it can't supply as much current as it wants to to the stepper motor due to insufficient power supply voltage.
So to use stealthChop, I suggest you set tpwmthrs, thigh and tcoolthrs all to the same value, for example:
M569 P0 D3 H50 v50
M915 P0 T50I tried using this example with these values. The result is that I lost my sensorless homing capabilities
You can send M569 P0 to see what belt speed the H and V parameters correspond to. What you are satisfied that you have the threshold high enough, execute the tuning procedure. If necessary, you can execute a very short move (just 1 microstep is enough) to power up the motors at the start.
In principle you could use different values of thigh and tcoolthrs so that at speeds too high for stealthChop you still use coolStep, however i'm not sure that there are any speeds at which coolStep provides any advantages over stealthChop.
If you are using stall-detect homing, then in the homing file you must increase the M915 T parameter to a value that corresponds to a speed below the speed of your homing move. [I have not yet checked whether you also need to switch to spreadCycle mode explicitly]. After homing, reduce the M915 T parameter again, then execute the tuning procedure.
HTH David
This is my configuration right now, I would preciate if you can clean it up so I can learn more and I can see where my mistakes were done. For sure this config is not optimal or probably is wrong, so please take into consideration Im trying to learn RRF:
Config.g
; General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"Printer" ; set printer name
M669 K1 ; select CoreXY mode; Network
M552 S0 ; disable network; Drives
M569 P0.0 S0 D3 ; physical drive 0.0 goes forwards X Se invirtieron los cables tambien. Se agrego D3 para stealhtchop3
M569 P0.1 S1 D3 ; physical drive 0.1 goes forwards Y Ultimo cambio: de S0 a S1. Se agrego D3 para stealhtchop3
M569 P0.2 S1 D3 ; physical drive 0.2 goes forwards
M569 P0.3 S1 D3 ; physical drive 0.3 goes reverse
M569 P0.4 S0 D3 ; physical drive 0.4 goes forwards
M569 P0.5 S0 D3 ; physical drive 0.5 goes forwardsM584 X0.0 Y0.1 Z0.2:0.3 E0.4:0.5 ; set drive mapping
M350 X256 Y256 Z32:32 E32:32 I1 ; configure microstepping with interpolation
; M92 X160.32 Y160.32 Z3200.00:3200.00 E827.22 set steps per mm
M92 X1285.13 Y1285.13 Z3200.00:3200.00 E827.22 ; set steps per mm
M566 X900.00 Y900.00 Z300.00:300.00 E2400.00 ; set maximum instantaneous speed changes (mm/min)
M203 X18000.00 Y18000.00 Z240.00:240.00 E1200.00 ; set maximum speeds (mm/min)
M201 X1000.00 Y1000.00 Z20.00:20.00 E500.00 ; set accelerations (mm/s^2)
M906 X1500 Y1500 Z900:900 E1000:1000 I30 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 S1 ; set axis minima
M208 X350 Y350 Z400 S0 ; set axis maxima; Endstops
M574 X1 S3 ; configure sensorless endstop for low end on X
M574 Y1 S3 ; configure sensorless endstop for low end on Y
M574 Z2 S2 ; configure Z-probe endstop for low end on Z; Z-Probe
M558 P5 C"^!io3.in" H5 F120 T18000 ; set Z probe type to switch and the dive height + speeds
G31 P500 X0 Y28.5 Z0.245 ; set Z probe trigger value, offset and trigger height
M557 X25:310 Y27:312 S57:57 ; define mesh grid; Heaters
; Heaters
M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
;M307 H0 B0 D30 S1.00 ; enable PID para camara, deadtime en 30 segundos
M307 H0 B1 S1.00 ; enable bang-bang mode for the chamber heater and set PWM limit
;M140 H0 ; map heated bed to heater 0
M141 H0 ; map chamber to heater 0
M143 H0 S130 ; set temperature limit for heater 0 to 130C
M308 S1 P"temp1" Y"thermistor" T500000 B4723 C1.19622e-7 ; configure sensor 1 as thermistor on pin temp1
M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1
M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M308 S2 P"temp2" Y"thermistor" T500000 B4723 C1.19622e-7 ; configure sensor 2 as thermistor on pin temp2
M950 H2 C"out2" T2 ; create nozzle heater output on out2 and map it to sensor 2
M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit; Fans
M950 F0 C"out3" Q500 ; create fan 0 on pin out3 and set its frequency
M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
M950 F1 C"out4" Q500 ; create fan 1 on pin out4 and set its frequency
M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on; Tools
M563 P0 D0 H1 F0 ; define tool 0
G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C
M563 P1 D1 H2 F-1 ; define tool 1
G10 P1 X0 Y0 Z0 ; set tool 1 axis offsets
G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C; Custom settings are not defined
M915 X Y S2 R0 F0 ; sensroless sensitivity; movments without homing
M564 H0; Miscellaneous
M501 ; load saved parameters from non-volatile memory
M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
M950 S0 C"0.out9" ; servo "0" in pin out9
M280 P0 S95 ; move servo to rest position
M376 H30 ; cancell mesh levelling
M143 S450 ; set max temp to 450 degrees for T0
M143 H2 S450 ; set max temp to 450 for T1
T0 ; select first toolMy homing files:
Homeall.g
; homeall.g
; called to home all axes
;; Calibration of motor currents etc
G91
G1 H2 Z0.02 F500
G4 P150
G1 H2 Z5
G1 H2 X0.02 F2000
G4 P150
G1 H2 Y0.02 F2000
G4 P150
G1 H2 Z-5; Uncomment the following lines to lift Z after probing
G91 ; relative positioning
G1 Z5 F100 ; lift Z relative to current position ; absolute positioningM400
M913 X60 Y60 ; drop motor current to 60%
M400; HOME X/Y
G1 H1 Y-400 X-400 F10000 ;
G1 Y175 X 175 F5000 ;
M400
G1 H1 Y-400 F10000
G1 Y175G1 H1 X-400 F10000
G1 X175
M400G1 H2 Z-5 F1200 ; lower Z again
G90 ; absolute positioning
M400
M913 X100 Y100 ; drop motor current to 100%
M400; Z HOMING
G1 X175 Y175 F5000 ; go to first bed probe point and home Z
G30homex.g
; homex.g
; called to home the X axis
;; Calibration of motor currents etc
G91
G1 H2 Z0.02 F500
G4 P150
G1 H2 Z5
G1 H2 X0.02 F2000
G4 P150
G1 H2 Y0.02 F2000
G4 P150
G1 H1 X-400 F10000; generated by RepRapFirmware Configuration Tool v3.1.4 on Wed Aug 19 2020
M400
M913 X60 Y60 ; drop motor current to 45%
M400
G91 ; relative positioningG1 H2 Z5 F1200 ; lift Z relative to current position
G1 H1 Y-400 F10000 ; nueva
G1 Y175 F5000 ; nueva
M400
G1 H1 X-400 F10000
M400
G1 H2 Z-5 F1200 ; lower Z again
G90 ; absolute positioning
M400
M913 X100 Y100 ; drop motor current to 100%
G1 X175 F4000
M400homey.g
; homey.g
; called to home the Y axis; Calibration of motor currents etc
G91
G1 H2 Z0.02 F500
G4 P150
G1 H2 Z5
G1 H2 X0.02 F2000
G4 P150
G1 H2 Y0.02 F2000
G1 H1 Y-400 F10000
G1 H2 Z-5;
; generated by RepRapFirmware Configuration Tool v3.1.4 on Wed Aug 19 2020 03:46:47 GMT-0300 (
M400
M913 X60 Y60 ; drop motor current to 45%
M400
G91G1 H2 Z5 F1200
G1 H1 Y-400 F10000
G1 H2 Z-5 F1200
G90
M400
M913 X100 Y100
G1 Y175 F4000
M400Thanks anyone who can help me get this working. The problems basically: stealhchop is not working above 9 mm/s.
-
@dc42
Sorry, it took some time on my side.
I upgraded to the beta2 (with SBC) but faced some issues.
Mesh bed leveling (BLTOUCH) was not working properly because the PIN was not always pushed outside, but it tried to probe.
But than I had some hugh blobs randomly,... on edges/directional changes of the print.
Tried to read out the values, which was working, but were not really able to make some "benchmarking".I went back now to the 3.1.1 and all "problems" are gone with the BLTouch and blobs.
I think also this is matching with some other posts here, at least for the blob topicChanged now the motors to a TRINAMIC (QMot) QSH4218-47-040 with "ultra low impandance" of 0,6mH.
Result is day and night with spreadcycle. It is just sligthly louder than a my other steppers with dampers, but without dampers.When i switch on stealthchop, it changes significatly the aperance of the noise to a differen sound. So it is switched on at least. But as i went back to 3.1.1 i can not read out the values.
I will try now more different values, but i am missing a little bit the understanding how it is the H and V value correlating.
Pure Stealchop mode: it runs well with around 100m/s
In Hybrid mode, i get some strange sound and stuttering, even if i config the "switch" speed to 80mm/s.
But properly the H + C + T values are not combined well.Can you give us any indication when the Beta3 Version will be available?
-
We hope to release 3.2beta3 next week.
-
This post is deleted! -
Hi,
did you include the functionality yet?
Kindly regards, Pierre
-
I have the same problem. Give it a way to use stealthchope ore cool step?