V88 - verticalish - calibration problems

I just tried using v0.88 in anger today (been doing lots of other software stuff instead).

Anyway, I couldn’t get calibration to work at all, very low values, stuck in a loop etc.

After switching both FW and WebUI back to 0.87 I saw this in the config panel - so I’m guessing there’s something wrong with the algorithm …


Yeah - I don’t use a square frame.

There’s also the problem of the ‘extend what you want’ value. If you go too large, you’ll get a “home position was more than 100mm off from what was expected”.

Also, if you redo calibration after changing some value (like the ‘extend what you want setting’), after having previously just refreshed your browser tab to get out of the infinite calibration loop, then the calibration process doesn’t quite seem to know where in the calibration process it is up to (i.e. which waypoint).

Then if you “turn it off and on again” and rerun the calibration, your frame comes out square, as above.

I suspect that calibration doesn’t like verticalish setups. As per the comment for the Maslow_::takeSlackFunc() function (shown below), if every belt has been extended the same, but you only tighten up the ‘bottom’ belts, and you 'extend’ed too far, then you’re guaranteed to be well off home position.

/*
* This function is used to take up the slack in the belts and confirm that the calibration values are resonable
* It does this by retracting the two lower belts and taking a measurement. The machine's position is then calculated 
* from the lenghts of the two upper belts. The lengths of the two lower belts are then compared to their expected calculated lengths
* If the difference is beyond a threshold we know that the stored anchor point locations do not match the real dimensons and and error is thrown
*/

Here’s an abridged log from the earlier step trying to get calibration to happen.

