steps/mm and placement accuracy

402 views
Skip to first unread message

Dave McGuire

unread,
Jan 20, 2022, 1:58:55 PM1/20/22
to OpenPnP
On 1/20/22 11:11 AM, mark maker wrote:
> You know how to calculate stepper steps per unit, right?
>
> You need the stepper step angle (typically 1.8° or 0.9°), driver
> microsteps, number of teeth in pulley and belt pitch (usually 2mm).

Please pardon me for jumping in; starting a new thread for this.
What's the general expectation of accuracy for setting steps/mm purely
via calculation? Since I first assembled my LitePlacer a couple of
years ago, I've always set steps/mm by doing long excursions along a
good ruler and making fine adjustments to steps/mm based on that.
Instead of the calculated value of (in my case) 80, I'd end up with
values like 79.8, etc.

And to this day I've had persistent placement accuracy issues,
worsening in +X and +Y on parts toward the upper right of a panel of
smaller boards, suggesting cumulative error. Reflow self-centering
takes care of some of it, but 0.5mm-pitch QFPs need hand adjustments
prior to reflow, as they're off by as much as half a pin pitch. After a
great deal of effort I've not been able to eliminate the need for hand
adjustments with tweezers prior to reflow.

I had a brief period of gross errors early on, before I figured out
that the steel ruler I was using was cheap and inaccurate (nonlinear in
one area) so I replaced it with a quality Mitutoyo ruler. That improved
things, but the problem persists.

I'm in the process of recalibrating everything using the amazing
recent work from Mark and Tony, but as I've been following along with
other recent threads, and looking at other folks' Smoothieware
config.txt files, I've begun to suspect that setting steps/mm via
measurement as I've been doing may not have been the correct approach.

I'm an EE, with minimal mechanical aptitude so it's difficult for me
to visualize the way some types of errors work in a system like this. I
know stepper motors' steps are pretty accurate, and these toothed belts
tend to be pretty good. Is it really sufficient to calculate the
steps/mm using these parameters?

Thanks,
-Dave

--
Dave McGuire
McGuire Scientific Services, LLC
New Kensington, PA

tonyl...@gmail.com

unread,
Jan 20, 2022, 3:56:51 PM1/20/22
to OpenPnP
I assume you are using 3 or more fiducials near the corners of your boards to align the boards with the machine. If so, the important thing is that the axes scaling is linear.  That is, if a machine axis is commanded to move L+K millimeters, it actually moves s*(L+K) millimeters where L and K are any real values and s is a constant (that is hopefully near 1.0 but doesn't need to be exactly 1.0).  The actual value of s is not all that important because when the board fiducial check is performed, an Affine transform is computed which is used to translate between the board coordinates and machine coordinates. The Affine transform accounts for any rotation of the board axes with respect to the machine axes; differences in the board and machine axes scaling; and any difference in the "squareness" of their axes. What it can't correct for is any non-linearities in the axes - for instance, a belt that may have been over-tensioned and got stretched differently over different sections of the belt; eccentric pulleys or cogs that impart a sinusoidal component to the motion; or curved, bent, or twisted axes.  One thing about the LitePlacer is that it is easy to assemble the machine with a twist in the X-axis (side-to-side) rail that imparts a rolling motion to the head as it move in X - you might want to check that.  Also use a level to verify the Y-axis (front-to-back) rails are parallel. 

The bottom line is that you should be able to set the axes scaling by either method - based purely on the gearing ratios, etc. of your machine or by measuring the actual displacements with a (linear) ruler.  They should both be close enough and the Affine transforms should automagically take care of any remaining (linear) discrepancies.

You mentioned you're using a panel of smaller boards.  Something I'm not sure about is if OpenPnP computes a separate Affine transform for each board (I think that's how it should work) or if it just computes one Affine transform for the entire panel based on the panel's fiducials or maybe even just one of the board's fiducials. I'll have to dig into the code to know for sure.

You didn't mention rotational displacements - do the rotations of the parts look ok?

Tony

Jarosław Karwik

unread,
Jan 21, 2022, 2:05:19 AM1/21/22
to OpenPnP
Actually steppers are not that accurate. Well - base stepping yes, but precise fractional steps - not ( anything below 1/8 step does not give better mechanical accuracy, just better sound).  While belts are accurate (especially these with steel cords) - the wheels for them are not ( unless cut with wire cutters -  I deal with industrial ink jets which use them and it can be seen on printouts whether machine uses standard or wire cut wheels). Even ball screws are not precise ( there are 3 different technologies to make them and these really precise are insanely expensive), also the error is cumulative.

For our machines, even with these errors you can still have good machine - but it does require precise calibration. Linear encoder will help much. but unlikely to solve all problems.

So trust no one :-)

mark maker

unread,
Jan 21, 2022, 4:49:23 AM1/21/22
to ope...@googlegroups.com

Tony is right, of course, but he jumps right into the solution and its details, so I'd like to take a step back, and give a broader perspective. I'm no mechanical engineer, so this is just what I learned as a hobbyist, so far (Numbers for referencing).

  1. There are different types of "quality" in positioning, Accuracy, Repeatability, Resolution (source):
  2. Accuracy is the difference between a point instructed by the controller and the point actually achieved by the tool.
  3. Repeatability is the cycle-to-cycle variation when aimed at the same point.
  4. Resolution smallest increment of motion or distance/angle that can be controlled, often only theoretically, i.e. micro-steps or the resolution of a servo's closed loop encoder.
  5. As Jarosław pointed out, Accuracy can be further divided into:
  6. Absolute Accuracy, i.e. absence of errors accumulating on the long run through e.g. belts, screws etc. ... and ...
  7. Relative, or cyclic Accuracy affecting the local linearity of positioning through e.g. micro-steps not being linear, or rails wobbling.
  8. The topic of this thread seems to be about Absolute Accuracy.

Now that is laid out, let's talk about it:

  1. To say it bluntly: Absolute Accuracy is very much overrated for Pick & Place. Unlike, say, a laser cutter, we simply don't need it. For the most part, we don't care about the absolute coordinates of feeders, nozzle tip changers, bottom camera etc., we just capture them, and then rely on Repeatability. The only thing that on first sight needs Absolute Accuracy is the PCB i.e. applying placement data from the E-CAD. But this is limited to the PCB size, not across the whole machine. 
  2. And that's first sight only, because as Tony pointed out, we have Fiducials and Affine Transforms to perfectly calibrate the machine to each individual PCB, so any Absolute Accuracy issues are simply eliminated, notably including those from the PCB manufacturing process, which can also be present. This means we can concentrate on the other topics listed above: Relative, or cyclic Accuracy, Repeatability, Resolution.
  3. What this means in practice? IMHO, you can leave your steps/mm on the nominal value, e.g. the 80 steps/mm Dave mentioned. Unless you have crap belts or damaged them (over-stretched), the Absolute Accuracy of belts and ball screws is enough for PnP. For stepper+belt machines: note, that a belt cannot slip on a pulley, and the stepper's native angular steps are physically tied to its housing, so everything is "digital" in absolute terms (not speaking of the relative/cyclic errors here). This "digital" property is what makes stepper machines so attractive. The only thing that can exhibit absolute errors is the belt, i.e. the teeth across its length. So buy good belts and don't overstretch them.
  4. The next thing to discuss is Relative, or cyclic Accuracy. Obviously we need relative accuracy fine enough for the task at hand. If you want to place 0201 parts it needs to be better than for 0402 etc. As an absolute minimum requirement I'd say you need something like a quarter of the smallest contact size. So if you got 0.5mm pitch parts with 0.2mm pads, you'd need accurate relative positioning down to +/- 0.05mm or better.
  5. But that relative accuracy must also be covered by Repeatability. Given most machines are either stepper or encoder controlled (i.e. "digital"), the base repeatability is good. Effects like backlash & Co. can ruin that, so we compensate it as well as possible.
  6. Which brings us to Resolution. We need enough resolution to achieve the needed relative accuracy, plus the finesse to compensate for things like backlash. Don't know much about servos and encoders, but for steppers, the resolution is given by the micro-steps, which are ratio magnetic fields holding the motor at a sub-step angles, and as Jarosław pointed out, these can be skewed by external forces. How many micro-step division can you trust? 4, 8, 16?
  7. As you know, I've added accuracy tests to the Automatic Backlash Calibration of the axes, so you are not flying blind. The diagram below comes from my (modified) Liteplacer, i.e. a simple-as-it-gets 1.8°-steeper+belt machine, 80 steps/mm nominal resolution at 16 micro-steps (the diagram goes over the 80 steps of one millimeter). Blue points show step-wise relative accuracy, Brown points show repeatability, i.e. moving from random far-away positions to the step positions at full speed (with the calibrated backlash compensation applied). Except for one random point, everything is within +/- two 16er micro-steps, which tells us we can take about 8 micro-steps seriously. This is measured with the camera, I must say, so including camera/lens errors. Not bad.
  8. What if this diagram looks bad on your machine? Trusted too many micro-steps? You might need to mount a smaller pulley, to increase the steps/mm, i.e. make the micro-steps count for less.


_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/7d8177c2-b1f5-4f9d-8af7-696cbd28ca1bn%40googlegroups.com.

tonyl...@gmail.com

unread,
Jan 21, 2022, 6:03:54 PM1/21/22
to OpenPnP
Dave,

I'm still poking at your mention of "panel of smaller boards."  Are you using OpenPnP's panelization feature or are you panelizing the smaller boards in your CAD tools so that OpenPnP just treats it all as one big board?

Tony

Dave McGuire

unread,
Jan 21, 2022, 6:14:57 PM1/21/22
to ope...@googlegroups.com
On 1/21/22 6:03 PM, tonyl...@gmail.com wrote:
> I'm still poking at your mention of "panel of smaller boards."  Are you
> using OpenPnP's panelization feature or are you panelizing the smaller
> boards in your CAD tools so that OpenPnP just treats it all as one big
> board?

Hi Tony, I'm sorry for the delay, it's a busy week here. I'm still
absorbing all of the info in the replies to my post.

I'm using OpenPnP's panelization feature. My panels' frames have
four panel fiducials, but I've been using only two, the lower left and
the upper right.

My situation is that I'm occasionally building a set of panels of the
same boards several times per year. I've long suspected that either
OpenPnP's panelization math is slightly buggy, or that my assumption
that two fiducials were sufficient.

Can you offer any guidance in this area?

tonyl...@gmail.com

unread,
Jan 21, 2022, 8:05:09 PM1/21/22
to OpenPnP
How many fiducials do you have per board?  I've looked at OpenPnP's panelization code a bit and it doesn't appear that the two panel fiducials actually get used anywhere.  I don't really see that as a problem though as long as the fiducials of each board get checked.  If I'm reading the code correctly, it appears that the fiducials on the board in the lower left corner get used to align that board as well as the entire panel and then all the other boards are aligned using their own fiducials.  Can you post a log from a job with panelized boards?

Tony

Dave McGuire

unread,
Jan 21, 2022, 9:52:24 PM1/21/22
to OpenPnP
  I have one fiducial on each board, but I've not been using those at all (i.e. OpenPnP isn't checking them).  It looks to me (from the behavior, not the code) that it actually is using the panel fiducials, because I get believable rotational offsets in the "Rot." column, which I can affect by moving the panel a bit.

I found a log from a previous run; it's quite old, but it's from these boards and is typical of the runs I've done.  File attached.

                Thanks,
                  -Dave
OpenPnP-87-20200530.log

tonyl...@gmail.com

unread,
Jan 22, 2022, 9:29:49 AM1/22/22
to OpenPnP
I see in your logs that it is indeed using the panel fiducials - I need to examine the code more closely to see what it is doing exactly.  But, in any case, with only two fiducials, OpenPnP can't estimate the non-squareness of the axes and it can only estimate a single scaling factor that gets applied equally to X and Y.  It needs at least three fiducials to correctly estimate all the parameters.  Unfortunately, at the moment, OpenPnP only supports two fiducials per panel (while I'm looking at this I'll see if that can be increased - I think it is just a GUI limitation).  If at all possible, I highly recommend adding more fiducials to your boards because then each board can have its own Affine transform to correct for its local coordinates.

Tony

tonyl...@gmail.com

unread,
Jan 22, 2022, 11:15:36 AM1/22/22
to OpenPnP
Ok, I looked at the code more closely and I do see where it is using the panel fiducials to find the board origins and rotations.  But without board fiducials, it doesn't apply any local corrections to the placement locations on each board. I guess one change we could make is to at least apply the appropriate Affine correction found from the panel fiducials to each board's placements (if the board itself doesn't have fiducials).  If, along with that, we fix the GUI to allow for more panel fiducials, you might get there without having to add board fiducials (although it would still be better to have three or, even better, four fiducials per board).

Before proceeding with any changes though, I want to think about also adding support for fiducials that are local to specific placements, i.e., say you have a few large fine pitched parts on your board, you could have a set of fiducials near each of those placements that get checked just before the part is placed.  That "feels" like a very similar sort of thing - local fiducials are to a board as board fiducials are to a panel. I guess each placement would need to have a flag that would indicate if a local fiducial check were needed before placing the part. In the GUI, the placements table would need an extra column for the flag.  If the flag is set for the placement, the nearest two or three fiducials would be checked prior to the placement being placed.

Tony

mark maker

unread,
Jan 22, 2022, 11:34:39 AM1/22/22
to ope...@googlegroups.com

> Before proceeding with any changes though, I want to think about also adding support for fiducials that are local to specific placements

Assuming that flaws in machine motion mechanics and/or PCB manufacturing are always locally continuous, wouldn't it make sense to model a net of all the fiducials, regardless of whether they are intended for specific placements or for the whole PCB, (or even for the Panel) and then smoothly interpolate between them? 

http://stockage.univ-brest.fr/~herbette/Data-Analysis/data-analysis-steven-interpolation-recov.pdf

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

tonyl...@gmail.com

unread,
Jan 22, 2022, 12:15:49 PM1/22/22
to OpenPnP
> Assuming that flaws in machine motion mechanics and/or PCB manufacturing are always locally continuous, wouldn't it make sense to model a net of all the fiducials, regardless of whether they are intended for specific placements or for the whole PCB, (or even for the Panel) and then smoothly interpolate between them?

That certainly is a possibility although I'm also thinking about errors that may change over time. For example, as the machine runs it may heat up and expand different amounts in different directions.  For those kinds of errors, I think you'd want to base the correction on data collected just before the placement is made and not based on a model that was built from data that was collected sometime in the past.  Of course, it could be some sort of hybrid approach where all the fiducials are checked at the start of the job to build the model and then the model gets periodically updated as the job progresses.  When and how to update it then becomes the question - it could be updated only before specific placements are made or it could be done after a certain time interval has elapsed, or both, .... In any case, we also need to make sure the model (whether it is continuous or not) doesn't become corrupted by a bad fiducial measurement (need a check to verify any local distortion is not too far from the global average).

Tony

Dave McGuire

unread,
Jan 22, 2022, 12:27:27 PM1/22/22
to OpenPnP
That sounds reasonable.  For these specific panels, though, I have a lot of them, and they only have a single fiducial per individual board.  Is that one useful at all in this context, i.e. should I bother setting it up in OpenPnP, or just wait until I run out of these panels and then add more fiducials to the Gerbers for the next batch?  (it's pretty tight, I'm not even certain that I could do it)

I'm tracking the test builds, and I can put one of those panels on my machine to test the additional panel fiducials code (at least for basic configuration, I'm not prepared to do another run of these boards just yet) if you add the GUI enhancments for additional panel fiducials.

