Few componets mounted "90deg wrong"

345 views
Skip to first unread message

vespaman

unread,
Aug 21, 2023, 2:32:28 AM8/21/23
to OpenPnP

I am looking back at my notes from last batch, and have now arrived at one note that is a mystery for me; a few components where populated exactly +/-90degree wrong on the boards.
It is only in the order of 1%, but it happened twice on the same position (a 0402 resistor), and then on various 0603 capacitors.

I suspected vision, but now I have gone through the images from last run, and could not find any image where the red box (bv_result*) is 90 degree wrong. Maybe this is not a proper approach though?
And I am unsure on which panel/board the actual errors where, so I think I have to give up on trying to understand what happened. (otherwise I'd like to study the log as well).

But:- for the next time, is there something that I can prepare to find, apart from inspecting the panels better, and write down exactly the panel/board+panel finishing time?



mark maker

unread,
Aug 21, 2023, 2:43:53 AM8/21/23
to ope...@googlegroups.com

There is only one thing that comes to my mind. Check all the Vision Settings that they are set to Adjust and not Full:

Please report back, if you find anything (or not).

_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/87ae1063-938b-48db-a7f2-d6e6cf9b074fn%40googlegroups.com.

Jonathan Oxer

unread,
Aug 21, 2023, 3:06:46 AM8/21/23
to ope...@googlegroups.com
This was very interesting to read, because I've had this happen from time to time and just put it down to *shrug*, can't reproduce, something glitched perhaps in the comms and moved on.

But if Micael is seeing it too, maybe it's a real thing. For what it's worth, I've noticed it happen on the very first placement of a job at the start of the day. That's one of the reasons I disregarded it: I assumed that it was something like the machine being out of sync with the rotation value on the nozzle and it clears itself up after the first placement.

I'm going to pay more attention now and see if I can capture the logs when it happens. I already have "Adjust" as the size tolerance in vision settings.

Cheers

Jon

vespaman

unread,
Aug 21, 2023, 3:58:01 AM8/21/23
to OpenPnP

So, I just checked all my vision setup, and they are indeed all set to "Adjust".

Interesting to read that I am not alone - it is indeed possible that it happened on the first panel, or at least early in they day, since I remember finding some of them just after the first run (when I inspected a bit more thoroughly). But maybe also later, I can't tell for sure, since I found one or two after breaking apart the boards from the panels (in a non-FIFO way).


 - Micael

mark maker

unread,
Aug 21, 2023, 4:29:01 AM8/21/23
to ope...@googlegroups.com

From the perspective of Alignment, this can only happen if the part appears more than 45° turned. OpenPnP always snaps to the 90° step angle that is nearest the wanted angle. So if a part were really off by more than 45°, it would snap to the next + or - 90°.

I don't know if such a >45° offset can physically happen in feed&pick. I guess it depends on the kind of feeder, and accuracy of the pick for small parts (0402 was mentioned). If the pick was off and the vacuum leaking, I can imagine that a part could kinda "rotate-toward-vacuum-suction" on the nozzle tip. 😉

OpenPnP does not have a notion of length and width i.e. which should be shorter. Even giving it a Footprint and performing the Size Check does not help: the author implemented it in a way that doesn't  mind swapped width/height (one of my TODOs to improve).

But it could also be a vision issue. If the thresholds are off, there could be wrong rectangles detected that are 45° off. The same happens if intermittently something in the background of the camera lights up. The rectangle will the also include it (see the animation below). Are you all using the latest test version and stock Vision Settings/Pipelines with sliders?

https://github.com/openpnp/openpnp/wiki/Bottom-Vision#using-the-stock-vision-settings

Parametric-Pipeline

There is always the possibility of a bug in the code, although I'm really reluctant to believe this, given it works out okay most of the times. Apart from the vision problems described above, this is entirely linear math, it can't have any hidden "edge cases".

The same considerations (both vision and math) applies to the PCB/Panel Fiducial vision and Affine transform. At least that is what I assume, @Tony Luken might know more. 😎

_Mark

vespaman

unread,
Aug 21, 2023, 4:53:51 AM8/21/23
to OpenPnP
So, I am not using the exact latest, but I do have a version with the vision settings you point to.

I also do not think it is a bug!

The 45deg/90deg snap functionality got me thinking... :-)  (you always learn something..)

