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

Use of Canbus for stall detection on remote board

Scheduled Pinned Locked Moved
General Discussion
3
10
238
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.
  • undefined
    kj3d
    last edited by 10 Mar 2024, 12:14

    Hi

    Just a quick question when will stall detection be available via canbus satellite boards (In latest full release (3.4.6) it does not appear to be possible. I am trying to get stall detection via a 3HC expansion board connected via canbus. The drive is connected to the 3HC board

    undefined 1 Reply Last reply 10 Mar 2024, 12:45 Reply Quote 0
    • undefined
      droftarts administrators @kj3d
      last edited by 10 Mar 2024, 12:45

      @kj3d should work from RRF 3.4 and later, see https://docs.duet3d.com/User_manual/RepRapFirmware/CAN_limitations#temporary-limitations

      Make sure the expansion board firmware is up to date. Otherwise post your config, responses to M122, commands you are using etc.

      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

      undefined 2 Replies Last reply 10 Mar 2024, 12:50 Reply Quote 0
      • undefined
        kj3d @droftarts
        last edited by kj3d 3 Oct 2024, 12:54 10 Mar 2024, 12:50

        @droftarts

        The extruder is simply to convey filament to the other extruders and its "Load" code is below

        ;Motor stall detection

        ;T2 ; select tool 2
        ;M302 P1 ; enable cold extrusion
        ;G4 S1 ; wait for one second
        ;G4 S1
        ;G1 P1.1 F3000 ; retract a little filament
        ;M400 ; wait for move to finish before changing current

        ;M915 E2 S3 ; set stall sensitivity
        ;M913 E80 ; motor current to 30%
        ;M83 ; relative extrusion
        ;G1 H1 E800 F1000 ; feed up to 800mm until stall
        ;M913 E100 ; restore normal motor current
        ;M302 P0 ; disable cold extrusion
        ;M291 P"Filament Prime complete!" S0 T3 ; display message

        (The lines appear above appear commented out - in the macro they are not)

        1 Reply Last reply Reply Quote 0
        • undefined
          kj3d @droftarts
          last edited by 10 Mar 2024, 12:50

          @droftarts

          m122 b1
          Diagnostics for board 1:
          Duet EXP3HC rev 1.01 or earlier firmware version 3.4.6 (2023-07-21 14:15:46)
          Bootloader ID: not available
          All averaging filters OK
          Never used RAM 158504, free system stack 173 words
          Tasks: Move(notifyWait,0.0%,128) HEAT(notifyWait,0.1%,88) CanAsync(notifyWait,0.0%,69) CanRecv(notifyWait,0.5%,80) CanClock(notifyWait,0.1%,71) TMC(notifyWait,57.0%,99) MAIN(running,32.1%,409) IDLE(ready,0.0%,40) AIN(delaying,10.2%,263), total 100.0%
          Last reset 01:49:18 ago, cause: software
          Last software reset at 2021-08-15 15:42, reason: HardFault bfarValid precise, available RAM 154828, slot 2
          Software reset code 0x0060 HFSR 0x40000000 CFSR 0x00008200 ICSR 0x00000803 BFAR 0x30303051 SP 0x20002fd8 Task MAIN Freestk 350 ok
          Stack: 30303030 20002ff8 00000000 00000000 70707070 00023a09 ffffffff 61000000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0000007c ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
          Driver 0: pos 212040, 684.0 steps/mm,standstill, SG min 0, mspos 344, reads 50872, writes 19 timeouts 0, steps req 212040 done 212040
          Driver 1: pos 0, 684.0 steps/mm,standstill, SG min 0, mspos 8, reads 50875, writes 16 timeouts 0, steps req 0 done 0
          Driver 2: pos 0, 80.0 steps/mm,standstill, SG min 0, mspos 8, reads 50881, writes 11 timeouts 0, steps req 0 done 0
          Moves scheduled 3, completed 3, in progress 0, hiccups 0, step errors 0, maxPrep 24, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0
          Peak sync jitter -3/15, peak Rx sync delay 180, resyncs 0/0, no step interrupt scheduled
          VIN voltage: min 24.0, current 24.0, max 24.0
          V12 voltage: min 12.2, current 12.2, max 12.3
          MCU temperature: min 31.7C, current 32.7C, max 32.7C
          Last sensors broadcast 0x00000000 found 0 28 ticks ago, 0 ordering errs, loop time 0
          CAN messages queued 52504, send timeouts 0, received 321264, lost 0, free buffers 37, min 37, error reg 0
          dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 292, adv 37101/37190

          undefined 1 Reply Last reply 10 Mar 2024, 12:52 Reply Quote 0
          • undefined
            kj3d @kj3d
            last edited by 10 Mar 2024, 12:52

            The error message I get is unable to initiate extruder end stops

            undefined 1 Reply Last reply 10 Mar 2024, 14:08 Reply Quote 0
            • undefined
              dc42 administrators @kj3d
              last edited by 10 Mar 2024, 14:08

              @kj3d to clarify: reporting of stalls from motors attached to expansion boards is supported in 3.4 and later, but stall detect endstops on motors attached to expansion boards are not yet.

              Note, if you want to use the resume-after-power fail functionality then stall detection endstops on axis motors are not suitable, because the trigger point is not consistent enough.

              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

              undefined 1 Reply Last reply 10 Mar 2024, 16:05 Reply Quote 0
              • undefined
                kj3d @dc42
                last edited by kj3d 3 Oct 2024, 16:14 10 Mar 2024, 16:05

                @dc42

                Thanks for that. I was looking to sense when the filament had completed its feed from the feed extruder to the main extruder before that started its load sequence.

                Reporting the stall would be a useful event, but I cant see how to configure that?

                Alternatively monitoring the main extruder during the actual operation of G1 E2000 F1000 controlled by the 3HC board (running the feed extruder) (The main extruder has a filament sensor on it (albeit that's controlled by a tool board) Is it possible to monitor sensors (located on other boards) whilst a G1 command is executing on a distinct and separate canbus board, if so how and do I have any choice on monitoring frequency?

                undefined 1 Reply Last reply 10 Mar 2024, 16:51 Reply Quote 0
                • undefined
                  droftarts administrators @kj3d
                  last edited by 10 Mar 2024, 16:51

                  @kj3d I’m not sure if this will work, but try changing this

                  M915 E2 S3
                  

                  to

                  M915 P1.1 S3
                  

                  Then it should look for the stall of the specific motor, not the endstop.

                  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

                  undefined 1 Reply Last reply 10 Mar 2024, 17:53 Reply Quote 0
                  • undefined
                    kj3d @droftarts
                    last edited by 10 Mar 2024, 17:53

                    @droftarts

                    Thanks Ian, Will try that in the morning and let you know how I got on.

                    undefined 1 Reply Last reply 11 Mar 2024, 17:57 Reply Quote 0
                    • undefined
                      kj3d @kj3d
                      last edited by 11 Mar 2024, 17:57

                      Hi

                      That worked. I can now reliably detect the stall. Ideally I would like to stop the filament feeding when the stall is detected.

                      At present I use G1 E1000 F1000 to feed filament up to a second extruder, how would be best to interrupt the G code part way if a stall is detected if it reaches the second extruder after 900mm (bearing in mind the end stop limitations with the canbus boards)

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