[SOLVED] Mysterious nozzle to camera offset error

User avatar
wormball
Posts: 75
Joined: Thu Oct 04, 2018 8:37 am

[SOLVED] Mysterious nozzle to camera offset error

Post by wormball »

Hello!

My liteplacer places some parts precisely, but most of the parts are placed at 0.1 - 0.4 mm right and/or down to the intended locations. I investigated this issue and it completely broke my brain.

Here is example of placement (mostly 0402):
20181023_191645.jpg
20181023_191645.jpg (1.96 MiB) Viewed 8583 times
Most parts self-align in the oven but not all, and it is quite annoying.

It is not because of some constant nozzle to camera offset calibration error, cos those parts which are not rotated are also affected. And it picks most parts quite precisely.

"Don't use nozzle correction" is checked cos correct nozzle calibration using up looking camera is pain to me, and instead i measured nozzle offset at different unscrewing angles of nozzle adapter and milled 0.6 mm washer with which the nozzle offset is within 0.1 mm.

"Slack compensation" is on.

I found that after placement if i push "measured location", the camera goes to precise (within 0.1 mm) location of the soldering pattern. So i think that this behavior is not because of camera mount or drivetrain but solely due to nozzle to camera offset variation.

So i tried to measure this offset variation. I glued a needle to one of the nozzles (it is not precisely at the center so average offset is not zero). Then i pierced an A4 sheet of paper with this needle using "panelize" function. (By the way, i found yet another bug - if you make panel more of 10*10 boards, the program gives duplicate names for some parts, e. g. C1_115 stands for C1 at board (11, 5) and C1 at board (1, 15), and some of these duplicate parts are not placed (but some are placed).)

Then i pierced this sheet another time, and results were within 0.1 mm compared to first time. Moreover, this holds even next day. So it is not random displacement of the nozzle or some environment fluctuation.

Here are coordinates of some obtained points (unfortunately these points are too faint for automatic measurement so i had to measure them by hand, so some of them may be imprecise or even erroneous) (first two numbers are coordinates from board origin in cm, the other two are offset error in mm):

Code: Select all

