Maslow accuracy - simplification proposal

Gentleman,
I am working on my second build of Maslow and trying to introduce best practices from our forum. My focus is on sources of errors and how to make Maslow as accurate as it is precise as my projects are always rescaled: sometimes 2 to 5mm for parts 500mm long. Thank you @dlang, @madgrizzle, @c0depr1sm and others for fantastic discussion in “List of sources of error”.
One thing strikes me: as @c0depr1sm illustrates our model upon which calculations are based is strongly non linear - introducing corrections do not removes nonlinearities - it makes math more complicated. Every machine have its own set of corrections.
When g-code sends coordinates for the next point where router bit should be, we are calculating what the length of left chain L should be and length of the right chain R should be and translating it into sprocket rotation. Calculations formula uses nonlinear model - model in not perfect - router bit is not in the position where it should be.

Here is my line of thinking:
Length L and length R is smooth and monotonic function of [x, y] position. If I can find precise length of chain for several [x, y] points I can fit a surface to this points. That surface will later on give me length in any other point.

Step 1. Draw X axis and Y axis on the surface of Maslow, mark non uniform grid - at points with coordinates like this in mm:

[0,1200] [400,1200] [800, 1200] [1200,1200] [1600,1200] [2000,1200] [2400,1200]

[0, 800] [400, 800] [800, 800] [1200, 800] [1600, 800] [2000, 800] [2400, 800]

[0, 400] [400, 400] [800, 400] [1200, 400] [1600, 400] [2000, 400] [2400, 400]

[0, 0] [400, 0] [800, 0] [1200, 0] [1600, 0] [2000, 0] [2400, 0]

Step 2. Move bit near [0,0], measure x, measure y and count number of chain links to the left sprocket and to the right sprocket - correct by fraction of link if necessary(famous 12:00) - get length in mm. (At this point I am assuming that chain is attached to sled at fixed points A and B).

Repeat for all points on the grid.

As result, three matrices [xi, yi], [Li] and [Ri] are created - in other word we sampled two surfaces L=f(x, y) and R=f(x, y) (it should be mirror image of each other)

Step 3. Record measurement in Ground Control which creates interpolated functions interpL and interpR. Routine can be written in scipy:

from scipy import interpolate
***define grid

x, y=grid[xij, yij]

***generate spline fitted surface

tckL= interpolate.bisplrep(x, y, Lij, s=0)

tskR= interpolate.bisplrep(x, y, Rij, s=0)

***read line of g code - eg. G1 X200 Y100

200  100

***calculate length of chain

L = interpolate.bisplev( 200, 100, tckL)
R = interpolate.bisplev( 200, 100, tckR)

Step 4. Pass L and R to execute

As long as mass of sled is constant and line AB is horizontal, interpolated surface L and R will contain all nonlinearities of our machine. Moreover, it maybe universal for all machines as long as weight of sled will be the same, points where chain is attached and spread of sprockets will be the same. Accuracy will only depend on precision of x, y and chain length measurements. Accuracy will deteriorate as chain will creep over time.

Python gives other options to interpolate our surfaces. I am not a Python coder but quick look to documentation shows that we can use ‘grid’ and ‘griddata’ or ‘LSQBivariateSpline’

I simulated surface and interpolation in Matlab to find possible accuracy.
Surface is arbitrary cos - sin function calibrated to get length in mm similar to Maslow

z=(2 * cos((xx/4800)*pi) - sin((yy/4800)*pi)+0.8)*1000;

and z is defined on the grid:

x = [0 400 800 1200 1600 2000 2400];
y=[0; 300; 600; 900; 1200];
[xx,yy]=meshgrid(x,y);

Surface representing right chain length R is illustrated above and have 7 x 5 points.
Spline interpolation finds R length in let say 100 200 point:

zi=interp2(x, y, z, 100, 200, ‘spline’)

Difference between function value and interpolated value at 100, 200 is

-0.23mm for R=2665.4mm

which is -0.009% - very promising! Router bit position error will be different as we have to take into account dL, dR and cos of the angle between L and R: something like

delta = (dL+dR)*cos(LR-angle) - it will be in range 0.2mm - I think :wink:

