Available memory for kinematics



  • A question maybe especially for @dc42 : I want to try implementing some correction parameters into kinematics like between a stepper and the xy position, to correct stepper position erros. How many memory is available for e.g. a floating point array to hold such correction values, for Duet2 wifi and Duet3? A wish would be for one for every step, so 200 or 400, better would be for microsteps also, but I expect that not so much memory is available. An alternative is storing it as differential values like the TMC chips store ramp up values, so some numbers about storing an integer array would be nice also.

    Please tell me floating point and integer array sizes which are secure, taking into account that future firmware developement will diminish available memory. A rough number is sufficient of course (100, 1000, 100000?)


  • administrators

    You can find out how much free RAM you have on a Duet by running M122 and looking for the "Never used RAM" in the report.

    My Kossel (Duet WiFi, 3 axes, single extrusion) has about 8.5Kb and my tool changer (Duet 3, 4 axes, 3 extruders and 3 tools) has nearly 75Kb.



  • @dc42 ok thank you, I'll take this as a reference.



  • I'm curious what you mean here. You want to correct stepper position errors by commanding the stepper to a different spot? Basically, you want to create a "correction grid" to compensate for errors in positions at specific spots?

    But, if the error is from the stepper's error (ie, within 5% tolerance) how will you correct the error? Sending a few step pulses extra? That doesn't seem to me to correct for stepper error, but other positional errors due to mechanics.



  • @bot basically yes, that was the idea. If I target xy 100,100 e.g. and know that it's not stepper positon 45° but 5 microsteps right of it, I could correct that. And it's not 5% wrong, because I measured the specific stepper exactly. But it is only an idea now and I don't know whether it's worth it. Other possibilities like correcting uneven tooth distribution of GT2 belts or odd (ogging) wheels may be better examples. The parameter array could be filled by G-Code on-the-fly, which makes a nice testing scenario (a print with different settings e.g.). But the first challenge is to first measure everything exactly.



  • @JoergS5 right, I get what you mean. I think it's impossible to correct for "stepper error" by commanding the stepper to a different position. You're essentially just rounding off microstepping. Reducing microstepping might help you there.

    But I agree, you could have some luck correcting position for other mechanical errors, as long as they are within your stepper motor's reliable resolution.

    This is like ballscrew compensation for CNC machines: they map the error of the screw at certain points, and then correct it in the logic somewhere.



  • @bot Another topic what I miss in the firmware is backlash compensation. I thought about to add steps when a stepper changes direction (there is a single place in the code where direction changes), but I expect that the timings of all axes will not match then. So I try to find constructions which avoid backlash.

    Microstepping: I often forget that they are very inaccurate (primarily used to reduce noise/vibration), so you will be right.



  • @JoergS5 With microstepping, the more you microstep, the worse each microstep gets. By that I mean, 16x microstepping has "weaker" microstep holding torque than 8x microstepping, and 8x is "weaker" than 4x. (To a very small degree).

    So, if you find that your steppers can not reliably hit their target position with 16x microstepping, you could try 8x microstepping.

    I could imagine there is a point right on the threshold of reliability, where 8x microstepping will actually improve your overall repeatability compared to 16x microstepping, if with 16x there was just not quite enough power to hit the 1/8th position, or even 1/4 position while 16x is enabled.

    I heard once, and use for reference in my mind, that 1/4 microstepping position is the most we should ever consider to be accurate. That is to say, ignore the 1/8th and 1/6th positions, because they will likely never reliably hit their marks. However, running 4x microstepping is loud and annoying.



  • @bot Thank you, I will try your information.


Log in to reply