Specific placement fiducials are an interesting idea.

              -Dave

tonyl...@gmail.com

unread,
Jan 22, 2022, 4:08:23 PM1/22/22
to OpenPnP
> I have a lot of them, and they only have a single fiducial per individual board.  Is that one useful at all in this context?
Probably not right now. Even if you enabled them, I don't think OpenPnP could make use of them as it requires a minimum of 2 per board.

>it's pretty tight, I'm not even certain that I could do it
Although not ideal, if you don't have enough room elsewhere, you can put fiducials under parts - they'll get covered up once the parts are placed but at that point, they've already done their job.

jdlv

unread,
Jan 23, 2022, 5:38:21 AM1/23/22
to ope...@googlegroups.com

Hi,

if this can help, a couple of years ago while adding linear scale I make some measurements of X axis position error:


One measure every mm, moves from the motor to the idler pulley and back.

The shift between the curve is the backlash, the high "frequency" sinus shape is the pulleys eccentricity and certainly stepper error. The increase in error is the idler pulley eccentricity. That's a real low cost one!

I don't know what is causing the low "frequency" error.

With better quality pulleys and for small moves accuracy can be not so bad...

joël

X error.png

mark maker

unread,
Jan 23, 2022, 7:06:41 AM1/23/22
to ope...@googlegroups.com

Wow, very illustrative, thanks!

I didn't think pully/idler errors would be that large. But this could easily be compensated (obtaining the data is the difficult thing for those that do not own linear scales).

The low frequence error is not important for PnP, IMHO, as I explained earlier here. It could come from changing drag chain weight/forces.

Did you do it multiple times? How repeatable is it? At different speeds/accelerations?

