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

    Do any Duet3D boards monitor the motor current ?

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    10
    20
    962
    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.
    • zaptaundefined
      zapta @cnd
      last edited by

      Can current monitoring detect air spaghetti? How is it done?

      1 Reply Last reply Reply Quote 0
      • A Former User?
        A Former User
        last edited by

        No, from the motor drivers perspective printing in air and printing properly looks the same. You might be able to use the load angle feature that stall guard uses to detect a collision but thats about it, and likely not very reliable.

        1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal
          last edited by

          This is a great philosophic ambition... but... Duet firmware can only do what the silicon in the driver chips allow, the feedback they give.

          TMC drivers do not directly report current. They do attempt to detect a full stall, based on some settable parameters in certain registers and they report back if they detect a stall.

          But... unless the XY movements actually hit something, you are not going to get a stall. And "air print" vs. "good print" has extremely small effect on XY or Extruder physical loading, and therefore that same small effect on current. The "air" v "good" 'signal' is more than overwhelmed by the 'noise' of other sources of variation.

          So Duet really doesn't have the choice to add this feature. At least not with Trinamic driver chips.

          Delta / Kossel printer fanatic

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

            @cnd said in Do any Duet3D boards monitor the motor current ?:

            My "pet hate" is dumb controller boards that ignore important data - like the current that is feeding into each phase of stepper motors.

            In normal mode the stepper drivers feed constant current into the motor. So they already measure the current - so that they can regulate it to match the current to asked for in your M906 command.

            The quantity that changes with motor load is the phase of the back emf of the motor compared to the current. The TMC2660 drivers on Duet WiFi/Ethernet, and also the TMC5160 and TMC2209 drivers used on Duet 3, measure that phase difference and express it as a number between zero (heavy load) and 1023 (light load). You can see the minimum and maximum recorded values of that number for each driver in the M122 report. These drivers can also use that number to trigger a stall warning. See the M915 command in the GCode wiki page.

            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

            gtj0undefined 1 Reply Last reply Reply Quote 1
            • gtj0undefined
              gtj0 @dc42
              last edited by

              @dc42 Would it be possible to get the load values placed into the object model? They might be useful when designing/tuning kinematics.

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

                @gtj0 said in Do any Duet3D boards monitor the motor current ?:

                @dc42 Would it be possible to get the load values placed into the object model? They might be useful when designing/tuning kinematics.

                Yes I can add them the min/max recorded the OM, that's the easy bit. But I presume you will need some way of resetting them 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

                gtj0undefined 1 Reply Last reply Reply Quote 0
                • gtj0undefined
                  gtj0 @dc42
                  last edited by

                  @dc42 said in Do any Duet3D boards monitor the motor current ?:

                  @gtj0 said in Do any Duet3D boards monitor the motor current ?:

                  @dc42 Would it be possible to get the load values placed into the object model? They might be useful when designing/tuning kinematics.

                  Yes I can add them the min/max recorded the OM, that's the easy bit. But I presume you will need some way of resetting them too.

                  Actually I was thinking of the last reported as well as the min/max but I'm not sure how the drivers report it and whether it's reasonable to include it.

                  1 Reply Last reply Reply Quote 0
                  • zaptaundefined
                    zapta @cnd
                    last edited by

                    @cnd said in Do any Duet3D boards monitor the motor current ?:

                    the head typically flounders in print spaghetti

                    For detecting air print and other irregularities, a camera with a machine learning algorithm is more pro-missing. E.g. https://www.thespaghettidetective.com/

                    We just need to have a community driven open source one.

                    Danalundefined arhiundefined 2 Replies Last reply Reply Quote 2
                    • Danalundefined
                      Danal @zapta
                      last edited by

                      @zapta said in Do any Duet3D boards monitor the motor current ?:

                      @cnd said in Do any Duet3D boards monitor the motor current ?:

                      the head typically flounders in print spaghetti

                      For detecting air print and other irregularities, a camera with a machine learning algorithm is more pro-missing. E.g. https://www.thespaghettidetective.com/

                      We just need to have a community driven open source one.

                      Wow, that fee service is going to be commoditized out very quickly. Just a year or two ago, trainable machine vision required $500 to $1000 to hundreds of thousands of USD per instance in hardware. Today, trainable machine vision runs absolutely fine on a Pi4.

                      Wow.

                      Stitching together the software is (almost) trivia. Somebody want to attack the training? Maybe a group of us here?

                      Delta / Kossel printer fanatic

                      arhiundefined 1 Reply Last reply Reply Quote 0
                      • arhiundefined
                        arhi @Danal
                        last edited by

                        @Danal I'm using TSD for a while, only I'm using "self hosted" version as a bunch of stuff I make is protected and I cannot allow images to leave the house. It works like a charm. I download from time to time new version with new data for the ML. Not sure if it's worth training yourself.

                        1 Reply Last reply Reply Quote 0
                        • arhiundefined
                          arhi @zapta
                          last edited by

                          @zapta said in Do any Duet3D boards monitor the motor current ?:

                          We just need to have a community driven open source one.

                          Not sure I follow, TSD is already open source?

                          zaptaundefined 1 Reply Last reply Reply Quote 0
                          • tenajaundefined
                            tenaja @cnd
                            last edited by

                            @cnd said in Do any Duet3D boards monitor the motor current ?:

                            My "pet hate" is dumb controller boards that ignore important data - like the current that is feeding into each phase of stepper motors.

                            Without making that data available to the firmware, the best any board without this could ever be is "dumb".

                            For example - when an FDM print fails badly, the head typically flounders in print spaghetti - which is totally detectable by anything that monitors the instantaneous current of the step phases. Which, as best I can tell, nothing does?

                            Same for milling when the bit gets blunt. Same for SLA and DLP when the print separates from the platform and the plunger lowers onto it... I can't think of any situation where it's not valuable to know when the behavior of the steppers suddenly changes mid-print for no apparent reason - it's always valuable info.

                            So yeah - my question - do any Duet3D boards expose this info?

                            If not - PLEASE add it to your upcoming features list...

                            Chris.

                            Chris, do not confuse the operation of a stepper drive with that of a brushed or brushless motor drive.

                            With a stepper motor, YOU set the current, and it remains there until YOU change it. (Possible exception being reduced current at rest, although this is also usually a setting.) Stepper drives do not compensate when extra or reduced current is needed, the way a brushless motor driver does... It either successfully makes the step at your current setting, or it doesn't. (And, as said above, the duet driver chips can detect that.)

                            1 Reply Last reply Reply Quote 0
                            • zaptaundefined
                              zapta @arhi
                              last edited by

                              @arhi said in Do any Duet3D boards monitor the motor current ?:

                              Not sure I follow, TSD is already open source?

                              You are right, it has an open source link at the bottom of the page. Kind of hidden compared to the paid plans.

                              arhiundefined 1 Reply Last reply Reply Quote 0
                              • arhiundefined
                                arhi @zapta
                                last edited by

                                @zapta I use it self hosted. Got a lot of help from the guy's making it to setup the thing locally. They are not hiding anything. The only thing is, the "self hosted" version does not automatically learn from the prints while hosted version, after the print you tick that it was a good print or not or and it will use that to learn.

                                I know someone on octoprint forum was trying to tweak the ML model so that it is smaller and simpler to use so that the whole thing could be hosted directly on the PI. Don't know what happened to those efforts, I don't know about ML not nearly as I would like so did not look at the code myself.

                                Baenwortundefined 1 Reply Last reply Reply Quote 0
                                • Baenwortundefined
                                  Baenwort @arhi
                                  last edited by

                                  @arhi how do you trigger the Duet to stop printing when Spaghetti Detective finds a problem?

                                  I've got a Jetsen Bank that isn't being used (was mentioned to be the new heart of a PS2 replacement for my wife but her parents got her a retrocade before I completed) and am thinking of using it for Spaghetti Detective but I haven't figured out how to stop the print.

                                  A Former User? arhiundefined 2 Replies Last reply Reply Quote 0
                                  • A Former User?
                                    A Former User @Baenwort
                                    last edited by

                                    @Baenwort having a separate host monitor Spaghetti Detective and sending the Duet a HTTP request to pause the print might be the way to go.

                                    or if you host it yourself, the same host could be used i guess.

                                    Baenwortundefined 1 Reply Last reply Reply Quote 0
                                    • Baenwortundefined
                                      Baenwort @A Former User
                                      last edited by

                                      @bearer I am hosting myself (or plan to) but was asking what he has done that works.

                                      1 Reply Last reply Reply Quote 0
                                      • arhiundefined
                                        arhi @Baenwort
                                        last edited by

                                        @Baenwort said in Do any Duet3D boards monitor the motor current ?:

                                        @arhi how do you trigger the Duet to stop printing when Spaghetti Detective finds a problem?

                                        No, I do not have that on any of the printers (with or without octoprint), I just send me an email that there's a problem so I check manually what's up... I started making some weird "duet monitor" app that sends screens to TSD, creates dual camera timelapse and works as a telegram bot but I got sidetracked on other project so it sits there not working with just basic functionality, and also 5 out of 5 printers are non functional since few weeks ago 😞 .. and I can't get time to get at least one back to function, let alone work on that system... if I ever get it to a "working" state I'll push it to gitlab or github but till then...

                                        I haven't figured out how to stop the print.

                                        look at danal's api, if you are using python it should be super easy.
                                        I started porting everything to go but I'm still at bare beginnings so none of the work I did so far is really useful.

                                        you can also send g-code via curl to pause print

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