1 1 X: -0.036 Y: -0.236
2 1 -0.1 -0.2
3 1 -0.1 -0.2
10 1 -0.15 -0.1
20 1 -0.15 -0.05
29 1 -0.2 -0.0
29 10 -0.2 -0.1
20 10 -0.2 -0.1
10 10 -0.15 -0.1
2 10 -0.0 -0.3
1 20 -0.15 -0.15
10 20 -0.2 -0.1
20 20 -0.2 -0.05
29 20 -0.25 -0.05
1 2 -0.1 -0.2
1 3 -0.1 -0.15
1 4 -0.1 -0.1
1 5 -0.05 -0.15
1 6 -0.05 -0.2
1 9 -0.1 -0.15
1 13 -0.1 -0.2
1 15 -0.1 -0.2
1 16 -0.1 -0.2
1 17 -0.0 -0.2
1 19 -0.1 -0.2
1 20 -0.1 -0.15
2 20 -0.05 -0.15
3 20 -0.1 -0.15
4 20 -0.15 -0.15
5 20 -0.1 -0.1
6 20 -0.1 -0.1
7 20 -0.1 -0.1
8 20 -0.1 -0.05
9 20 -0.15 -0.05
10 20 -0.15 -0.05
11 20 -0.15 -0.05
14 20 -0.15 -0.0
15 20 -0.2 -0.0
16 20 -0.2 -0.0
17 20 -0.15 -0.05
19 20 -0.15 -0.05
20 20 -0.15 -0.1
21 20 -0.2 -0.05
22 20 -0.25 -0.05
23 20 -0.2 -0.1
24 20 -0.15 -0.1
25 20 -0.2 -0.1
26 20 -0.2 -0.05
27 20 -0.2 -0.0
28 20 -0.2 -0.05
29 20 -0.2 -0.1
29 19 -0.2 -0.15
29 18 -0.2 -0.1
29 17 -0.2 -0.1
29 16 -0.2 -0.15
29 15 -0.2 -0.1
29 14 -0.2 -0.1
29 12 -0.25 -0.15
29 11 -0.2 -0.15
29 9 -0.2 -0.0
29 8 -0.15 -0.0
29 7 -0.2 -0.1
29 6 -0.15 -0.1
29 5 -0.25 -0.0
29 3 -0.2 -0.1
29 2 -0.2 -0.05
29 1 -0.2 -0.05
27 1 -0.2 -0.1
26 1 -0.2 -0.05
24 1 -0.1 -0.1
23 1 -0.1 -0.1
22 1 -0.15 -0.05
21 1 -0.15 -0.05
19 1 -0.15 -0.1
17 1 -0.15 -0.05
16 1 -0.15 -0.05
15 1 -0.2 -0.1
14 1 -0.15 -0.05
12 1 -0.1 -0.1
11 1 -0.15 -0.1
10 1 -0.15 -0.1
9 1 -0.15 -0.1
8 1 -0.1 -0.1
7 1 -0.1 -0.15
6 1 -0.1 -0.2
5 1 -0.1 -0.2
4 1 -0.15 -0.25
3 1 -0.1 -0.25
2 1 -0.1 -0.25
1 1 -0.05 -0.25
3 10 -0.1 -0.3
4 10 -0.1 -0.3
5 10 -0.0 -0.2
6 10 -0.05 -0.2
7 10 -0.05 -0.2
8 10 -0.0 -0.15
10 10 -0.05 -0.15
12 10 -0.0 -0.1
13 10 -0.0 -0.1
15 10 -0.15 -0.1
16 10 -0.15 -0.1
17 10 -0.15 -0.1
18 10 -0.1 -0.1
19 10 -0.1 -0.1
20 10 -0.15 -0.1
21 10 -0.1 -0.1
22 10 -0.15 -0.1
23 10 -0.05 -0.1
24 10 -0.05 -0.1
25 10 -0.1 -0.1
26 10 -0.15 -0.1
28 10 -0.1 -0.1
29 10 -0.1 -0.1
15 1 -0.2 -0.05
15 2 -0.15 -0.0
15 3 -0.15 -0.0
15 4 -0.15 +0.05
15 5 -0.15 -0.0
15 6 -0.15 -0.05
15 7 -0.15 -0.05
15 8 -0.15 +0.05
15 9 -0.1 -0.0
15 10 -0.2 -0.1
15 11 -0.15 -0.1
15 12 -0.2 -0.05
15 13 -0.2 -0.1
15 14 -0.2 -0.1
15 15 -0.2 -0.1
15 16 -0.2 -0.05
15 17 -0.1 -0.05
15 18 -0.2 -0.05
15 19 -0.2 -0.05
15 20 -0.2 -0.0
So we see that X offset varies within about 0.2 mm and Y offset varies within about 0.3 mm. Similar issue was described in this post: https://liteplacer.com/phpBB/viewtopic.php?f=10&t=448 but i did not understand how the author solved it.

Then i made some points by "place here" (they are at another rotation angle so absolute error does not agree with the above) and measured them automatically:

Code: Select all

At table level (0 mm):
500 1 X: X: 0.082 Y: -0.427
490 1 X: X: 0.054 Y: -0.445
500 350 X: 0.082 Y: -0.336
490 350 X: 0.064 Y: -0.372

(now i bent my needle, but miraculously it remained within 0.1 mm from above measurements)

At table level (0 mm):
495 1 X: 0.163 Y: -0.427
495 350 X: 0.091 Y: -0.363
1 350 X: 0.191 Y: -0.590
11 350 X: 0.136 Y: -0.563

At table + 3 mm (mdf board):

11 350 X: 0.109 Y: -0.653
1 350 X: 0.036 Y: -0.708

Re-measuring some older holes at 0 mm:
490 350 X: 0.073 Y: -0.372
495 350 X: X: 0.145 Y: -0.318
500 350 X: 0.100 Y: -0.372

At +3 mm:
490 350 X: 0.127 Y: -0.463
500 350 X: 0.054 Y: -0.372

Re-measuring older holes at 0 mm:
490 1 X: 0.064 Y: -0.372
495 1 X: 0.145 Y: -0.318
500 1 X: 0.082 Y: -0.299

At +3 mm:
490 1 X: 0.091 Y: -0.336
500 1 X: 0.091 Y: -0.381
20 20 X: 0.163 Y: -0.463
20 30 X: 0.136 Y: -0.581

Re-measuring older holes at +3 mm:
1 350 X: 0.000 Y: -0.662
11 350 X: 0.136 Y: -0.590

