Pulling my hair out on offset issues :(

257 views
Skip to first unread message

Kim Lindberg

unread,
Apr 23, 2021, 5:56:19 AM4/23/21
to OpenPnP
I really need input on this issue.
I'm having A LOT of trouble getting my machine to place consistently and adjusting offsets.
I found this article:
where it's mentioned, that the offsets are changing with every homing run ???!!!
How is one supposed to get a machine going, when offsets cannot be trusted??
I'm really frustrated by this, and I don't see how I can get it working on a daily basis when all feeders and parts needs to be adjusted every time :(

What can I do to make this better? I have tried everything, nozzle calibration, visual homing, fine tuning bottom camera position etc.

ma...@makr.zone

unread,
Apr 23, 2021, 7:33:15 AM4/23/21
to ope...@googlegroups.com

You need to be more specific. What offsets exactly do you mean? Head offsets?

>  changing with every homing run

This section of the trouble-shooting page is not very helpful, frankly. It probably refers to run-out. As the rotation axis is usually not homed, it can be at any angle when you power up the machine. If the nozzle has run-out, it will point in an unknown direction, which means the nozzle tip position is affected. But we can compensate that using nozzle tip calibration. The link is below, but do it in the right order.

> How is one supposed to get a machine going, when offsets cannot be trusted??

Read and follow these instructions, in that order (if not yet done):

https://github.com/openpnp/openpnp/wiki/Visual-Homing

https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Nozzle-Setup#head-offsets

https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Calibration-Setup

Use Pre-rotate here (Because it was missing, I just added that to the Wiki):

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

Also check this out here (Because it was missing, I just added that to the Wiki):

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

If the pipeline is the problem, see this:

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

_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/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com.

Kim Lindberg

unread,
Apr 23, 2021, 7:47:30 AM4/23/21
to OpenPnP
Hi Mark,
Sorry for not being too specific.
I'm trying to run a job with six boards each having approx. 100 parts. every time I Home the machine (visual homing using fiducial on the bed at same Z as the board) I get a new offset and have to adjust all feeders and the bottom camera position.
When I run the job, I get different offsets for each board which I can correct by changing bottom camera position 0.2-0.3mm.
all parts are offset in the same direction.

I will have a look at the links you posted, to see if I missed something.
Thanks for your help. hope I can get this working reliably.

ma...@makr.zone

unread,
Apr 23, 2021, 8:02:22 AM4/23/21
to ope...@googlegroups.com

If you already have visual homing and still "get a new offset and have to adjust all feeders and the bottom camera position", then either visual homing does not consistently detect the homing fiducial or your machine has a mechanical problem, one of which could be backlash. Note that improper backlash compensation can affect visual homing!

To debug visual homing, enable the ImageWriteDebug stages in your FiducialLocator pipeline, perform visual homing and post the images here. The images are found in your $HOME/.openpnp2/org.openpnp.vision.pipeline.stages.ImageWriteDebug directory.

For Backlash compensation see here:
https://github.com/openpnp/openpnp/wiki/Backlash-Compensation

Be assured that this will work, if everything is set up right. Hang in there! ;-)

_Mark

Clemens Koller

unread,
Apr 23, 2021, 8:47:17 AM4/23/21
to ope...@googlegroups.com
Hi, Kim!

On 23/04/2021 11.56, Kim Lindberg wrote:
> I really need input on this issue.
> I'm having A LOT of trouble getting my machine to place consistently and adjusting offsets.

"A LOT of trouble" is not very specific which is allowing people to help you.
Do you have more details?

> I found this article:
> https://github.com/openpnp/openpnp/wiki/Troubleshooting-Placement-Accuracy
> where it's mentioned, that the offsets are changing with every homing run ???!!!
> How is one supposed to get a machine going, when offsets cannot be trusted??

Nope. The primary goal of homing is to gain precision and get consistency by eliminating undesired (varying) offsets.
And, it seems to be important to add *successful* homing to the deal?!

There are some pitfalls, nevertheless:
- Some physical Limit-Switches are not switching at the exact same position (and there could but shouldn't be electrical noise, if you are very precise).

- The visual homing with the camera has also lots of variables. If your camera calibration is correct, I recommend doing a pattern match in the image processing chain using fiducals with "rich image content" as it is one of the most precise way to get a position on the table recognized.

The chain of different errors summing up can still be quite complex. :-(


Clemens

> I'm really frustrated by this, and I don't see how I can get it working on a daily basis when all feeders and parts needs to be adjusted every time :(
>
> What can I do to make this better? I have tried everything, nozzle calibration, visual homing, fine tuning bottom camera position etc.
>
> --
> 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 <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Clemens Koller

unread,
Apr 23, 2021, 8:50:41 AM4/23/21
to ope...@googlegroups.com
Hi, Kim!

On 23/04/2021 13.47, Kim Lindberg wrote:
> I'm trying to run a job with six boards each having approx. 100 parts. every time I Home the machine (visual homing using fiducial on the bed at same Z as the board) I get a new offset and have to adjust all feeders and the bottom camera position.

Your visual homing seems to be broken. You need to fix that first. Then you do not need to adjust all feeders and camera position after homing.
If you still have to adjust feeder positions after homing, you are on the wrong track!

> When I run the job, I get different offsets for each board which I can correct by changing bottom camera position 0.2-0.3mm.
> all parts are offset in the same direction.

This seems also not correct. You are not supposed to change the camera calibration for each board, obviously.

Clemens

>
> I will have a look at the links you posted, to see if I missed something.
> Thanks for your help. hope I can get this working reliably.
>
> fredag den 23. april 2021 kl. 13.33.15 UTC+2 skrev ma...@makr.zone:
>
> You need to be more specific. What offsets exactly do you mean? Head offsets?
>
> />  changing with every homing run/
>
> This section of the trouble-shooting page is not very helpful, frankly. It probably refers to run-out. As the rotation axis is usually not homed, it can be at any angle when you power up the machine. If the nozzle has run-out, it will point in an unknown direction, which means the nozzle tip position is affected. But we can compensate that using nozzle tip calibration. The link is below, but do it in the right order.
>
> /> //How is one supposed to get a machine going, when offsets cannot be trusted??/
>
> Read and follow these instructions, in that order (if not yet done):
>
> https://github.com/openpnp/openpnp/wiki/Visual-Homing <https://github.com/openpnp/openpnp/wiki/Visual-Homing>
>
> https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Nozzle-Setup#head-offsets <https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Nozzle-Setup#head-offsets>
>
> https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Calibration-Setup <https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Calibration-Setup>
>
> Use *Pre-rotate *here (Because it was missing, I just added that to the Wiki):
>
> https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration>
>
> Also check this out here (Because it was missing, I just added that to the Wiki):
>
> https://github.com/openpnp/openpnp/wiki/Bottom-Vision#part-configuration <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#part-configuration>
>
> If the pipeline is the problem, see this:
>
> https://github.com/openpnp/openpnp/wiki/Bottom-Vision#tips <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#tips>
>
> _Mark
>
>
>
> Am 23.04.2021 um 11:56 schrieb Kim Lindberg:
>> I really need input on this issue.
>> I'm having A LOT of trouble getting my machine to place consistently and adjusting offsets.
>> I found this article:
>> https://github.com/openpnp/openpnp/wiki/Troubleshooting-Placement-Accuracy <https://github.com/openpnp/openpnp/wiki/Troubleshooting-Placement-Accuracy>
>> where it's mentioned, that the offsets are changing with every homing run ???!!!
>> How is one supposed to get a machine going, when offsets cannot be trusted??
>> I'm really frustrated by this, and I don't see how I can get it working on a daily basis when all feeders and parts needs to be adjusted every time :(
>>
>> What can I do to make this better? I have tried everything, nozzle calibration, visual homing, fine tuning bottom camera position etc.
>>
>> --
>> 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/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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 <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Kim Lindberg

unread,
Apr 23, 2021, 10:24:13 AM4/23/21
to OpenPnP
Hi Mark,
I already checked the backlash and I was unable to identify any, so I do not expect this to be the problem.
I did a test on the homing fiducial with ImageWriteDebug enabled (images attached)
It seems to locate the fiducial just fine.
I am suspecting mechanical issues, mostly lost steps, so I already turned down acceleration and speed to a bare minimum.

fidloc_results_4736208244731836231.png
fidloc_template_1780478270751803169.png
fidloc_original_6220677346015079946.png

Clemens Koller

unread,
Apr 23, 2021, 10:41:10 AM4/23/21
to ope...@googlegroups.com
Hi, Kim!

The images look good. I would expect that the visual homing will work. But: Did you check that all of your Z-heights are identical and/or that your camera is perfectly vertical? Here, I do not mean mechanically vertical, I mean that the optical axis is vertical to your work area.

Since I do not know your machine, I cannot give you hints how to verify that.

Regards,

Clemens

On 23/04/2021 16.24, Kim Lindberg wrote:
> Hi Mark,
> I already checked the backlash and I was unable to identify any, so I do not expect this to be the problem.
> I did a test on the homing fiducial with ImageWriteDebug enabled (images attached)
> It seems to locate the fiducial just fine.
> I am suspecting mechanical issues, mostly lost steps, so I already turned down acceleration and speed to a bare minimum.
>
> fredag den 23. april 2021 kl. 14.50.41 UTC+2 skrev Clemens Koller:
>
> Hi, Kim!
>
> On 23/04/2021 13.47, Kim Lindberg wrote:
> > I'm trying to run a job with six boards each having approx. 100 parts. every time I Home the machine (visual homing using fiducial on the bed at same Z as the board) I get a new offset and have to adjust all feeders and the bottom camera position.
>
> Your visual homing seems to be broken. You need to fix that first. Then you do not need to adjust all feeders and camera position after homing.
> If you still have to adjust feeder positions after homing, you are on the wrong track!
>
> > When I run the job, I get different offsets for each board which I can correct by changing bottom camera position 0.2-0.3mm.
> > all parts are offset in the same direction.
>
> This seems also not correct. You are not supposed to change the camera calibration for each board, obviously.
>
> Clemens
>
> >
> > I will have a look at the links you posted, to see if I missed something.
> > Thanks for your help. hope I can get this working reliably.
> >
> > fredag den 23. april 2021 kl. 13.33.15 UTC+2 skrev ma...@makr.zone:
> >
> > You need to be more specific. What offsets exactly do you mean? Head offsets?
> >
> > />  changing with every homing run/
> >
> > This section of the trouble-shooting page is not very helpful, frankly. It probably refers to run-out. As the rotation axis is usually not homed, it can be at any angle when you power up the machine. If the nozzle has run-out, it will point in an unknown direction, which means the nozzle tip position is affected. But we can compensate that using nozzle tip calibration. The link is below, but do it in the right order.
> >
> > /> //How is one supposed to get a machine going, when offsets cannot be trusted??/
> >
> > Read and follow these instructions, in that order (if not yet done):
> >
> > https://github.com/openpnp/openpnp/wiki/Visual-Homing <https://github.com/openpnp/openpnp/wiki/Visual-Homing> <https://github.com/openpnp/openpnp/wiki/Visual-Homing <https://github.com/openpnp/openpnp/wiki/Visual-Homing>>
> >
> > https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Nozzle-Setup#head-offsets <https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Nozzle-Setup#head-offsets> <https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Nozzle-Setup#head-offsets <https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Nozzle-Setup#head-offsets>>
> >
> > https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Calibration-Setup <https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Calibration-Setup> <https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Calibration-Setup <https://github.com/openpnp/openpnp/wiki/Nozzle-Tip-Calibration-Setup>>
> >
> > Use *Pre-rotate *here (Because it was missing, I just added that to the Wiki):
> >
> > https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration> <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#global-configuration>>
> >
> > Also check this out here (Because it was missing, I just added that to the Wiki):
> >
> > https://github.com/openpnp/openpnp/wiki/Bottom-Vision#part-configuration <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#part-configuration> <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#part-configuration <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#part-configuration>>
> >
> > If the pipeline is the problem, see this:
> >
> > https://github.com/openpnp/openpnp/wiki/Bottom-Vision#tips <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#tips> <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#tips <https://github.com/openpnp/openpnp/wiki/Bottom-Vision#tips>>
> >
> > _Mark
> >
> >
> >
> > Am 23.04.2021 um 11:56 schrieb Kim Lindberg:
> >> I really need input on this issue.
> >> I'm having A LOT of trouble getting my machine to place consistently and adjusting offsets.
> >> I found this article:
> >> https://github.com/openpnp/openpnp/wiki/Troubleshooting-Placement-Accuracy <https://github.com/openpnp/openpnp/wiki/Troubleshooting-Placement-Accuracy> <https://github.com/openpnp/openpnp/wiki/Troubleshooting-Placement-Accuracy <https://github.com/openpnp/openpnp/wiki/Troubleshooting-Placement-Accuracy>>
> >> where it's mentioned, that the offsets are changing with every homing run ???!!!
> >> How is one supposed to get a machine going, when offsets cannot be trusted??
> >> I'm really frustrated by this, and I don't see how I can get it working on a daily basis when all feeders and parts needs to be adjusted every time :(
> >>
> >> What can I do to make this better? I have tried everything, nozzle calibration, visual homing, fine tuning bottom camera position etc.
> >>
> >> --
> >> 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/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com> <https://groups.google.com/d/msgid/openpnp/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/openpnp/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> >
> > --
> > 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 <mailto:openpnp+u...@googlegroups.com>.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com> <https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> 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 <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/aab94867-8d0a-4b7d-8cb8-e9e5e9fec628n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/aab94867-8d0a-4b7d-8cb8-e9e5e9fec628n%40googlegroups.com?utm_medium=email&utm_source=footer>.

ma...@makr.zone

unread,
Apr 23, 2021, 12:18:41 PM4/23/21
to ope...@googlegroups.com

> mostly lost steps

How far off are we talking when you say "when all feeders and parts needs to be adjusted every time"?

I'm asking because a two phase powered stepper loses steps in increments of four full steps (if I remember correctly). It will snap into the next full step with the same polarization. Four full steps are quite a large jump on a PnP machine. On my machine I have 80 steps per millimeter on a 16 microstep driver. So four full steps would be 64 microsteps or 0.8 millimeters, i.e. clearly visible. If multiple steps are lost, it would even be multiples of 0.8mm.

Also: to exclude any other errors, you might post a log at trace level, that shows the homing.

_Mark

jdlv

unread,
Apr 23, 2021, 6:00:03 PM4/23/21
to ope...@googlegroups.com
Hi Kim,

did you check the mounting of the camera and lens?
Everything must be firmly fixed so as not to move during accelerations
and decelerations.

joël
> <https://groups.google.com/d/msgid/openpnp/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/openpnp/85dd9067-4051-46ac-9da0-e950c8d0df32n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> >
> > --
> > 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
> <mailto:openpnp+u...@googlegroups.com>.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com>
> <https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/openpnp/b0b16ccb-db96-44d5-ba16-f61b535bbc04n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> 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
> <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/aab94867-8d0a-4b7d-8cb8-e9e5e9fec628n%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/aab94867-8d0a-4b7d-8cb8-e9e5e9fec628n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Kim Lindberg

unread,
Apr 26, 2021, 11:30:04 AM4/26/21
to OpenPnP
Hi all and thanks for all your input.
I did a simple job today with fairly large (0805 and SO8) parts today, and found that visual homing and the feeder align quite nicely.
I did some movements between "park" on the far back to PCB origin a few times, and found that the offset changes by about ~0,5 to ~1,0mm mostly in x-direction.
I fear I am loosing steps, and I am currently looking into getting some closed-loop steppers to get rid of this problem.

@joël
My bottom camera is fixed very firmly into the aluminum bed with the lens fixed with small screws into the side, so I am confident this doesn't move. 

Kim Lindberg

unread,
May 4, 2021, 8:07:35 AM5/4/21
to OpenPnP
Hi all, and thanks for all your help.
I got hold of two closed-loop steppers which seems to have done the trick. I haven't run an actual job yet though, but initial tests look promising.
This must mean I had issues with lost steps on the old steppers.
As a bonus I got a MUCH better sounding machine as the steppers are much quieter and smoother.

Reply all
Reply to author
Forward
0 new messages