Are we doing needle calibration right?

mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Are we doing needle calibration right?

Post by mrandt »

dampfboot wrote:For me as an end user I would like to do the cam to needle axis measurement once in a lifetime of the machine and do the wooble correction every time I changed/touched the needle.
Yet another reason to consider A-axis center as nozzle position - and not an arbritrary, potentially out-of-center position of nozzle at machine start... Just my 0,02 € :-P
JuKu
Site Admin
Posts: 1110
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: Are we doing needle calibration right?

Post by JuKu »

> I assume that you want to implement the latter as well?

Yes, now when Jason showed me how to use his vision code. This is a bigger job. It also makes the whole LitePlacer software to GPL, but I think that is fine, my license terms are rather allowing already.

> This has one more advantage: Assuming that some people will use nozzles with almost no runout (be it Juki or Samsung with precision made shaft and coupler), the nozzle tip just happens to be in the same spot

And I will move to Samsung nozzles in very near future. I think I need to rethink about this, although I suspect it might turn out that if bottom vision gives us the rotation and x,y corretion for a part when the nozzle is in the middle of the camera field (which it is if the current correction system works as intended), correcting for rotation, applying wobble correction plus the x,y correction, the part is right where it needs to be. This is not as complicated as it sounds programming-wise, the system already thinks in terms of moving the needle, all the corrections happen at low level.
JuKu
Site Admin
Posts: 1110
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: Are we doing needle calibration right?

Post by JuKu »

[quote="dampfbootTo ease setup for people one could combine the needle to CAM distance measurement with the wobble correction measurement because this HAS to be done in one step[/quote]

In setup, the needle to cam distance and the up cam position setting has to be done in one step, without touching the needle during it. You are right, the instructions could be even more strong in this.
mawa
Posts: 139
Joined: Wed Jun 10, 2015 1:23 pm
Location: Near Hamburg, Germany

Re: Are we doing needle calibration right?

Post by mawa »

So, my thoughts are not so erroneous as it seems. ;)

When most of the users have orthogonal or horizontal aligned parts the offset induced by wobble does not become very evident since the part is mostly placed within the solder paste blob.
If you encounter increased tombstoning that could suggest a too large offset.

My current PCB board consists of 50 5050 LEDs and 50 0603 Caps all rotated by 6 degrees increment in groups of 5 concentric rings. So the rotation difference between the leftmost parts and the right most parts is 54 degrees at a placement angle between 153 and 207 degrees. They picked up from tape at 0 degrees so wobble certainly comes to effect.

@Juha: just read the openpnp thread carefully and you will see that my conserns are right.

If we think of implementing a nozzle changer we have to use the real center of the z axis tube because the runout of the nozzle holder can probably be neglected (as long as the z axis is truely orthogonal and the holder is concentric) but the nozzles are pulled and pushed in the changer accordimng to the center of the holder aka the center of the tube.

Computing the real axis center is fairly simple. To be most accurate it could be meaningful to use 15 degrees rotation steps and average the results of the 4 right angle intersection calculations as the videoprocessing circle detection is not unambiguous.
best regards
Manfred
mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Are we doing needle calibration right?

Post by mrandt »

mawa wrote:If we think of implementing a nozzle changer we have to use the real center of the z axis tube because the runout of the nozzle holder can probably be neglected (as long as the z axis is truely orthogonal and the holder is concentric) but the nozzles are pulled and pushed in the changer accordimng to the center of the holder aka the center of the tube.
Hi Manfred; I am getting confused. You continue to find arguments that support my claim ("we must use center of A-axis rotation for reference, not the actual needle tip position at a given A-angle"). Yet, you said earlier that it was not necessary?

Anyways, auto nozzle changer is probably the best argument besides bottom vision offset / rotational correction: Assuming each nozzle has a slightly different runout behaviour, the wobble calibration needs to be done (and correction applied) per nozzle.

Still, we will need a head position which is independent of nozzle; so IMHO that could ONLY be the rotational center. Easy enough to determine with each wobble calibration. Just measure actual position at given angles and compute the center of gravitiy of the ellipsis. The "mean" of all deviations might also be good enough.

I am not sure what this change entiles but I guess it would be helpful to avoid problems in the future.

