Printer characterization. Looking for feedback and inputs
-
I'm starting to work on a macro to help characterize my printer. I designed and built my own printer and my engineer's sense of certainty has not been satisfied with "seems to work OK" for lots of stuff, but right now I'm working on max acceleration limits for the X and Y motors. Thought I'd share what I'm working on and see if people want to dissuade me from doing anything, or point me in a better direction.
My plan is to create a macro that will aid in a search for the "max acceleration before motor skipping". The core will be a binary search, aided by the user (me). The macro will set an acceleration limit (with high max speed to allow a long run at max acceleration, and a high jerk limit to make all the starting steps happen at max acceleration), attempt a 100mm move, then ask the user if the motor skipped steps. If yes, decrease the max acceleration and try again, in no, increase it. When the threshold is found, I'll write the data to a file.
Just because I'm an engineer, I'll wrap this core process in a couple of other loops. One loop will vary the direction of the line so I can measure at 0,45,90, and 135 degrees. With my CoreXY, this will give me minimum mass (0 degrees), max mass (90 degrees), and each motor as the sole motive force.
The other loop will vary the max motor currents from 10% of max to 80% of max.
With all the data I should be able to draw graphs that will give me a very good estimation of the max acceleration as a function of motor current. This can be my outer bound for the X and Y acceleration limits. I may decide to set them lower for print quality, but I'll know not to set them higher. With a bit of math, I might also be able to estimate the mass of the print head and gantry (why use a scale when you can write a macro?)
I'm contemplating a further loop to look at the relationship of all this to microstep setting. And at this point there will be too many of the core binary searches for me to want to assist with all of them. So I'm thinking about how to sense motor skips and wondering if anyone has suggestions for connecting a rotary encoder to the Duet3. I would not be trying for precision encoding, just a coarse answering of the question - did it move 100mm?. I'm thinking a cheapo encoder like this (https://www.amazon.com/Taiss-KY-040-Encoder-15×16-5-Arduino/dp/B07F26CT6B) fitted to a geared idler could monitor belt movement. But I'm not sure where I'd connect it or how a macro would read the data.
Any guidance?