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

    Stall Detection on Duet 2 WiFi and Duet 3 MB6HC

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    3
    7
    156
    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.
    • R006undefined
      R006
      last edited by R006

      Hi,

      I’m using a Duet 2 WiFi board running RepRapFirmware 3.5.0-rc2. My setup includes six stepper motors: three on the Z-axis, two on the Y-axis, and one on the X-axis.
      I’m trying to implement stall detection and would appreciate some guidance on where to start. I’ve followed the documentation at:
      " https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection "
      I set up a table-top test, but stall detection doesn’t appear to be working as expected.
      Here is my current configuration:

      daemon.g

      ; Monitor for X stall
      if move.axes[0].stalled
        M291 P"X Axis Stall Detected!" R"Warning" S1 T3
        M18 X ; Disable X motor
      

      config.g

      M569 P0 S1 D2         ; Configure driver 0 with stall detection enabled (mode D2)
      M584 X0 Y1 Z2:3:4 E5  ; Axis mapping
      M915 P0 S3 F0 R0      ; Stall detection for driver 0, sensitivity 3, no filtering, no action
      

      Questions:

      1. Is there anything incorrect or missing in this configuration?
      2. Is there a recommended way to test stall detection in a controlled manner?
      3. Should the daemon check be done differently in firmware 3.5.0?

      Additionally, I want to implement stall detection on a Duet 3 MB6HC board. This setup uses:
      -Three stepper motors for Z,
      -Two servos for Y,
      -One servo for X.
      Can stall detection be applied in a similar way for servos, or would I need a different approach?

      Any help would be greatly appreciated. @dc42 @Phaedrux

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

        @R006 said in Stall Detection on Duet 2 WiFi and Duet 3 MB6HC:

        RepRapFirmware 3.5.0-rc2

        The old unsupported 3.5 rc2 or the new in testing 3.6 rc2?

        Z-Bot CoreXY Build | Thingiverse Profile

        R006undefined 1 Reply Last reply Reply Quote 0
        • R006undefined
          R006 @Phaedrux
          last edited by

          @Phaedrux said in Stall Detection on Duet 2 WiFi and Duet 3 MB6HC:

          The old unsupported 3.5 rc2 or the new in testing 3.6 rc2?

          i am testing with this RRF too.

          droftartsundefined 1 Reply Last reply Reply Quote 0
          • droftartsundefined
            droftarts administrators @R006
            last edited by

            @R006 Driver stalls are handled by the Events system in RRF 3.4 and later. Better to use that than daemon.g, which will only run once every 10 seconds. See https://docs.duet3d.com/en/User_manual/RepRapFirmware/Events
            Change your M915 R parameter to R2 to trigger the event. See https://docs.duet3d.com/User_manual/Reference/Gcodes#m915-configure-motor-stall-detection

            Tuning the stall detection is covered by the documentation.

            For servos, I assume you have 6HC with CAN-connected 1XD, connected to the external drivers for the servos. The external drivers usually have an error or alarm pin. See the 'Alarm' section of the configuration examples here https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Expansion_1XD#configuration-examples to set up an IO pin and triggers to detect the alarm.

            Ian

            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

            R006undefined 1 Reply Last reply Reply Quote 0
            • R006undefined
              R006 @droftarts
              last edited by R006

              @droftarts said in Stall Detection on Duet 2 WiFi and Duet 3 MB6HC:

              Change your M915 R parameter to R2 to trigger the event. See https://docs.duet3d.com/User_manual/Reference/Gcodes#m915-configure-motor-stall-detection

              i have try to generating trigger but it's not run while motor is stall.

              For servos, I assume you have 6HC with CAN-connected 1XD, connected to the external drivers for the servos. The external drivers usually have an error or alarm pin. See the 'Alarm' section of the configuration examples here https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Expansion_1XD#configuration-examples to set up an IO pin and triggers to detect the alarm.

              Thanks. i am just conform with.

              droftartsundefined 1 Reply Last reply Reply Quote 0
              • droftartsundefined
                droftarts administrators @R006
                last edited by

                @R006 said in Stall Detection on Duet 2 WiFi and Duet 3 MB6HC:

                i have try to generating trigger but it's not run while motor is stall.

                Have you set up the sys/driver-stall.g macro? Even without this, you should get a message in the console, though motion will continue. If you don't get a stall warning message, adjust the sensitivity; see https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection#stall-detection-sensitivity-m915-s-f-and-h-parameters

                Ian

                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                R006undefined 1 Reply Last reply Reply Quote 0
                • R006undefined
                  R006 @droftarts
                  last edited by

                  @droftarts said in Stall Detection on Duet 2 WiFi and Duet 3 MB6HC:

                  Have you set up the sys/driver-stall.g macro? Even without this, you should get a message in the console, though motion will continue. If you don't get a stall warning message, adjust the sensitivity; see https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection#stall-detection-sensitivity-m915-s-f-and-h-parameters

                  Yes, the driver-stall.g macro is present in my sys folder. I’ve tried setting the sensitivity value from -10 to +64, but stall detection still isn’t working.

                  Recently, I tried testing stall detection for a stepper motor on a tabletop setup using RRF version 3.6.0-rc1. Both daemon.g and driver-stall.g macros are present in my sys folder.
                  Here’s what I did:

                  1. I homed the Z motor using the G92 command.
                  2. Then I moved the Z-axis with the command: G1 Z300 F6000.
                  3. While the motor was moving, I manually held the shaft to simulate a stall.
                    However, no stall was detected — neither daemon.g nor driver-stall.g was triggered.
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA