It is already done. You just need to enable nozzle tip calibration, it will measure any non-uniform Z tilts between nozzles.
Explained in the Wiki (illustration exaggerated):
_Mark
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/e60fe2f2-219d-44a3-8e0e-b770ddf0ae28n%40googlegroups.com.
> What do I have to do to avoid lowering the nozzle in the job?
For optimal performance, configure your machine for a non-empty Safe Z Zone, i.e., some headroom above Safe Z (allow Z optimization through limping nozzles), and then for Dynamic Safe Z.
https://github.com/openpnp/openpnp/wiki/Kinematic-Solutions#special-considerations-for-z-axes
Then set focus of the lens to be at or slightly above Safe Z. Then use the Issues & Solution "Determine the up-looking camera ... position" solution (Include Solved, Reopen) to set the camera position.
https://youtu.be/md68n_J7uto?t=212
https://github.com/openpnp/openpnp/wiki/Vision-Solutions#up-looking-camera-offsets
or set it manually.
Note, in bottom vision OpenPnP will still adjust for the part
height to get the bottom of the part into the focal plane.
With a non-empty Safe Z Zone and the bottom camera location at or
slightly above Safe Z, the movement to/from the bottom camera will
be a diagonal in X/Y and Z, i.e. it will smoothly ramp up to Safe
Z + part height, so there should be no extra corners and Z moves
wasting time.
Please report back if this works. You'll be one of the first. Although some users using pneumatic nozzles (that can only go "all up" or "all down") use it with success.
Note: although this all makes perfect sense in theory, many
professional machines still have the camera focal plane at PCB Z.
So I guess there is still some merit.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/0b2fa200-7681-4255-9d21-1ed4747bb763n%40googlegroups.com.
Yes, Leoyu, you're perfectly right.
To refer back to the illustration: We don't know if Z1 has tilt
too. But it doesn't matter, as Leoyu pointed out in his points 2
and 3.
And yes, as Leoyu also points out in his point 4, each nozzle is
also calibrated in the nozzle<->down-looking camera offset
calibration, a.k.a. "confetti" test. And as everybody can see now
(I hope) it is extra important that this confetti test be
performed on PCB Z level.
https://youtu.be/md68n_J7uto?t=460
Another element is units per pixel calibration. We do that by
moving around the nozzle above the bottom camera, so we directly
take the machine X/Y motion into account. After calibration, it
therefore doesn't matter that the focal plane is farther away from
the camera, and that things appear smaller.
So all in all, the upper X/Y plane may be shifted a bit (by Z1
tilt), but any offsets measured in bottom vision remains the same,
and is entirely relative to the neutral nozzle tip position we
calibrated before (also against run-out btw.).
All errors can be eliminated.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ac6af60d-2902-4e9c-a461-8e09c0a8e48an%40googlegroups.com.
"The wiki link in your first reply made me realize that the N1 might be different"
That's true insofar as it was used to calibrate the bottom camera
at one time. Issues & Solutions just happens to use
the "default nozzle" for that, which is the first as defined in
the Machine Setup tree.
But after that moment a nozzle is no longer special. It will be calibrated for offset like all the other nozzles. If the bottom camera slightly moved, or the machine homes a bit different, or you get unequal thermal expansion, or you since crashed the nozzle into an obstacle and it now has a new tilt, it will be compensated in the nozzle tip calibration, like nozzle 2 or an other. Operationally, all nozzles are equal.
Strictly speaking, calibration is per Nozzle-Tip-and-Nozzle
combo, and you can see the Camera position offset is not
zero here (this is from a simulated imperfect machine):
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/65a8a4a6-17ee-48d7-9727-9dacc3ea455bn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/65a8a4a6-17ee-48d7-9727-9dacc3ea455bn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/CAJSOC538vuYho6jfc0tA2KM9DP-emyKXSxVhnY68mWPBuL%2BciA%40mail.gmail.com.
Please open a separate discussion thread. This one is about
"Bottom Vision & Nozzle Offsets"
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/CAN7PtYvZabRtrFkJ4onG%2BYutfJpHTQMvfiKVEjnRbU-OHNHWTQ%40mail.gmail.com.
Good for you to want to understand. 😎
No, the offset determined in nozzle tip calibration is exclusively applied when holding the part over the bottom camera, nowhere else. Only the run-out is compensated everywhere.
It follows that as long as you calibrate the confetti on PCB Z
and the nozzle tip on camera focal Z, my promise to eliminate all
errors holds.
(I'm just talking about these Z tilt errors, of course, not really
"all errors" 😇).
Granted, if you have a feeder with a pick Z drastically different from PCB Z, this promise does not help you. OpenPnP does not compensate the Z tilt in the nozzle per se. To calibrate the true Z tilt we would need to perform a "confetti test" on a secondary Z.
But to compensate Z axis tilt would be more complicated than you might think, that's why it has been discussed, but never implemented so far. The problem is that Z moves then also involve X/Y moves, but different ones for each nozzle. So a "Head move to Safe Z" becomes more complicated, because today's code now assumes it is the same for all HeadMountables, but it is not. And moving X/Y for each Z also involves X/Y backlash compensation on most machines (slow!). Implemented naively, the extra backlash moves would mean smearing the part around in the solder paste. Not impossible to go around this (precompensating at Safe Z) but way more complicated than today. So we are certainly not saying "no" to a nozzle Z tilt compensation, but it should not be mistaken as a "quick thing to add". 😂
Consequence: put your feeders roughly to PCB Z, as all the pro machines do too. 😛
> The only solution I currently see...
It is better to use a "confetti test" on a secondary Z, because
it then actually makes the top camera view-axis the "reference Z
axis". This allows you to capture feeder pick locations etc.
reliably withe the camera at different Z, and then go to each of
these Z with the tilt compensated nozzle. The bottom camera on the
other hand only ever operates at the focal Z/part underside.
_Mark
> The secondary nozzles are calibrated to have error compensation for different Z-heights and can accept different feeder pickup heights. What about the first nozzle. It still seems to accept only feeder pickup heights that are in line with the PCB plane?
No, the nozzles would all be "confetti"-calibrated at two
Z levels. There would be no difference between nozzle 1 and the
others.
The only event that singles out the first nozzle, is the momentary(!)
transfer of the calibrated nozzle 1 position, in order to
calibrate the bottom camera position. This is the same as today,
and tilt compensation would not change that. Also the bottom
camera should not change by applying tilt compensation, because
nozzle tip calibration already did the same thing, just not in a
generalized "3D" way, but only for that particular bottom camera
focal Z plane.
Note, you can then still do nozzle tip calibration and it will be a good indicator whether the tilt compensation works, i.e. it should then only show negligible offsets, this time on all nozzles.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/002b24ca-33ff-4695-a429-eb611dd0c427n%40googlegroups.com.
> Unfortunately - technically speaking - your claim "you
since crashed the nozzle into an obstacle and it now has a new
tilt, it will be compensated" does not hold true as such an
event would change the location of the nozzle which is only
corrected by a new confetti calibration.
Yes, of course, I was implying that too. But realize that by crashing it you might get a different Z tilt, so even after you redo the confetti calibration, the position up at the higher camera focal Z would still be different. Nozzle tip calibration will automatically fix it, without you having to re-calibrate the bottom camera location.
With that example I was just pointing out that that the use of nozzle 1 for bottom camera calibration is just momentary. Afterwards it is like every other nozzle and can "acquire" an offset too, i.e., nozzle 1 is not special anymore.Conversely, the bottom camera is not "dependent" of the nozzle 1.
After it was momentarily calibrated with nozzle 1, it has
its location set in absolute machine coordinates.
Nozzle 1 is just a vessel for a momentary transfer of coordinates, that's what I wanted to point out with the example.
_Mark
I guess you'd only need to change the cameras focal plane. Due to the
blur, that's applied anyway, the focus error of ~5mm shall not matter
that much.
I am excited about the result!
> This is quite complicated even to understand what is implemented. Do we really need so much complexity?
Yes. If you want speed. Otherwise just set the focal plane at PCB Z as is still recommended for least problems.
If you want, speed, you don't need to understand the "why". Just the "how" (to setup). And I told you "how". 😉
Dynamic Safe Z is a speed optimization in itself , because it
only lifts parts as high as needed to clear obstacles. The many
small passives need not be lifted as high as the one or two bulky
electrolyte capacitors. If you already have Dynamic Safe Z
configured, then you automatically have the required Safe Z Zone,
and following my advice is straight-forward.
> They don’t seem to care about part height but only z=0.
Is that so? Source?
> Considering the Bcam has auto-focus...
OpenPnP has auto-focus, only it is not camera auto-focus,
instead we move the nozzle to focus on the part bottom, so we can
auto-detect the part height, when a part is used for the very
first time. So you don't need to enter it manually.
https://github.com/openpnp/openpnp/wiki/Up-looking-Camera-Auto-Focus
Please stay far, far away from auto-focus in cameras. They
involve
focus breathing, unstable lens axes(!), and are extremely
slow to focus. Plus they are bulky and heavy. We don't want any of
that.
For very short (i.e. not tall) parts it would be feasible to not adjust Z for part height. The camera being slightly out of focus is actually good for detection (sometimes we add an artificial blur stage to reduce noise anyways). But you must realize that bottom vision is then not as precise, because the scale (Units per Pixel) of any detected part shift is not known, with the part underside varying. For taller parts it likely needs more passes in vision (slower). We could try and compensate for scale at Z too but if you speak of "so much complexity" then that is!
But as Jan already explained: if you want Dynamic Safe Z for best speed, then the part is already at the right height, when you pass over the camera. So this discussion is quite useless. The discussion would become useful when we start talking about multi-camera bottom vision, i.e. detecting multiple nozzles at the same time, and they cannot be individually Z-adjusted as they have shared Z axes...but that's another level with bags of new problems. 😛
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/44843c30-0311-4a20-8dcb-3c4598ab1489n%40googlegroups.com.
>> They don’t seem to care about part height but only z=0.
>Is that so? Source?
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/f73ccf2e-2175-4ba9-a7bd-dd9d68d00a34n%40googlegroups.com.
> What problems do we have to watch out/expect if the focal
plane of the bottom camera is not at PCB Z anymore?
It's just a mechanical system that may behave differently up at Safe Z than down at PCB level. Machines habe become more elaborate, e.g., precision linear rails have become affordable and more common, so most of this may have gone. But for older DIY machine of the "Liteplacer class" with just "plastic wheels on extrusions" and other make-do designs, where everything is "bendy" etc., there might be effects like the vacuum tube being more compressed at safe Z and creating a different pressure and run-out (I'm just inventing something here, purely for illustration).
Plus you either need to understand the complexity and devise how to setup the machine, or follow much more complicated "recipes" by others. You need recalibration more often. And perhaps you need to let go to a degree and trust OpenPnP, even when it is asked too much to understand each and every rationale behind what it does._Mark
Also keep in mind those commercial machines use high speed analog cameras with frame grabber boards triggered by the motion system on the machine. This is thousands of dollars to implement and FAR beyond the scope of OpenPNP IMHO.
Non-OpenPnP-user SM, rolling his own PnP solution, demonstrated
that it can be done. That's very impressive, but apparently
involved using a proprietary industrial SDK which AFAIK excludes
an Open Source and/or OS-portable implementation. Also, I don't
know the real cost of his hardware (he said it was old). Clearly
the machine is also extremely impressive in itself, as you can see
by the perfectly acceptable placement even without vision
(somewhat ironic 😂).
https://groups.google.com/g/openpnp/c/0YNIHQRU13k/m/-TSa4TNFAAAJ
Please read his post to understand which parts are with/without vision "with flyby vision (bottom row) and without vision (top row)".
_Mark
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/476a9dd3-34a2-40c1-a85e-39e727fa731en%40googlegroups.com.
Non-OpenPnP-user SM, rolling his own PnP solution, demonstrated that it can be done. That's very impressive, but apparently involved using a proprietary industrial SDK which AFAIK excludes an Open Source and/or OS-portable implementation. Also, I don't know the real cost of his hardware (he said it was old). Clearly the machine is also extremely impressive in itself, as you can see by the perfectly acceptable placement even without vision (somewhat ironic 😂).
Hi Micael!
IMHO fly-by-vision is just the final escalation state. In order to be
prepared, OpenPnP would first have to learn how to calculate and apply
bottom vision corrections in parallel with motion to the place location.
This involves, that retries are not practical anymore (or at least very
costly). Then OpenPnP would have to calculate some kind of path across
the camera so that bottom vision happens always that the same speed and
direction.
Finally OpenPnP and the controller need to agree on some type
of API to send out a trigger to the camera.
There are much lower hanging fruit, like the currently missing feeder co-location optimization. 😇
As SM's machine ironically demonstrates, placement without vision is also an option, and there is basically one intertwined question:
Is the machine stiff and precise in itself?
If yes: you can likely place many of the numerous
passives without vision. As for the few large but fine
pitch ICs, the gain with fly-by is negligible.
If no: forget about all the fancy stuff like fly-by
vision. It will simply never work, as SM laid out it is about
micro-seconds, and triggering from FPGA hardware, not even an MCU
being "real-time" enough, and you basically extrapolate from that
one camera shot, i.e. no backlash and no machine vibration
whatsoever can be present, which excludes many if not most
machines in the OpenPnP biotope.
_Mark
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/b354efd0-d6fd-4099-938c-10923c31f1f3n%40googlegroups.com.
There are much lower hanging fruit, like the currently missing feeder co-location optimization. 😇
If no: forget about all the fancy stuff like fly-by vision. It will simply never work, as SM laid out it is about micro-seconds, and triggering from FPGA hardware, not even an MCU being "real-time" enough, and you basically extrapolate from that one camera shot, i.e. no backlash and no machine vibration whatsoever can be present, which excludes many if not most machines in the OpenPnP biotope.
> OK, I can forget about it. But sub micro-second triggering on my
> machine, should be doable in code. The cortex M4 has 12cycle interrupt
> latency, and IIRC, it is running at 170mhz, we can get an interrupt from
STMs are very nice in the way that one can link their timers to form
quite complicated structures. Then you'll generate the trigger in
hardware and have no latency by design.
You could also hijack the inner step generator loop and emit the
trigger in parallel with step pulses, again with no latency (suppose the
code can not be interrupted, as I assume for precise step calculation.).
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/e1126266-1c8a-4f47-a9f6-23972dfe121en%40googlegroups.com.