BTW: Any chance we change the Z-axis behaviour to comply with most other CNC and PNP; Z-axis positive is up, negative is down? I would like to invert my motor movement and exchange Z-min + Z-max switches to be able to run OpenPNP. It would be absolutely fantastic if LitePlacer software supported this wiring as well; it could be a configuration option so that users don't have to change their existing machine unless they want a "normal" coordinate system or use other PnP-software in parallel.
mawa
Posts: 139
Joined: Wed Jun 10, 2015 1:23 pm
Location: Near Hamburg, Germany

Re: Are we doing needle calibration right?

Post by mawa »

mrandt wrote:Yet, you said earlier that it was not necessary?
What a misunderstanding! :cry: :cry:

If you take a second look at my first post, it Is exactly what I wanted to say and question. I called it z-axis center.

so here my original suggestion and claim:
mawa wrote: step 1) first compute the center point of the neddle wobble aka the z-axis center.
step 2) The camera to needle offset will then be set using the real z-axis center and will remain constant thereafter.
step 3) Then to compensate eventuall needle wobble we move the z-axis center to the up cam center and then calibrate the wobble / runout and fill the offset table for the 16 angles. Now the 0°entry has an offset X/Y unequel to 0.

When we change to needle or power up the system with an unknown theta angle after that we only need to execute step 3 with the new needle.
best regards
Manfred
mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Are we doing needle calibration right?

Post by mrandt »

OK; I get it now. Seems like we have been on the same page all along.

@JuKu I think we can conclude the discussion; unless you object? In the end it's up to you anyways... Unless Manfred or I implement something (the latter is unlikely though, sorry) :D
JuKu
Site Admin
Posts: 1110
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: Are we doing needle calibration right?

Post by JuKu »

BTW: Any chance we change the Z-axis behaviour to comply with most other CNC and PNP; Z-axis positive is up, negative is down? I would like to invert my motor movement and exchange Z-min + Z-max switches to be able to run OpenPNP. It would be absolutely fantastic if LitePlacer software supported this wiring as well; it could be a configuration option so that users don't have to change their existing machine unless they want a "normal" coordinate system or use other PnP-software in parallel.
Unlikely, to be realistic. Install a switch for the limit switch wires and for one pair of motor wires. You can change the polarity of Z axis by a serial command, too but if/when I do this, I think the switch would be easier to use.
sgraves
Posts: 30
Joined: Mon Jul 04, 2016 2:48 am
Location: Tampa, FL USA

Re: Are we doing needle calibration right?

Post by sgraves »

I just joined the forum, I have a new machine. I agree that the compensation should be relative to the A axis. Ironically, the algorithm to do this is quite simple. First one must realize that the needle point is at some distance from the A axis. If we rotate the needle 180 degrees the distance between the two points is twice the distance and the center of that line is the center of rotation. So the algorithm only needs to be measured at two points. Say those two points are 0 and 180 degrees and the points (camera coordinates) are (0.3, 0.1) and (-0.1,0.5) , the center is at (0.1, 0,3) ( 0.3+[-0.1-0.3]/2, 0.1 + [0.5-0.1]/2). The compensation factor is the vector from the center to the 0 deg point (0.2,0.2) . Using trigonometry one can calculate the correction factor for any degrees (basically the rotation transform). One determines the wobble first then does the needle offset calibration. If one uses the compensation factor the distance of the needle offset will be to the A axis. For example, if we place the needle at a point on the PCB and the machine position is (20,50) and then when we align the camera at the same mark and the machine position is (95,78) the distance the machine moved is (75,28) but we want the distance from the center A rotation so our needle (more accurately A axis) to cam offset is (75.2, 28.2). If the offset were done at a different angle then the new relative position of the A axis is done with rotation transform and those values are used.

https://en.wikipedia.org/wiki/Rotation_matrix

Unless one moves the camera the A axis to cam offset will not change, so changing needles will not require re-calibration. However, if one power cycles at any position other than 0 a new wobble compensation must be done.
JuKu
Site Admin
Posts: 1110
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: Are we doing needle calibration right?

Post by JuKu »

I have to think about this again. :) You are right if we assume there is no wobble on the axis itself. Maybe a safe assumption, but I haven't actually measured it (I should). If there is, I think we'll get ellipses, therefore the multiple point calibration.
Post Reply