Did you do it continuously or always full axis motion to the point (i.e. once from the right end, once from the left end of the axis)?

_Mark

jdlv

unread,
Jan 23, 2022, 8:23:01 AM1/23/22
to ope...@googlegroups.com

Position were measured every mm, motor moves 1mm, stops, waits for stabilisation and position is measured.

Sorry I don't have two plots with exactly the same conditions but with different belt tension :

Belt tension changes the distance between the motor and the idler because of belt elasticity. This effect is compensated in the plots. If I remember correctly Low Belt Tension was just a little bit less but High Belt Tension was close to insane belt tension and proves to be useless.

joël
xerror.png

Dave McGuire

unread,
Jan 23, 2022, 10:15:14 AM1/23/22
to ope...@googlegroups.com
On 1/23/22 7:06 AM, mark maker wrote:
> I didn't think pully/idler errors would be that large. But this could
> easily be compensated (obtaining the data is the difficult thing for
> those that do not own linear scales).

I may be looking at this too simplistically, but would it not be
sufficient to do it via vision, place a good-quality ruler along an axis
and measure the movements as the ruler ticks go by?

bert shivaan

unread,
Jan 23, 2022, 10:19:38 AM1/23/22
to OpenPnP
The deviation in the graph is not really that high, not sure a ruler will be enough. The difference in the peaks for instance on the blue scale is about .1mm So while the graph looks like there is huge error, the error is likely as good as any DIY system will ever get. And the sine wave looking part is also only about .1mm in the section we can see.


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

mark maker

unread,
Jan 23, 2022, 10:42:26 AM1/23/22
to ope...@googlegroups.com

> The difference in the peaks for instance on the blue scale is about .1mm So while the graph looks like there is huge error, the error is likely as good as any DIY system will ever get.

I agree. One needs to only look at one of the curves (the backlash we can compensate) and only for one cycle. All the lower frequency stuff can be sufficiently compensated by the Affine Tranform, i.e. by fiducials.

And thinking about it some more, it would probably not be easy to compensate the sinusoid after all, as the idler (unlike the pulley) can slip on the belt, so its phase will likely shift over time. Probably easier to buy a higher quality one.

For a successful wheel run-out compensation, one would need a design, where all the wheels are toothed (idlers too), and of the same (known) number of teeth. Therefore, you'd need a construction, that only bends the belt around its toothed side.

_Mark

Jan

unread,
Feb 3, 2022, 1:52:43 PM2/3/22
to ope...@googlegroups.com
Hi Tony!
I'm following your discussions about panel fiducials for a while and
now have a job with many very small pcbs in a panel. The panel has
fiducials, but the boards don't. If you would go the first step by
adding support for three fiducials per panel, I'd be happy to test it.

Jan
> --
> 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/14f7115d-8267-42b2-8fb9-c985759134ebn%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/14f7115d-8267-42b2-8fb9-c985759134ebn%40googlegroups.com?utm_medium=email&utm_source=footer>.

tonyl...@gmail.com