Maybe (not sure about this, but..) in my case it is possible that these components where >45 deg off to start with - I sometimes add components to the nozzles manually on a miss pick. Why? Because if the head has already arrived to the camera and the vision says no part, I don't know how to proceed, apart from pressing the stop button, which discards the component on the other nozzle, which I don't always like, but also you loose time to restart the job (fiducials etc). Maybe there's a better way out of this situation?

This is something that I can easily have in mind on the next run, so either way it will be good to rule it out if not!


 - Micael

vespaman

unread,
Aug 21, 2023, 4:56:06 AM8/21/23
to OpenPnP
I should add;
..or maybe sometimes, maybe I have nudged the component since it where just outside the proper center, or tomb stoned sideways. etc.

Khaled Sharaf

unread,
Aug 24, 2023, 3:53:02 PM8/24/23
to OpenPnP
Hi All,

I am new to OpenPnP and just had the machine 2 month ago getting to know the ins and outs. And like it thus fat

From my end, I also have the same issue when I use loose parts.

Some of the resistors 0805 are rotated by 90 degree as well. I am not sure if it is because the components on the loose feeders are rotated or not, but I can give it a try and let you know.

Patricio Cohen (Cmos2016)

unread,
Aug 24, 2023, 6:43:48 PM8/24/23
to OpenPnP
Hi,

Same problem here, and it is driving me nuts. I have 0402s and 0603s  that are weirdly placed placed 90 degrees off.


Patricio

mark maker

unread,
Aug 25, 2023, 3:44:22 AM8/25/23
to ope...@googlegroups.com

Sounds like a systemic problem. I need more information.

  1. What type of feeder, exactly.
  2. Regular pick from feeder?
  3. Or did you put the part on manually, or adjust it manually, as was said before?
  4. Does it always happen given a certain placement angle, or just from time to time? If the latter, what is the estimated percentage?
  5. Is is always plus or minus  90°, or are there other angles too?
  6. Does this only happen with small parts like 0402, 0603 or does it also happen with larger parts?
  7. Do you use the stock Vision Settings / Pipelines, as is recommended?
    https://github.com/openpnp/openpnp/wiki/Bottom-Vision#using-the-stock-vision-settings
  8. Are you using pre-rotate?

_Mark

vespaman