Proposed method simplify math and should be easy to implement into Ground Control. It also opens opportunity to simplify mechanic - we do not need ring and bearings anymore, no worries about coaxial bit. We may have one calibration for all machines with the same sprocket spread, sled weight, and chain attachment.

What do you think?

2 Likes

There are people working on this, but one problem is where do you get the
accurate marks on the maslow over those distances?

look for the thread on optical calibration

David Lang

1 Like

Hi @TomD,
Your proposal covers quite some ground and contains several interesting assumptions.

Now I have worked thoroughly the maths and firmware experiments around chain length calculation and I can say:

  • it is easy to compute the sled position to achieve less that 1.5mm over the workspace.
  • the residual error varies slowly and closer points will show smaller errors
  • positioning the sled is one thing, keeping it in the right spot when routing is a different task. (for the later, read on later in the post)

One important assumption:

We could place the bit “near” each “known” location on the workspace, then “measure chain length”. Placing the sled in the right spot requires a known good target to something in the order of 0.1 mm accuracy, and a tool to get a close view of the bit over the workspace to get it aligned with a target. Then finding chain length involves chain pitch variations and chain stretch. (Counting links will not yield chain length).

A second assumption:

Positioning the bit at the right place would allow cutting accurate parts. When the bit touches the material, side forces will be applied to the bit and to the sled. To keep the bit in the right position, mechanics must maintain forces equilibrium. And there you need something like:

  • a triangular link
  • 11.5 feet or more top beam to reduce dangling sled cases in lower corners.
  • designing routing paths to allow some deflection then accurate finishing passes

Now it would be great to ease even more those assumptions. :slight_smile: (ideas welcome)

“Home Made” is a value.

Each Maslow frame is unique. And that is good because Maslownians makers can do the best with what they have at hand. And it is possible to tune a Maslow with minimal work and to make it cut usefull straight parts.

One achievement of the MaslowCNC is to provide a solution that works with simple measurement tools. (Yet if you want to CNC very accurate parts, you’ll likely need a 6 inch caliper. But that is a general precision CNC machining requirement)

I say “achievement”, yes, because we are at the stage of firmware improvements integrating the latest findings in a beta test. Then finalizing integration with simple working instructions.

So why the oval circles?

Up to recently, something was misunderstood., and something was missing:

A) Maslow realy has only a few important parameters, and among that there is only one needing help: Chain tolerances. This parameter describes chains link real average pitch. Misadjusted, it can warp the workspace in a unique way.

B) Also, there was one parameter missing into the MaslowCNC control to provide Chain stretch compensation. That is because steel is elastic and it contributes to center top vertical scale error. But it is easy to find and generalize for a chain type like the RS25 used into MalowCNC. (Despite it was missing, the easy fix was to exagerate left-right motor distance to pull up the center top workspace and reduce somewhat the vertical distortion.)

For both of these items, the Holey Calibration topic resulted into a beta version to address both issues and improve the workspace scale precision and uniformity.

I personnaly went through a parallel firmware development effort and came to the same conclusions, achieving the Zipper Tree Challenge.

So my position is the following:

  • With the Holey Calibration, the MaslowCNC control is progressing quite well. And trying it would be a baseline to estimate what will soon be the current user experience. (Considering GroundControl can also automate some steps).

  • Each mechanical phenomenon involved in chain length calculation is simple to model. I also found that the chain sag compensation factor is a sufficiently precise estimation of the catenary equation, but requires some (easy) tuning.

  • Overall, mathematics into the MaslowCNC are actually well encapsulated and the specific chain length calculations fit in less than 100 lines of code (for the triangularInverse model) into the file Kinematics.cpp.

  • With that the latest parameters set, you can repeatedly reach below 1.5 mm error over the range.

  • For those who want to get near 0.5mm error over the range, I could share my approach in a cooperative way in a new “High Precision Cutting” Maslow forum category.

Regards :slight_smile:

5 Likes

Great stuff! Thank you @c0depr1sm ;-))
It looks that I am underestimating dynamic forces and key issue of precise measurement on the distance of 2 - 2.5m.
I like your point of “Home made” value and waiting for next version of firmware
Cheers
TomD

1 Like

