double sided panel

263 views
Skip to first unread message

Jan

unread,
Jul 22, 2022, 4:38:20 AM7/22/22
to OpenPnP
Hi all!
I just wont to report on a minor glitch I detected when setting up a
double sided panel. First of all, I've to admit, that I'm new to this
topic and hence have not established workflow.
I've created a new job, imported the board and panelized it. Then I
followed Tonys suggestion and edited the job-file by hand to add
more/all fiducials on the panel. Then I reopened the job in OpenPnp and
tried a fiducial check on the panel fiducials. This fails, because
OpenPnp tries to find all fiducial, ignoring the "side=" property. My
workaround is to split the job into Top and Bottom and remove the
fiducials, that are not on the active side.
So, the - to my expectation - unexpected behavior is, that either the
side property shall not be part of the fiducial definition in the job
file or the panel fiducial check shall use the relevant fiducials. I
assume, that the first would cover more use cases in that it handles
panels of multiple board types better.
One addition questions: would anyone please tell me, how double sided
boards are expected to be handled in OpenPnp? Are they handle in a
single job file with some switch somewhere to select the side to
populate or is double sided beyond the scope of OpenPnp?

Jan

Zdenko Stanec

unread,
Jul 22, 2022, 1:24:40 PM7/22/22
to OpenPnP
Hi Jan,

You can handle double-sided boards in the same job file, just select the side, right-click on the job file and select "set side" Top/Bottom.