unread,
Aug 25, 2023, 5:20:01 AM8/25/23
to OpenPnP
While I have already reported some, just for completeness;
1. reference push pull feeder
2. This I don't know. Could be that I have nudged or put it on. Future will tell. Will keep better notes.
3.
4. I have only seen it on components that are 90 from tape. But most of my components are this.
5. Only +/-90 for me. Exact placement.
6. Only for 0402/0603 for me. But that is about 95% of the board, so..
7. Yes, I think so. I have size tol @35% though. And image write debug, not giving me  any clue (I don't think it is vision related).
8. Set to "default"

 - Micael

mark maker

unread,
Aug 25, 2023, 9:10:34 AM8/25/23
to ope...@googlegroups.com

Thanks.

> 8. Set to "default"

Then the setting is inherited from Machine Setup / Vision / Bottom Vision. Please check there.

_Mark

Patricio Cohen

unread,
Aug 25, 2023, 9:43:29 AM8/25/23
to ope...@googlegroups.com
Hi Mark,

Here is the info.

1. ReferencePushPullFeeder
2. Yes, regular picks
3. At first I used to do that and after reading here, I have put special attention to automated feeds to see if they happened only when part was put manually on the nozzle. The wrong placements are off by 90 deg also in automated feeds.
4. Between 10 to 20 percent.
5. Only plus or minus 90 deg.
6. I have tested only with 0402s and 0603s at the moment.
7. I think so.
8. Yes.

Additional info:

- I have a 2 nozzle machine with shared z axis. The problem has been happening only with nozzle 1, nozzle 2 is always correct. Nozzle 1 is the one on the left when you are standing in front of the machine.

-Each of the nozzle motors rotate in the same direction when jogging them individually. At first I thought it could be related to motor polarity.

-The nozzles when rotated, bottom cam shows the rotation in the same direction. This means if I rotate the motor to the left, I see the motor also rotating to left in the screen. Is this ok or should be in the opposite direction? 

Thank you Mark

Patricio 


Khaled Sharaf

unread,
Aug 25, 2023, 11:04:16 AM8/25/23
to OpenPnP
When I put the 0805 resistors on the loose part feeder all in the right direction (all placed in landscape way), then the bottom feeder can correctly align all the components with no issue.

But, if I placed one of the components at an angle (about 45 degree), then the bottom vision rotates the whole component by 90 degree.

Answering your questions:

- What type of feeder, exactly. -> Loose part feeder
- Regular pick from feeder?  -> I am using a loose part feeder
- Or did you put the part on manually, or adjust it manually, as was said before? -> I was using a loose part feeder and placed the components manually on a pink background for better component detection
- Does it always happen given a certain placement angle, or just from time to time? If the latter, what is the estimated percentage? -> It happens to me when the component is placed on the loose part feeder section at an angle
- Is is always plus or minus  90°, or are there other angles too? -> It is always +/- 90 degree on my end
- Does this only happen with small parts like 0402, 0603 or does it also happen with larger parts? -> It happens with larger parts 0805 on my end
- Do you use the stock Vision Settings / Pipelines, as is recommended? -> For the vision settings yes, for the pipeline I created my own
- Are you using pre-rotate? -> Yes I am using pre-rotate, but I am not seeing the component getting aligned correctly when it gets to the bottom camera

Extra things that I noticed:
1- When the 0805 component is placed with an angle on the loose part feeder, and taken to the bottom vision, I don't see that there is any correction to the offset that was detected when picking up the component from the top camera
2- When the 0805 component is picked and placed for alignment at the bottom camera with this offset angle, I noticed that the zero angle is rotated by 90 degree (As Mark mentioned before previously). 

Mark: " From the perspective of Alignment, this can only happen if the part appears more than 45° turned. OpenPnP always snaps to the 90° step angle that is nearest the wanted angle. So if a part were really off by more than 45°, it would snap to the next + or - 90°"

But in my mind, I would have thought that 0 degrees on the bottom vision should be exactly the same as 0 degrees on the board (after fiducial checks), or am I missing something here?

Let me know if you need a video, and I can record my findings.
Thank you!

vespaman

unread,
Aug 25, 2023, 12:06:12 PM8/25/23
to OpenPnP

Thanks.

> 8. Set to "default"

Then the setting is inherited from Machine Setup / Vision / Bottom Vision. Please check there.


Well, it is default there as well;
Screenshot_20230825_180011.png
 
I remember you and Jan had a discussion about my bottom vision settings, but I didn't really understand what either of you meant. Maybe this is not how it is supposed to look like.

 - Micael

mark maker

unread,
Aug 25, 2023, 3:23:40 PM8/25/23
to ope...@googlegroups.com

Loose part feeder opens a whole new can of worms. It could be wrong there too.

As I have no loose part feeders and no means to simulate, are you ready to test this if I make a new test Version?

If yes, I'll have a look, in addition to the other problem(s).

> > Mark: " From the perspective of Alignment, this can only happen if the part appears more than 45° turned. OpenPnP always snaps to the 90° step angle that is nearest the wanted angle. So if a part were really off by more than 45°, it would snap to the next + or - 90°"

> But in my mind, I would have thought that 0 degrees on the bottom vision should be exactly the same as 0 degrees on the board (after fiducial checks), or am I missing something here?

When I said "more than 45° turned" I meant relative to the expected angle, either plus or minus. So everything should be irrespective of the angle at which it is actually aligned.

_Mark

mark maker

unread,
Aug 25, 2023, 3:24:39 PM8/25/23
to ope...@googlegroups.com

its on the other tab ;-)

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