Hi c0depr1sm,
I think that with simple calliper modification we can measure position of bit within 0.2mm precision - take a look at my picture and you will fill the dots.
I dive deeper into firmware and Ground Control code but I cannot figure it out where do you record number of pulses for given gcode command (I am lousy coder :blush:). When I discussed with my neighbour, my approach to encompass all non linearities of Maslow into calibration surface, Greg (his name), pointed to me that we do not have to measure length of chain - we have motor with encoder and all calculations ends up with the number of pulses to move router bit anyhow. My L = f(x,y) and R = f(x,y) should be in “number of pulses” not in milimeters.
Calibration process should involve moving router near point of my grid using Ground Control buttons ; measuring Xi and Yi and recording number of steps.
Which variable holds that value?
There are no need to calculate length of chain when we know that for given x,y we need N and M pulses for left and right motor.
Such approach maybe a significant simplification of mechanics and software and accuracy will go closer to 0.5mm rather 1.5mm .
Where in the code those values are held?
Regards :sweat_smile:

1 Like

The encodersteps combined with the number of teeth on the sprocket and the link
size determine how many steps per inch of chain that you let out.

how much chain you need to let out to get to a given position is the hard part.
That’s where the chanin stretch and sag calculations come into play.

There is no simple X number of steps per in for the x axis, Y number of steps
per in for the Y axis.

measuring with a caliper works over the distance of the caliper (however, check
what you are measuring, if it’s a hole, is the size of the bit really what you
think it is?, etc), but if you have to measure multiple times your error adds up
fast, ± 0.2mm sounds good, until you measure 5 times and your error is now ±
1mm

remember, we have to cover a 4ft x 8 ft area, the errors are very different in
the bottom corners than the top center.

David Lang

Dave,
The whole beauty of my method is that I do not have to know link size, number of sprocket etc. All what I need to know is how many pulses I send to the Left and to the Right, and measure where bit is. I am moving bit to the next point and repeat procedure - I am “sampling” all my working space with sparse, non evenly spread points; let say 16 of them. When I need to send router bit to particular point (gcode command) software interpolate how many steps are needed to get there. Good analogy is “treasure hunt” :face_with_raised_eyebrow: - “go 20 steps forward and three steps left and you will find your treasure” - do you care how tall are you or which size of shoes you are wearing? Do you care if terrain is up hill or down hill? :laughing:
All non linearities of the machine, all sources of errors are included in the shape of sampled functions L = f(x,y) and R = f(x,y) - see my original post. In original post I assumed that L and R will be in units of mm. Wrong - it should be in number of pulses send to motors! Which we are monitoring as motors has encoders!:open_mouth:
Now the measurements. I modified callipers by replacing ruler with measure tape (see picture). Measure tape has accuracy ±0.5mm. A vernier gives me ±0.05mm - one order of magnitude better. I have to mark my X= 0 line and Y = 0 line: two pieces of c beam 15x15 mm aluminum will do it (making sure that they are perpendicular is easy task). One end of tapes goes on the router bit and vernier slides to the “0 line” and in theory I can measure 2400mm ± 0.05mm. It means that my first significant digit (without error) is 0.1mm . It is safe to claim measurement accuracy at 2x0.1=0.2mm
Interpolation: estimation of spline interpolation error (see post) gives us 0.23mm uncertinty. We have 0.2mm uncertinty in X and 0.2mm in Y from measurements - the same order of magnitude. The bit end will be within the square 0.23mm x 0.23mm and maximum error (corner of that square) is 0.325mm.
Thats the limit of accuracy with interpolation method - in theory.
Realistically? … we should be able to achieve +/-0.5mm in every point of working space!!! :joy:
Tomasz

Dave,B
The whole beauty of my method is that I do not have to know link size, number of sprocket etc. All what I need to know is how many pulses I send to the Left and to the Right, and measure where bit is. I am moving bit to the next point and repeat procedure - I am “sampling” all my working space with sparse, non evenly spread points; let say 16 of them. When I need to send router bit to particular point (gcode command) software interpolate how many steps are needed to get there. Good analogy is “treasure hunt” :face_with_raised_eyebrow: - “go 20 steps forward and three steps left and you will find your treasure” - do you care how tall are you or which size of shoes you are wearing? Do you care if terrain is up hill or down hill? :laughing:
All non linearities of the machine, all sources of errors are included in the shape of sampled functions L = f(x,y) and R = f(x,y)

