Calibration Issues Maslow 4: Calibration Fitness Too Low

Thanks for the video! That is super helpful. It’s looking good!

To me this sounds like the belts tightening on the spools. Mine makes some sounds like that from time to time if the belts aren’t that tightly wound. Over time they will go away once the belt spools up under tension.

Did you see anything printed out in the console about what the error was? It should tell you what it thinks is wrong.

That is totally normal. The motors will twitch a little bit while holding position in the same place.

Good question, it should be!

At 1:45 you can see the power cable was caught causing a snap action. Something to consider is how to deal with horizontal cable management with power/vacume etc.

1 Like

I noticed it too. I wrapped every 20 to 30 cm a velcro around the cables, that caused the snap. I have a hook on the ceiling and will attach a bungee rubber to hold everything up a bit.

1 Like

I will try it!

1 Like

Thank you again for the video. Super super helpful.

I’ve been able to replicate this issue and I’m working on a fix

Sounds good. Please let me know if I can test anything else though traveling for business over the next days unfortunately.

1 Like

Here are my results! I change the z values all to -70, because I have anchors on individual heights. I then started with firmware 0.69 first a small square with 300mm x 300mm with only 2 x 2 points:

LOG:
Computing… This may take several minutesFitness: 1.2435727 in 100
Fitness: 1.2592172 in 200
Fitness: 1.2687154 in 300
Fitness: 1.2766589 in 400
Fitness: 1.2824999 in 500
Fitness: 1.2838591 in 600
Fitness: 1.2838591 in 700
Fitness: 1.2838591 in 800

Calibration complete
Calibration values:
Fitness: 1.2838590543582071
Maslow_tlX: 6.9
Maslow_tlY: 2491.1
Maslow_trX: 4262.1
Maslow_trY: 2490.4
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 4275.6
Maslow_brY: 0.0
These values have been automatically saved for you.
You MUST restart your machine for them to take effect…I know that is annoying, it’s getting fixed ASAP.

Then I made a larger square with 550mm x 550mm with 5 x 5 points:

LOG:
Computing… This may take several minutesFitness: 1.0343323 in 100
Fitness: 1.0350510 in 200
Fitness: 1.0350510 in 300
Fitness: 1.0350510 in 400

Calibration complete
Calibration values:
Fitness: 1.0350509659095615
Maslow_tlX: 6.8
Maslow_tlY: 2491.3
Maslow_trX: 4262.4
Maslow_trY: 2490.4
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 4275.7
Maslow_brY: 0.0
These values have been automatically saved for you.
You MUST restart your machine for them to take effect…I know that is annoying, it’s getting fixed ASAP.

Then I went full size for me: 1260mm x 550mm with 11 x 5 points.

LOG:
Computing… This may take several minutesFitness: 0.8410351 in 100
Fitness: 0.8432207 in 200
Fitness: 0.8452140 in 300
Fitness: 0.8467937 in 400
Fitness: 0.8480560 in 500
Fitness: 0.8489096 in 600
Fitness: 0.8496005 in 700
Fitness: 0.8501281 in 800
Fitness: 0.8505797 in 900
Fitness: 0.8509582 in 1000
Fitness: 0.8513130 in 1100
Fitness: 0.8514869 in 1200
Fitness: 0.8515334 in 1300
Fitness: 0.8515334 in 1400
Fitness: 0.8515334 in 1500

Calibration complete
Calibration values:
Fitness: 0.8515334414213115
Maslow_tlX: 8.7
Maslow_tlY: 2494.9
Maslow_trX: 4263.4
Maslow_trY: 2490.5
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 4276.2
Maslow_brY: 0.0
These values have been automatically saved for you.
You MUST restart your machine for them to take effect…I know that is annoying, it’s getting fixed ASAP.

Is a fitness of 0.85 sufficient?

1 Like

No, nothing. My console seems to stop sometimes…

1 Like

I think so!

We’re still exploring so there are no real experts yet, but for me that would be a great value :grinning:

Markus Rinn wrote:

Some questions (slightly unrelated to the topic):

  • During calibration I found that even when all belts are tight one motor seems to spin. Looking closer I saw it was only wiggling around. Is that normal? Is that part of the measuring process?

no, the motors should be solid on the arms, the arms move.

  • I set all my anchor points some cm to high, because when I measured the height of the spools my z-axis was not completely down. I made the calibration with the z-axis all the way up. Is it possible to insert negative values for the z offset of the anchor points in the yaml file? Then I can rerun calibration with the z-axis all the way down.

