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

    Duet2 Wifi, sensorles homing

    Scheduled Pinned Locked Moved
    General Discussion
    4
    7
    161
    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.
    • mrjoneskodundefined
      mrjoneskod
      last edited by

      Re: Anybody using a Duet board with a Klipper SBC?

      Does anyone know how to enable stall guard or sensorless homing in Klipper when using Duet2 wifi? I have looked around, and what I found so far isn't very promising:

      github.com/Klipper3d/klipper/issues/3298

      Since it works with RRF, I don't see why it can't work with Klipper.

      I can't use RRF because my toolhead uses CAN bus (SB2209). I looked at schematics, 3 different ones for Duet2, but found nothing that isn't in the GitHub post.
      Pin PB5 current doesn't seem to change from the regular 1.5v on stall guard enable, which doesn't trigger the home position.

      Any help appreciated, as I want to avoid the extra wiring, and I don't need the extra precision of endstop switches.

      Thanks!

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

        @mrjoneskod said in Duet2 Wifi, sensorles homing:

        Since it works with RRF, I don't see why it can't work with Klipper.

        You'd have to ask the Klipper folks.

        Z-Bot CoreXY Build | Thingiverse Profile

        mrjoneskodundefined 1 Reply Last reply Reply Quote 0
        • mrjoneskodundefined
          mrjoneskod @Phaedrux
          last edited by

          @Phaedrux Yeah, already did. It seems like Klipper looks for the signal coming from the SG_TST pin, which seems to be PB5 for all steppers.

          I wanted to find out the approach used by RRF so I can try to amend the code and add a PR to Klipper repo.

          I am not very good with electronics, but I am an SWE. So if I understand the mechanism, I think I may be able to add this, solve my problem and help other folks in the same situation as I am.

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

            @mrjoneskod RRF on Duet 2 and Duet 3 6HC boards polls the status of all drivers over SPI at frequent intervals, thereby getting the complete driver status including open load, short circuit, over temperature etc. flags as well as the stall status.

            On Duet 3 Mini it uses the individual DIAG outputs of the drivers to detect stalls instead, because the UART interface to the drivers on that board is much slower.

            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

            mrjoneskodundefined 1 Reply Last reply Reply Quote 0
            • mrjoneskodundefined
              mrjoneskod @dc42
              last edited by

              @dc42 Thanks. Is there anything else you could give to help on this quest? Schematics of the poll and how to read the status for each stepper, for example?

              For now, I downloaded the TMC 2660 docs and will start with that. I appreciate your time. @Phaedrux, thanks as well!.
              If I make any progress, I will post about it here.

              jay_s_ukundefined dc42undefined 2 Replies Last reply Reply Quote 0
              • jay_s_ukundefined
                jay_s_uk @mrjoneskod
                last edited by

                @mrjoneskod AFAIK, klipper doesn't currently support getting sensorless homing status over SPI like RRF does. In which case, that'll all need implementing into klipper

                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
                • dc42undefined
                  dc42 administrators @mrjoneskod
                  last edited by

                  @mrjoneskod you can find the interrupt service routine for SPI transfer to drivers completed at https://github.com/Duet3D/RepRapFirmware/blob/139f16f52cd30a12431bdf5884aee6bc637b26c4/src/Movement/StepperDrivers/TMC2660.cpp#L874. The ISR checks whether a transfer has been completed and if so, reads the status and kicks off another transfer.

                  On boards other than Duet 2 we use a separate FreeRTOS task to poll the drivers, so as to simplify the control flow and do less work in the ISR.

                  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

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