Are we doing needle calibration right?

mawa
Posts: 139
Joined: Wed Jun 10, 2015 1:23 pm
Location: Near Hamburg, Germany

Are we doing needle calibration right?

Post by mawa »

I stepped into a recurring offset problem after changing my needle or after restart of the program.

Let me show you my path of findings and please correct me if I am wrong:

a) the machine coordinates are homed mechanically and optically using the center of the down cam.
b) right now we will ignore PCN fiducial corrections.
c) the down cam center matches the machines homed X and Y values which we also display.
d) when we want to pick or place a part we have to know the correct offset to move the needle to the location.
This offset is measured using a needle at 0°angle by one of the known camera<->needle calibration methods.
e) But because the needle is not 100% straight it will wobble in a circular pattern when we use an angle different from 0°. So we execute a needle wobble calibration which creates a table with X/Y offset values relative to the nozzle location @ 0°. During this calibration we see the rotating around a location - the Z axis tubes center point. the Offset values for 0° and 360° are very close to zero. Deviation is caused by GetCircle inaccuracy of the vison system.
f) as long as we keep the 0° position of the A axis and do not change the nozzle everything is fine....

until we
g) restart the programm after leaving the A in an non 0° angle or we change the needle. In later case the wobble offset can be totally different depending into which direction the nozzle is bent.
h) we calibrate this new situation and get a new wobble offset table. Again @ 0° we get a value very close to zero.
i) BUT we do Not recalibrate the camera to needle offset

Result:
we get an offset which in its worst case can be the sum of the 0° offset vector of both needles from the z-Axis center.

Conclusion: When we calibrate the needle we have to

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 to wobble 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.

So dear fellow liteplacers... am I right or is there a flaw in my thinking?
best regards
Manfred
michael-yurov
Posts: 12
Joined: Fri Jun 05, 2015 11:09 pm

Re: Are we doing needle calibration right?

Post by michael-yurov »

I had big problems with the nozzle correction.
When I turned off the nozzle correction, the machine began to work much more precisely!

I think there are error in nozzle correction algorithm.

For example, elements of the tape located as an + Y, and elements are located as 180deg. have been installed incorrectly. Nozzle adjustment worked in the opposite direction.

The problem appeared after Juha made changes in the program, where is set the angle of the elements in the tape (Tape Position table).
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 believe the wobble correction works, and I'm not aware of any issues with it. I will investigate what Michael is saying, but the basic principle is sound. What mawa is missing is that the correction at 0 angle is measured and used as well. When you set up the machine, you set the down camera to needle distance and the up camera location with one arbitary needle wobble position. All needle calibrations are done against these nominal values, including the 0 angle measurement. When you restart the machine, the rotation zero is indeed different than what it was when you turned the machine off, and therefore, the needle position is also different. This doesn't matter, as the needle offset is re-measured and the new offset is used.

For example, if you have the machine with the rotation axis at 90 degrees, the needle correction values for 90deg. are x and y. These are close to zero only by chance. If you turn off the machine now and restart it, the rotation value is set at 0. The needle is recalibrated and this time, the 0 deg. wobble correction values will be very close to the same (non-zero) x and y values, that the machine used for 90 degrees on previous run. Does this make sense?
michael-yurov
Posts: 12
Joined: Fri Jun 05, 2015 11:09 pm

Re: Are we doing needle calibration right?

Post by michael-yurov »

JuKu wrote:I believe the wobble correction works, and I'm not aware of any issues with it. I will investigate what Michael is saying, but the basic principle is sound.
I guess that need to check how the correction varies in different directions of parts in the tapes.

Maybe. I was wrong, and the algorithm is working properly...
But I am very long time could not achieve good result, while not disabled this feature.
(the up looking camera is always good and accurately detect nozzle)
mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Are we doing needle calibration right?

Post by mrandt »

I marked the "default" orientation on my nozzles, just to make sure the A axis is always the same when I start up.

Also, I repeat needle to camera distance calibration and needle wobble calibration before each job.

There has been some extensive discussion about alternate ways to implement wobble correction a while back:
http://liteplacer.com/phpBB/viewtopic.p ... rate#p1061

Basically it boils down to where your center of reference is - either the "virtual" middle of all measured nozzle tip positions or the "acutal" position of the nozzle at A = 0°.

I believe both approaches work as long as compensation algorithms are in sync with the frame of reference.