Khaled Sharaf

unread,
Aug 25, 2023, 3:30:51 PM8/25/23
to ope...@googlegroups.com

As I have no loose part feeders and no means to simulate, are you ready to test this if I make a new test Version?

If yes, I'll have a look, in addition to the other problem(s).

Me and my team are ready to test it! :)

Let us know as well if there is any development work that we can assist with as well.


mark maker

unread,
Aug 25, 2023, 3:39:25 PM8/25/23
to ope...@googlegroups.com

AdvancedLoosePartFeeder or ReferenceLoosePartFeeder?

Khaled Sharaf

unread,
Aug 25, 2023, 3:50:54 PM8/25/23
to OpenPnP
ReferenceLoosePartFeeder

2023-08-25_15h49_18.png

mark maker

unread,
Aug 25, 2023, 4:00:55 PM8/25/23
to ope...@googlegroups.com

Thanks. I checked out both and one suspicion I had, turned out unfounded, it seems to work as it should, provided the vision works.

Could you please add a ImageWriteDebug stage to the feeder pipeline?

Set the prefix to something unique:

Then set the logging level to TRACE.

Then try a small Job again, with parts deliberately at an angle.

Then send the log and the debug images.

https://github.com/openpnp/openpnp/wiki/FAQ#how-do-i-turn-on-debug-logging

https://github.com/openpnp/openpnp/wiki/FAQ#where-are-configuration-and-log-files-located

https://github.com/openpnp/openpnp/wiki/FAQ#how-can-i-get-a-native-camera-image

Thanks.

Unfortunately, I gotta go now. Will look into this tomorrow.

_Mark

Khaled Sharaf

unread,
Aug 26, 2023, 1:05:12 AM8/26/23
to OpenPnP
Thanks Mark!

Test was done on 13x R0805 components.

The components were placed deliberately at around 60 degree angle. (See attached picture below).
And you can see that the loose feeder pipeline was able to detect the angle of each component correctly (+/- some offset that should be corrected using the bottom vision)

The resistance in order were:
- R1(correctly placed)
- R2 (90 degree offset)
- R3 (90 degree offset)
- R4 (90 degree offset)
- R6 (90 degree offset)
- R10 (90 degree offset)
- R21 (90 degree offset)
- R23 (90 degree offset)
- R24 (90 degree offset)
- R25 (90 degree offset)
- R26 (90 degree offset)
- R27 (90 degree offset)
- R28 (90 degree offset)

Attached is the logs & snapshot that was requested. Added to that, I have also added the pipeline for the loose feeder as well, as I think you might need it! :)

Let me know if there is anything else needed from our end!

Thank you! And have a good night!
OpenPnP.log
FeederPipeline.png
LooseFeederPipeline.txt
feeder_loose_R_0805_1K1693024741760068100.png

vespaman

unread,
Aug 26, 2023, 2:04:42 AM8/26/23
to OpenPnP

its on the other tab ;-)


OMG. Sometimes I get tired of myself. Yes pre-rotate is set to active.
 
 - Micael

mark maker

unread,
Aug 26, 2023, 6:17:36 AM8/26/23
to ope...@googlegroups.com

Hi Khaled,

in the log I see occasions where the angle is completely wrong:

2023-08-26 00:39:04.522 ReferenceBottomVision DEBUG: Bottom vision part R0805-1K result rect { {644.3677368164062, 344.36370849609375} 94x59 * -44.144901275634766 }
2023-08-26 00:39:04.522 ReferenceBottomVision DEBUG: Offsets too large (0.224080, 0.206479, 0.000000, 44.954952 mm) : center offset 0.30470576093817303 > 0.1