you do not want tension on the belts to pull the sled away from the workpiece,
so you can either lower the anchors or add a thicker wasteboard below your
workpiece to lift the workpiece and maslow up.

David Lang

1 Like

I tried again the Maslow Logo and now it didn’t stop. Perfect! I can start to cut!
I hold a pencil in the middle to draw the logo on the spoil board, but I lifted it to often. Would be great to have a pencil holder for the hole in the sled. Maybe I find some time tomorrow…

But some more questions. How does it work, that the Maslow 4 knows the height of the z-axis? If it is needed to retract and expand the belts every time, it should be needed to prime the z-axis too, or am I missing something. That the router and the spools are one piece is a very very clever design flaw. :stuck_out_tongue_winking_eye: How would be the correct order?:

  1. lower the z-axis all the way down
  2. special homing that Maslow 4 knows it’s down
  3. all the way up to put in the router bit
  4. lowering the router bit on the wood
  5. home the z-axis for cutting
1 Like

You are not missing anything…the software is missing that. I need to add a button for it. I just got wrapped up in the calibration issues and I haven’t had a chance to.

Every time the machine powers on it assumes that the z-axis is at a height of 28mm above the bottom.

That is top of my list once I get everyone up and calibrating…just had a very successful test of the new system which I think should get us much closer so hopefully soon!

2 Likes

This would be my workaround. Lowering the anchors would be to much annoying work. For now the negative values in the yaml file don’t bother me.

1 Like

Markus Rinn wrote:

Is a fitness of 0.85 sufficient?

We think so, but the way to test is to run the sled around the workpiece to see
that it moves as expected and doesn’t develop loose (or super-tight) belts
anywhere.

David Lang

1 Like

Markus Rinn wrote:

But some more questions. How does it work, that the Maslow 4 knows the height of the z-axis? If it is needed to retract and expand the belts every time, it should be needed to prime the z-axis too, or am I missing something. That the router and the spools are one piece is a very very clever design flaw. :stuck_out_tongue_winking_eye: How would be the correct order?:

  1. lower the z-axis all the way down
  2. special homing that Maslow 4 knows it’s down
  3. all the way up to put in the router bit
  4. lowering the router bit on the wood
  5. home the z-axis for cutting

the maslow doesn’t know the position of the Z motors, so you need to lower them
all the way down to make sure that they are both the same (otherwise the router
will be tipped slightly, flexing the plastic, and the bit will not be in the
center of the system)

In theory, this should not need to be done very frequently, as the motors are
always told to move the same amount. But it’s a good idea to do it once in a
while just to be sure nothing has slipped.

After you power on or change the bit, you need to set z=0 so that the router
knows the point that the bit will touch the wood. Bar intends that at some point
it will remember it’s position when powered down so that you only have to do
this when changing bits, but like the straightness issue above, it’s not a bad
idea to do it once in a while even with the same bit to make sure.

David Lang

Markus Rinn wrote:

For now the negative values in the yaml file don’t bother me.

The issue isn’t negative values, the issue could be that belt tension pulls up
on the router, causing it to pull away from the workpiece and/or tip. either of
which will affect the cut.

now, it may be that the weight of the sled is enough that you don’t have
problems, but it’s something to watch for in case you do have problems.

David Lang

So I’ve been looking into the calibration process. The first question to me was, is it possible in general to get an accurate and fast calibration? Some physical problems can be difficult to solve numerically, as they might converge slowly, or accumulate error, or be so sensitive that small errors or roundoff can distort the answers and make accurate solutions impossible.

What I did was to take a couple of examples from the discussion here and generate a solution using Excel Solver. Solver is a pretty powerful and flexible tool for solving numerical problems, and while we would not build it into the Maslow, it is a good tool to show us what is possible.

First I took the results that @ronlawrence3 posted on 4/14 of a 300x300 with 3x3 points, resulting in a fitness score of 0.693, a solution that took 107,200 iterations (!).

I set up a spreadsheet that for each calibration point, each of four intersection points from the four sets of adjacent belts was calculated and the distance from each point to the centroid of that set of 4 was calculated (the ‘errors’). All these error distances were squared and summed to create the sum-squared error (SSE) across the whole set of calibration points. I then told Solver to minimize the SSE by changing the five belt mounting point dimensions.

