Do any Duet3D boards monitor the motor current ?
-
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.
-
@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.
-
@dc42 Would it be possible to get the load values placed into the object model? They might be useful when designing/tuning kinematics.
-
@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.
-
@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.
-
@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.
-
@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?
-
@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.
-
@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?
-
@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.)
-
@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.
-
@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.
-
@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.
-
@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.
-
@bearer I am hosting myself (or plan to) but was asking what he has done that works.
-
@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