I'm still working on calibrating my kossel mini. Because I'm mechanically very lazy I rather prefer writing code to auto calibrate it instead of adjusting parameters iteratively (although I seem to enjoy posting about ideas even more than actually implementing them). So the idea is to use the inverse kinematic formula for a printer and correlate physical positions with the position of the stepper motors relative to the homing position. For a delta printer (or lisa) this should work very nice, simply probe 13 points on your print bed, throw in the stepper motor positions and use non linear programming / numerical optimization to find the unknown variables.

Someone else had this idea first and implemented this in a maxima worksheet (algebraic math package). It's all explained in the worksheet.

https://github.com/hercek/Marlin/blob/M ... ration.wxm

I simply ported it to c using an LBFGS library (I really don't have a clue how it works lol)

https://github.com/DejayRezme/DeltaAutoCalibration

The formula for delta inverse kinematic on Z=0 is this:

- Code: Select all
`A : (x-xa)^2 + (y-ya)^2 + (ta+α)^2 - r^2 = 0 $`

B : (x-xb)^2 + (y-yb)^2 + (tb+β)^2 - r^2 = 0 $

C : (x-xc)^2 + (y-yc)^2 + (tc+γ)^2 - r^2 = 0 $

If you eliminate x and y you can use that as an error function (sum over multiple probed points), that should be 0 if your rod length and delta radius is correct (please refer to the maxima worksheet comments). So if you plug in the wrong parameters into the error function it doesn't resolve to 0 for all points but you can use the derivative of the function to see in which direction you have to tweak the parameters to minimize / reduce the error. The LBFGS algorithm does that for you. It runs very fast on a PC. For delta this is especially nice because you only need to use a Z probe and sample enough points and you can calibrate all three axis dimensionally correct.

For wally, you'd first have to use different formula and create a different error function of course.

Also you'd probably have to print or draw cubes at various positions and measure the width / depth at different positions. The simplest math case would be to use a pen to draw an X/Y print with approximate values, measure the X/Y positions of the cross sections (they should be warped) and throw them into the error function. I don't know the formulas or how to set it up exactly.

Maybe this is a nice math homework for Nicholas students?

I'm pretty sure this will work for deltas / lisa / gus (but not 100% sure), it might not be mathematically feasible for polar / scara arms. I'm not really that good at math, just wanted to share the general idea

PS: For windows, best use the version of the maxima worksheet in my repo because the original has problems loading with character encodings for α,β,γ