The results were better than those found by the Maslow software. SSE decreased by a factor of 8, and both the maximum and average errors (relative to the centroid) decreased by a factor of 3-4X. I tried to calculate the fitness but clearly I don’t understand exactly how it is done because my values are different than the ones the Maslow gives - 0.48 improving to 1.34, instead of 0.68 improving to ??

What is interesting is that the belt mounting points I found were significantly different than those found by the Maslow, by more than 200mm in many cases. The results were:

@RL Excel
Maslow_tlX -61.50 -51.05279978
Maslow_tlY 2226.10 2505.73
Maslow_trX 2615.60 2362.86
Maslow_trY 2223.20 2490.14
Maslow_blX 0 0
Maslow_blY 0 0
Maslow_brX 2614.30 2364.88
Maslow_brY 0 0
Max Error: 4.18 1.17 Relative to centroids
Avg. Error: 1.37 0.50 Relative to centroids
SSE: 121.03 15.04
‘Fitness’: 0.482930245 1.341027121 Not right

I’ve attached the spreadsheet.

I was a little concerned that the results were affected by a small 3x3 grid run in a space of 300x300mm in the center of a much larger frame, resulting in larger frame size variations than you might get with a larger grid. So I then repeated this process with the results reported by @Markus_Rinn on 4/17 using a 5x3 grid in a 1260x550mm space. This time the Maslow solution had a fitness of only 0.199. When I ran his CLBM values through the spreadsheet I got the following results:

@MR Excel
Maslow_tlX 13.50 6.422244741
Maslow_tlY 2214.60 2548.90
Maslow_trX 4422.60 4227.82
Maslow_trY 2187.30 2544.42
Maslow_blX 0 0
Maslow_blY 0 0
Maslow_brX 4430.50 4239.26
Maslow_brY 0 0
Max Error: 22.17 2.57 Relative to centroids
Avg. Error: 6.33 1.23 Relative to centroids
SSE: 4291.16 126.99
‘Fitness’: 0.103916256 0.536827722

Again, Solver found a superior solution, with a 5-10X improvement in the maximum and average errors. My calculation of fitness improved from 0.104 to 0.537, incorrect numbers but directionally accurate. The belt anchoring points were different by more than 300mm in some cases.

This spreadsheet is also attached.

What is really interesting is that each of these solutions took no more than 30 iterations, fewer if your initial guess is better. Note that some initial guesses for the frame size are trigonometrically impossible and the math will crash.

Excel Solver is using the GRG Nonlinear model with (this is important) the ‘Make all unconstrained variables non-negative’ box UNchecked (default is checked).

Obviously it would be great if someone looked at my results carefully and looked for mistakes. Also it would be great if @ronlawrence3 and @Markus_Rinn put the frame dimensions I found into their units and see if it produces better results, and found the proper fitness values.

If I didn’t mess up, then there are some really interesting conclusions:

First, we know that it is feasible to determine an accurate solution in a small number of iterations.

Second, sometimes large variations in frame shape produce small errors at the router. This observation, combined with the large differences between the different frame size solutions and the observations made by several people that the measure frame size differed significantly from the values found by the Maslow, makes me suspect that (at least at this point in time) it might actually be more accurate to measure the distances between the belt mounting points than to run the calibration routine. If you measure the diagonals and do the math (or sketch it out in CAD) you can get the proper frame locations allowing for non-parallel sides. At the very least, measuring the frame in this manner may allow the Maslow to start the calibration routine in better shape so there are fewer problems with slack belts and mysterious behaviors.

Next I’m going to try to prototype a numerical solution on Excel so we don’t have to rely on Solver.

Let me know what you think

20240415 ronlawrence3 300x300 3x3.xlsx (32.2 KB)
20240417 Markus_Rinn 5x3.xlsx (70.3 KB)

6 Likes

That 100% tracks with my understanding of things. It makes sense that there are huge improvements especially on the speed and reliability of converging fronts.

It’s true that we can’t use excel functions, but I bet there are some powerful JavaScript libraries that we can take advantage of.

I’m hoping to release a new version tomorrow which will hopefully make things a little better, but there is still soooo much room to improve

This is exactly what is discussed in Possible alternate approach(es) to M4 Calibration

Okay, then it works for me. I could run the maslow sign without any error or loose belts.

1 Like