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

    Trouble with stall detection

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    3
    16
    693
    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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by

      How are you calling Rehome.g? Are you not using the actual homing files?

      Why aren't you dropping the motor current during homing with M913?

      When you say it does not work, what exactly does it do?

      Z-Bot CoreXY Build | Thingiverse Profile

      1 Reply Last reply Reply Quote 0
      • djstephenson1undefined
        djstephenson1
        last edited by djstephenson1

        I have been trying to call the rehome.g through using M915 in config.g. I may not understand how to properly set it up however.

        Regarding M913, I tried it for sensorless homing, and it worked fine.

        When I say it does not work, it is not detecting any stalls; I started a print, held the bed with my hand, forcing a stall, and no detection whatsoever. It also is not catching any soft stalls from current drop.

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

          M915 sets up the stall detection parameters, yes, but you have to initiate the homing in some way. Usually that's in the homing files. homex homey homez and homeall. Those are the files that get called when you press the homing buttons and issue G28, etc.

          So please post those homing files.

          Z-Bot CoreXY Build | Thingiverse Profile

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

            @djstephenson1 said in Trouble with stall detection:

            When I say it does not work, it is not detecting any stalls; I started a print, held the bed with my hand, forcing a stall, and no detection whatsoever.

            • Were you moving the bed fast enough for stall detection to operate? There is a minimum speed for stall detection, see the M915 H parameter.
            • You may need to increase the stall detection sensitivity, by reducing the M915 S parameter.

            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

            djstephenson1undefined 1 Reply Last reply Reply Quote 0
            • djstephenson1undefined
              djstephenson1 @Phaedrux
              last edited by

              @Phaedrux Attached are my homing files. Thanks for sticking with me on this.

              homeall.g homex.g homey.g homez.g

              1 Reply Last reply Reply Quote 0
              • djstephenson1undefined
                djstephenson1 @dc42
                last edited by

                @dc42 I had the print moving appx 50-55mm/s. I thought that was within the minimum?

                I also had the sensitivity set to 1. Should I continute dialing it down? If so, by what increment would you suggest?

                Thanks for your time and help

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

                  Ok, so unless you're calling rehome.g as a macro it's never going to do stall detection homing as your homing files and config.g are set to use normal endstops. So rework your config.g and homing files to contain the stall detection commands.

                  Just to make it easier to see what we're talking about here are all your relevant files in post.

                  ; Configuration file for Duet WiFi (firmware version 2.03)
                  ; executed by the firmware on start-up
                  ;
                  ; generated by RepRapFirmware Configuration Tool v2.1.8 on Sat May 09 2020 00:15:31 GMT-0700 (Pacific Daylight Time)
                  
                  ; General preferences
                  G90                                                ; send absolute coordinates...
                  M550 P"Ender 3 EVO"                                  ; set printer name
                  
                  ; Network
                  M552 S1                                            ; enable network
                  M586 P0 S1                                         ; enable HTTP
                  M586 P1 S0                                         ; disable FTP
                  M586 P2 S0                                         ; disable Telnet
                  
                  ; Drives
                  M569 P0 S0                                         ; physical drive 0 goes backwards
                  M569 P1 S0                                         ; physical drive 1 goes backwards
                  M569 P2 S1                                         ; physical drive 2 goes forwards
                  M569 P3 S0                                         ; physical drive 3 goes backwards
                  M569 P4 S1                                         ; physical drive 2 goes forwards
                  M584 X0 Y1 Z2:4 E3 P3                               ; set drive mapping
                  M671 X-30:245 Y0:0 S3                           ; leadscrews at left (connected to Z) and right (connected to E1) of X axis
                  M350 X16 Y16 Z16:16 E16 I1                         ; configure microstepping with interpolation
                  M92 X80.00 Y80.00 Z400:400 E837.08           ; set steps per mm
                  M566 X800.00 Y800.00 Z24.00:24.00 E500.00 ; set maximum instantaneous speed changes (mm/min)
                  M203 X30000.00 Y30000.00 Z3000.00:3000.00 E1200.00 ; set maximum speeds (mm/min)
                  M201 X300.00 Y300.00 Z100.00:100.00 E5000.00 ; set accelerations (mm/s^2)
                  M906 X400 Y400 Z1000:1000 E1200 I30                ; set motor currents (mA) and motor idle factor in per cent
                  M84 S300                                           ; Set idle timeout
                  M572 D0 S0.05
                  M915 X Y S3 F0 R3 H400
                  
                  ; Axis Limits
                  M208 X-5.5 Y-10 Z0 S1                              ; set axis minima
                  M208 X258.5 Y246 Z260 S0                           ; set axis maxima
                  
                  ; Endstops
                  M574 X1 S1
                  M574 Y1 S1                                      ; set active high endstops
                  M574 Z1 S2                                         ; set endstops controlled by probe
                  M591 D0 C3 P2 S1
                  
                  ; Z-Probe
                  M307 H3 A-1 C-1 D-1                                ; disable heater on PWM channel for BLTouch
                  M558 P9 H3 F12000 T12000                          ; set Z probe type to bltouch and the dive height + speeds
                  G31 P25 X-47 Y-22 Z2.902                          ; set Z probe trigger value, offset and trigger height
                  M557 X30:180 Y30:180 S30                           ; define mesh grid
                  
                  ; Heaters
                  M305 P0 T100000 B3950 R4700                        ; set thermistor + ADC parameters for heater 0
                  M143 H0 S120                                       ; set temperature limit for heater 0 to 120C
                  M305 P1 T100000 B4725 C7.060000e-8 R4700           ; set thermistor + ADC parameters for heater 1
                  M143 H1 S280                                       ; set temperature limit for heater 1 to 270C
                  
                  ; Fans
                  M106 P0 S0 I0 F500 H-1                             ; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
                  M106 P1 S1 I0 F500 H1 T45                          ; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
                  M106 P2 S1 I0 F500 H1 T45                        ; set fan 2 value, PWM signal inversion and frequency. 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
                  
                  ; Custom settings
                  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
                  T0                                                 ; select first tool
                  
                  ; Home y, x, z, and Toolchanger Lock axes
                   
                  G91 G1 Z5 F800 H2           ; Lift z so we don't crash
                  M98 P"homey.g"
                  M98 P"homex.g"
                  M98 P"homez.g"
                  
                  ; homex.g
                  ; called to home the X axis
                  ;
                  ; generated by RepRapFirmware Configuration Tool v3.1.3 on Sun Jun 21 2020 16:11:37 GMT-0500 (Central Daylight Time)
                  G91                 ; relative positioning
                  G1 H2 Z10 F12000    ; lift Z relative to current position
                  G1 H1 X-269 F5000 ; move quickly to X axis endstop and stop there (first pass)
                  G1 H2 X15 F12000     ; go back a few mm
                  G1 H1 X-269 F3000 ; move slowly to X axis endstop once more (second pass)
                  G1 H2 Z-10 F12000   ; lower Z again
                  G90                 ; absolute positioning
                  
                  ; Home Z Axis
                   
                  G90 G1 X107.5 Y107.5 F8000   ; Move to the center of the bed
                   
                  M564 H0                   ; Just in case bed is touching probe at start. 
                  G91                       ;
                  G1 S10 Z2:4 F5000                 ;
                  M564 H1                   ;
                  G90                       ;
                   
                  M280 P3 S160 I1           ; And reset the probe, again, just in case. 
                   
                  M558 F400                 ; Set the probing speed
                  G30
                  M558 F150                  ; Set a slower probing speed
                  G30
                  
                  ; rehome.g
                  
                  G91                     ; relative positioning
                  G1 S2 X0.2 Y0.2 Z0.2 	; Move all axis 0.2 mm, clear stall status
                  ; x and y Sensor less homing
                  M400			; make sure everything has stopped before we make changes
                  M915 X S1 Y S3 R0 F0	; set X and Y sensitivity, do nothing when stall, unfiltered
                  M574 X1 Y1 S3		; set endstops to use motor stall
                  G1 S1 X-265 Y-245 F5000 ; move X and Y back, stopping at the end stop
                  G1 Z-0.2    		; Move Z back down -0.2 mm,
                  M400			; make sure everything has stopped
                  G90 			; back to absolute mode
                  M915 X Y S3 R3 F1    ; set X and Y sensitivity to -0, when stall home XY and resume print, filtered so it takes 4 steps to figure out it has stalled
                  

                  For sensorless homing you'll need these in either your homing files or in config.g. Config.g would be the normal place to put it unless you want to have seperate M915 commands tuned specifically for sensorless homing and for stall detection during a print. In that case, put the M915 for sensorless homing at the start of your homing files, and the M915 for stall detection during a print inside your slicer start gcode after homing.

                  M574 X1 Y1 S3		; set endstops to use motor stall
                  M915 X Y S3 R0 F0	; set X and Y sensitivity, do nothing when stall, unfiltered
                  

                  In your homing files you should have something like the following.

                  ; homex.g
                  ; called to home the X axis
                  ;
                  ; generated by RepRapFirmware Configuration Tool v3.1.3 on Sun Jun 21 2020 16:11:37 GMT-0500 (Central Daylight Time)
                  M400
                  M913 X50 Y50 ; drop motor current to 50%
                  M400
                  G91                 ; relative positioning
                  G1 H2 Z10 F12000    ; lift Z relative to current position
                  G1 H1 X-269 F5000 ; move quickly to X axis endstop and stop there (first pass)
                  G1 H2 X15 F12000     ; go back a few mm
                  G1 H1 X-269 F3000 ; move slowly to X axis endstop once more (second pass)
                  G1 H2 Z-10 F12000   ; lower Z again
                  G90                 ; absolute positioning
                  M400
                  M913 X100 Y100 ; return current to 100%
                  M400
                  

                  Same goes for homey.

                  In your homez I'm not sure what's going on here:

                  M564 H0                   ; Just in case bed is touching probe at start. 
                  G91                       ;
                  G1 S10 Z2:4 F5000                 ;
                  M564 H1                   ;
                  G90 
                  

                  That's not a valid G1 command. Just remove that whole part.

                  See if you can get sensorless homing working first before trying to move on to stall detection during a print.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  djstephenson1undefined 3 Replies Last reply Reply Quote 1
                  • djstephenson1undefined
                    djstephenson1 @Phaedrux
                    last edited by

                    @Phaedrux THANK YOU SO MUCH. I will give this all a shot and report back.

                    1 Reply Last reply Reply Quote 0
                    • djstephenson1undefined
                      djstephenson1 @Phaedrux
                      last edited by

                      @Phaedrux So I have sensorless homing dialed in. I have changed my config.g and home files accordingly. Everything is working well regarding sensorless homing.

                      1 Reply Last reply Reply Quote 0
                      • djstephenson1undefined
                        djstephenson1 @Phaedrux
                        last edited by

                        @Phaedrux How is this for a modified rehome file? rehome.g

                        I have also adjusted that bizarre G1 command in homez. The idea was to move Z up by ten mm before deploying the probe. I fixed it though.

                        Also, I have added M915 X Y S3 R3 F1 to my slicer. Is that appropriate?

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

                          I suppose that looks ok. Is rehome.g just for testing?

                          The only issue I see in there is that you have two S values in your M915 as if you're trying to set different sensitivity values for X and Y but I don't think it will work like that. You'd have to seperate that into separate commands for homing X and Y.

                          M915 X S1 Y S3 R0 F0

                          @djstephenson1 said in Trouble with stall detection:

                          Also, I have added M915 X Y S3 R3 F1 to my slicer. Is that appropriate?

                          That is a good place to put it, but you'll have to test the stall detection itself to see if those values are right for you.

                          Z-Bot CoreXY Build | Thingiverse Profile

                          djstephenson1undefined 1 Reply Last reply Reply Quote 0
                          • djstephenson1undefined
                            djstephenson1 @Phaedrux
                            last edited by

                            @Phaedrux Okay wonderful. How can I make a better write up for this topic? The information on the dozuki is lacking.

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

                              Well you can sign up for a dozuki account and submit changes directly, or you can post your suggestions here.

                              Z-Bot CoreXY Build | Thingiverse Profile

                              djstephenson1undefined 1 Reply Last reply Reply Quote 0
                              • djstephenson1undefined
                                djstephenson1 @Phaedrux
                                last edited by

                                @Phaedrux I will create an account. What does an efficient rehome.g file look like?

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

                                  Do you mean homeall?

                                  Z-Bot CoreXY Build | Thingiverse Profile

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