Serial Messages
Index.html Version: 0.88
[MSG:INFO: Channel auto report interval set to 50 ms]
[MSG:INFO: FluidNC v0.88]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.7-dirty]
[MSG:INFO: Local filesystem type is littlefs]
[MSG:INFO: Configuration file:maslow.yaml]
[MSG:INFO: Machine Maslow S3 Board]
[MSG:INFO: Board Maslow]
[MSG:INFO: UART1 Tx:gpio.1 Rx:gpio.2 RTS:NO_PIN Baud:115200]
[MSG:INFO: SPI SCK:gpio.12 MOSI:gpio.11 MISO:gpio.13]
[MSG:INFO: SD Card cs_pin:gpio.10 detect:NO_PIN freq:8000000]
[MSG:INFO: Stepping:Timed Pulse:4us Dsbl Delay:0us Dir Delay:0us Idle Delay:240ms]
[MSG:INFO: Axis count 3]
[MSG:INFO: Axis X (-2438.400,0.000)]
[MSG:INFO:   Motor0]
[MSG:INFO: Axis Y (-1219.200,0.000)]
[MSG:INFO:   Motor0]
[MSG:INFO: Axis Z (-100.000,0.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2209 UART1 Addr:0 Step:gpio.15 Dir:gpio.16 Disable:NO_PIN R:0.110]
[MSG:INFO:   Motor1]
[MSG:INFO:     tmc_2209 UART1 Addr:1 Step:gpio.46 Dir:gpio.38 Disable:NO_PIN R:0.110]
[MSG:INFO: Z Axis driver test passed]
[MSG:INFO: Z2 Axis driver test passed]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: Using spindle NoSpindle]
[MSG:INFO: Connecting to STA SSID:TP-Link_5CB2]
[MSG:INFO: Connecting.]
[MSG:INFO: Connecting..]
[MSG:INFO: Connected - IP is 192.168.1.100]
[MSG:INFO: WiFi on]
[MSG:INFO: Start mDNS with hostname:http://maslow.local/]
[MSG:INFO: SSDP Started]
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: Using spindle NoSpindle]
[MSG:INFO: Connecting to STA SSID:TP-Link_5CB2]
[MSG:INFO: Connecting.]
[MSG:INFO: Connecting..]
[MSG:INFO: Connected - IP is 192.168.1.100]
[MSG:INFO: WiFi on]
[MSG:INFO: Start mDNS with hostname:http://maslow.local/]
[MSG:INFO: SSDP Started]
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]
[MSG:INFO: Retracting all belts]
[MSG:INFO: Bottom Left pulled tight with offset -0.097]
[MSG:INFO: Bottom Right pulled tight with offset 0.021]
[MSG:INFO: Top Left pulled tight with offset -0.054]
[MSG:INFO: Top Right pulled tight with offset 0.183]
[MSG:INFO: Retracting all belts]
[MSG:INFO: Top Right pulled tight with offset -0.043]
[MSG:INFO: Bottom Right pulled tight with offset -0.032]
[MSG:INFO: Top Left pulled tight with offset 0.054]
[MSG:INFO: Bottom Left pulled tight with offset -0.011]
[MSG:INFO: Extending all belts]
[MSG:INFO: All belts extended to 1850.000mm]
[MSG:INFO: Setting z-stop position]
[MSG:INFO: Machine Position found as X: -3.190 Y: -95.000]
[MSG:INFO: Measured waypoint 6]
[MSG:INFO: Measured waypoint 7]
[MSG:INFO: Measured waypoint 8]
[MSG:INFO: Measured waypoint 9]
[MSG:INFO: Measured waypoint 10]
[MSG:INFO: Measured waypoint 11]
[MSG:INFO: Measured waypoint 12]
[MSG:INFO: Measured waypoint 13]
[MSG:INFO: Measured waypoint 14]
CLBM:[{bl:1818.47,   br:1812.35,   tr:2053.41,   tl:2051.27},{bl:1940.29,   br:1702.17,   tr:1958.86,   tl:2151.52},{bl:2020.75,   br:1795.64,   tr:1845.40,   tl:2055.25},{bl:1917.00,   br:1903.00,   tr:1941.69,   tl:1946.43},{bl:1932.94,   br:2012.13,   tr:2050.55,   tl:1842.88},{bl:1706.15,   br:1930.14,   tr:2153.93,   tl:1949.90},{bl:1917.83,   br:1895.83,   tr:1944.76,   tl:1954.39},{bl:1833.84,   br:1817.70,   tr:2034.11,   tl:2043.28},{bl:1649.25,   br:2000.17,   tr:2210.11,   tl:1889.68},{bl:1733.43,   br:2076.72,   tr:2128.51,   tl:1785.96},{bl:1836.35,   br:2164.17,   tr:2044.81,   tl:1685.24},{bl:2009.89,   br:1998.68,   tr:1853.08,   tl:1855.97},{bl:2186.26,   br:1826.64,   tr:1675.52,   tl:2048.85},{bl:2109.12,   br:1723.08,   tr:1769.35,   tl:2132.74},{bl:2025.92,   br:1630.25,   tr:1874.41,   tl:2220.55},]
Computing... This may take several minutesFitness: 0.0455547 in 100
Fitness: 0.0518002 in 200
Fitness: 0.0572877 in 300
Fitness: 0.0637077 in 400
Fitness: 0.0699161 in 500
Fitness: 0.0752554 in 600
Fitness: 0.0798869 in 700
Fitness: 0.0835706 in 800
Fitness: 0.0871514 in 900
Fitness: 0.0905585 in 1000
Fitness: 0.0935381 in 1100
Fitness: 0.0964651 in 1200
Fitness: 0.0991577 in 1300
Fitness: 0.1015063 in 1400
Fitness: 0.1034053 in 1500
Fitness: 0.1053125 in 1600
Fitness: 0.1072665 in 1700
Fitness: 0.1087769 in 1800
Fitness: 0.1099579 in 1900
Fitness: 0.1104388 in 2000
Fitness: 0.1104876 in 2100
Fitness: 0.1108009 in 2200
Fitness: 0.1110359 in 2300
...
Fitness: 0.1119925 in 2900
Fitness: 0.1120731 in 3000
...
Fitness: 0.1128548 in 3500
Fitness: 0.1130009 in 3600
...
Fitness: 0.1139631 in 4500
Fitness: 0.1140941 in 4600
...
Fitness: 0.1149535 in 5900
Fitness: 0.1150067 in 6000
...
Fitness: 0.1157534 in 16600

WARNING FITNESS TOO LOW. DO NOT USE THESE CALIBRATION VALUES!
Calibration values:
Fitness: 0.1157534213672829
Maslow_tlX: 8.5
Maslow_tlY: 2200.6
Maslow_trX: 3254.2
Maslow_trY: 2093.0
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 3167.0
Maslow_brY: 0.0
 RestartingFitness: 0.1208519 in 100
Fitness: 0.1208519 in 200
...
Fitness: 0.1208519 in 1000

WARNING FITNESS TOO LOW. DO NOT USE THESE CALIBRATION VALUES!
Calibration values:
Fitness: 0.12085193994978287
Maslow_tlX: -5.3
Maslow_tlY: 2150.8
Maslow_trX: 3247.2
Maslow_trY: 2104.0
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 3187.7
Maslow_brY: 0.0
 RestartingFitness: 0.1405453 in 100
Fitness: 0.1405453 in 200
...
Fitness: 0.1405453 in 1000