unread,
Feb 3, 2022, 4:35:34 PM2/3/22
to OpenPnP
I haven't actually tested this, but if you're in a hurry, you could just try adding the additional fiducials to your job xml file (after you've panelized it and saved it).  If you open it in a text editor, it should look something like (without the highlighted parts):

<openpnp-job>
   <panels>
      <panel>
         <id>Panel1</id>
         <columns>2</columns>
         <rows>3</rows>
         <x-gap value="5.0" units="Millimeters"/>
         <y-gap value="5.0" units="Millimeters"/>
         <part-id>Fiducial_1mm_Dia_2.54mm_Outer_CopperTop-Fiducial_1mm_Dia_2.54mm_Outer_CopperTop</part-id>
         <check-fids>true</check-fids>
         <fiducials>
            <placement version="1.4" id="PanelFid1" side="Top" part-id="Fiducial_1mm_Dia_2.54mm_Outer_CopperTop-Fiducial_1mm_Dia_2.54mm_Outer_CopperTop" type="Fiducial" enabled="true">
               <location units="Millimeters" x="-10.0" y="-10.0" z="0.0" rotation="-0.006382345361929821"/>
               <error-handling>Alert</error-handling>
            </placement>
            <placement version="1.4" id="PanelFid2" side="Top" part-id="Fiducial_1mm_Dia_2.54mm_Outer_CopperTop-Fiducial_1mm_Dia_2.54mm_Outer_CopperTop" type="Fiducial" enabled="true">
               <location units="Millimeters" x="215.0" y="230.0" z="0.0" rotation="-0.006382345361929821"/>
               <error-handling>Alert</error-handling>
            </placement>
            <placement version="1.4" id="PanelFid3" side="Top" part-id="Fiducial_1mm_Dia_2.54mm_Outer_CopperTop-Fiducial_1mm_Dia_2.54mm_Outer_CopperTop" type="Fiducial" enabled="true">
               <location units="Millimeters" x="-10.0" y="230.0" z="0.0" rotation="-0.006382345361929821"/>
               <error-handling>Alert</error-handling>
            </placement>
            <placement version="1.4" id="PanelFid4" side="Top" part-id="Fiducial_1mm_Dia_2.54mm_Outer_CopperTop-Fiducial_1mm_Dia_2.54mm_Outer_CopperTop" type="Fiducial" enabled="true">
               <location units="Millimeters" x="215.0" y="-10.0" z="0.0" rotation="-0.006382345361929821"/>

               <error-handling>Alert</error-handling>
            </placement>
         </fiducials>
      </panel>
   </panels>
   <board-locations>

Here I added two additional fiducials to the panel called "PanelFId3" and "PanelFid4" and changed their x and y locations as appropriate (see the yellow highlights above) - add as many (or few) as you wish. Then save the file and re-load it into OpenPnP.  I think when you run the job it will then check all the fiducials listed.

Tony

james.edwa...@gmail.com

unread,
Feb 3, 2022, 5:46:52 PM2/3/22
to ope...@googlegroups.com

Hi, Tony. I have a question for you. Imagine I have a critical placement where the most accuracy possible is needed. If I create a fiducial at X, Y (using the part shape as the fiducial shape ) and then have the part placement at X, Y , will that “guarantee” that the part is placed at the X,Y location found for the fiducial?

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/4c198c71-c5a3-4a82-b470-a93fbe6114adn%40googlegroups.com.

tonyl...@gmail.com

unread,
Feb 3, 2022, 10:39:53 PM2/3/22
to OpenPnP
> If I create a fiducial at X, Y (using the part shape as the fiducial shape ) and then have the part placement at X, Y , will that “guarantee” that the part is placed at the X,Y location found for the fiducial?
The short answer is no.  In theory you could do such a thing, but OpenPnP doesn't currently support it. It only looks at all the fiducials in a global sense and computes the "best fit" Affine transform that transforms between board coordinates and machine coordinates.  Note that there is also (currently) no support for a fiducial, say shaped like a footprint, that can give orientation information (we currently only get x-y location information from a single fiducial) - that's why we need to use multiple fiducials to not only get the position but orientation as well (you need both in order to accurately place the part).  I think what you're looking for is what I talked about earlier in the thread about "local fiducials" that get used for specific placements.  

Tony

Jan

unread,
Feb 4, 2022, 3:55:18 AM2/4/22
to ope...@googlegroups.com
Hi James!
Sorry, Tony, for jumping in.
As discussed earlier, local fiducials only help, if PCBs and/or the
machine has position local errors (x, y position errors are a function
of the position). I think, that's unlikely unless you have very large
PCBs and/or very bad mechanics.
It's more likely that the position accuracy will be affected by all the
other errors:
a) how precise can vision detect the position and angle of the part
you're going to place?
b) how precise can the machine correct vision errors?
c) how precise is your up-looking camera position with respect to the
placement position?
d) how precise can your machine move to the placement position and how
precise can the machine place the component there?
As most configuration/calibration work is done by vision, it's all a
question how precise and repeatable vision operations are. Unfortunately
I've not see a series of vision operations and their results to qualify
the error. Just keep in mind, you're doing a single vision operation to
decide how to correct the part before placement. Hence vision operation
has to be 100% precise and repeatable or the other way around: the
larges outlier you find in this series defines the best placement
accuracy you can claim.

Jan