the difficulty is how to accurately determin those two functions, which are
going to be different for every machine that’s built (similar in some cases, but
minor differences is motor mounts will make the functions different)

  • see my original post. In original post I assumed that L and R will be in
    units of mm. Wrong - it should be in number of pulses send to motors!

currently position is measured in mm of chain, not encoder pulses (encoder
pulses are captured at a lower level, but not accessable to the user and Ground
Control at this point)

right now, a default machine has ~8000 pulses per rev, or about 0.008mm of chain
per encoder step

Now the measurements. I modified callipers by replacing ruler with measure tape (see picture).

apologies, I tend to read and reply via e-mail using a client that doesn’t show
images, I don’t always notice that they are there.

Measure tape has accuracy ±0.5mm. A vernier gives me ±0.05mm - one order of
magnitude better.

ahh, going to the forum via a browser I see what you have. Where do you get
calipers that fit a tape measure like that?

I have to mark my X= 0 line and Y = 0 line: two pieces of c beam 15x15 mm
aluminum will do it (making sure that they are perpendicular is easy task).

note that these need to be aligned with the actual centerline of the machine (as
defined by the motor mounts).

One end of tapes goes on the router bit and vernier slides to the “0 line” and
in theory I can measure 2400mm ± 0.05mm. It means that my first significant
digit (without error) is 0.1mm . It is safe to claim measurement accuracy at
2x0.1=0.2mm Interpolation: estimation of spline interpolation error (see post)
gives us 0.23mm uncertinty. We have 0.2mm uncertinty in X and 0.2mm in Y from
measurements - the same order of magnitude. The bit end will be within the
square 0.23mm x 0.23mm and maximum error (corner of that square) is 0.325mm.
Thats the limit of accuracy with interpolation method - in theory.

have you gone through the optical calibration thread? they put a camera in
place of the router bit and got a printed grid to move around until they see the
point of the grid. The camera has better theoretical accruacy (but you have to
wonder the accuracy of the pre-printed grid :slight_smile: )

That thread also has links to the code to compute the L() and R() functions
based on the measured coordinates. That would be very similar to the code you
need.

how many measurements do you plan to make?

Realistically? … we should be able to achieve +/-0.5mm in every point of working space!!! :joy:

reports are that the holey calibration fork is getting that accuracy with FAR
fewer measurements.

David Lang

Well, Holey can get to 1.5mm over the workspace with 12 measurements because it calibrates chain tolerances and includes chain stretch and sag.

SImply put, once Holey Triangular calibration will be mainstream, we’ll get on the next step: high accuracy MaslowCNC using correction grid values.

That is what I did actually: To acheive 0.5mm accuracy, I added a corection grid of measured position error values above the initial results of a well calibrated chain length computation model. And in that way, I would say @TomD 's “surper tape” application idea is partly implemented with a firmware version listed at the end of the post here, and using tape measures between a 3row x5 collumn grid of CNC marks, and a top beam contact surface for vertical position like item d here.

Improving the tape with the Caliper is a very interesting step!

To load a correction grid, I created a new B code that I send using a GroundControl Macro once after power up. See example here

Finally, when I used the Holey triangular calibration on it, the optimization tool basically reported I had optimal parameters. So I got the following comment on the Holey Triangular Calibration topic.

1 Like

@TomD The caliper trick is awesome! :astonished:
When I measured for the Holey Calibration, I used a machinist ruler lined up with the tick marks on the tape and then just push the tape slightly to reveal the edge of the holes.

1 Like

With these two updates, we can achieve quite a bit better precision in our measurements. When I did Holey Calibration, I am pretty sure my measurements were the limitation of the calibration.