WARNING FITNESS TOO LOW. DO NOT USE THESE CALIBRATION VALUES!
Calibration values:
Fitness: 0.1405452596705082
Maslow_tlX: -6.5
Maslow_tlY: 2107.8
Maslow_trX: 3254.3
Maslow_trY: 2088.5
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 3212.3
Maslow_brY: 0.0
 RestartingFitness: 0.1338986 in 100
Fitness: 0.1338986 in 200
...
Fitness: 0.1338986 in 1000

WARNING FITNESS TOO LOW. DO NOT USE THESE CALIBRATION VALUES!
Calibration values:
Fitness: 0.1338986462766522
Maslow_tlX: -25.3
Maslow_tlY: 2067.7
Maslow_trX: 3277.5
Maslow_trY: 2051.7
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 3223.7
Maslow_brY: 0.0
 RestartingFitness: 0.0890136 in 100
Fitness: 0.0893031 in 200
...
Fitness: 0.0893031 in 1100

WARNING FITNESS TOO LOW. DO NOT USE THESE CALIBRATION VALUES!
Calibration values:
Fitness: 0.08930309490055931
Maslow_tlX: -89.1
Maslow_tlY: 2017.5
Maslow_trX: 3211.9
Maslow_trY: 2157.3
Maslow_blX: 0.0
Maslow_blY: 0.0
Maslow_brX: 3189.4
Maslow_brY: 0.0
 RestartingFitness: 0.0978734 in 100
Fitness: 0.0978734 in 200
...
Fitness: 0.0978734 in 900
1 Like

Think 1800 got me close. Just hit home after the tightening procedure and you’re good to go.

FWIW I got v0.88.0 to work on a vertical setup. Think it failed the first go, then worked well. Might want to wipe the yaml file and give it another go. I’ve encountered a few stale state issues and have had settings persist in the yaml file as well as in the web interface. Starting over with a fresh yaml file usually fixes it. I also try to refresh and check that any settings I input in the web interface persist, sometimes they revert.

1 Like

Yeah, I think that the software development thing that we need most is testing and improving reliability. There is still a LOT of work to be done there.

Since 0.88 doesn’t ask for a user input for the frame size it uses the first measurement to compute the frame size making the assumption that it’s square. Basically one measurement is only enough information to compute the size of the frame if we make the assumption that the frame is square. Having a value for the frame which is square is good enough that we can take another set of measurements which gives us enough information to refine the anchor point locations further.

How many times did it loop? I’ve seen it take five or six loops to get a correct answer, but it should get there eventually if the input data is correct. There may be a bug in there.

This shouldn’t be a thing, this sounds like a bug. Is it repeatable? Are you running the release version of 0.88 or a modified one?

There should be no such thing as too far off in 0.88, basically it should compute on its own to correct.

I strongly suspect this this is a requirement, when moving from 0.87 to 0.88

It never got out of it; I had to refresh the browser tab to stop it.

Yep repeatable. v0.88 absolutely plain

1 Like

@bar - this is the main reason I included the serial log from the second run - the calibration waypoints start at 6

1 Like

Oh that’s interesting!

I think that there is a bug where some of the states aren’t getting reset and it needs a full power off and back on between calibration attempts? Could that be what you are seeing?

I’m pretty sure that is what happened

Yeah I think so.

1 Like

Following up on this because I have been able to get v0.88 to work now and perform calibration.

Key detail was @kyleschoen 's suggestion to

And yeah, some settings had definitely reverted. In particular the relative Z-offsets for each corner did not match my machine at all. But I also replaced the stored corner XY values with values closest to nearest 100mm.

With that, and an ‘extend what you want’ value that was relatively close to what would work for my frame, I reran the calibration and ultimately ended up with a 0.98

@bar - Looking at my logs I do think that there’s a safety check that should be done for the calibration process in v0.88. My recommendation is that after 10 cycles through the fitness finding algorithm if it can’t get above 0.2 then it strongly implies that something is really off with the current settings (things like the relative Z values for example), and with that the calibration process should be aborted.

My thoughts for upgrading from whatever to v0.88.

  • ‘Clean’ your maslow.yaml file.
    • Specifically go to the XY values for each corner and make these values close to what are there currently, but rounded up to the nearest 50mm (a suggestion)
    • Double check that your Z-Offsets for each corner match your specific arrangement of arms, and anchor points
  • To get a reasonable ‘extend’ value for your frame.
    • Measure the distance between the two corners you think are the furtherest apart from each other
    • Subtract 220 from that value (minus belt ends and arms, but plus an allowance so you have some slack) and round the resulting value up to some nice number
    • Divide by 2 - that’s a good extend distance for your frame.