On 03.02.2022 23:46, james.edwa...@gmail.com wrote:
> Hi, Tony. I have a question for you. Imagine I have a critical placement
> where the most accuracy possible is needed. If I create a fiducial at X,
> Y (using the part shape as the fiducial shape ) and then have the part
> placement at X, Y , will that “guarantee” that the part is placed at the
> X,Y location found for the fiducial?
>
> *From:* ope...@googlegroups.com <ope...@googlegroups.com> *On Behalf
> Of *tonyl...@gmail.com
> *Sent:* Thursday, February 3, 2022 3:36 PM
> *To:* OpenPnP <ope...@googlegroups.com>
> *Subject:* Re: [OpenPnP] Re: steps/mm and placement accuracy
> On 22.01.2022 17:15, tonyl...@gmail.com <mailto:tonyl...@gmail.com>
> > tonyl...@gmail.com <mailto:tonyl...@gmail.com> wrote:
> >
> > How many fiducials do you have per board?  I've looked at
> > OpenPnP's panelization code a bit and it doesn't appear that
> > the two panel fiducials actually get used anywhere.  I don't
> > really see that as a problem though as long as the fiducials
> > of each board get checked.  If I'm reading the code
> > correctly, it appears that the fiducials on the board in the
> > lower left corner get used to align that board as well as
> > the entire panel and then all the other boards are aligned
> > using their own fiducials.  Can you post a log from a job
> > with panelized boards?
> >
> > Tony
> >
> > On Friday, January 21, 2022 at 5:14:57 PM UTC-6 Dave McGuire
> > wrote:
> >
> > On 1/21/22 6:03 PM, tonyl...@gmail.com
> > <mailto:openpnp+u...@googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/14f7115d-8267-42b2-8fb9-c985759134ebn%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/openpnp/14f7115d-8267-42b2-8fb9-c985759134ebn%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/4c198c71-c5a3-4a82-b470-a93fbe6114adn%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/4c198c71-c5a3-4a82-b470-a93fbe6114adn%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/017c01d8194f%24eda935f0%24c8fba1d0%24%40gmail.com
> <https://groups.google.com/d/msgid/openpnp/017c01d8194f%24eda935f0%24c8fba1d0%24%40gmail.com?utm_medium=email&utm_source=footer>.

Jan

unread,
Feb 4, 2022, 4:26:20 AM2/4/22
to ope...@googlegroups.com

tonyl...@gmail.com

unread,
Feb 4, 2022, 10:27:16 AM2/4/22
to OpenPnP
>I can confirm, that this works. All three fiducials that I have on the
panel are checked and used. 

Great - I'll work on an update that will permit the operator to enter more than 2 fiducials from the GUI so they won't need to hand edit the job file.

>As discussed earlier, local fiducials only help, if PCBs and/or the
machine has position local errors (x, y position errors are a function
of the position). I think, that's unlikely unless you have very large
PCBs and/or very bad mechanics.

All that you said is true, but have you considered that errors can change with time?  For example, thermal expansion/contraction - most likely machines are constructed using a lot of aluminum which expands/contracts with temperature a lot more than typical PCB materials, i.e., fiberglass.  If the fiducials get checked just before the placement, those kinds of errors can be compensated. Granted those errors will typically be small but if you're operating near the edge of your machine's capability it might just allow for placements that would otherwise fail. 

Tony 

Dave McGuire

unread,
Feb 4, 2022, 12:06:49 PM2/4/22
to ope...@googlegroups.com

I'll be doing a panel today with the new testing version; I will use
this method too. Thanks to both of you!

-Dave

Jan

unread,
Feb 4, 2022, 4:39:40 PM2/4/22
to ope...@googlegroups.com
Hi Tony!

On 04.02.2022 16:27, tonyl...@gmail.com wrote:
[...]
> >As discussed earlier, local fiducials only help, if PCBs and/or the
> machine has position local errors (x, y position errors are a function
> of the position). I think, that's unlikely unless you have very large
> PCBs and/or very bad mechanics.
>
> All that you said is true, but have you considered that errors can
> change with time?  For example, thermal expansion/contraction - most
> likely machines are constructed using a lot of aluminum which
> expands/contracts with temperature a lot more than typical PCB
> materials, i.e., fiberglass.  If the fiducials get checked just before
> the placement, those kinds of errors can be compensated. Granted those
> errors will typically be small but if you're operating near the edge of
> your machine's capability it might just allow for placements that would
> otherwise fail.
>
According to Wikipedia, the thermal expansion coefficient of aluminum is
23.1e-6/K @20°C. If your machine is build of such a aluminum and your
PCB has fiducials in 20cm distance and you'd have a temperature raise of
20° between fiducial checking and end of job your PCB would look like
23.1e-6 * 20° * 20cm = 92.4um longer. Despite the fact that it's rather
unlikely that you will have a temperature increase of 20° while a job is
running and ignoring that all belts and the PCB itself will also expand,
I'd consider this of less importance. Especially as thermal processes
tent to be slow compare to job running time. However thermal expansion
might be an issue for the bottom camera. Everything we do follows the
assumption, that the position of the bottom camera is well known and
does not change. But what if on a sunny day the workshop heats up until
the evening. This will likely result in a measurable expansion of the
machine and hence to a position error of the bottom camera. It might
therefore be a good idea to recalibrate the camera position from time to
time...
To you have any idea how this is handled in professional PnP machines?

