UNSOLVED Duet Wifi - Configuring Coolstep RRF 3.11



  • Hi Forum,

    since the TMC2660 don't have Stealthchop I wanted to at least use Coolstep which is kind of the predecessor.

    I searched the forum and read TMC2660 documentation sheets before posting.

    What I did:

    • Use the max rated current for the X and Y stepper motor as stated in the documentation:
      M906 X900.00 Y900.00 Z540.00 E500.00 I10

    The I started a print with usual (fast) settings and raised my SGT value to the point where I didn't get false false StallGuard errors anymore.

    The result was then:
    M915 X S3 F0 H400 R1
    M915 Y S3 F0 H400 R1

    Then I wanted to calibrate Coolstep and things got complicated as I found no guide with 3D printing in mind without additional special hardware to measure motor resistance etc..

    As stated in the Duet documentation Coolstep is configured as follows:
    "Tnnn (optional) Coolstep control register, 16-bit unsigned integer"

    At section 6.7. is a table which explains the approach further:
    https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2660_datasheet_Rev1.07.pdf

    I also found this guide with recommended starting values:
    https://www.trinamic.com/fileadmin/assets/Support/Appnotes/AN002-stallGuard2.pdf

    I read here in the forum and also in the guides that you can use your SG min/max values to determine the SEMIN and SEMAX value.
    My SG values are: Driver 0: standstill, SG min/max 11/442

    In the guide it says:

    With SEMIN = 0 coolStep is switched off. The SEMIN parameter defines the minimum value of the
    stallGuard2 signal SG that triggers the increasing of the current if load is detected. The SEMIN
    parameter is internally multiplied by 32. So, the increasing of current is triggered if SG < (SEMIN * 32).
    To start parameterization, first choose a SEMIN in the range of SG_MAX / 4 … SG_MAX / 8.
    

    Ok, SG max is 442 and I should divide it with 8? This would mean the value 55,25. Here comes my first ??. I can only enter a max SEMIN value of 15.

    As I don't understand how I should apply those instructions I tried different values for SEMIN and SEMAX, for example SEMIN5 and SEMAX10:

    M915 X S3 F0 H400 T0101010010100100 R1
    

    The sound of the stepper motor didn't change at all (and thereby the current). When I ask for the status with M915 I get this report:

    Driver 0: stall threshold 3, filter off, steps/sec 400 (32.0 mm/sec), coolstep ffff, action: log
    

    "ffff" isn't that a maxed out hex value?

    Hope someone knows and uses the feature. 🙂



  • @Argo i'm on the same boat my friend...



  • @Argo & @celulari , I have been looking into this also. I think the correct format for the control register is the following:

    SMARTEN Register.png
    coolStep bits.png

    I would start playing around with this and help, but I'm on diving ops this morning and therefore can't access my printer. The only thing that concerns me on coolstep is that it lowers the motor current - which could cause a loss of accuracy.🤷

    Cheers,
    Kolbi



  • Here is an example on the 16 bit. But I have not figured out how to properly solve, or even swag (scientific wild-ass guess), SEMAX and SEMIN. @dc42, can you give some light on how to obtain SEMAX & SEMIN values?

    coolStep example.png

    M915 X T57957
    


  • I'm still trying to figure out how to figure for SEMAX & SEMIN values, but this video is pretty cool in explaining how it works.
    https://youtu.be/Prw7wNa20Gk



  • @Argo, from Trinamic:

    From: Trinamic Support ticketfeedback@trinamic.com
    Subject: Re: tmc2660 coolstep
    Date: August 5, 2020 at 5:00:19 PM GMT+9
    To:

    Hi Kolbi,

    nice to meet you!

    The SEMIN and SEMAX 4 bit values are multiplied internally by 32 to yield the compare value. So, 110 to 55 give a setting of roughly 2 (2*32=64) to 4.

    SEMAX realizes a hysteresis. Leave it at 0 for first tests. If you find, that the motor current becomes scaled down too early, or it scales up / down to often, increase it to 1 or 2. This yields a second comparison value of SEMIN*32+(SEMAX+1)*32. CoolStep will scale down current only, when the SG_RESULT exceeds this second value.

    You can use the results from the equation as a starting value, but in fact it is best to try out the effect of different settings, because the StallGuard values will show some dependance on the motor current, too.

    Hope this helps. I will put over the ticket to our US support, for more direct response.

    Best regards
    Bernhard

    TRINAMIC Motion Control GmbH & Co KG
    Waterloohain 5 • D-22769 Hamburg • Germany



  • So maybe try:
    SMARTEN.png

    M915 X T16708
    

    I guess while testing, keep an eye on hiccups?

    I received another email, it goes to say:
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    From: Trinamic Support ticketfeedback@trinamic.com
    Date: Thu, Aug 6, 2020 at 1:31 AM
    Subject: Re: tmc2660 coolstep
    To: Kolbi

    Dear Bob,

    I do not see CoolStep a good match for 3D printers. It cannot cope with the type of high acceleration / deceleration. CoolStep is more for operation at a known velocity, with mechanical load changing. This allows the required time of a few fullsteps to adapt the current. I think, this situation is seldom for 3D printers - it will only occur in Z axis, but Z axis is not really critical as it only has long moves for initialization and end of print.

    Best regards
    Bernhard

    TRINAMIC Motion Control GmbH & Co KG
    Waterloohain 5 • D-22769 Hamburg • Germany
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    That doesn't mean that it can't be used, just use with caution and check for hiccups/ missed steps.
    I tried both on mine, both made the motor noise much less. I used the following macro to test it out.

    G1 Z10
    
    G1 X250 F6000
    G1 X0 F6000
    
    G1 X0 F8000
    	G1 X20 F8000
    G1 X10 F8000
    	G1 X30 F8000
    G1 X20 F8000
    	G1 X40 F8000
    G1 X30 F8000
    	G1 X50 F8000
    G1 X40 F8000
    	G1 X60 F8000
    G1 X50 F8000
    	G1 X70 F8000
    G1 X60 F8000
    	G1 X80 F8000
    G1 X70 F8000
    	G1 X90 F8000
    G1 X80 F8000
    	G1 X100 F8000
    G1 X90 F8000
    	G1 X110 F8000
    G1 X100 F8000
    	G1 X120 F8000
    G1 X110 F8000
    	G1 X130 F8000
    G1 X120 F8000
    	G1 X140 F8000
    G1 X130 F8000
    	G1 X150 F8000
    G1 X140 F8000
    	G1 X160 F8000
    G1 X150 F8000
    	G1 X170 F8000
    G1 X160 F8000
    	G1 X180 F8000
    G1 X170 F8000
    	G1 X190 F8000
    G1 X180 F8000
    	G1 X200 F8000
    G1 X190 F8000
    	G1 X210 F8000
    G1 X200 F8000
    	G1 X220 F8000
    G1 X210 F8000
    	G1 X230 F8000
    G1 X220 F8000
    	G1 X240 F8000
    G1 X230 F8000
    	G1 X250 F8000
    G1 X240 F8000
    	G1 X250 F8000
    
    G1 X0 F6000
    G1 X250 F6000
    
    G1 X250 F8000
    	G1 X230 F8000
    G1 X240 F8000
    	G1 X220 F8000
    G1 X230 F8000
    	G1 X210 F8000
    G1 X220 F8000
    	G1 X200 F8000
    G1 X210 F8000
    	G1 X190 F8000
    G1 X200 F8000
    	G1 X180 F8000
    G1 X190 F8000
    	G1 X170 F8000
    G1 X180 F8000
    	G1 X160 F8000
    G1 X170 F8000
    	G1 X150 F8000
    G1 X160 F8000
    	G1 X140 F8000
    G1 X150 F8000
    	G1 X130 F8000
    G1 X140 F8000
    	G1 X120 F8000
    G1 X130 F8000
    	G1 X110 F8000
    G1 X120 F8000
    	G1 X100 F8000
    G1 X110 F8000
    	G1 X90 F8000
    G1 X100 F8000
    	G1 X80 F8000
    G1 X90 F8000
    	G1 X70 F8000
    G1 X80 F8000
    	G1 X60 F8000
    G1 X70 F8000
    	G1 X50 F8000
    G1 X60 F8000
    	G1 X40 F8000
    G1 X50 F8000
    	G1 X30 F8000
    G1 X40 F8000
    	G1 X20 F8000
    G1 X30 F8000
    	G1 X10 F8000
    G1 X20 F8000
    	G1 X5 F8000
    G1 X10 F8000
    	G1 X0 F8000
    
    G1 X250 F6000
    G1 X0 F6000
    
    
    
    
    
    
    G1 Y215 F6000
    G1 Y0 F6000
    
    G1 Y0 F8000
    	G1 Y20 F8000
    G1 Y10 F8000
    	G1 Y30 F8000
    G1 Y20 F8000
    	G1 Y40 F8000
    G1 Y30 F8000
    	G1 Y50 F8000
    G1 Y40 F8000
    	G1 Y60 F8000
    G1 Y50 F8000
    	G1 Y70 F8000
    G1 Y60 F8000
    	G1 Y80 F8000
    G1 Y70 F8000
    	G1 Y90 F8000
    G1 Y80 F8000
    	G1 Y100 F8000
    G1 Y90 F8000
    	G1 Y110 F8000
    G1 Y100 F8000
    	G1 Y120 F8000
    G1 Y110 F8000
    	G1 Y130 F8000
    G1 Y120 F8000
    	G1 Y140 F8000
    G1 Y130 F8000
    	G1 Y150 F8000
    G1 Y140 F8000
    	G1 Y160 F8000
    G1 Y150 F8000
    	G1 Y170 F8000
    G1 Y160 F8000
    	G1 Y180 F8000
    G1 Y170 F8000
    	G1 Y190 F8000
    G1 Y180 F8000
    	G1 Y200 F8000
    G1 Y190 F8000
    	G1 Y210 F8000
    G1 Y200 F8000
    	G1 Y215 F8000
    
    G1 Y0 F6000
    G1 Y215 F6000
    
    	G1 Y200 F8000
    G1 Y210 F8000
    	G1 Y190 F8000
    G1 Y200 F8000
    	G1 Y180 F8000
    G1 Y190 F8000
    	G1 Y170 F8000
    G1 Y180 F8000
    	G1 Y160 F8000
    G1 Y170 F8000
    	G1 Y150 F8000
    G1 Y160 F8000
    	G1 Y140 F8000
    G1 Y150 F8000
    	G1 Y130 F8000
    G1 Y140 F8000
    	G1 Y120 F8000
    G1 Y130 F8000
    	G1 Y110 F8000
    G1 Y120 F8000
    	G1 Y100 F8000
    G1 Y110 F8000
    	G1 Y90 F8000
    G1 Y100 F8000
    	G1 Y80 F8000
    G1 Y90 F8000
    	G1 Y70 F8000
    G1 Y80 F8000
    	G1 Y60 F8000
    G1 Y70 F8000
    	G1 Y50 F8000
    G1 Y60 F8000
    	G1 Y40 F8000
    G1 Y50 F8000
    	G1 Y30 F8000
    G1 Y40 F8000
    	G1 Y20 F8000
    G1 Y30 F8000
    	G1 Y10 F8000
    G1 Y20 F8000
    	G1 Y5 F8000
    G1 Y10 F8000
    	G1 Y0 F8000
    
    G1 Y215 F6000
    G1 Y0 F6000
    
    


  • I made a quick calculator in excel to assist: SMARTEN - M915.xlsx

    Update: On my work pc the xlsx behaved a bit differently then at home. You may have to do the following: When entering a binary number such as 01, you'll have to either enter it like '01 or simply change those cells to text format. On the last cell where it gives an example M915 command, you may have to change CONCAT to CONCATENATE.



  • Second attempt at it:
    SMARTEN.xlsx

    Cheers,
    Kolbi


Log in to reply