I know @madgrizzle has been working on this for a while. However, I am not sure this is such an obvious next step. Here are my points:

  • When you consider the statistical nature of this problem, a large number of measurements works in your favor when dealing with measurement errors, because the standard deviation of a population of measurements is less than the standard error of any single measurement.
  • With Holey Calibration, 12 measurements are made. However, only 4 parameters are calibrated. In reality, the 12th measurement is only used to determine the y-offset, which is independent of the other 3 parameters. So, 11 measurements are used to calibrate 3 parameters. That is almost a 4 to 1 ratio. That is like taking a measurement 4 times, and using the average of the 4 as your value.
  • The errors that you see from the Holey Calibration are mostly a representation of the measurement error, and the calibration accuracy (statistically speaking) should be quite a bit better than those errors.
  • Even though Holey Calibration makes such a small change to the parameters, those changes are meaningful. For example, you measure the distance between motors as 3600 mm, and after calibration it ends up being 3601 mm. One could assess this difference as meaningless. However, these small of changes represent the level of accuracy we are achieving with the calibration, which is quite a bit higher than we typically achieve during normal work.
  • The accuracy achieved by @madgrizzle’s optical calibration, I think, is on the order of 1 to 1.5 mm. The inaccuracy comes from several sources: the measurement of the position of each individual point on the worksurface; and the inaccuracy of the position of the points on the printed template. Right now, I think Holey Calibration is better. I believe this will improve, but we shouldn’t jump to the next solution before establishing the capability of the current.

Hi @Joshua - I agree with your point of view and would like to reiterate your last statement: “we shouldn’t jump to the next solution before establishing the capability of the current.” If Holey Calibration will not get us into 0.2mm accuracy then we should try something else.

.2mm is approaching the accuracy of a rigid metal gantry table, is that obtainable for a wood framed CNC machine?

Don’t most wood working plans work within 1/32" or .8mm? I’ve seen high end table saw fences marked at that accuracy.

IMHO, I think most folks here would be thrilled if their Maslow was accurate to 1/64" or .4mm and squared up. At that accuracy fine inlay work would be possible. I could be wrong, but that’s my 2 cents.

2 Likes

I agree. I would certainly not try to get anything beyond that if I were able to reliably get that kind of accuracy, but there may be people who need more accuracy, there may be people who want more accuracy, and there may be people who just want to see how good it can possibly be.

Your point about the wood frame is a good one, but there are also plenty of metal and hybrid frames out there that are more rigid. And certainly, the only part of the frame that needs to be rigid is the beam holding the motor connections. As long as those don’t move relative to the work surface, then the machine can be considered rigid, and accomplishing a rigid beam is easily surmountable at a modest cost with both wood and metal.

I don’t think you are trying to say that the efforts to increase accuracy are wasted, but perhaps are saying that not achieving 0.2mm is not a failure?

2 Likes

@Keith, Yes, thank you. I applaud all efforts to increase the accuracy of the Maslow and it’s great to see people making an effort again in improving the firmware and GroundControl.

Maybe I misunderstood @TomD 's comment, but anything that moves the needle in the right direction in accuracy is worth pursuing in my book. With my rebuilt frame and superstrut top beam and running Holey Calibration, I measured at least 1/32" accuracy and cut true squares and round circles.

I was not able to obtain that with my previous frame. But I was still able to complete some simple projects and I was more like .8mm off and out of round!

2 Likes

Maybe I said too much. This is the accuracy of the calibration. It doesn’t take into account, for example, the amount of deflection from the forces of the bit cutting through the wood. It doesn’t take into account the potential drift of calibration caused by shrinking or swelling of the wood beam, due to water adsorption. It doesn’t take into account the precision (or lack thereof) of the motor PID controller. Also, it doesn’t account for potential drift over time due to missed-pulses from the motor encoder.

Stepping back. I do believe the calibration can achieve a 0.2 mm accuracy. However, due to other factors outside of the calibration, this accuracy may not be achieved during real cutting operations.

1 Like

@Joshua, thanks for breaking it down. My take away from this is:

0.2mm Accuracy in calibration is possible.
(0.2mm * x) Repeatability in cutting will be some multiple of this depending on your frame and environment, tool path settings.

1 Like

Guys! I apologise for stirring this discussion but we should abandon idea of tape with vernier.
Read this:

and my respond

There are varying classes of tape measures.
if you have a Class I tape measure, then you are probably good with the caliper method.
(max deviation is ±1.1mm over a 10m length)
Unfortunately, most tape measures are class II (±2.3mm over 10m) or unclassified (??? over ???).

1 Like

remember, we are measuring over about a 1m length (3m for the top beam, but
holey triangular calibration only gets up to 1.2m) so that’s around .2-.3mm for
a class 2

a class 1 16ft take is around $11, not bad

David Lang

2 Likes