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

    RRF 3.4.0 Sensorless Homing Issues after Power Cycle

    Scheduled Pinned Locked Moved Solved
    Beta Firmware
    8
    28
    1.6k
    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.
    • floblerundefined
      flobler
      last edited by

      Hey guys,

      I recently upgraded from RRF 3.3 to RRF 3.4.0 which seems to have caused some issues with my sensorless homing configurations. Since I upgraded to RRF 3.4.0, I am getting incorrect stalls on both my X and Y axes when I try to home them after power-cycling the printer. After these initial, incorrect stalls, both axes home correctly until I power-cycle the printer again.

      I downgraded the printer again to re-confirm that everything is working correctly on RRF 3.3, which it is. I did not change anything about my configurations when I upgraded.

      I am seeing this behavior for two printers.

      Printer: Prusa MK3 Bear
      Firmware: RRF 3.3 upgrade to RRF 3.4.0
      Board: Duet 3 Mini 5+

      config.g

      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      ; config.g
      ;
      ; Duet 3 Mini 5+
      ; RRF Version BUILD_VARIABLE_RRF_VERSION
      ; Bear Configuration BUILD_VARIABLE_BEAR_CONFIG_VERSION
      ; 
      ; Description:
      ;  	- main configuration file
      ;	- executed on start-up
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      
      
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      ; General Preferences
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      
      G90                                        ; absolute positioning
      M83                                        ; extruder relative positioning
      M550 P"duet-bear-wifi"                     ; set printer name
      
      
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      ; Network
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      
      if {network.interfaces[0].type = "ethernet"} ; network type = ethernet
          M552 P0.0.0.0 S1                         ; enable network and acquire dynamic address via DHCP
      else                                         ; network type = wifi
          M552 S1                                  ; enable network
      
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      ; Drives
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      
      M569 P0.0 D3 V10 S0                        ; physical drive 0.0 goes backwards / Z-left  / reduced V parameter to enable stealthChop
      M569 P0.1 D3 V10 S0                        ; physical drive 0.1 goes backwards / Z-right / reduced V parameter to enable stealthChop
      M569 P0.2 D3 S1                            ; physical drive 0.2 goes forwards  / Y 
      M569 P0.3 D3 S0                            ; physical drive 0.3 goes backwards / X
      M569 P0.4 D3 S1                            ; physical drive 0.4 goes forwards  / E
      
      M584 X0.3 Y0.2 Z0.0:0.1 E0.4               ; set drive mapping
      
      M671 X-36.5:293.5 Y0:0                     ; define lead screw positions
      
      M350 X32 Y32 Z32 E64 I1                    ; configure microstepping with interpolation
      M92 X200.00 Y200.00 Z800.00 E1660.00       ; set steps per mm
      
      M566 X480.00 Y480.00 Z48.00 E300.00        ; set maximum instantaneous speed changes (mm/min)
      M203 X24000.00 Y24000.00 Z1200.00 E6000.00 ; set maximum speeds (mm/min)
      M201 X4000.00 Y4000.00 Z1000.00 E1500.00   ; set accelerations (mm/s^2)
      
      M906 X490 Y490 Z490 E400 I40               ; set motor currents (mA) and motor idle factor in per cent
      
      M84 S60                                    ; set idle timeout
      M564 H0 S1                                 ; allow unhomed movement and forbid axis movement outside defined limits
      
      
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      ; Axis Limits
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      
      M208 X0 Y-4 Z0 S1                          ; set axis minima
      M208 X250 Y212.5 Z210 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
      M915 X S3 F0 H200 R0                       ; set the X axis sensitivity
      M915 Y S3 F0 H200 R0                       ; set the Y axis sensitivity
      
      M591 D0 P2 C"io3.in" S1                    ; configure filament sensor for extruder drive 0 on pin io3.in and turn it on
      
      
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      ; Z-Probe
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      
      M558 P5 C"^io2.in" H5 F500 T10000 A1       ; set Z probe type to switch on pin io2.in, dive height + speed, travel speeds and number of probes 
      G31 P1000 X23 Y5 Z0                        ; set Z probe trigger value, offset and trigger height
      M557 X24:228 Y6:208 P7:7                   ; define mesh grid
      
      
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      ; Heaters
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      
      ; Bed Heater
      M308 S0 P"temp0" Y"thermistor" T100000 B4725 C7.06e-8 A"Bed"    ; configure sensor 0 as thermistor on pin temp0
      M950 H0 C"out0" Q50 T0                                          ; create bed heater output on out0 and map it to sensor 0, PWM frequency 50Hz
      M307 H0 B0 S1.00                                                ; disable bang-bang mode for the bed heater and set PWM limit
      M140 H0                                                         ; map heated bed to heater 0
      M143 H0 S110                                                    ; set temperature limit for heater 0 to 110°C
      
      ; Hotend Heater
      M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.06e-8 A"Nozzle" ; 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
      M143 H1 S300                                                    ; set temperature limit for heater 1 to 300°C
      
      
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      ; Fans
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      
      ; Part Cooling Fan
      M950 F0 C"out4" Q25                        ; create fan 0 on pin out5 and set its frequency
      M106 P0 C"Part Cooling" S0 H-1             ; set fan 0 name and value. Thermostatic control is turned off
      
      ; Hotend Fan
      M950 F1 C"out5" Q500                       ; create fan 1 on pin !out3 and set its frequency
      M106 P1 C"Hotend" S1 H1 T50                ; set fan 1 name and value. Thermostatic control is turned on
      
      ; Case Fan
      M950 F2 C"out3" Q500                       ; create fan 2 on pin out6 and set its frequency
      M106 P2 C"Case" S1 H1 T50                  ; set fan 2 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 0°C
      M302 S180 R180                             ; allow extrusion and retraction starting at 180°C
      
      
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      ; Miscellaneous
      ;-----------------------------------------------------------------------------------------------------------------------------------------------
      
      M575 P1 S1 B57600                          ; enable support for PanelDue
      M501                                       ; load saved parameters from non-volatile memory
      T0                                         ; select tool 0
      

      homing-modifications.g

      ;---------------------------------------------------------------------------------
      ; homing-modifications.g
      ;
      ; Description:
      ; 	- system file
      ; 	- sets motor current and V parameter for homing moves
      ; 	- tunes motor drivers
      ; 	- used in all homing system files
      ;---------------------------------------------------------------------------------
      
      
      ;---------------------------------------------------------------------------------
      ; Modifications
      ;---------------------------------------------------------------------------------
      
      M569 P0.3 V10         ; reduce V parameter to ensure stealthChop is enabled for X
      M569 P0.2 V10         ; reduce V parameter to ensure stealthChop is enabled for Y
      M913 X60 Y60          ; drop X and Y motor current to 60%
      G4 P150               ; wait 150ms
      
      
      ;---------------------------------------------------------------------------------
      ; Driver Tuning
      ;---------------------------------------------------------------------------------
      
      G91                     ; relative positioning
      G1 H2 X0.2 Y0.2 F3000   ; power up X and Y motors to ensure they are not stalled
      G4 P150                 ; wait 150ms
      M400                    ; wait for current moves to finish
      G1 H2 X-0.2 Y-0.2 F3000 ; move back to original position
      

      homeall.g

      ;----------------------------------------------------------------------------
      ; homeall.g
      ;
      ; Description:
      ; 	- system file
      ; 	- called to home all axes
      ; 	- used in homez.g
      ;----------------------------------------------------------------------------
      
      
      ;----------------------------------------------------------------------------
      ; Preparation
      ;----------------------------------------------------------------------------
      
      M98 P"homing-modifications.g" ; calls homing-modifications.g
      
      ; Lift Z Axis
      G91                           ; relative positioning
      G1 H2 Z5 F1200                ; lift Z axis by 5mm	
      M400                          ; wait for current moves to finish
      
      
      ;----------------------------------------------------------------------------
      ; Home X Axis
      ;----------------------------------------------------------------------------
      
      G1 H1 X5 F1200                ; move X axis away from homing position by 5mm
      G1 H1 X-255 F3000             ; move to X axis endstop and stop there
      G1 X5 F1200                   ; move back by 5mm
      G1 H1 X-10 F3000              ; move to X axis endstop again
      G1 X10 F1200                  ; move back by 10mm
      M400                          ; wait for current moves to finish
      
      ;----------------------------------------------------------------------------
      ; Home Y Axis
      ;----------------------------------------------------------------------------
      
      G1 H1 Y5 F1200                ; move Y axis away from homing position by 5mm
      G1 H1 Y-220 F3000             ; move to Y axis endstop and stop there
      G1 Y5 F1200                   ; move back by 5mm
      G1 H1 Y-10 F3000              ; move to Y axis endstop again
      G1 Y10 F1200                  ; move back by 10 mm
      M400                          ; wait for current moves to finish
      
      ;----------------------------------------------------------------------------
      ; Home Z Axis
      ;----------------------------------------------------------------------------
      
      G90                           ; absolute positioning
      G1 X11.5 Y4.5 F6000           ; go to first probe point
      G30                           ; home Z axis by probing the bed
      G1 Z0.6 F500                  ; move Z axis to 0.6mm
      G91                           ; relative positioning
      G1 Z1 F500                    ; lift Z axis by 1mm
      M400	     	              ; wait for current moves to finish
      
      
      ;----------------------------------------------------------------------------
      ; Restore Defaults
      ;----------------------------------------------------------------------------
      
      M98 P"homing-modifications-reset.g" ; calls homing-modifications-reset.g
      
      

      Is there something I missed in the upgrade notes that would explain this behavior? I saw that the drivers to no longer default to stealthChop2 but I thought this would not matter the way I have everything configured.

      Thanks for your help!

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

        It's perhaps related to this from the change log

        [Duet 3 Mini] [Duet Maestro] The stepper drivers no longer default to stealthchop mode, because of the risk of excessive motor current if the correct tuning move is not executed

        Z-Bot CoreXY Build | Thingiverse Profile

        jay_s_ukundefined floblerundefined 2 Replies Last reply Reply Quote 0
        • jay_s_ukundefined
          jay_s_uk @Phaedrux
          last edited by

          @phaedrux he has D3 on each M569 line so can't be that

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          1 Reply Last reply Reply Quote 0
          • floblerundefined
            flobler @Phaedrux
            last edited by flobler

            @phaedrux yep I thought so too first but I have accounted for that in config.g as @jay_s_uk said and I also verified that the drivers are in stealthChop2 when homing.

            I think if that were the case I also would not be able to home at all but right now only the first try after the power cycle fails.

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

              @flobler please provide the contents of homing-modifications-reset.g too.

              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

              floblerundefined 1 Reply Last reply Reply Quote 0
              • floblerundefined
                flobler @dc42
                last edited by

                @dc42 sure, I forgot about that one.

                I also tried to have it all in one file instead of splitting it up. That did not change the behavior.

                homing-modifications-reset.g

                ;-----------------------------------------------------------------------
                ; homing-modifications-reset.g
                ;
                ; Description:
                ; 	- system file
                ; 	- resets all homing modifications applied in homing_modifications.g
                ; 	- used in all homing system files
                ;-----------------------------------------------------------------------
                
                
                M913 X100 Y100  ; reset X and Y motor current to 100%
                M569 P0.3 V2000 ; restore default V parameter for X
                M569 P0.2 V2000 ; restore default V parameter for Y
                G90             ; absolute positioning
                
                floblerundefined 1 Reply Last reply Reply Quote 0
                • Phaedruxundefined Phaedrux moved this topic from Tuning and tweaking
                • floblerundefined
                  flobler @flobler
                  last edited by

                  @dc42 did you have a chance to look into this? 🙂

                  Please feel free to let me know if there is something I can do to help troubleshoot.

                  Krohm Koalaundefined 1 Reply Last reply Reply Quote 0
                  • Krohm Koalaundefined
                    Krohm Koala @flobler
                    last edited by

                    @dc42 @Phaedrux is anyone have some news on that ? That's kind off a weird issue...

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

                      @krohm-koala you should perform stealthChop tuning in the homing files before executing the homing move.

                      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

                      floblerundefined 1 Reply Last reply Reply Quote 0
                      • floblerundefined
                        flobler @dc42
                        last edited by

                        @dc42 @Phaedrux to my understanding I am performing the stealthchop tuning in the homing-modifications.g file.

                        The main issue though is that these files have worked with both my printers for RRF 3.3 but do not work in RRF 3.4.0.

                        This indicates to me that something has been changed in RRF 3.4.0, preventing us from homing directly after a power cycle.

                        Am I doing something wrong? If so, why does it work without problem in RRF 3.3?

                        Thanks for your time!

                        Del87undefined gloomyandyundefined 2 Replies Last reply Reply Quote 0
                        • Del87undefined
                          Del87 @flobler
                          last edited by

                          @flobler mb because stealthchop is not default mode on 3.4 anymore

                          Dmitry

                          Krohm Koalaundefined floblerundefined 2 Replies Last reply Reply Quote 0
                          • Krohm Koalaundefined
                            Krohm Koala @Del87
                            last edited by

                            @del87 but Everything is set to stealthchop in config.g so it should be a problem

                            1 Reply Last reply Reply Quote 0
                            • floblerundefined
                              flobler @Del87
                              last edited by

                              @del87 thamks for chiming in but that is accounted for in config.g and I am certain the drivers are set to operate in stealthChop mode when trying to home. Otherwise hpming would not work at all and not just after a power cycle of the printer.

                              1 Reply Last reply Reply Quote 0
                              • gloomyandyundefined
                                gloomyandy @flobler
                                last edited by

                                @flobler The tuning moves you are using are very small. I wonder if perhaps using a longer move would help? You might also want to add a delay/m400 after the 2nd move as well to see if that makes any difference?

                                I agree that it is odd that 3.3 works but 3.4 does not, but perhaps your settings were right on the edge and starting in spreadcycle mode then switching to stealthchop mode (which is in effect what now happens in 3.4), results in slightly different "learned" values after tuning? I suppose you could try switching back to 3.3 and capturing the various register contents just before your homing moves and compare those with 3.4.

                                floblerundefined 1 Reply Last reply Reply Quote 1
                                • floblerundefined
                                  flobler @gloomyandy
                                  last edited by flobler

                                  @gloomyandy Thanks for the input! I tried to make the move longer and also to add the second M400 which both did not change the behavior.

                                  What I also tried is to play with the sensitivity for stall detection as I thought maybe something changed here and the drivers are just being configured too sensitive. I used S3 for both axes on RRF 3.3. With RRF 3.4.0 I went all the way up to the least sensitive value (63) which also did not help. The motors still stall immediately when trying to home after a power-cycle.

                                  So to me there is two things than could be going wrong:

                                  a) I am doing something wrong with the tuning move (but I am not sure what and the docs are not very clear here); then I am still a bit confused why it did not happen in RRF 3.3

                                  b) Something changed from RRF 3.3 to 3.4.0 that breaks the stealthChop tuning procedure

                                  If any of my other settings were wrong (i.e. speed, current, acceleration or jerk) then I don't think the motors would home properly after this initial false stall after a power-cycle.

                                  1 Reply Last reply Reply Quote 0
                                  • floblerundefined
                                    flobler
                                    last edited by flobler

                                    @dc42 @Phaedrux I have not managed to figure out what I am doing wrong yet and the behavior is still consistent across two machines.

                                    Do you have any hints? Is my driver tuning procedure configured wong?

                                    Thank you 🙂

                                    P.S.: May I aske why this is categorized under "Beta Firmware"?

                                    oliofundefined 1 Reply Last reply Reply Quote 0
                                    • oliofundefined
                                      oliof @flobler
                                      last edited by

                                      @flobler I had issues with sensorless homing after updating to 3.4 until I did M569 Pxx D3 at the beginning of the homing file and switched back to normal hybrid mode doing M569 Pxxx D2 at the end. Maybe that helps. Also the documentation recommends homing moves to be above 40mm/sec so I moved to 40mm/sec just so. With the reduced motor power it is just a light tap and the axis is homed.

                                      <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                                      floblerundefined 1 Reply Last reply Reply Quote 1
                                      • floblerundefined
                                        flobler @oliof
                                        last edited by

                                        @oliof thank you, I will give that a go and report back!

                                        1 Reply Last reply Reply Quote 0
                                        • floblerundefined
                                          flobler
                                          last edited by

                                          @oliof this did not help in my case. I think in your case you utilized that the drivers were defaulting to stealthChop before going to RRF 3.4.0 and therefore you needed to give them instructions to use stealthChop2 after the upgrade (as with RRF 3.4.0 the default now is spreadCycle).

                                          My problem is not really that homing is not working generally. Homing works totally fine and smooth just not right after I power-cycle my printer when trying to home for the first time.

                                          Thank you for the suggestion though!

                                          oliofundefined 1 Reply Last reply Reply Quote 0
                                          • oliofundefined
                                            oliof @flobler
                                            last edited by

                                            @flobler well, without my change homing usually did not work at all, including right after turning on the printer. So yours is a bit of a weird one.

                                            <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

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