Jan
> <https://groups.google.com/d/msgid/openpnp/4c198c71-c5a3-4a82-b470-a93fbe6114adn%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/openpnp/4c198c71-c5a3-4a82-b470-a93fbe6114adn%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/c905e519-6e86-4c6d-8976-318836e0a9b3n%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/c905e519-6e86-4c6d-8976-318836e0a9b3n%40googlegroups.com?utm_medium=email&utm_source=footer>.

tonyl...@gmail.com

unread,
Feb 4, 2022, 5:59:21 PM2/4/22
to OpenPnP
I feel like we're going down a bit of a rabbit hole here but thanks for running some numbers.  While 92.4um doesn't sound like much, consider a 0.5mm pitch part - you can probably tolerate misplacements of about a quarter of the pitch or about 125um - that thermal expansion just ate 74% of your allowance.  Of course, as you point, that is a very worst-case analysis, but I don't think it should just be dismissed either.

>  you have any idea how this is handled in professional PnP machines?
No, I'm not sure if they account for it or not.  One option I can think of instead of having to recalibrate when the temperature changes, is that they could have a thermal model of their machine that is used to determine how the various dimensions change as a function of temperature change. For a single machine design, it wouldn't be that difficult for a commercial enterprise to develop such a model either through CAD tools or actual physical measurements of a representative machine.  Unfortunately, that is probably out of the reach of most DIYers so it's probably not a viable option for OpenPnP.

Tony

Harjit Singh

unread,
Feb 4, 2022, 11:09:49 PM2/4/22
to ope...@googlegroups.com
For assembly at contract manufacturers, We had fiducials on the edge of the PCB and before the start of placement, they would read them. 

Shouldn't this null out any changes in the PCB or the machine?

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/1ec7f284-83a1-468b-a0ae-df28b043186an%40googlegroups.com.

mark maker

unread,
Feb 5, 2022, 5:22:44 AM2/5/22
to ope...@googlegroups.com

Jan,

like you said, you are "ignoring that all belts and the PCB itself will also expand". The whole machine does, so the resulting error will be much less than 94µm. Everything on the machine is expanding or contracting, so errors can only be in the differences of thermal expansion coefficients. If a machines is made of Aluminium throughout (as seems to be the case for any ambitious design), the belt will stretch to whatever length the Aluminium gives (assuming your tensioner is rigid), so these differences will be minor. I guess if you were to mix Steel and Aluminium, you must be careful not to create bimetal bending.  And using a wooden tables such as in the simplest Liteplacers could be a problem too (maybe thermally and hygroscopically).

But ...

There are fiducials on each PCB, so  both the position and the dimension of the PCB are compensated. And how long does it take to assemble one PCB? How many °C of temperature change during that time?

The bottom camera position is always implicitly calibrated when you calibrate a nozzle tip. That's one of the reasons why nozzle tip calibration is important, even if you do not have run-out.

The more advanced feeder classes can be position calibrated by vision (BlindsFeeder, ReferencePushPullFeeder, others), some are even vision-all-the-time (LoosePartFeeder, etc.)

The nozzle tip changer can be vision calibrated.

All the above can be configured so the position calibration is invalidated on machine homing. So simply re-homing the machine after a particularly bad temperature change can take care of all that.

To sum it up: I do not think thermal expansion in the mechanics* is a problem for OpenPnP at all. 😎

_Mark

*) Some users reported that the camera can exhibit image shift/distortion when the camera heats up. That's a completely different matter... Probably best to replace that camera or at least warm it up consistently before calibration and use.

tonyl...@gmail.com

unread,
Feb 5, 2022, 10:53:04 AM2/5/22
to OpenPnP
The only reason I brought this up was because of this open issue.  I guess if everyone is in agreement that it is unnecessary, then that issue should be closed.

Tony

Reply all
Reply to author
Forward
0 new messages