At +3 mm:
140 120 X: 0.100 Y: -0.481
300 210 X: 0.027 Y: -0.427
290 210 X: 0.073 Y: -0.318
300 20 X: 0.045 Y: -0.481
290 20 X: 0.073 Y: -0.454
20 210 X: 0.136 Y: -0.454
30 210 X: 0.118 Y: -0.481
280 210 X: -0.009 Y: -0.408
290 200 X: 0.045 Y: -0.472
280 200 X: 0.027 Y: -0.427
300 200 X: 0.064 Y: -0.436
290 205 X: 0.018 Y: -0.436
290 100 X: 0.054 Y: -0.381
300 100 X: 0.036 Y: -0.408
20 100 X: 0.218 Y: -0.554
30 100 X: 0.109 Y: -0.554
30 20 X: 0.200 Y: -0.599
20 20 X: 0.118 Y: -0.526
150 20 X: 0.136 Y: -0.526
160 20 X: 0.100 Y: -0.472
160 100 X: 0.073 Y: -0.445
150 100 X: 0.082 Y: -0.399
150 210 X: 0.127 Y: -0.390
160 210 X: 0.100 Y: -0.354
20 30 X: 0.154 Y: -0.545
30 30 X: 0.182 Y: -0.572

Re-measuring older holes:
20 210 X: 0.127 Y: -0.472 -  at +3 mm
1 350 X: 0.109 Y: -0.587 - at 0 mm
11 350 X: 0.188 Y: -0.535 - at 0 mm
So:

1. Offset varies within 0.218 mm by X and within 0.409 mm by Y.
2. Variations due to random camera or nozzle offset or different Z coordinate contribute no more than 0.09 mm (X) and 0.13 mm (Y) in this offset.
3. At the left side the Y offset is about 0.2 - 0.3 mm less than at the right side.

Also i measured linearity of belts with rulers. And nonlinearity is also within 0.1 mm! However if it were more it would not explain changing Y offset while moving by X axis.

Dialog between program and tinyG shows that all coordinate displacements are correct (X displacement is 0.05 mm bigger than i set but also equal in all cases).

I use non-shielded cables so variations of force acting on the gantry are also excluded. Also i tied all the cables to the gantry base so nozzle and camera do not experience significant force variations from cables.

The other hypothesis that i have is bending of the makerslides. But makerslides are straighter than all my rulers! While such offset difference requires fairly big bending - i think 0.3/80 mm is about 1 mm nonlinearity at 750 mm makerslide.

Also it might be uneven wheels but these wheels have about 60 mm circumference, and i do not observe such waves in my data.

So i have no idea what this is and how to fix this. I need your help.

Thanks in advance.
Last edited by wormball on Thu Nov 01, 2018 10:45 pm, edited 1 time in total.
User avatar
wormball
Posts: 75
Joined: Thu Oct 04, 2018 8:37 am

Re: Mysterious nozzle to camera offset error

Post by wormball »

Here are the plots of errors vs coordinates made of above data. It seems that Y error begin to grow going left from the X = 100 mm line.

liteplacer_xx.png
liteplacer_xx.png (181.35 KiB) Viewed 8576 times
liteplacer_xy.png
liteplacer_xy.png (142.89 KiB) Viewed 8576 times
liteplacer_yx.png
liteplacer_yx.png (162.35 KiB) Viewed 8576 times
liteplacer_yy.png
liteplacer_yy.png (162.92 KiB) Viewed 8576 times
robert@serve101.org
Posts: 22
Joined: Thu Jan 18, 2018 8:19 pm

Re: Mysterious nozzle to camera offset error

Post by robert@serve101.org »

I have worked on this issue for a long time as well. I have not been nearly as scientific as you, well done.

What has worked best for me was to just change the X,Y tape offsets and nominal locations on the CSV file, to "lie" about where they are supposed to be picked up and placed.

The first step is to play with the X and Y offsets in the tape file so the part is picked up near the middle. This is not perfect, as I find the offset needed on part#1 of the tape is different from part #30, but generally I can fine a compromise that can pickup parts nearly in the middle.

The second step is to place parts on a board with double sided sticky tape, and adjust the nominal locations (and the re-measure of course) until each part is placed as accurately as possible.

Step three is to put each board under a microscope to push the parts into position as needed.

I can use this approach only because I use the machine to place parts on a half a dozen boards over and over again. It is best that, say C1 is always placed from tape part #4, for example.
JuKu
Site Admin
Posts: 1114
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: Mysterious nozzle to camera offset error

Post by JuKu »

If Y error grows when going to one direction, it might be caused by uneven belt tension. To correct: Loosen both pulleys on the drive shaft. Tighten the belts and try to get then equally tight. You don't need to be super accurate on this, I fins that finger feel is good enough. Move the bar manually back and forth a couple of times to even out the tension on front and back, then tighten the pulleys. You probably need to re-do the squareness compensation measurement.
User avatar
wormball
Posts: 75
Joined: Thu Oct 04, 2018 8:37 am

