Thanks for that explanation. Now I’m curious what it does now in relation to all of the “corrections” for sag, stretch, etc. Does it do those calculations each time within the 50ms?

Yes it does. It’s handled by the “inverse triangular” section of kinematics.cpp

U mentioned that the position/angle the chain is feeding off the sprocket at each angle nees to be compensated for? What if we put a small sprocket or nylon roller a couple inches in from the sprocket for the chain to ride on which would create a more precise point to measure/calculate from possibly eliminating a variable from calculations?

I did a write-up in chain length calculation for the forum wiki.

I think we have a good handle on calculating how much chain wraps around the sprocket. It’s not something we calibrate.

It does steel a couple mm off the total length though say from when the chain is 45% compared to when its at 15%. I made a model in fusion360 which showed this.

Yep. Take a look at the thread and let us know what you think. it took a long time for me to figure out how it was done (didn’t have a drawing)… so I documented it in case I forget it.

you can’t eliminate it, you can try to reduce it, but at some point the fact

that a link can’t bend will limit how tight the curve can be.

This is a fairly easy thing to calculate, it’s not worth a lot of mechanical

complexity to try and reduce it.

David Lang

I agree. We can’t assume we know what the causes of inaccuracy are, so a system that that just gets to the answer, without having to care about why, seems like it would be best. (Though perhaps deeply unsatisfying to an engineer mind?)

This is why I keep coming back to the idea of make reference cuts, take a picture and feed to the sw ( or another piece of software that generates a calibration file) and go.

I’m not sure you can get the accuracy you want by making a series of cuts around the board and taking a photo of it. Even with the high resolution cameras, I just think detecting the cut points really accurately will be difficult. Trying to hit a 0.5 mm accuracy in results is challenging. That’s why I’ve taken to using a printed calibration pattern. I got three ANSI E blueprints printed at Staples for $21 to cover my board… seems cheap enough. The only thing else that’s needed is a cheap usb endoscope and something to get the endoscope perfectly centered in the router body (I’m using a turned block of wood at the moment but need to improve upon it).

a 25 MP camera is theoretically able to have one pixel per 0.5mm, since you need

at least double that resolution, you would need a 100MP camera, and this is

assuming a perfect lens (which none are) as you could not tell the difference

between lens distortion and cut distortion (unless you have mapped out that

particular lens at that particular distance)

what @madgrizzle is doing of trying to look at a smaller area and graft those

together has a better chance, but he’s reinventing the way that an optical

mouse works (but at a slightly larger scale), so I think he is going to end up

running into the same issue.

David Lang

The challenge in my method is accurately determining the center of the square in the picture. I use a series of filters/edge detection to do it and its not perfect. I’m sure it can be improved upon. I have 0.1 mm per pixel resolution at the distance the camera is at so I think that’s fine. If I better positioned the frame/top beam and had the center closer to the center, I could lower the camera and gain more resolution… and/or use a better camera. This one is pretty low res.

That clearly won’t be a solution for everyone?

the issue is less the camera resolution (a bigger camera will let you see more

area, which is a speed upgrade more than anything else). The bigger issue is

what error is there joining the various pictures together (or rather their

results)

if you have a 2" picture (not counting overlap), that means that there are at

least 48 pictures to logically join together, an error margin of 0.01mm per join

adds up to our desired 0.5mm total error budget.

David Lang

it doesn’t have to be.

If we have one person who can accurately measure error across the sheet, it

becomes FAR easier to test other accuracy improvements.

This is not what I’m doing. I’m taking individual pictures and measuring the distance from the center of the picture to the center of the square that should be in the center of the picture. That gives me an x and y error for a given x and y target. Then, in the controller, I change the target coordinates in triangularInverse to accomodate the error. So if I want to go to -100, -100 and when I tried to get there before I actually went to -102, -103, I change the coordinates to -98, -97. Not perfect, but close.

I used a 2nd order quadratic equation and used numpy’s least-squares (lstsq) routine to fit my calibration data to the equation. The solution was not extraordinarily good but I’m fairly my issue is because I only have data for the bottom left quarter of the board (everything else is zeros). Kinda hard to expect a smooth equation to handle such impulses. If you (or anyone) have any recommendations as to the form of formula or if you have recommendations on methodology for curve fitting, please let me know. I thought you (or someone) posted something for me to look at but for the life of me I can’t find the post.

It was mathworks.

They have a number of types of curve fits. Very full site

What I was hoping to get was delta y values (and delta x values) for a grid across a full sheet. It’s why I suggested on 12” squares.

Then for each ordinate plot the deltas in a “surface plot”. That is a 2 dimension plotted surface of the delta values ( 2 plots, one for x and one for y)

After viewing the surface, then chose several of their surface fits and see how good each is.

The best surface fit should be able to calculate the delta correction for any x,y point, to use somewhere in the maslow software to adjust the chain length.

I wanted to do this without any of the current correction calculations involved. Let this see what the native Maslow does because I think one correction is all that would be needed, not correction on corrections.

Ed

Hopefully this weekend I can post a full sheet’s worth of values that you can use. It’ll be every 3 inches, but you can pick just pick every 4th one

The problem I might have though with disabling chain sag is that the “raw” equations (uncorrected by chain sag) may be so inaccurate that the camera won’t be able to see one of the squares, but we can try.

Well we’ll find out. Hopefully it’s not that far off. What are the dimensions of your machine? Motor spacing and height.

141 inch motor spacing and approximate 19 inches above worksurface