I have not checked but I believe RMod is different from Juha's original source in this regard. Also, Karl reimplemented most correction algorithms for location (also for tilt and sheer of the PCB) - so you will find major differences in both versions. I don't want to give a verdict which one yields better results though.
mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Are we doing needle calibration right?

Post by mrandt »

mrandt wrote:Basically it boils down to where your center of reference is - either the "virtual" middle of all measured nozzle tip positions or the "acutal" position of the nozzle at A = 0°.
After reading the following, I have to revise above statement:
https://groups.google.com/forum/#!topic ... 6YV9sPXPFM

If we want to use bottom vision (uplooking cam) to perform correction for offset and rotation of components, the reference for pickup head position MUST be the A-axis center of rotation - what I called the "virutal" middle before.

The nozzle / needle wobble calibration should be used to determine the true center of rotation, which I assume is the center of gravitiy of all measured nozzle tip positions during a full revolution of A-axis.

This "virtual" center should be used for all positioning tasks and be corrected according to measured nozzle runout (wobble) for any given A-axis angle.

As a consequence, camera - nozzle offset calibration would also need to be changed. It has to be relative to A-axis rotational center; not nozzle tip. But as we can only measure nozzle tip, it should only be performed AFTER nozzle runout / wobble calibration, so that the offset for the given A-axis angle can be factored in.

I think this is a major change in the software; but IMHO a necessary one.
User avatar
dampfboot
Posts: 48
Joined: Tue Jul 28, 2015 5:51 pm
Location: Hannover, Germany
Contact:

Re: Are we doing needle calibration right?

Post by dampfboot »

Hello Mrand.

I am new to liteplacer - but I always wondered how the lite placer software ever measures the cam to needle distance without measuring the wobble and calculating the true center of the rotating needle axis.

So for my oppinion you are totally right with your thinking...

Rainer
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 »

@Malte: I'm not sure about this. OpenPnP does not have wobble correction, we do. For the discussion, let's assume that the correction is perfect. If so, the software is capable to getting the needle exactly where it is wanted. The needle is always where the software wants it to be; the center of rotation is irrelevant.

This is the thinking behind the the software today. Now, if the correction is perfect or not, is another matter...

@dampfoot: At setup, the needle to camera distance and the up camera position are measured with one needle position. All the following measurements are referred to this. If another needle happens to be a bit to left in all rotation values, so be it; the software will always apply a correction to 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 »

I agree that OpenPnP does not have wobble correction; but it does use bottom vision to correct part rotation error and offset.

I assume that you want to implement the latter as well? IMHO it is absolutely necessary to place smaller parts, ICs and BGA.

Now, what do you do once you determine rotational error? You measure and correct it by changing A-angle.

Interestingly enough, the part will not rotate around the nozzle tip position but around the actual A-axis center of rotation - someone put togehter a very nice animation showing the effect:
https://www.youtube.com/watch?v=nb8HYkDGoDA

In reality, you will not only want to correct for orientation but also for offset (part is shifted left / right and up / down).

That should be fairly easy assuming the center of rotation is identical to the "virtual" nozzle position - and might be significantly harder with the current implementation of assuming nozzle location as actual nozzle tip location with a specific A-angle.

I am not saying it can't be done; you could for example center the part with a stepping approximation method (similar to homing in on fiducials), then calculate all offsets from last known nozzle position and apply the correction matrix during placement...

But I foresee a lot of trouble with this approach and would consider it much easier if we actually took the A-axis rotational center as the reference.

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 :D
User avatar
dampfboot
Posts: 48
Joined: Tue Jul 28, 2015 5:51 pm
Location: Hannover, Germany
Contact:

Re: Are we doing needle calibration right?

Post by dampfboot »

@Juku you will be right because you are the programer of the code - and a geniouse because of this in my eyes for sure!

As a mechanical CNC thinking user a needle to cam distance would indicate the cam to motor rotation axis - but you are right this is irrelevant as long as nobody touches the A axis till the first wooble correction!

To 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 - otherwise if someone will rotate the needle (like me) and is thinking that he has done the needle to cam distance measurement already he will run in trouble - or is there any other code implemented which ensures that this is not a problem?

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. Maybe this would cause some major reprograming for you - so i will no longer ask pesky questions about that in the future because I like what I have got already!
Post Reply