it detects a 44.95° offset from what it expected.

This angular offset is then confirmed in the subsequent alignment passes, after it has been compensated.

2023-08-26 00:39:05.441 ReferenceBottomVision DEBUG: Bottom vision part R0805-1K result rect { {626.547607421875, 353.59918212890625} 93x58 * 0.9391909241676331 }
2023-08-26 00:39:05.441 ReferenceBottomVision DEBUG: Offsets too large (-0.248193, 0.164251, 0.000000, -0.129141 mm) : center offset 0.29762079596867835 > 0.1
...
2023-08-26 00:39:06.168 ReferenceBottomVision DEBUG: Bottom vision part R0805-1K result rect { {637.1075439453125, 363.65435791015625} 93x58 * 0.9710219502449036 }
2023-08-26 00:39:06.169 ReferenceBottomVision DEBUG: Offsets accepted (-0.093485, 0.012523, 0.000000, -0.160972 mm)
2023-08-26 00:39:06.169 ReferenceBottomVision DEBUG: Alignment result: R0805-1K  |  X:-0.118 Y:0.383 C:44.665 ?:0.401
When I search for  N2.pick() log lines and from these lines look upwards for the last N2.moveTo() above that, I see angles around ~60°. Which seems to be okay given your image:

So to me, this currently looks as if you get systematic problem on the bottom camera vision. This could happen with small parts, when there are bright specks on the nozzle tip in the background, i.e. they rotate with the nozzle tip, so they will always skew the rectangle in a similar ways.

Please enable ImageWriteDebug stages in the bottom vision pipeline to get some alignment shots, and send them.

https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Background-Calibration#trouble-shooting

https://github.com/openpnp/openpnp/wiki/Bottom-Vision#troubleshooting

nozzle-tip-background-diagnostics

If this is all good, and we have to turn our eye back on the feeder:

I don't know much about the ReferenceLoosePartFeeder, but if I were you, I'd try the AdvancedLoosePartFeeder. There is no Wiki page, unfortunately, but the CHANGES say:

* AdvancedLoosePartFeeder

    ReferenceLoosePartFeeder has received a big upgrade thanks to @dzach. The
    new AdvancedLoosePartFeeder is able to be trained to recognize the orientation of loose parts,
    allowing perfect placement of loose bins of both polarized and unpolartized parts. This
    provides a complete feeding solution with no feeders at all!
    
    A lot of work and discussion has gone into this feature. For more details see:
    https://github.com/openpnp/openpnp/issues/573#issuecomment-311633280
    https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/openpnp/zqeeh6mGqtk/Ix9MgDbvCAAJ
    
    It is expected that the default pipelines will need to be tuned and updated as we
    get more experience with this new system. Please post your feedback about this feeder
    to the mailing list.
    
    Thank you @dzach!

By implication this means the ReferenceLoosePartFeeder does not recognize the part orientation, so there is a danger it will be off in steps of 90°. In my cursory examination I haven't seen something like that in the log, but maybe I overlooked something.

This looks like no easy solve. So I'll have to see when I find more time...

_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.

Khaled Sharaf

unread,
Aug 26, 2023, 11:34:12 AM8/26/23
to OpenPnP
Hi Mark,

As you can see the Nozzle calibration can detect the nozzle hole/tip (see attached picture below).

I will try the advanced loose part feeder and will let you know!
Thank you!
Nozzle_Calibration_N21693063865315452700.png
Nozzle_Calibration_N21693063863905651000.png
Nozzle_Calibration_N21693063864374801900.png
Nozzle_Calibration_N21693063864842423200.png
Nozzle_Calibration_N21693063863446846500.png
Nozzle_Calibration_N21693063866272612400.png
Nozzle_Calibration_N21693063865807471700.png
Nozzle_Calibration_N21693063862983114100.png
Nozzle_Calibration_N21693063866777914900.png

