[Solved] Kabsch algorithm - was calibration issue

Post Reply
Covert
Posts: 79
Joined: Thu Jun 18, 2015 1:10 am

[Solved] Kabsch algorithm - was calibration issue

Post by Covert »

I'm using Resa 0.4 mod. I cannot seem to get placement on my panel correct.

I have double checked my fiducial locations and match them up to the physical PCB and component locations using digital calipers.

I use 3 fiducial at 3 corners of my panel. Optical homing on them is smooth and clear.

Machine movement is consistent. Moving back to the same location every time when using F keys in both +/- and Y/X. Slack compensation is enable.

My panel has 16 boards in a 4 x 4 matrix. Using "Move to PCB Location"

[edit] tl;dr - motor rotation did not match real machine moment. Calibrated and fixed.

Attached images numbering is column-row starting from bottom left.

Image 2-3 is teh closes to the middle of the board of the middle of the 3 fiducial. Not surprisingly it's the most accurate one.

I'm not sure how to debug this. My knowledge of Kabsch algorithm is not very good.

Overall panel size is 190 x 180mm.
1-1.PNG
1-1.PNG (11.34 KiB) Viewed 69086 times
1-2.PNG
1-2.PNG (13 KiB) Viewed 69086 times
1-3.PNG
1-3.PNG (11.96 KiB) Viewed 69086 times
1-4.PNG
1-4.PNG (13.7 KiB) Viewed 69086 times
*****************************************
2-1.PNG
2-1.PNG (10.62 KiB) Viewed 69086 times
2-2.PNG
2-2.PNG (10.62 KiB) Viewed 69086 times
2-3.PNG
2-3.PNG (11.63 KiB) Viewed 69086 times
2-4.PNG
2-4.PNG (10.13 KiB) Viewed 69086 times
*****************************************
3-1.PNG
3-1.PNG (14.61 KiB) Viewed 69086 times
3-2.PNG
3-2.PNG (11.44 KiB) Viewed 69086 times
3-3.PNG
3-3.PNG (13.73 KiB) Viewed 69086 times
3-4.PNG
3-4.PNG (11.51 KiB) Viewed 69086 times
*****************************************
4-1.PNG
4-1.PNG (15.26 KiB) Viewed 69086 times
4-2.PNG
4-2.PNG (13.57 KiB) Viewed 69086 times
4-3.PNG
4-3.PNG (12.98 KiB) Viewed 69086 times
4-4.PNG
4-4.PNG (15.03 KiB) Viewed 69086 times
Last edited by Covert on Wed Aug 26, 2015 3:24 am, edited 1 time in total.
Covert
Posts: 79
Joined: Thu Jun 18, 2015 1:10 am

Re: Kabsch algorithm

Post by Covert »

I just found there are 2 different functions. Recompute and Recompute2 in the LeastSquaresMapping file. I changed LeastSquaresMapping() to us Recompute() instead of Recompute2() and the errors are still the same.
Covert
Posts: 79
Joined: Thu Jun 18, 2015 1:10 am

Re: Kabsch algorithm

Post by Covert »

I got a new square to set the squareness up of the machine. It has improved somewhat with the Y axis landing spot on just about every time.

However the X axis seems to 0.1mm out in each direction on either end.. To far - towards the - end and too far + towards the + end.
Covert
Posts: 79
Joined: Thu Jun 18, 2015 1:10 am

Re: Kabsch algorithm

Post by Covert »

Found an issue in the X axis using a long metal ruler I also purchased.

For 400mm moved the machine moves 401mm. Y axis seems spot on.

Where am I getting the extra .25% travel from ?
JuKu
Site Admin
Posts: 1110
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: Kabsch algorithm

Post by JuKu »

Your belt is so tight that it is stretching a bit. You can set is spot on by telling the machine that it moves only 39.90mm per motor revolution (40mm x .9975).
Covert
Posts: 79
Joined: Thu Jun 18, 2015 1:10 am

Re: Kabsch algorithm

Post by Covert »

Ok. Got it sorted. I adjusted the $1tr value and also calibrated the Y axis the same way. I think this should be added to the calibration/setup instructions. It caused no end of trouble till I solved it.

For those interested.

Using a Engineering ruler I aligned it on the X axis and moved the X axis 400mm and checked the distance moved on the ruler. Movement was 401mm. Took the existing 1tr value of 40.0 and worked out the new value. Entered 40.1 into the 1tr setting in defaultSettings found in MainForm.cs (could of been done from serial console)

Did the square setup using a 600x400mm square I got from the Hardware store.

Did the same calibration as above for the Y axis with the 2tr setting. My new value was 40.06

Solved weeks of problems....
WayOutWest
Posts: 198
Joined: Thu Jul 16, 2015 12:18 am
Location: Washington State, USA

Re: Kabsch algorithm

Post by WayOutWest »

Covert wrote: For those interested.
...
Entered 40.1 into the 1tr setting
...
Did the square setup using a 600x400mm square I got from the Hardware store.
...
Solved weeks of problems....
Covert, thank you for posting your experiences; you can be sure at least one person benefited!
- Adam
Post Reply