Re: Mysterious nozzle to camera offset error

Post by wormball »

Hello!

I actually solved this problem on monday but was too busy to reply. I will post the right answer soon. Now i have to say that you both are wrong.
20181029_172421.jpg
20181029_172421.jpg (1.9 MiB) Viewed 8540 times
User avatar
wormball
Posts: 75
Joined: Thu Oct 04, 2018 8:37 am

Re: Mysterious nozzle to camera offset error

Post by wormball »

So, the right answer!

The root of all evil is that the liteplacer has two makerslides as the X axis. They are bonded together only at the ends at some distance (d0). If the carriage moves close to one end (fig. A), it squeezes (or pushes) makerslides cos the distance between wheels (d1 and d2) is not equal to d0. So the makerslides are slightly bent. As two halves of the carriage are connected (at the bottom) by only one bar, these halves rotate relative to each other to fit (now bent) tracks on makerslides. So the error arises.

But if the carriage is far enough from the ends (in my case more than 100 mm) (fig. B), it experiences almost no bending. If the carriage is near to the other end, it may suffer bending of the same or inverse sign depending on whether the distance between makerslide ends is more or less than the distance between wheels. So at both ends the error may be of both signs.
20181101_233239.jpg
20181101_233239.jpg (1.11 MiB) Viewed 8536 times
The solution is to loosen all screws at one end of the X axis, move the carriage to this end, and tighten those screws. And repeat at the other end, of course. So the distance between the makerslides is set approximately equal to the distance between wheels, and bending is considerably reduced.

I think this should be mentioned in the liteplacer assembly instructions.

However, to totally eliminate this error we need to make all of the wheels perfectly aligned at the same distance and right angles, which i think is problematic under home/small lab conditions.

I am considering total removal of one of the makerslides (fig. C). In this case the error is totally* defined by the curvature of the remaining makerslide, which i think (hope?) is pretty straight.

* Not quite totally, there is also similar case with the Y axes, i think it is less expressed (cos graphs show almost no dependence of the error on Y coordinate) and may be solved in similar way.
JuKu
Site Admin
Posts: 1114
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: [SOLVED] Mysterious nozzle to camera offset error

Post by JuKu »

> The solution is to loosen all screws at one end of the X axis, move the carriage to this end, and tighten those screws.

Good point, thank you!

> I think this should be mentioned in the liteplacer assembly instructions.

Added, and should have been there in the first place.

> I am considering total removal of one of the makerslides (fig. C). In this case the error is totally* defined by the curvature of the remaining makerslide, which i think (hope?) is pretty straight.

If the MakerSlides are curved or don't match each other, you might be able to bolt them together (involves drilling, so that might not be that attractive) or clamp them together with adequate force while doing the step in the first sentence.
Jet
Posts: 100
Joined: Mon Apr 17, 2017 4:13 am

Re: [SOLVED] Mysterious nozzle to camera offset error

Post by Jet »

Tried the instructions here to see if it addressed by positioning issue (it didn’t), but the X axis now moves a lot more freely.

However I couldn’t find JuKu’s additions in the build instruction (to see if I followed the official instructions correctly), I’ve probably missed them, but couldn’t find them in the obvious places —>
JuKu wrote:>
Added, and should have been there in the first place.
Thanks
JuKu
Site Admin
Posts: 1114
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: [SOLVED] Mysterious nozzle to camera offset error

Post by JuKu »

Jet wrote:Tried the instructions here to see if it addressed by positioning issue (it didn’t), but the X axis now moves a lot more freely.

However I couldn’t find JuKu’s additions in the build instruction (to see if I followed the official instructions correctly), I’ve probably missed them, but couldn’t find them in the obvious places —>
JuKu wrote:>
Added, and should have been there in the first place.
Thanks
Noting fancy in there, just that the loosen / retighten can be done only after the long rails are in place. Please see https://www.liteplacer.com/the-machine/ ... ont-posts/, towards the end of the page.
User avatar
wormball
Posts: 75
Joined: Thu Oct 04, 2018 8:37 am

Re: [SOLVED] Mysterious nozzle to camera offset error

Post by wormball »

Jet wrote:Tried the instructions here to see if it addressed by positioning issue (it didn’t), but the X axis now moves a lot more freely.
Very interesting. Maybe your v-wheels are now tensioned insufficiently? Could you please measure offset error vs coordinates like i did?
Post Reply