One issue that I am having right now that I just want to mention so you can maybe observe it when you start with placements is that for example on some SOT-23 diodes I needed to change rotation in tape from 0 to 180deg between the Top and Bottom side (I don't know why), so for Top side rotation in the tape was 0deg and I needed to change it for bottom side to 180deg for the component to be placed correctly.

Another issue that I noticed is if you are placing the components for example on two boards, and you ran out of the components in the middle of the job, so in case you put one component on one board and you ran out of it, you will get an empty "red" component like "missing feeder" but you will get a check mark as the component was "Placed" on both boards, but in reality, it was only placed on one board because as I see the component list is shared between all panel boards, it does not "multiply" the placement file where you would be able to see and track every component on each board in a panel.

Hope I helped in some way.

Best regards,

Zdenko

tonyl...@gmail.com

unread,
Jul 22, 2022, 2:53:46 PM7/22/22
to OpenPnP
As you known, the current builds of the OpenPnP GUI only supports two fiducials per panel.  As Jan mentioned, you can edit the job file by hand to add more fiducials and the fiducial check will used them.  Unfortunately, the panel fiducial check only sets the panel origin location and rotation - it does not result in any Affine correction being applied when the placement locations are computed (unless the boards themselves have fiducials that are checked).  So, right now adding additional fiducials to panels doesn't really help that much with aligning placements that are far from the panel's origin.  I'm in the process of fixing all that.  In addition, I plan to make panels separate entities (will have their own *,panel.xml files just as boards currently have *.board.xml files).  Panels will be a lot more flexible in that they can be made up of any number of different boards and/or sub-panels at any orientation and will not be restricted to just a rectangular grid.  They will also support having any number of fiducials and will even be able to make use of board fiducials for the purpose of aligning the entire panel.  It's a bit of a slow go however as there is both GUI changes and code refactoring that needs to take place (but I think I'm getting close to releasing something soon).

@Zdenko, the problem with having to rotate components by 180 degrees on the bottom - are you only seeing that problem with panelized boards or with individual boards as well?  If it's the latter, the problem may be with the board importer.  What CAD package and importer do you use?  I've started documenting how placement rotation angles are defined by various different systems.  I only have experience with the three shown below.  If anyone knows for sure how other CAD packages define the rotation, I can add them to the list.

PlacementAngleReference.png

Zdenko Stanec

unread,
Jul 22, 2022, 3:20:02 PM7/22/22
to OpenPnP
Hey Tony,

The problem is with individual boards as well.

Personally, I am using KiCad and I still did not try bottom side placement to see if rotation is OK.

These boards that I am currently placing are for a friend, he is using Altium Designer, we needed to adjust the CSV file to get a good import in OpenPnP but we managed it including even component height. We were a bit confused when we saw that SOT-23-3 diodes are getting rotated by 180deg. :D 

For example, for Top side, the origin of the PCB is Bottom Left, and for the Bottom side origin needed to be moved to the Bottom Right but we needed to set rotation in tape from 0deg to 180deg to have it right on the Bottom, it is the same diode that was needed on Top and Bottom so we always needed to change rotation in tape.

Importer was "Named CSV".

Zdenko,

tonyl...@gmail.com

unread,
Jul 22, 2022, 5:26:49 PM7/22/22
to OpenPnP
Zdenko,

For individual rectangular boards, setup the job with the board top facing up and set the board location to match the board origin (see top half of the figure below).  This is typically the lower left corner of the board.  Be sure to set the width (as measured in the board's X direction) and length (as measured in the board's Y direction) of the board as well.  Then to place bottom side components, flip the board along its width (X dimension) so that the board origin is now at the lower right (see the lower half of the figure below) and on the Job tab, just change the board side from Top to Bottom (do not change the location of the board in OpenPnP).  OpenPnp knows that for bottom placements, it needs to add the width of the board to the board's location and then it subtracts the placement's local offset from that to arrive at the machine coordinates for that placement.

BoardOrigin.png

Now, WRT placement rotation on the bottom.  Most of the board importers "know" how the rotations are defined in their respective tools so they take care of any necessary conversions for the operator.  However, when using the "Named CSV" importer, it is your responsibility to make sure that the rotation of the placements in the CSV file match that as defined by OpenPnP (see left column of the image in my previous post).  Most likely, Altium Designer defines bottom rotations differently than OpenPnP so you will need to modify the rotation angles in the CSV file for bottom placements prior to importing it.  From your description, I think there are basically three possible conversions: openpnpAngle = 180 + altiumAngle,  openpnpAngle = 180 - altiumAngle, or openpnpAngle = -altiumAngle but I can't say which one of the three is the correct one (we only know that openpnpAngle = altiumAngle is not correct).  If rotating the polarized part in the feeder by 180 works for bottom placements at any orientation, then the first is probably correct.  Be careful though in jumping to that conclusion because if the design only has placements at 0 or +/-180 then either of the first two conversions would work but we can't say which one is the correct one (that is, would work for placements at other angles).  If the design happens to only have placements at +/-90, then either the first or third could be the correct one.  The bottom line is you need to know how Altium Designer defines rotation angles and figure out the conversion needed to get to how OpenPnP defines rotation angles.  And the real test would be to have polarized placements at 0, +90, 180, and -90 and verify all four get placed correctly.

Tony

Jan

unread,
Jul 22, 2022, 6:25:45 PM7/22/22
to ope...@googlegroups.com
Hi Tony!
Concerning the part rotation in Altium: angles are defined in the
natural mathematically positive sence, with zero degree to the right
(positive X direction) and counted counter clockwise for both, top and
bottom components. If a component is fliped to the other side, its like
rotating once hand, the component is rotated along the Y axis, so x is
translates into -x, the angle is kept unchanged. I would say, this is
the GerberX3 way.

Jan

On 22.07.2022 23:26, tonyl...@gmail.com wrote:
> Zdenko,
>
> For individual rectangular boards, setup the job with the board top
> facing up and set the board location to match the board origin (see top
> half of the figure below).  This is typically the lower left corner of
> the board.  Be sure to set the width (as measured in the board's X
> direction) and length (as measured in the board's Y direction) of the
> board as well.  Then to place bottom side components, flip the board
> along its width (X dimension) so that the board origin is now at the
> lower right (see the lower half of the figure below) and on the Job tab,
> just change the board side from Top to Bottom (do not change the
> location of the board in OpenPnP).  OpenPnp knows that for bottom
> placements, it needs to add the width of the board to the board's
> location and then it subtracts the placement's local offset from that to
> arrive at the machine coordinates for that placement.
>
> BoardOrigin.png
>
> Now, WRT placement rotation on the bottom.  Most of the board importers
> "know" how the rotations are defined in their respective tools so they
> take care of any necessary conversions for the operator.  However, when
> using the "Named CSV" importer, it is your responsibility to make sure
> that the rotation of the placements in the CSV file match that as
> defined by OpenPnP (see left column of the image in my previous post).
> Most likely, Altium Designer defines bottom rotations differently than
> OpenPnP so you will need to modify the rotation angles in the CSV file
> for bottom placements prior to importing it.  From your description, I
> think there are basically three possible conversions: openpnpAngle = 180
> + altiumAngle,  openpnpAngle = 180 - altiumAngle, or openpnpAngle =
> -altiumAngle but I can't say which one of the three is the correct one
> (we only know that openpnpAngle = altiumAngle is not correct).  If
> rotating the polarized part in the feeder by 180 works for bottom
> placements at _any orientation_, then the first is probably correct.  Be
> careful though in jumping to that conclusion because if the design only
> has placements at 0 or +/-180 then either of the first two conversions
> would work but we can't say which one is the correct one (that is, would
> work for placements at other angles).  If the design happens to only
> have placements at +/-90, then either the first or third could be the
> correct one.  The bottom line is you need to know how Altium Designer
> defines rotation angles and figure out the conversion needed to get to
> how OpenPnP defines rotation angles.  And the real test would be to have
> polarized placements at 0, +90, 180, and -90 and verify all four get
> placed correctly.
>
> Tony
> On Friday, July 22, 2022 at 2:20:02 PM UTC-5 zdenko...@gmail.com wrote:
>
> Hey Tony,
>
> The problem is with individual boards as well.
>
> Personally, I am using KiCad and I still did not try bottom side
> placement to see if rotation is OK.
>
> These boards that I am currently placing are for a friend, he is
> using Altium Designer, we needed to adjust the CSV file to get a
> good import in OpenPnP but we managed it including even component
> height. We were a bit confused when we saw that SOT-23-3 diodes are
> getting rotated by 180deg. :D
>
> For example, for *Top* side, the origin of the PCB is *Bottom Left*,
> and for the *Bottom* side origin needed to be moved to the *Bottom
> Right* but we needed to set rotation in tape from *0deg* to *180deg
> *to have it right on the Bottom, it is the same diode that was
> needed on Top and Bottom so we always needed to change rotation in tape.
>
> Importer was *"Named CSV".*
> PlacementAngleReference.png
> On Friday, July 22, 2022 at 12:24:40 PM UTC-5
> zdenko...@gmail.com wrote:
>
> Hi Jan,
>
> You can handle *double-sided* boards in the same job file,
> just select the side, *right-click* on the job file and
> select *"set side" Top/Bottom.*
>
> One issue that I am having right now that I just want to
> mention so you can maybe observe it when you start with
> placements is that for example on some SOT-23 diodes I
> needed to change rotation in tape from 0 to 180deg between
> the*Top* and *Bottom* side (I don't know why), so for *Top*
> side rotation in the tape was *0deg* and I needed to change
> it for bottom side to *180deg* for the component to be
> placed correctly.
>
> Another issue that I noticed is if you are placing the
> components for example on two boards, and you ran out of the
> components in the middle of the job, so in case you put one
> component on one board and you ran out of it, you will get
> an empty *"red"* component like *"missing feeder"* but you
> will get a check mark as the component was *"Placed"* on
> --
> 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/87117718-62b9-40bd-b724-2b6100bec402n%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/87117718-62b9-40bd-b724-2b6100bec402n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jan

unread,
Jul 23, 2022, 3:13:22 AM7/23/22
to ope...@googlegroups.com
Hi Zdenko!
Many thanks for your help!
I've found the "set side" context menu and used it to select the top
side. Unfortunately the panel fiducial check searched for bottom side
fidicials which are - luckily - at different positions, revealing my
missunderstanding. Today I think, that "set side" is an "expert feature"
that shall only be used when setting up a job, at least I will consider
it as such. After splitting the job in top and bottom side, I'll not
touch it anymore.
Concerning the bottom side rotation issue: if I understand Tonys
explanations and graphics correctly, the sense of rotation is different
between OpenPnp and Altium. So changing the just the rotation in tape,
as you suggested, only works for some part orientations but failes for
others. I just wont to mention, that this will not provide a fix, its
just a workaround. As Tony says, it would be better to transform the
rotation of parts.
The problem, that partly populated panels are not handled very well, is
a known limitation. I remember reading a post about it some month/years
ago and have seen it myself. If this a serious issue for you, you might
consider setting up the panel as individual boards in the job.

Jan

On 22.07.2022 19:24, Zdenko Stanec wrote:
> Hi Jan,
>
> You can handle *double-sided* boards in the same job file, just select
> the side, *right-click* on the job file and select *"set side" Top/Bottom.*
>
> One issue that I am having right now that I just want to mention so you
> can maybe observe it when you start with placements is that for example
> on some SOT-23 diodes I needed to change rotation in tape from 0 to
> 180deg between the*Top* and *Bottom* side (I don't know why), so for
> *Top* side rotation in the tape was *0deg* and I needed to change it for
> bottom side to *180deg* for the component to be placed correctly.
>
> Another issue that I noticed is if you are placing the components for
> example on two boards, and you ran out of the components in the middle
> of the job, so in case you put one component on one board and you ran
> out of it, you will get an empty *"red"* component like *"missing
> feeder"* but you will get a check mark as the component was *"Placed"*
> --
> 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/b172074f-3960-4540-993b-c0386e35205en%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/b172074f-3960-4540-993b-c0386e35205en%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jan

unread,
Jul 26, 2022, 12:13:49 PM7/26/22
to ope...@googlegroups.com
Hi Tony!
I've tried to setup the bottom side of my panel and don't get the board
fiducials to work. After some fiddeling around with the board zero
location and the panel fiducials I can see all boards and their
components where they should be. Panel fiducial check also finds all
four fidicuals I manually added in the .job file, with just small
devitations (< 0.5mm). However, the fiducial check ends with an
exception that the board origin would have to be moved by about 62mm.
Please find the log attached. Do you have a workaround for me? Thank You!

Jan

PS: with pads defined on the package level, its quite easy to verify the
rotation of components on the board and in the feeder. I would recommend
that to anyone wondereing if the setup of the parts orientation is ok.
> PlacementAngleReference.png
> On Friday, July 22, 2022 at 12:24:40 PM UTC-5 zdenko...@gmail.com wrote:
>
> Hi Jan,
>
> You can handle *double-sided* boards in the same job file, just
> select the side, *right-click* on the job file and select *"set
> side" Top/Bottom.*
>
> One issue that I am having right now that I just want to mention so
> you can maybe observe it when you start with placements is that for
> example on some SOT-23 diodes I needed to change rotation in tape
> from 0 to 180deg between the*Top* and *Bottom* side (I don't know
> why), so for *Top* side rotation in the tape was *0deg* and I needed
> to change it for bottom side to *180deg* for the component to be
> placed correctly.
>
> Another issue that I noticed is if you are placing the components
> for example on two boards, and you ran out of the components in the
> middle of the job, so in case you put one component on one board and
> you ran out of it, you will get an empty *"red"* component like
> *"missing feeder"* but you will get a check mark as the component
> was *"Placed"* on both boards, but in reality, it was only placed on
> --
> 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/e02e4a58-a7eb-4480-a38f-5f753aa6546fn%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/e02e4a58-a7eb-4480-a38f-5f753aa6546fn%40googlegroups.com?utm_medium=email&utm_source=footer>.
panel fiducial bottom side.txt

Jan

unread,
Jul 26, 2022, 3:42:57 PM7/26/22
to ope...@googlegroups.com
Hi Tony!
I just verified the Altium angles using my double sided panel. Due to
my inability to use OpenPnps inbuild "bottom" function, I desided to do
the mirroring outside and then verified the component orientation on the
board: as obvious one has to either invert X or Y to mirror the position
coordinates. Then, for the angle, one has to calcualte 180 - <angle>.
This is the same math as for Kicad according to your
PlacementAngleReference.png image.
In Altium the inbuild "Flip selection" feature does the same as
selecting the other layer on the properties panel. In addition to
changing the layers, they sometimes change the rotation as well. 0/180
is changed to 180/0 but 90 and 270 stay the same.
I've verified the rotation transformation (180 - <angle>) using
polaized components at 0, 45, 90 and 180°.

Jan

tonyl...@gmail.com

unread,
Jul 27, 2022, 12:03:46 PM7/27/22
to OpenPnP
Jan,

RE your problem with the bottom panel fiducial check.  The image below shows how I believe the legacy panellization works.  Note that unlike boards, when you flip the panel to work on the bottom side, the panel coordinate axes origin moves (relative the top panel origin) and the X-axis does NOT flip direction.  In other words, the panel coordinate system on the bottom of the panel is completely different than that used on the top of the panel.  I think, in order to get the bottom fiducial check to work, you must define the bottom fiducial locations in the panel's bottom coordinate system.

LegacyPanellization.png
Let me know if this is how you are already doing it or, if not, does changing to this fix your problem.

Part of my upcoming changes to panellization is to make panels behave more like boards currently do - the coordinate system is the same for top and bottom.

Tony

tonyl...@gmail.com

unread,
Jul 28, 2022, 2:53:00 PM7/28/22
to OpenPnP
Oh! One other thing, the fiducials on the bottom of the panel should be marked as being on the Top side.  There really is no such thing as the Bottom of a panel but instead you are creating two different panels that both have their Top facing up on the machine - on one, the Top of the boards face up and on the other, the Bottom of the boards face up.  In both cases, the panel fiducials need to be on the Top of the panel.  Does that make sense?

Tony

Reply all
Reply to author
Forward
0 new messages