Jan

unread,
Aug 30, 2023, 3:52:39 PM8/30/23
to ope...@googlegroups.com
Hi Micael!

On 21.08.2023 10:53, vespaman wrote:
[...]
> Maybe (not sure about this, but..) in my case it is possible that these
> components where >45 deg off to start with - I sometimes add components
> to the nozzles manually on a miss pick. Why? Because if the head has
> already arrived to the camera and the vision says no part, I don't know
> how to proceed, apart from pressing the stop button, which discards the
> component on the other nozzle, which I don't always like, but also you
> loose time to restart the job (fiducials etc). Maybe there's a better
> way out of this situation?
>
I'm sorry for the late response, but I still would like to add my five
cents here.
The JobProcessor is a state machine, that executes a job step by step.
If any step fails, the JobProcessor just stops. The user can then either
terminate (press stop button or select stop from the Job menu) or
continue (press start or step button) the job.
If the job is continued, the same step that had the error, is executed
again. As the JobProcessor is separated from the rest of the machine
control, one can do almost anything before continuing. One can
especially use the feeders control buttons to pick from the current
location again or feed and pick the next part. One can also freely
change the configuration of the feeder or anything or just discard a
component and pick a new one. On continue, the JobProcessor will do what
ever the current step requires. This includes moving the tool to the
camera if a bottom vision operation failed.
The main steps of the JobProcessor are Pick, Align and Place, all
separated by nozzle.
Just recently a PR has been merged, that simplifies this recovery even
more by selecting the part/feeder/package/vision that cased the error.
(This requires View -> Selections in Tables -> Linked to be enabled)

Jan

vespaman

unread,
Aug 31, 2023, 10:00:08 AM8/31/23
to OpenPnP
Thanks Jan. I normally try to manually re-pick using the feeder buttons, but this does not always work (I don't remember exactly what errors leads up to this). But if this is supposed to work, I will take better notes the next time I run a batch. It is probably a few weeks away.

 - Micael

Balázs Kiss

unread,
Sep 1, 2023, 5:24:38 AM9/1/23
to OpenPnP
Hi Mark and problem-mates,


we also experienced glitches like that. Our parts were 0603 and 1206 and some bigger footprint ICs (TSSOP-14).


  • What type of feeder, exactly. - Reference BlindsFeeder
  • Regular pick from feeder? Most of the cases.
  • Or did you put the part on manually, or adjust it manually, as was said before? Only 1-2% of the cases.
  • Does it always happen given a certain placement angle, or just from time to time? If the latter, what is the estimated percentage? Regular for the chips (50-75%), sometimes for the passives (2-5%).
  • Is is always plus or minus  90°, or are there other angles too? Yes, alway +-90°.
  • Does this only happen with small parts like 0402, 0603 or does it also happen with larger parts? Only one IC and some 0603, 1206 passives.
  • Do you use the stock Vision Settings / Pipelines, as is recommended? Vision setting values and pipeline values are adjusted, steps were not modified.
    https://github.com/openpnp/openpnp/wiki/Bottom-Vision#using-the-stock-vision-settings
  • Are you using pre-rotate? Yes.

Thanks for your help in advance!


Best regards,
Balázs and Mosso

mark maker

unread,
Sep 2, 2023, 6:47:59 AM9/2/23
to ope...@googlegroups.com

Just FYI, I still have this on the radar. I'm just a bit out of ideas, after having analyzed the code again.

I guess I will have to improve the diagnostics, before the real culprit can be caught. Unfortunately, I don't have much time in the next weeks 🙁.

One additional question:

9. If a part is picked from a certain feeder, will it always be placed wrong? Or is it the combination of feeder and placement angle, i.e. on the next board with the same part and placement, will it also be wrong? Or is this completely random?

_Mark

Reply all
Reply to author
Forward
0 new messages