Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Help needed with Duet 3 6hc TMC5160 StealthChop config

    Scheduled Pinned Locked Moved Unsolved
    Tuning and tweaking
    16
    86
    12.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N3XT3Dundefined
      N3XT3D
      last edited by

      @dc42 First of all, thank you very much for the detailed answer.

      Then I probably misunderstood that in principle. I thought you couldn't activate stealth chop at all. Unfortunately I can hardly assess how loud this jolt is. My wish would be to be able to print up to 100mm / s (maximum) in the steahlthchop and to be able to switch to the spreadcycle for the travel speed.
      Does the jolt depend on the Coolstep function? Or to put it another way, would this jolt also occur with the TMC 2209 drivers under the same conditions? I tried to find a couple of videos on Youtube that have a Duet 3 board built in to get an impression of what they sound like, but you can't find anything useful.

      Because with my printer with Duet 2 Wifi I have the problem that the printer without a stepper motor damper for X and Y is not acceptable because of the noise. I already reported on this in this forum. Here is the video too.

      https://www.youtube.com/watch?v=jcsMTAzeeRE&t=2s

      From this state I would like to turn off without "cheating" with the dampers. Otherwise I love the board and really don't want to leave the Duet boards. Therefore the consideration of switching to a Duet 3 board.

      danym21undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        Those motors in the video sound much noisier than normal, as if you don't have interpolation enabled. What microstepping settings are you using?

        The jolt when switching modes applies to the TMC2209 as well. From the TMC2209 datasheet:

        As a first step, both chopper principles should be parameterized and optimized individually (SpreadCycle settings may be programmed to OTP memory). In a next step, a transfer velocity has to be fixed. For example, StealthChop operation is used for precise low speed positioning, while SpreadCycle shall be used for highly dynamic motion. TPWMTHRS determines the transition velocity. Read out TSTEP when moving at the desired velocity and program the resulting value to TPWMTHRS. Use a low transfer velocity to avoid a jerk at the switching point.
        A jerk occurs when switching at higher velocities, because the back-EMF of the motor (which rises with the velocity) causes a phase shift of up to 90° between motor voltage and motor current. So when switching at higher velocities between voltage PWM and current PWM mode, this jerk will occur with increased intensity. A high jerk may even produce a temporary overcurrent condition (depending on the motor coil resistance). At low velocities (e.g. 1 to a few 10 RPM), it can be completely neglected for most motors. Therefore, consider the switching jerk when choosing TPWMTHRS. Set TPWMTHRS zero if you want to work with StealthChop only.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • N3XT3Dundefined
          N3XT3D
          last edited by

          I used 16x micro stepping with interpolation. The change to 1.8 ° stepper motors brought some improvement, reducing the motors to 1A as well. The motor dampers made the printer quieter, but the vibration in the motor is so strong that you can even see it in the printed part.

          This is my config.g

          ; Configuration file for Duet WiFi (firmware version 3)
          
          ; executed by the firmware on start-up
          
          ;
          
          ; generated by RepRapFirmware Configuration Tool v2.1.4 on Sat Dec 28 2019 21:53:43 GMT+0100 (Mitteleuropäische Normalzeit)
          
           
          
          ; General preferences
          
          ; Aktuelle Duet Wifi Firmware Version: 3.1.0 - Stand: 17.05.2020
          
          ; Paneldue Information: Hardware Version: Panel Due v3.0a - 57600 baud - aktuelle Version: 1.24 - Stand: 11.05.20
          
          M575 P1 S1 B57600														; set Panel Due Baudrate to 57600
          
          G90																		; send absolute coordinates...
          
          M83																		; ...but relative extruder moves
          
          M550 P"XY Cube"															; set printer name
          
           
          
          M667 S1																	; select CoreXY mode
          
           
          
          ; Network
          
          M552 S1																	; enable network
          
          M586 P0 S1																; enable HTTP
          
          M586 P1 S0																; disable FTP
          
          M586 P2 S0																; disable Telnet
          
           
          
          ; Drives
          
          M569 P0 F3 S1															; physical drive 0 goes forwards - Changed TOFF for reduced motor noise F4 is default
          
          M569 P1 F5 S1 															; physical drive 1 goes forwards - Changed TOFF for reduced motor noise F4 is default
          
          M569 P2 F3 S1															; physical drive 2 goes forwards - Changed TOFF for reduced motor noise F4 is default
          
          M569 P3 S1																; physical drive 3 goes forwards
          
          M584 X0 Y1 Z2 E3														; set drive mapping
          
          M350 X16 Y16 Z16 E16 I1													; configure microstepping with interpolation
          
          M92 X200.1 Y200.1 Z1600.00 E412.493								; set steps per mm
          
          M566 X500.00 Y500.00 Z30.00 E400.00										; set maximum instantaneous speed changes (mm/min)
          
          M203 X12000.00 Y12000.00 Z150.00 E2100.00								; set maximum speeds (mm/min)
          
          M201 X2000.00 Y2000.00 Z100.00 E5000.00									; set maximum accelerations (mm/s^2)
          
          M204 P1000 T2000														; set accelerations of printmoves to 1000 and for travelmoves to 2000 (mm/s^2)
          
          M906 X1600 Y1600 Z1600 E1600 I30										; set motor currents (mA) and motor idle factor in per cent
          
          ; M593 F32																; Set Dynamic Acceleration to cancel ringing at 48 Hz
          
          M84 S30																	; Set idle timeout
          
          M671 X30:270:30:270 Y270:270:30:30 P0.7									; Define Bedleveling screws, 0,7mm pitch
          
           
          
          ; Pressure advance
          
          M572 D0 S0.07															; Pressure advance - 0.113
          
           
          
          ; Axis Limits
          
          M208 X-11 Y0 Z0 S1														; set axis minima
          
          M208 X306 Y321 Z500 S0													; set axis maxima
          
           
          
          ; Endstops
          
          M574 X1 S1 P"xstop"														; configure active-high endstop for low end on X via pin xstop
          
          M574 Y2 S1 P"ystop"														; configure active-high endstop for high end on Y via pin ystop
          
          M574 Z1 S2																; configure Z-probe endstop for low end on Z
          
           
          
          ; Z-Probe
          
          M558 P1 C"zprobe.in+zprobe.mod" H3 F100 T12000 I0 B0					; set Z probe type to unmodulated and the dive height + speeds - A5 S0.02 optional fuer multiprobe selbsttest
          
          G31 P500 X-2 Y-16.4 Z3.05												; set Z probe trigger value, offset and trigger height - 3.05 for CFK; 3.02 for Buildtak; 2.724 for Powdercoated Springsteel; 3.152 for ALU -  Wert kleiner wird Abstand Größer.
          
          M557 X30:270 Y30:270 S40												; define mesh grid
          
           
          
          ; Heaters
          
          M308 S0 P"bedtemp" Y"thermistor" T100000 B3950 A"Druckbett"				; configure sensor 0 as thermistor on pin bedtemp - A"Printbed"
          
          M950 H0 C"bedheat" T0													; create bed heater output on bedheat and map it to sensor 0
          
          M143 H0 S100															; set temperature limit for heater 0 to 100C
          
          M307 H0 A154.1 C2269.2 D1.0 V24.0 B0 S1.00								; disable bang-bang mode for the bed heater and set PWM limit
          
          M140 H0																	; map heated bed to heater 0
          
          M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.06e-8 A"Nozzle"		; configure sensor 1 as thermistor on pin e0temp - A"E3DV6 Hotend"
          
          M950 H1 C"e0heat" T1													; create nozzle heater output on e0heat and map it to sensor 1
          
          M143 H1 S280															; set temperature limit for heater 1 to 280C
          
          M307 H1 A368.0 C157.4 D3.7 V24.0 B0 S1.00								; disable bang-bang mode for the nozzle heater and set PWM limit
          
           
          
          ; Fans
          
          M950 F0 C"fan0" Q250													; create fan 0 on pin fan0 and set its frequency
          
          M106 P0 C"Bauteil Lüfter" S0 H-1										; set fan 0 name and value. Thermostatic control is turned off
          
          M950 F1 C"fan1" Q500													; create fan 1 on pin fan1 and set its frequency
          
          M106 P1 C"Heatbreak Fan" S1 H1 T45										; set fan 1 name and 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
          
           
          
          ; Limit axis movement
          
          M564 H1 S1														; movements only work with homed Axis; H1 = forbid movement of axes that have not been homed; S1 = limit movement within axis boundaries
          
           
          
          ; Custom settings are not defined
          
          M912 P0 S-4														; Set correction for CPU Temperature
          
           
          
          ; Miscellaneous
          
          M911 S23 R28 P"M913 X0 Y0 G91 M83 G1 Z1 E-1 F1000"				; set voltage thresholds and actions to run on power loss
          
          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by dc42

            I suggest you send M350 without parameters, to confirm that interpolation really is enabled. It's not impossible that there is a non-printing character between the I and the 1 in your M350 command.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • N3XT3Dundefined
              N3XT3D
              last edited by

              Exactly, I cross-checked via the console and the M350 command whether the parameters are active.

              1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators
                last edited by dc42

                In that case, I think the movement speeds in your video must be hitting the mid-band resonance frequency band of the motors. I have a similar thing in my delta, it's noisy during homing but silent when printing.

                Have you tried configuring coolStep?

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                empi00undefined 1 Reply Last reply Reply Quote 0
                • N3XT3Dundefined
                  N3XT3D
                  last edited by

                  The volume is actually extremely loud throughout.
                  The faster the speed, the more extreme it becomes. If you print a cylinder with only one perimeter as a spiral, you will see very strong resonances in the print image due to the constant change in the speed of the motors due to the Corexy structure.
                  At some speeds the resonances are stronger, e.g. at 30mm/s at 60mm/s, on the other hand, the printer is "quietest", which is also outside the normal range. I have adjusted the M569 F parameter and tested between 1-10 during operation and at a standstill. The result would definitely be small.
                  I don't know how else to configure Coolstep, but I would definitely try it out.

                  1 Reply Last reply Reply Quote 0
                  • N3XT3Dundefined
                    N3XT3D
                    last edited by

                    I have read through the documentation and will test and report it.

                    1 Reply Last reply Reply Quote 0
                    • danym21undefined
                      danym21 @N3XT3D
                      last edited by

                      @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?

                      1 Reply Last reply Reply Quote 0
                      • rothundefined
                        roth @dc42
                        last edited by roth

                        @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:

                        1. StealthChop changing over to spreadCycle a very low speed. Compared to running in spreadCycle always, this reduces standstill noise with some motors.
                        2. 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.
                        3. 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.

                        1 Reply Last reply Reply Quote 0
                        • cjackson234undefined
                          cjackson234 @fractalengineer
                          last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • empi00undefined
                            empi00 @dc42
                            last edited by

                            @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

                            1 Reply Last reply Reply Quote 0
                            • empi00undefined
                              empi00
                              last edited by empi00

                              @dc42 said in Help needed with Duet 3 6hc TMC5160 StealthChop config:

                              TMC5160

                              TMC5160.JPG

                              Could this be somehow connected to our problem?

                              1 Reply Last reply Reply Quote 0
                              • empi00undefined
                                empi00 @dc42
                                last edited by empi00

                                @dc42
                                XY-Core Setup.
                                So, i tried now the following:
                                --------------------------------1-----------------------------------

                                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"
                                2. 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??

                                1 Reply Last reply Reply Quote 0
                                • empi00undefined
                                  empi00 @dc42
                                  last edited by

                                  @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."

                                  1 Reply Last reply Reply Quote 0
                                  • empi00undefined
                                    empi00
                                    last edited by

                                    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.

                                    😞

                                    1 Reply Last reply Reply Quote 0
                                    • Phaedruxundefined
                                      Phaedrux Moderator
                                      last edited by Phaedrux

                                      @empi00 hang tight.

                                      Z-Bot CoreXY Build | Thingiverse Profile

                                      empi00undefined 1 Reply Last reply Reply Quote 1
                                      • empi00undefined
                                        empi00 @Phaedrux
                                        last edited by

                                        @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...

                                        Phaedruxundefined 1 Reply Last reply Reply Quote 0
                                        • Phaedruxundefined
                                          Phaedrux Moderator @empi00
                                          last edited by

                                          @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.

                                          Z-Bot CoreXY Build | Thingiverse Profile

                                          1 Reply Last reply Reply Quote 0
                                          • dc42undefined
                                            dc42 administrators
                                            last edited by dc42

                                            @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.

                                            Duet WiFi hardware designer and firmware engineer
                                            Please do not ask me for Duet support via PM or email, use the forum
                                            http://www.escher3d.com, https://miscsolutions.wordpress.com

                                            empi00undefined 1 Reply Last reply Reply Quote 3
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA