How do you solve the concentricity problem of nozzle?

Skip to first unread message

Tianxiao Xu

unread,
Sep 25, 2017, 9:51:02 AM9/25/17
to OpenPnP
Hi, everyone,

My PnP can run the whole process now, I'm so happy about it, but sometimes, there are errors because of the concentricity problem of the nozzle.

When the nozzle turns in C-Axis, the X, Y position changes at the same time, and because the nozzle adaptor is fixed with the motor shaft by only one bolt,
the concentricity is not good enough, which means the offset between top camera and nozzle is changing.


And I know that we have bottom camera to figure it out before placing the resistor(for example) on the board,
but the problem happens before going to pick up the resistor, it turns C-Axis to fit the feeder.


Thus, when the error is too much, it cannot go to the right position to pick the resistor up. 


So, do you have any suggestion to solve this problem?
or any other type of nozzle/nozzle adaptor that is much better in quality?

Thanks
Terry

Cri S

unread,
Sep 25, 2017, 10:39:10 AM9/25/17
to ope...@googlegroups.com
What is the problem ?
you have a runout of 0.2286mm , the resistor is 0.8mm wide and the runout is
0.1143 added to the nozzle hole of 0.6mm is 0.7143mm .
The height offset if you have that give you more error as the runout !.
With 0402 the runout problem is theoretical present, pratical you
don't note it unless
you have really poor vacuum pump.
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/af8827d8-d098-4cc5-8bbb-9e2cc8f134a8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Tianxiao Xu

unread,
Sep 25, 2017, 11:24:13 AM9/25/17
to OpenPnP
Hi, Cri. S

Thanks for the reply.
These videos from youtube are not mine.
But my problem is caused because of this concentricity error.

After fiducial check, my PnP will go to the feeder and get the first resistor,
But the nozzle is not right on the position of the resistor, so the pickup fails.

I believe it is because the offset between the camera and nozzle changed because of the concentricity error of the nozzle and its rotation.
And I can not fix it right away. Maybe I have to buy some better nozzle adaptor/holder or better nozzle.
So I need some suggestion.

Thanks
Terry.

Marek T.

unread,
Sep 25, 2017, 3:30:01 PM9/25/17
to OpenPnP
And if you send camera to the feeder the camera-cross is placed in the center of the part? If it is then you just have set wrong distance between center of down looking camera and center of the nozzle. Place some plasticine on the PCB and make a mark lowering the nozzle there (you can rotate nozzle 360 to make a trace of averaged rotation). Then reset coordinates and go with camera to the center of the printed mark, and you have exact distance to put into xy parameters of the nozzle. Jason has described it somewhere already.
In my opinion every Chinese Juki are worth the same (it means nothing) about their runouts. I've tried from 3 suppliers and it's the same shit. But prerorate option compensate it perfectly.

Tianxiao Xu

unread,
Sep 26, 2017, 5:12:54 PM9/26/17
to OpenPnP
I used the plasticine and it is clear that after 360 turning, the hole is much bigger, about 1.3 to 1.5 times to the original one.
it works fine for big chips, but for small resistors, it would be a problem when picking.

Marek T.

unread,
Sep 26, 2017, 6:12:39 PM9/26/17
to OpenPnP
Of course it's bigger as the nozzle has the runout. Now you have averaged center, measure distance from this center to the center of the upper camera (the way like told before) and set it as offset of the nozzle. I did it this way and it works good. I've 502 nozzle with runout ~0.15mm and with prerorate option set on can place 0402 parts without any problems.

Tianxiao Xu

unread,
Sep 27, 2017, 8:28:36 AM9/27/17
to OpenPnP
Another problem is the C rotation direction, It seems after checking by the bottom camera, it turns to the wrong direction.
How can I figure it out? flip the image not helps, maybe change the wire connection to the stepper motor?

Marek T.

unread,
Sep 27, 2017, 11:25:20 AM9/27/17
to OpenPnP
But when you rotate nozzle by the jog it turns in proper direction??
If you use Smoothieboard try to add ! after port number...
gamma_dir_pin                                0.20!

Tianxiao Xu

unread,
Sep 27, 2017, 4:08:22 PM9/27/17
to OpenPnP
Thanks Marek,

Yes, I add ! in the pin definition, and it works fine, and I changed the flip of the image, to make sure it moves to the same direction as the mouse pointed.
it works much better now.

I tried the fiducials recognition for 10 times, it seems for my fiducials and camera, the error is in the range of 0.1, too much for me.
And as I know from the resolution of the camera, the webcamera is only 320x240, and the opencvcamera is 640x480. Does OpenPnP support better resolution such as 1080P?

Actually I use the same camera, but I can not connect the two same type of cameras to OpenPnP as opencvcamera, if I do so, I can not start OpenPnP.

I believe better resolution of camera can give better accuracy. or maybe I can move the camera closer to the fiducials later.

But the biggest problem which affect the accuracy is still the concentricity of the Nozzle and Nozzle holder.
the nozzle will move even when the vacuum on/off.


Is Jason's Nozzle and Nozzle holder in the video below much better than normal green juki nozzle? where can I buy it?

Jason von Nieda

unread,
Sep 27, 2017, 4:14:33 PM9/27/17
to OpenPnP
See https://github.com/openpnp/openpnp/wiki/USB-Camera-Troubleshooting-FAQ for why you can't connect two cameras with OpenCvCamera.

320x240 is pretty low, and could easily explain a significant amount of error.

In 2-3 days I will be releasing a new version of OpenPnP that includes an entirely new capture system. This should make it possible to use any camera at any supported resolution and also includes the ability to manually set properties such as exposure and focus. This is intended to replace OpenCvCamera and Webcams. Keep a lookout here on the list for the announcement.

Jason


--
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 post to this group, send email to ope...@googlegroups.com.

Bernd Walter

unread,
Sep 27, 2017, 5:40:09 PM9/27/17
to OpenPnP


On Wednesday, September 27, 2017 at 10:14:33 PM UTC+2, Jason von Nieda wrote:
See https://github.com/openpnp/openpnp/wiki/USB-Camera-Troubleshooting-FAQ for why you can't connect two cameras with OpenCvCamera.

320x240 is pretty low, and could easily explain a significant amount of error.

In 2-3 days I will be releasing a new version of OpenPnP that includes an entirely new capture system. This should make it possible to use any camera at any supported resolution and also includes the ability to manually set properties such as exposure and focus. This is intended to replace OpenCvCamera and Webcams. Keep a lookout here on the list for the announcement.

As much as I like development.
It also scares me a bit, since I have had a hard time to get OpenCV running in OpenPnP under FreeBSD and I'm using a local
modification to use the TCP stream from the Raspberry cameras.

Jason von Nieda

unread,
Sep 27, 2017, 5:42:02 PM9/27/17
to ope...@googlegroups.com
 Nothing is being removed. All existing systems will continue to work the same. This just adds a new camera type that can (optionally) be used.

Jason


--
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 post to this group, send email to ope...@googlegroups.com.

Tianxiao Xu

unread,
Sep 28, 2017, 9:14:58 AM9/28/17
to OpenPnP
That's GREAT!

How exciting it is!

Thanks Jason

Cri S

unread,
Sep 28, 2017, 9:16:17 AM9/28/17
to ope...@googlegroups.com
What other features that you have planned to include into next release ?
>>> Actually I use the same camera, *but I can not connect the two same type
>>>
>>> of cameras to OpenPnP as opencvcamera, if I do so, I can not start
>>> OpenPnP.*
>>>
>>> I believe better resolution of camera can give better accuracy. or maybe
>>>
>>> I can move the camera closer to the fiducials later.
>>>
>>> But the biggest problem which affect the accuracy is still the
>>> concentricity of the Nozzle and Nozzle holder.
>>> the nozzle will move even when the vacuum on/off.
>>>
>>>
>>> Is Jason's Nozzle and Nozzle holder in the video below much better than
>>> normal green juki nozzle? where can I buy it?
>>> https://www.youtube.com/watch?v=cwXc-rxFLUM&t=35s
>>>
>>>>
>>>> --
>>> 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 <javascript:>.
>>> To post to this group, send email to ope...@googlegroups.com
>>> <javascript:>.
>>> <https://groups.google.com/d/msgid/openpnp/6ba746c0-49a0-4e88-8b86-317a70663acd%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/87616465-db88-4f1e-a462-6134b1705dec%40googlegroups.com.

Marek T.

unread,
Sep 28, 2017, 9:32:44 AM9/28/17
to OpenPnP
Three fiducials and/or scaling ?! ;)

Jason von Nieda

unread,
Sep 28, 2017, 10:19:33 AM9/28/17
to OpenPnP
Mentioned in IRC, but will mention here too: 

I release code as it's finished. I don't hold features for releases. So, as soon as something is ready, it gets merged into develop. The camera code is just about ready, so once it's ready it will be pushed so people can start using it.

The fiducial scaling code is brand new, and right now is just a proof of concept. It will probably be a few weeks before it's ready to use, but as soon as it is I will push it.

Jason


On Thu, Sep 28, 2017 at 8:32 AM Marek T. <marek.tw...@gmail.com> wrote:
Three fiducials and/or scaling ?! ;)

--
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 post to this group, send email to ope...@googlegroups.com.

Marek T.

unread,
Sep 28, 2017, 10:26:06 AM9/28/17
to OpenPnP
Great Jason :-)

Tianxiao Xu

unread,
Sep 28, 2017, 11:20:56 AM9/28/17
to OpenPnP
So, do you have any suggestions about high quality juki nozzles for 5mm stepper motor I can buy?

Marek T.

unread,
Sep 28, 2017, 12:22:07 PM9/28/17
to OpenPnP
Terry, every Chinese nozzles have fatal runouts. Just they have usualy too large size of the pipe where the nozzle tip is placed. You can try original nozzles but the price is $150 instead of $10-15, but people say they are looking poor (comparing to Chinese) but, what's strange a bit, works perfect. So depend how much money you want to pay...
Also Chinese holders which I've imported are not ideal as we'd like to have to work with them without Prerotate-option. But for Chinese nozzles it's really not important. I've made perfect holder then found it was for nothing cause runout of the nozle killed all my efforts while holder making.
Summary is: in my oppinion it's pity of time for seeking ideal shaft motor or ideal holders if you want to use Chinese Jukis. You won't use them without prerotate option (or some auto-calibration feature if maybe appears in future) anyway. While with this option it will work no matter (almost) how shity set you will have built.
Suggestion is to consider using Samsung CP-40 nozzles of you didn't stall with these Juki too deep yet.

Tianxiao Xu

unread,
Sep 28, 2017, 5:06:50 PM9/28/17
to OpenPnP
Thanks Marek for your detailed reply, after reading a lot in this OpenPnP group talks about runout of Juki Nozzles, I found it is difficult to solve the runout problem, but it is possible to do in some way that this runout problem won't affect the PnP result.

I'm not quite sure if I understand all the ideas and your idea about this problem. 
But as I know, the two most important thing are:

1. Before picking the small chips/resistors =, if it runout too much, it may not pick up. So, the offset of nozzle and camera shall be very accurate before picking.
2. If the bottom camera center position is wrong, it will offset a little bit, after checked by the bottom camera. if we set he bottom camera to exact where the runout center is, it would be more accurate.

So, I'm not 100% sure if I am right, but I think there might be a way to fix these two problem.

1. If OpenPnP can check the nozzle runout/offset by the bottom camera before pickup, the nozzle won't miss any resistors/chips. Seems not included in OpenPnP now. If we have this function, even we change the nozzles, it could check the new nozzle when working.
2. OpenPnP think the image center of bottom camera is the nozzle center, but what if it is not? when we set the center of the nozzle, it is normally C=0,and the center of the nozzle. During the place, C<>0, but pretty close to 0,the error is quite small, acceptable.

So, if we can solve problem 1, it can works pretty good? that's why there is a checkbox "rotate prior vision" similar like this? I'm not sure, I need test more.
But I think once setting, the most important is not to rotate before pick up.

So if I set the part to 180 degree, the nozzle will not rotate, and I set the part in the board list to 180 degree, it rotates 180 degree. 
If I set the part 90 degree, it rotate 90 before pickup,  and I set the part in the board list to 90 degree, it rotates 180 degree, too!
This is very interesting. May be I have to double check of my settings, but it happens to my PnP.

Don't take it too serious, I need more test and check, but if you have time, take a look at yours please.

Marek T.

unread,
Sep 28, 2017, 6:06:16 PM9/28/17
to OpenPnP
If the width of the 0402 part is 0.5mm and runout of the 501 nozzle is ~0.1mm then no possible to the part could be not picked up because of that runout. If you have problem like that you rather must check accuracy (calibration) of your axis moving or there is still something wrong with nozzle offset to the downlooking camera.
If the part is alligned over uplooking camera and the rotation issuing from the pcb project (like 90 or 180deg) is performed after that, then this rotation also changes needlessly X/Y calculated offsets (because of the nozzle runout). If we make this rotation before alligning the part (on the fly between the feeder and allign camera) then this not needed changing XY does not occur. Making rotation before alligning is called "prerotate option".

OpenPnp does not have runout learning on the moment - and probably long time will not have yet.

I'm changing nozzles manually and don't care how centerly new nozzle is mounted at all. So the runout of the nozzle is added or deducted from the runout of the holder, accidentally. So sometimes is minimal but mostly quite huge. But it's never a reason of problems with picking or alligning the parts.

phon...@gmail.com

unread,
Sep 28, 2017, 8:30:29 PM9/28/17
to OpenPnP
Knowing nothing about the possiblity of new camera capture system,and if it not possible to making it works on actual computer or buy annother usb pci(e) card  rpi or similar device including low cost
routers with openWDT having it's usb host works.  If you don't want spend money, then switching camera works, the penality are 9-10 seconds delay.
It works with event script Camera.BeforeCapture and currently it works only with opencv driver.

Example, if camera id are 701 and 702 (DirectShow example, second and third camera) if camera is not used, id 751 and 752 is used.
I post the code for single camera, other code exist that allows two cameras to run parallel. 
.
 Useful if having uplooking camera for 
Here is the code for the Camera.BeforeCapture event using bsh code,

import org.openpnp.spi.Camera;
import org.openpnp.machine.reference.camera.OpenCvCamera;

if(machine.getProperty("camera")==null) {
 for(cam : machine.getCameras()) 
    if(cam instanceof OpenCvCamera) {
      if(((i=(OpenCvCamera)cam.getDeviceIndex())%100)<50) 
         ((OpenCvCamera)cam).setDeviceIndex(i+50);  
   machine.setProperty("camera",cam=machine.getDefaultHead.getDefaultCamera());
      if(((i=(OpenCvCamera)cam.getDeviceIndex())%100)>=50)  
         ((OpenCvCamera)cam).setDeviceIndex(i-50);  
cam = (Camera)machine.getProperty("camera");
if(cam!=camera) 
    if(camera instanceof OpenCvCamera) 
    if(cam instanceof OpenCvCamera) {
      if(((i=(OpenCvCamera)cam.getDeviceIndex())%100)<50) 
         ((OpenCvCamera)cam).setDeviceIndex(i+50);  
      try { Thread.sleep(2000); } catch(Exception e) {;}
      if(((i=(OpenCvCamera)camera.getDeviceIndex())%100)>=50)  
         ((OpenCvCamera)camera).setDeviceIndex(i-50);  
      try { Thread.sleep(7000); } catch(Exception e) {;}
     while((OpenCvCamera)camera).internalCapture()==null);
     for(i=0;i<20;i++)
     while((OpenCvCamera)camera).internalCapture()==null);

rainharvester

unread,
Oct 1, 2017, 9:17:41 PM10/1/17
to OpenPnP
"OpenPnp does not have runout learning on the moment - and probably long time will not have yet."


After looking at the code, I thought that if the up camera was ever used, then the offset would be applied to every subsequent move (even when up camera isn't used, like for moving to pick).

But I was told this wasn't the case.

I'm not sure why it couldn't be easily enabled. I stepped in the code but without a real camera and machine, it was difficult to verify.

Tianxiao Xu

unread,
Oct 2, 2017, 4:24:25 PM10/2/17
to OpenPnP
I agree with you because I searched OpenPnP group people already talk about this problem, and Jason used to have the function to check the nozzle offset.
But it seems didn't what perfectly, so he removed it. 

Hi Marek,
I tried to change the nozzle from 505 to 502, to find out that the offset changed about 0.4-0.5 mm, which may be too much for the nozzle to pickup a R0603 resistor.
Is that means I have to calibrate offset settings between top camera and nozzle every time when I change a nozzle?

Offset between nozzle and camera, bottom camera position are the two most important parameters we need to accurately Pick and Place.
I'm sure there much be a way to figure out these parameters during it's working.
Once we find it out, the system can calibrate by itself, then it could be perfect.

Jason von Nieda

unread,
Oct 2, 2017, 4:28:34 PM10/2/17
to OpenPnP
Yes, this feature is called "nozzletip runout calibration". There is an issue about it here https://github.com/openpnp/openpnp/issues/235

I wrote the feature quickly in a night or two and it seemed to work, but then I noticed significant errors in the interpolated values so I turned the feature off until it could be revisited. The code is, I think, mostly working but some of the math needs to be looked at and it needs significant testing.

Jason


--
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 post to this group, send email to ope...@googlegroups.com.

Cri S

unread,
Oct 2, 2017, 5:19:00 PM10/2/17
to ope...@googlegroups.com
As nozzleTip holders usually are polarized for not allowing that the
nozzle rotate and
if using the park feature the nozzle alway have the same initial and
final rotation,
nozzle offset calibration is only required during unplanned power
outages or initial nozzle
setup. I'm suspect that you have camera height offsets where that is a
bigger issue as
nozzle runout, unfortunatly you don't have tested it out.
Maybe 3D printed type nozzle holder are different.or not made accurate enought.
Automatic nozzle tip offset pipline setup need vision recognition
skills and scriptings
stages. Just nozzle orientation correction is not difficult, just the
normal hsv color filtering,
check differences with orginal image, hough line detection, draw that
result and perform MinAreaRectangle detection in order to find out
the angle, maybe this correct you'r
problem of repeatibility because of presumibly printed nozzle holder.
>> <https://groups.google.com/d/msgid/openpnp/c27acf3c-089a-4cd1-acd3-4688bd864d6d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyDE-xQ39PJSi6Mmro%2BL3%2BLDVe5iAs7MN051aWVHDXc_w%40mail.gmail.com.

Marek T.

unread,
Oct 2, 2017, 5:20:15 PM10/2/17
to OpenPnP
Hi Terry,
Offset has changed after nozzle changing? Hmm, understand you may have other runout value but center of the circle drawn by runout of rotating nozzle (kind of virtual center) should rather remain in the same point - so also offset should remain the same. Don't you have there a problem with fixing holder to the motor shaft or the shaft doesn't have some fatal transverse clearance?

Tianxiao Xu

unread,
Oct 3, 2017, 8:25:17 AM10/3/17
to OpenPnP
I'm not sure where it comes, after change, I made a 360 circle in the Plasticine, and found the offset to the center of the 360 circle isn't too much, but the offset data is smaller then before about 0.4-0.5 mm. 

I'm using some typical Chinese Juki nozzle and nozzle holder, which is fixed to the stepper motor shaft by one bolt only. 

Theoretically, this kind of things (360 circle center moves a lot) only happened when the stepper motor holder moved a little during manually amount the nozzle, as Cri S mentioned. Thanks Cri S very much.
I'll check it tomorrow.

Marek T.

unread,
Oct 3, 2017, 9:07:13 AM10/3/17
to OpenPnP
Sorry haven't seen before that Cri advised you. But he had to advise you well as usually does :-).
I meant on my mind that your motor shaft has large transverse clearance, or nozzle holder is not fixed enough - or motor holder is not fixed enough. And then when you manually change the nozzle then also offset changes a little. Check these three points.
Btw, one screw is ok. I made two additional and it helped nothing. You must rotate holder manually around the shaft to compensate runout of the shaft with runout of the holder as much as possible, to don't summarize them.

Cri S

unread,
Oct 3, 2017, 10:00:05 AM10/3/17
to ope...@googlegroups.com
If you send images from the nozzles (uplooking camera) at correct height,
all nozzleTips mount on all nozzles and one image without nozzleTip,
taken at the same height as the other images. For one nozzle 4 images
with 100 degree rotation difference.
If you have 2 nozzles and 5 nozzleTip, this are 42 pictures.
Further image of downlooking camera set at picture center viewed from
uplooking camera and two additional pictures with 1-2 mm distance
The .position must be the configured camera position, on machine
configuration panel
go to the uplooking camera and on camera specific tab move camera to
configured location.
To make the picture, double click on the camera image.
Tell me how many nozzles you have and what nozzle type, and i send you
the scripts.
Then you need to mount each nozzle 18 times on each nozzle at 20
degree intervals
calling a utility script
This gives you the indication where you should place the mounting dot
on the nozzle
in order to have the minimal runout.
It need some time making the mounting dot. The advantage is that in
future nozzle change
is just a task and introduces no processing variation.
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/2b191ae5-b28a-4c1c-9053-310c20dd935c%40googlegroups.com.

Marek T.

unread,
Oct 3, 2017, 10:21:33 AM10/3/17
to OpenPnP

Tianxiao Xu

unread,
Oct 3, 2017, 1:28:39 PM10/3/17
to OpenPnP
Thanks Cri S and Marek.
 I don't have the meter, and I checked my nozzle, that even open/close the vacuum will shift for about 0.1 mm. 
and Press turn to -1degree, it will make a 359degree turn at the first time, and then offset about 0.3mm.

I think my nozzle holder and the nozzle are with very bad quality.

I will try to buy a new set with better quality, and I will try Cri S's idea. Otherwise, if the status of the nozzle and nozzle holder is not stable, any calibration I do on it is wasting time.

Thanks very much.

Cri S

unread,
Oct 3, 2017, 1:50:04 PM10/3/17
to ope...@googlegroups.com
If that is true that vacuum shift the nozze, then the screw could be
wrong position or wrong
size.
You could make a picture of the holder, the nozzle without holder and
screw length,
all pictures taken at the same distance and positions.
With this photo, you or i could make a combined picture that displays
the presumed position
of the screw. This then show if the holder have a problem and gives
hints how to fix it if you
are capable of drilling and tap a hole.

Tianxiao Xu

unread,
Oct 3, 2017, 3:23:13 PM10/3/17
to OpenPnP
Hi, Cri S,  Jason and Marek,

I'm not sure the following things I'm thinking about is right or not, please tell me what you think about it.

I believe, no matter where the nozzle is, how much its offset, if the nozzle position won't move during moving X, Y, it is possible that we use OpenPnP to calibrate the system automatically.
And make sure no rotation when moving from the bottom camera to the pick/place position, the system can work accurate enough.

The key problem now is that we get the part position by the upper camera, and we check the part position by the bottom camera, there is an error between them.

We have two cameras to check the position. The bottom camera can see the nozzle and the upper camera, the upper camera check the position for pick and place. 
So I think it can check the offset between the two in some manner, right?

If our upper camera (lens and ring out of lens )has enough contrast with the background, we can figure out the position of the upper camera by the bottom camera, vise versa.
and if our nozzles has enough contrast with the background, we can figure out the position of the nozzle by the bottom camera(except the nozzle with strange shape, such as 500 with two holes).

We know the offset between them from bottom camera's view (Here named it Offset1). But it is not the offset between the upper camera's view and the nozzle. 
Because when my bottom camera aiming the center of upper camera lens' center, my upper camera is not aiming the center of bottom camera lens' center at the same time.
But we can check this offset(here named it Offset2) manually or automatically by OpenCV, if possible. And I believe Offset2 shall be constant if we don't touch the two cameras.
(Two make things easy, take the Offset2 from the image of bottom camera<offset between image center and upper camera lens center>, when the upper camera aiming the center of the bottom camera, )

With Offset1 and Offset2, we can know the exact offset between the upper camera view center and the nozzle center(here named it Offset3 =  Offset1+Offset2, maybe minus though), which is the most important parameter we need.
We believe Offset3 won't change if there is no rotation during the process. Then we can pick up the part very accurately.

After picking up, we will move the chip to the bottom camera. Before this step, I want OpenPnP to remember the position when the upper camera is on the bottom camera, never mind which one is centered.
And we move the chip onto the bottom camera(The position is position when upper camera aiming the center of the bottom camera lens+Offset3, named it PositionC + Offset3). checked by the bottom camera about the Offset4. 
With Offset3 and Offset4, we can place the chip in the right position.

Since there is the Z offset between the upper camera and the nozzle, the down camera's view should be as vertical as possible, for accurate purpose.

And in the whole process, we don't need to check everything every time. For example, we can set the Offset2 in the settings, which is not changing frequently, so we don't need openpnp to calibrate it.
And we defined PositionC mentioned above in the settings too, when the upper camera aiming the center of the bottom camera, since this won't change.

Then the key problem is changed to : whether bottom camera in OpenPnP can recognize the position of nozzle center and upper camera center, to give the parameter  Offset2. 

Of course, it the two cameras are perfectly vertical and the calibration is perfect, Offset1 could be 0.

What do you think about it?

Jason von Nieda

unread,
Oct 3, 2017, 4:05:29 PM10/3/17
to OpenPnP
If I understand correctly, Offset3 assumes no rotation of the nozzle during pick, but this is false. The nozzle rotates to pick the part at the feeder's defined rotation. In addition, most users do not have an index or home for their C axis, so it would mean remeasuring the offsets each time the machine is used.

As I mentioned before, we have code that will solve this problem ( https://github.com/openpnp/openpnp/issues/235 ), but it needs to be finished and tested. Overall, I think it's a much simpler solution than what you are proposing here.

Jason

--
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 post to this group, send email to ope...@googlegroups.com.

Marek T.

unread,
Oct 3, 2017, 4:30:03 PM10/3/17
to OpenPnP
Terry, no matter how poor quality holder and nozzle you have, it's impossible tho vacuum could change offset due to their quality.
Holder kept by screw can't budge any micron because of vacuum.
Nozzle kept by really strong spring in Chinese holders can't budge too.
Nozzle tip also kept by another spring also has no chance to change position, specially in nozzles above 502.
Vacuum on/off may change position of the shaft (in construction like mine) if there is some clearance. Because of tension changing.
About your idea of the offsets analyze by the cameras, Jason with Cri are probably the only people here who may tell something wise not me. But it sounds interesting :-).

Tianxiao Xu

unread,
Oct 3, 2017, 5:24:03 PM10/3/17
to OpenPnP
Hi Jason,

Actually, yes, Offset3 assumes no rotation of the nozzle from bottom camera check to pick.  But we can rotate it before moving to the bottom camera. 
And yes, it means check every time before pick. But I think we can check only for small pieces, but for bigger chips, no need to check every time.

And a doubt in my mind is why we have to rotate twice.  Before pick we rotate and before check by the bottom camera we rotate, can we combine them together to only one rotation? 

In my description, it seems very complex, but the key is not that complex.
I can try it in a simple way later.

Tianxiao Xu

unread,
Oct 3, 2017, 5:24:49 PM10/3/17
to OpenPnP
I read through #235, but can't find how you calibrate it in detail.


On Tuesday, October 3, 2017 at 4:05:29 PM UTC-4, Jason von Nieda wrote:

Cri S

unread,
Oct 3, 2017, 5:44:01 PM10/3/17
to ope...@googlegroups.com
The camera can be used to correct something. and because that i have
asked to provide
image of that in case you want the scripts.
As example if you have two nozzles and make the test with flour or
plasticine for
getting nozzle and camera offsets, it is highly possible that the
offsets between the marks
and the offsets from uplooking camera between nozzles differs significantly.
After machine is setup, that setup can be verified and cross checked
including correcting
settings.

As hint, because i don't think you invest time in making a correct setup,
the nozzle need to rotate for small components because you have setup it wrong.
It is not a problem, only in that case, why you don't simple setup the
offset with the same
wrong rotation? If then you have further problems with pickup, it's
annother problem,
height offset, nozzleTip or other meccanical component with too big
error or any other
meccanical setup problem.

Tianxiao Xu

unread,
Oct 4, 2017, 8:50:26 AM10/4/17
to OpenPnP
Hi Cri S and Jason,

You are experts on PnP both in hardware and software, you know much more and much deeper than others.
I really appreciate your help, my PnP can pick up big parts and put it pretty accurate after calibrate the offset between nozzle and camera.
So if some of my thoughts seems to be stupid because I don't know enough of the problem, please forgive me.

I already changed to the new OpenPnP with new camera driver system,  and calibrated it, it works great.
Now my setting is in 1024x768 MJPG mode, actual FPS is about 6.5. I tried YUY2mode, seems no big difference, FPS was lower. 


I will setup the whole head from motor holder to the nozzle again these days, step by step, thoroughly.
My plan is to set the bottom camera vision vertical enough first, and use the bottom camera to check the motor, nozzle holder, to make sure they are vertical enough.
I already ask a some one to add two screw holes on my nozzle holder, hope it could grab the stepper motor steady enough.
Is my process good? please give me some suggestion if it is not good. (By the way, my Z axis can move about 20 mm)

After that, if it still works badly, I will take pictures, and please help me with your scrips, Cri S.

As a new user, I don't know much about how and why of the detail settings of the machine, for example, the offset between the upper camera and the nozzle.
Now my offset data is in camera settings, Jason suggests to set in nozzle head, right?  So, what's the difference?

If setting in nozzle, after I changed the offset data, and home the system, the home coordinates are changed, too? (My home is not all to Zero, 2 axes home to maximum)
Then I have to set every position again? like bottom camera, feeder position? That's why I set my offset in Camera.
If I'm wrong, please tell me.

Sincerely 
Terry

Tianxiao Xu

unread,
Oct 4, 2017, 8:52:54 AM10/4/17
to OpenPnP
By the way, have you found the reason why this significantly differences comes from?

Jason von Nieda

unread,
Oct 4, 2017, 9:48:06 AM10/4/17
to ope...@googlegroups.com
On Wed, Oct 4, 2017 at 7:50 AM Tianxiao Xu <xtx...@gmail.com> wrote:
Hi Cri S and Jason,

So if some of my thoughts seems to be stupid because I don't know enough of the problem, please forgive me.

Nothing is stupid and no forgiveness is needed. I learn more about this every day, and I do not have all the answers :)
 

I already changed to the new OpenPnP with new camera driver system,  and calibrated it, it works great.
Now my setting is in 1024x768 MJPG mode, actual FPS is about 6.5. I tried YUY2mode, seems no big difference, FPS was lower. 

YUV is uncompressed, so the image quality will be somewhat better, but in turn it will use much more bandwidth.
 

I will setup the whole head from motor holder to the nozzle again these days, step by step, thoroughly.
My plan is to set the bottom camera vision vertical enough first, and use the bottom camera to check the motor, nozzle holder, to make sure they are vertical enough.
I already ask a some one to add two screw holes on my nozzle holder, hope it could grab the stepper motor steady enough.
Is my process good? please give me some suggestion if it is not good. (By the way, my Z axis can move about 20 mm)


All sounds fine to me.
 
As a new user, I don't know much about how and why of the detail settings of the machine, for example, the offset between the upper camera and the nozzle.
Now my offset data is in camera settings, Jason suggests to set in nozzle head, right?  So, what's the difference?


On a single nozzle system, either way is fine. In a multiple nozzle system I find it's easier to leave the camera at 0 and measure the nozzles from the camera, rather than from each other.
 
If setting in nozzle, after I changed the offset data, and home the system, the home coordinates are changed, too? (My home is not all to Zero, 2 axes home to maximum) 
Then I have to set every position again? like bottom camera, feeder position? That's why I set my offset in Camera.
If I'm wrong, please tell me.

Home coordinates are not changed, it just looks a bit like it. The DROs show the position of the nozzle, not the head or controller. In fact, they show the position of whatever is selected (nozzle 1, nozzle 2, camera, etc.). When you "capture coordinates" in OpenPnP, the value that is stored has it's offsets removed, so it will be referenced to whatever component you have set to 0.

It's a little complicated, but in short, no, you shouldn't have to update all your settings again. 

That being said, I highly recommend dialing in your offsets before setting up the rest of the machine simply because it makes things easier.

 
Sincerely 
Terry

--
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 post to this group, send email to ope...@googlegroups.com.

Cri S

unread,
Oct 4, 2017, 10:07:13 AM10/4/17
to ope...@googlegroups.com
I know where the significant differences coming , it is becaue the
optic axis is not
90 degree to the camera sensor, the optical center is offset from
camera sensor in order
to have better view based on mounting option of webcam on computer, the use of
cheap M12 mounts that always have big tollerances that are compensated using OTP
settings inside camera sensor.
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/884d9f78-5800-4041-9d6a-7b897b8ed378%40googlegroups.com.

Bernd Walter

unread,
Oct 4, 2017, 10:28:03 AM10/4/17
to OpenPnP


On Wednesday, October 4, 2017 at 4:07:13 PM UTC+2, Cri S wrote:
I know where the significant differences coming , it is becaue the
optic axis is not
90 degree to the camera sensor, the optical center is offset from
camera sensor in order
to have better view based on mounting option of webcam on computer, the use of
cheap M12 mounts that always have big tollerances that are compensated using OTP
settings inside camera sensor.

Wow - this is a very valuable hint for me.
I was wondering why the nozzles are so off on the bottom camera, but the nozzles were
raised when I'd played with that.
And the top camera was off even further.
My bottom camera wasn't mounted just a few days ago.
I havn't thought about the optical axis yet...

Marek T.

unread,
Oct 4, 2017, 10:45:33 AM10/4/17
to OpenPnP
As said before, adding two more screws to better fix the holder to the shaft will not help you a lot. My machine has 3 Chinese nozzle holders and I also have added additional screws to eliminate the runout. After the play with the tool which linked you above that added screws left empty.
But it sounds that you have problem with some clearances somewhere mainly if runout changes for you when on/off vacuum. You must eliminate it first and no matter how many screws you use for this. Advice is to use some anareob thread locker (blue type enough) for all the screws in the header. Something like this one:
https://www.hurtownia-techniczna.pl/images/produkty/mini/250px_loctite_243.png

Tianxiao Xu

unread,
Oct 4, 2017, 1:33:08 PM10/4/17
to OpenPnP
I agree with you, because the shaft of the motor is so short, even with three bolts, it is fixed in one point, if the shaft is long enough, add more bolts may give us a little adjustable space to control the runout of the nozzle holder.
I saw Thang's video, which type of nozzle is he using?

Message has been deleted

Tianxiao Xu

unread,
Oct 4, 2017, 1:36:36 PM10/4/17
to OpenPnP
Maybe this offset is what I mentioned Offset2?
I believe it won't change since we installed the two cameras.

and if we have an Offset2 in the settings, can it solve the this problem?

Tianxiao Xu

unread,
Oct 4, 2017, 3:58:50 PM10/4/17
to OpenPnP
https://www.robotdigg.com/product/517/Adapter-for-Juki-Nozzles-to-5mm-Hollow-Shaft-Stepper

Is there anyone use this nozzle adapter?
what's the difference in JKADP and JKAC? 

There are 3 types in the robotdigg, which one do you think is the best one?



Marek T.

unread,
Oct 4, 2017, 4:19:04 PM10/4/17
to OpenPnP

Michael Anton

unread,
Oct 4, 2017, 5:16:49 PM10/4/17
to OpenPnP
It looks like JKAC is an auto changer version.  It is probably the other picture in the listing.  It looks like it might have ball bearings, with a rubber band around them to grab onto the nozzle.

If you want to use the 5mm bore Juki adapters, this is the only motor that will work: 11HY3406-9SK825.  The others have 8mm shafts.  Another option is to use a NEMA8 motor, instead of the NEMA11 motors you linked to.

Tianxiao Xu

unread,
Oct 4, 2017, 7:13:14 PM10/4/17
to OpenPnP
I'm using the same one. 
the connector with the motor shaft is not long enough, with only one screw. 
it is designed to have bigger concentricity. ^_^

Tianxiao Xu

unread,
Oct 4, 2017, 7:15:27 PM10/4/17
to OpenPnP
I agree, thank you! 
Seems only need to buy auto changer type.

Marek T.

unread,
Oct 5, 2017, 11:21:38 AM10/5/17
to OpenPnP
If there is no clearance between the pipe of holder where the shaft is sitting (it means only ~0.01mm enough to put the shaft inside), it is not very important how long is the holder. Nor how many screws you have. Note also that the ending of the shaft should be grinded to a cone then fits central into the holder. The problem is that as I know these holders have much bigger diameter than the shaft, I've heard about some 0.4mm in some case.

Cri S

unread,
Oct 5, 2017, 12:15:03 PM10/5/17
to ope...@googlegroups.com
If you mix automatic nozzle changer and manual nozzles, the automatic
nozzle motors
need 30mm M2 brass standoffs, or you later want upgrade to automatic
nozzle, don't
forget the height difference for cable, vacuum and other related things,
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/6054d0ca-3b56-4ecb-b6aa-73355469b347%40googlegroups.com.

Tianxiao Xu

unread,
Oct 10, 2017, 11:43:35 AM10/10/17
to OpenPnP
Hi, Cri S,

Do you think this difference is a fixed value and not very difficult to find out?

My knowledge inside the small camera are very limited.



On Wednesday, October 4, 2017 at 10:07:13 AM UTC-4, Cri S wrote:

Cri S

unread,
Oct 10, 2017, 12:47:15 PM10/10/17
to ope...@googlegroups.com
The height offset is easy to find out, i think i have instructed you
how to calbirate camera.
You can use flour confined with credit card on specific height using
stack of approx 9
papers to set the distance, or use rubber stamp pad and paper to
impress the nozzle contours. This on 1.6mm pcb or the usual pcb height
you use where no hole/vias is.
Then add additional 3 or 4 pcb , add some weight in order the height
is more accurate.
If pcb is 1.6mm size, 3x 1.6=4.8mm or 4x 1.6=6.4mm .
Repeat the measurements at this distance.
Then you have a XY offset based on this 4.8/6.4mm and you scale it to
10mm, as example with random numbers.
you get X0.234567 Y-0.12345 on 4.8mm this is X0,48868125 and
Y-0,2571875 as value.
As example using this values difference between 1.6 and 3mm pcb thickness is
X0.07 and Y0.04 mm difference that make 0.08mm difference. It is
nothing, but this error
is applied to fiducial code and added to other errors it could be a
problem for some parts
that need to be assembled precisly.
If feeder have 20mm height difference to pcb, you cannot picking up 0402 or 0201
even if you do top vision for detecting part position because the
camera axis error is
bigger and need to be corrected.and just 1.4mm difference cause 0.04mm
error,when
this is not compensated. I have proposed some time a mod but it was
not accepted or
manifested the intention to want make it different in future and not
interested in this mod,
or no other had the intention to calibrate it out and just make the
shortcut to have the feeder on the same height as pcb.
This are just fictive values, i don't know real values.
What you can try out, using a part that is 100% recognized on fiducial
pipeline check
the position on camera value, and the position on 10mm down and 10mm up.
This gives you a indication of the camera error on uplooking camera.


2017-10-10 17:43 GMT+02:00, Tianxiao Xu <xtx...@gmail.com>:
> Hi, Cri S,
>
> Do you think this difference is a fixed value and not very difficult to
> find out?
>
> My knowledge inside the small camera are very limited.
>
>
>
> On Wednesday, October 4, 2017 at 10:07:13 AM UTC-4, Cri S wrote:
>>
>> I know where the significant differences coming , it is becaue the
>> optic axis is not
>> 90 degree to the camera sensor, the optical center is offset from
>> camera sensor in order
>> to have better view based on mounting option of webcam on computer, the
>> use of
>> cheap M12 mounts that always have big tollerances that are compensated
>> using OTP
>> settings inside camera sensor.
>>
>>
>>
>> 2017-10-04 14:52 GMT+02:00, Tianxiao Xu <xtx...@gmail.com <javascript:>>:
>>
>> > By the way, have you found the reason why this significantly differences
>> >
>> > comes from?
>> >
>> >
>> > On Tuesday, October 3, 2017 at 5:44:01 PM UTC-4, Cri S wrote:
>> >>
>> >> As example if you have two nozzles and make the test with flour or
>> >> plasticine for
>> >> getting nozzle and camera offsets, it is highly possible that the
>> >> offsets between the marks
>> >> and the offsets from uplooking camera between nozzles differs
>> >> significantly.
>> >>
>> >
>> > --
>> > 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 <javascript:>.
>> > To post to this group, send email to ope...@googlegroups.com
>> <javascript:>.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/openpnp/884d9f78-5800-4041-9d6a-7b897b8ed378%40googlegroups.com.
>>
>>
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>>
>
> --
> 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 post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/816f7f44-8d55-429b-9373-4ea89711dca6%40googlegroups.com.

Cri S

unread,
Oct 10, 2017, 10:41:10 PM10/10/17
to ope...@googlegroups.com
Ps: The mod for picking up all components with nozzle rotation 0 is #605
I had published a pr here because it was/is requested a lot.

the actuator have to set position 0 for rotation using G92 as example and
reset it that position.
you can reset position by:
G53 C0
G92 C0
without reset homing position if you have set homing position using
g92 and not g10
G92 C0
set pos 0, substitute Axis name as you need it.
Reply all
Reply to author
Forward
0 new messages