Package Footprint Editor

1,886 views
Skip to first unread message

Jason von Nieda

unread,
Feb 6, 2016, 3:16:56 PM2/6/16
to ope...@googlegroups.com
Hi everyone,

I'm very excited to announce that OpenPnP now includes a package footprint editor with the ability to share packages. 

It looks like this:
Screen Shot 2016-02-06 at 12.08.17 PM.png
As you can see, you can set a body width and body height for each package and you can add pads which have their own dimensions. Packages are shown in real time on the camera view so you can match it up to the ones in your feeders or on your boards.

The editor also supports copy and paste to an XML text format. This is the first step to being able to share package definitions with one another and eventually having a community package database.

When you press the copy button the package is copied to your clipboard in a format like this:

<package id="SOT-23">
   <outline units="Millimeters"/>
   <footprint units="Millimeters" body-width="2.9" body-height="1.3">
      <pad name="1" x="-1.0" y="-1.1" width="0.8" height="0.8" rotation="0.0" roundness="0.0"/>
      <pad name="2" x="1.0" y="-1.1" width="0.8" height="0.8" rotation="0.0" roundness="0.0"/>
      <pad name="3" x="0.0" y="1.1" width="0.8" height="0.8" rotation="0.0" roundness="0.0"/>
   </footprint>
</package>

The paste button does the opposite. If you have a package definition on your clipboard and hit paste the package will be created and added to the list.

I've created a Wiki page we can use to share packages at https://github.com/openpnp/openpnp/wiki/Package-Definitions

The package editor is one of the key elements required to implement bottom vision, which is the current development focus for OpenPnP. By creating a package definition and footprint you can tell OpenPnP what to look for when performing bottom vision operations.

Please let me know if you have any feedback! As this is a brand new feature I expect it may go through some revisions but I will try to maintain compatibility with package definitions so we don't lose valuable work.

Thanks,
Jason


Richard Hornbaker

unread,
Feb 6, 2016, 4:12:15 PM2/6/16
to OpenPnP
Hi, Jason.

Cool. Comments from the peanut gallery here, so take it for what it's worth...

Does a feature exist to import packages from existing libraries like Eagle? I only ask because I spent a chunk of time in years past to define my own packages and components (mostly to tweak the land patterns and solder mask). And to that point, do you see the precise pad dimensions being relevant for vision?

The wiki is a great idea for collaborating. I would think that a baseline of standard JEDEC packages would cover 90%+ of cases, but there will always be unique parts.

Would it be important to include origin coordinates for the package? I imagine there are odd parts where center of gravity and pick location are more sensitive.

FWIW,
Richard

Jason von Nieda

unread,
Feb 6, 2016, 5:00:36 PM2/6/16
to ope...@googlegroups.com
Hi Richard,

Thanks for your comments. My thoughts inline:


Does a feature exist to import packages from existing libraries like Eagle?  I only ask because I spent a chunk of time in years past to define my own packages and components (mostly to tweak the land patterns and solder mask).  And to that point, do you see the precise pad dimensions being relevant for vision?

Not currently, no. We do have most of the pieces in place to do this but it needs to be fleshed out.

The best answer I can give as to whether we need the precise pad dimensions for vision is "Maybe". I'm still working through the algorithms for this. There are two paths I am looking at:

1. Just try to detect the body of the package based on the width and height. I think this will mostly work but it gets a little bit complicated based on the color and reflectiveness of the body.
2. Use the outline of everything we see in the frame with the background subtracted. This would include the pins / pads and if we have this data we can calculate an external bounding rectangle to look for.

There is an additional benefit to having detailed footprints, though. If we have this data we can display it during setup tasks, making it easier to do alignment. It will also be used for visualizing the board. I've been quietly working on a new UI paradigm for OpenPnP that gets rid of most of the interface aside from a live 2D rendered view that shows boards, placements, feeders, etc. This view allows you to click on any object on the machine to edit it. It's a long way out, but getting the data is step one.
 

The wiki is a great idea for collaborating.  I would think that a baseline of standard JEDEC packages would cover 90%+ of cases, but there will always be unique parts.

I agree. My hope is someone will volunteer to create these packages :)
 

Would it be important to include origin coordinates for the package?  I imagine there are odd parts where center of gravity and pick location are more sensitive.

I'm not sure, and I'd love to hear some opinions on this. My (possibly naive) assumption right now is that you'd always want to pick in the center of the body. This is one of the reasons I included body width and body height. Using this information in combination with the pad data I have a good idea of where I should pick for a given package.

So, that's a good question for the group: Are you aware of packages that should be picked somewhere other than in the center of the body mass?

Jason

 

FWIW,
Richard

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/970f8bff-448c-4431-9af0-4027e4fbfd19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Parmenter

unread,
Feb 6, 2016, 5:27:48 PM2/6/16
to ope...@googlegroups.com
Awesome work Jason!

Sent from my iPhone

On Feb 6, 2016, at 1:16 PM, Jason von Nieda <ja...@vonnieda.org> wrote:

Hi everyone,

I'm very excited to announce that OpenPnP now includes a package footprint editor with the ability to share packages. 

It looks like this:

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Michael Anton

unread,
Feb 7, 2016, 4:22:07 AM2/7/16
to OpenPnP
The only case I can think of to pick a part outside of body mass, is because the placement point does not correspond to that point in the footprint.  This could be handled with an offset parameter instead, that maps the pick point to the placement point.  Though I suppose if one was using vision, the pick point would be irrelevant anyhow.

I have a library of parts I use to program the pick and place machine that I run.  It is in a spreadsheet, so it would be pretty easy to reformat into whatever you might need.  This one is not based on vision, and is based on the length and width of parts as seen by a laser scanner, so I'm not sure if it would be entirely useful.  It really only contains the X, Y, and Z values of each part.  There is nothing contained in it regarding the leads of the part.

Mike

Malte R.

unread,
Feb 8, 2016, 5:48:14 AM2/8/16
to OpenPnP
Hi Jason,

looks great; I particularly like the preview in the camera overlay.

I have at least one example of a part which requires "assymetric" pickup: WAGO 2060-402 wire to board connector. They are excellent, I use them in many designs. A bit on the expensive side but these babies make connecting / disconnecting a module much easier compared to regular screw terminals. Also, they are surface mounted and can be picked & placed which makes manufacturing faster and cheaper.

Pickup location is off-center, see picture attached (screenshot taken from datasheet).

Best regards
Malte
wago.png

Jason von Nieda

unread,
Feb 8, 2016, 11:04:12 AM2/8/16
to OpenPnP
Hi Malte,

Great example, thanks for sending this over!

It seems like the simple solution here is to define an offset on the package as well. The question then is whether the offset is applied by the software during pick, or if the user specifies the pick position and the offset is just used for vision and placement. Perhaps you could give some insight into how you would normally set this part up? For instance, is it's origin in the library at the pick position, or the center? And the same for the placement origin. 

Thanks,
Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Malte R.

unread,
Feb 8, 2016, 2:03:30 PM2/8/16
to OpenPnP
Hi Jason,

you're welcome. I should thank you instead for putting all this time and effort into building a great PnP software :-)

So far, I have been placing those connectors by hand due to lack of support for off-center pickup in my PnP :-P

The parts are big and I usually don't have many per board, so it is easy enough. Still, I would like to automate that at some point.

I have checked the EAGLE library published by Wago; the placement center is the center of gravity of the pads - which is NOT the center of the part body and also NOT the pickup location.

Here is the package - measures added:



And here is the pickup location from the datasheet:



So this leaves us with a few challenges:

a) Pickup + placement location can be different per part and thus should be part of the package definition

b) If such a part needs to be rotated, an XY offset needs to be calculated and nozzle position has to be corrected accordingly

c) Visually detecting the part body is not sufficient to determine exact part position unless we have exact specs of body dimensions, pad / pin dimensions and locations in reference to pickup + placement center

As long as the parts come in reels or as cut tape, it would work well to specifiy the offset of pickup center location from sprocket holes. Vision can then detect the holes and determine correct pickup location. The manufacturers datasheet should always give you the necessary specs, otherwise factory assembly would not be possible either.

For loose parts that does not help though.

What about manually teaching the desired pickup location on a sample part, taking a snapshot and utilize this to find the correct spot later?

As long as we can reliably pickup the part, we could detect the pins using upward facing camera in table surface and correct pickup error (rotational and / or offset) before placement.

The more I think about it, the more difficult it seems ;-)
Auto Generated Inline Image 1
Auto Generated Inline Image 2

Cri S

unread,
Feb 9, 2016, 7:43:07 AM2/9/16
to OpenPnP
Its fairly simply on this package.
Speaking from generic PnP
Every Feeder has position and offset coordinate.
On setup if rotation or pickup offset is needed to change feeder offset is used.
On this package then up looking vision is used to find pins center and place it. If only uplooking can is used, or on other format, the destination coordinate need to be changed. Better sw allow to specify filters for that on import (CSV).
If sw don't have that awk is usually used to do the same. Clearly it don't work on eagle direct import. Same for part naming.
If assembly for others mapping between packages, parts is needed.
Clearly there are differences about hobbyist and professional assembler.
This is visible on eagle import and Gerber import. Hobbyist prefer all in one solution, pro use external tools for preparing productions files. It is possible to integrate simple functionality like this into openpnp, it is some split and some config file. You must understand that integrating it you loose functionality.
Externally you can have additional fields that show result of translation and if Gerber file or scanners file exist, show if package and Gerber matches. This inside excel or ... Where you can sort on that columns, execute scripts to color output, ..... It is just to write CSV export in order this works on opencv.
Awk for java exist.

ja...@tetontechnology.com

unread,
Sep 20, 2016, 9:35:32 PM9/20/16
to OpenPnP
All,

Is there a composition of package definitions floating around out there?  I assume a few have made packages for some of the parts found on the new OpenPNPTest PCB (Version2)?  If anyone doesn't mind sharing can we start pulling some resources together.  We are working on a board at the moment that uses many C1206 and R1206 parts as well as a few IC's.  I will be creating packages for these and will share them.  I simply do not wan't to duplicate efforts.   https://github.com/openpnp/openpnp/wiki/Package-Definitions

SMdude

unread,
Sep 20, 2016, 10:52:31 PM9/20/16
to OpenPnP
It would be nice if this feature could upload new packages to the update server and download the package library automatically to users. This would save everybody having to create new packages all the time when it's been done before.
However, there would need to be a rating system that allowed users to rate a package and if it is no good for some reason the component gets flagged.

Looks nice!

Cheers

Cri S

unread,
Sep 21, 2016, 7:51:12 AM9/21/16
to OpenPnP
I suppose you are not using eagle.
What layout system you use?

Jason Parmenter

unread,
Sep 21, 2016, 9:14:45 AM9/21/16
to ope...@googlegroups.com
Cri, I am using Eagle.

> On Sep 21, 2016, at 5:51 AM, Cri S <phon...@gmail.com> wrote:
>
> I suppose you are not using eagle.
> What layout system you use?
>
> --
> You received this message because you are subscribed to the Google Groups "OpenPnP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/dec7fd26-4720-4412-ab20-bca38cd650a1%40googlegroups.com.

Matt Brocklehurst

unread,
Sep 21, 2016, 9:19:14 AM9/21/16
to ope...@googlegroups.com
i did start to wonder about eagle footprint -> openpnp footprint importer type deal...


On Wed, Sep 21, 2016 at 2:14 PM, Jason Parmenter <ja...@tetontechnology.com> wrote:
Cri,  I am using Eagle.

> On Sep 21, 2016, at 5:51 AM, Cri S <phon...@gmail.com> wrote:
>
> I suppose you are not using eagle.
> What layout system you use?
>
> --
> 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+unsubscribe@googlegroups.com.

> To post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/dec7fd26-4720-4412-ab20-bca38cd650a1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.

SMdude

unread,
Sep 21, 2016, 9:53:33 AM9/21/16
to OpenPnP
I'm using Diptrace.
I don't think it is a case of importing footprints from an existing pcb layout footprint library. These footprints are always larger than the component pins and don't have a shape or outline for the component body. The openpnp footprints are to identify components rotation and offset properly and the "pads" need to be very close to the component pin size as far as I can see.

Jason von Nieda

unread,
Sep 21, 2016, 10:07:10 AM9/21/16
to OpenPnP
Hi folks, allow me to add some clarity:

1. Footprints currently are only used for fiducial detection. The footprint data is not used for anything else - so currently there is only value in having a footprint defined for the type of fiducial you use. I added the footprint editor in anticipation of using footprints with bottom vision, but it turned out not to be needed just yet. It may in the future.
2. I would eventually like to have a service to share footprints as others have mentioned in this thread, but since footprints aren't really used yet, it's a low priority item. If someone wants to write it, of course, I'd accept the pull request. Some discussion would be needed to determine a good place to store the data.
3. As for importing footprints, there is some code in OpenPnP that is being used for solder paste pad import that could also be used to import footprints from Eagle. It's a general Eagle file format parser.

Jason



On Wed, Sep 21, 2016 at 8:53 AM SMdude <spiteri...@gmail.com> wrote:
I'm using Diptrace.
I don't think it is a case of importing footprints from an existing pcb layout footprint library. These footprints are always larger than the component pins and don't have a shape or outline for the component body. The openpnp footprints are to identify components rotation and offset properly and the "pads" need to be very close to the component pin size as far as I 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.

To post to this group, send email to ope...@googlegroups.com.

Jason von Nieda

unread,
Sep 21, 2016, 11:17:40 AM9/21/16
to OpenPnP
Oh, one other thing I forgot to mention: Footprints are used to show outlines in the camera view in some places. It's purely informational, not functional, but that is one other reason to define footprints.

Jason

Cri S

unread,
Sep 21, 2016, 11:42:21 AM9/21/16
to OpenPnP
There exist eagle to package ulp for rectangular and round pins only.
Graham have written similar for kikad.

Mark Harris

unread,
Sep 22, 2016, 12:09:19 AM9/22/16
to ope...@googlegroups.com
If anyone cares to export altium footprints I have over 500 footprints with full 3d models and manufacturer accurate land patterns?


On 21 September 2016 at 09:42, Cri S <phon...@gmail.com> wrote:
There exist eagle to package ulp for rectangular and round pins only.
Graham have written similar for kikad.
--
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+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.

Rich Obermeyer

unread,
Sep 22, 2016, 12:43:01 AM9/22/16
to ope...@googlegroups.com
Interesting!
I like that you have well documented parameters for items in the library.  To often you can tell who put something in a library because of their personal incompatible rules.  I like this.
I have about 60Mbytes of Altium libraries myself already.  It will be interesting to see how they compare.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.

Mark Harris

unread,
Sep 22, 2016, 12:53:05 AM9/22/16
to ope...@googlegroups.com
If you want access to the azure database send me an email off list. There's I think 5 universities and a few dozen personal/small business users now :)

On 21 September 2016 at 22:42, Rich Obermeyer <rich.ob...@gmail.com> wrote:
Interesting!
I like that you have well documented parameters for items in the library.  To often you can tell who put something in a library because of their personal incompatible rules.  I like this.
I have about 60Mbytes of Altium libraries myself already.  It will be interesting to see how they compare.

On Sep 21, 2016, at 9:09 PM, Mark Harris <ma...@rris.com.au> wrote:

If anyone cares to export altium footprints I have over 500 footprints with full 3d models and manufacturer accurate land patterns?


On 21 September 2016 at 09:42, Cri S <phon...@gmail.com> wrote:
There exist eagle to package ulp for rectangular and round pins only.
Graham have written similar for kikad.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/9627c654-b559-4048-83f6-e84a9c77262a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

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

Cri S

unread,
Sep 22, 2016, 8:50:34 AM9/22/16
to OpenPnP
If you want converted it to openPnP Footprint,
Export the pattern to P-CAD V16 PCB Library (*.lis) format.
That can be used to get the
OpenPnP packages.
Remember, only rectangular and round pads are supported and package center is calculated using
Pads and not package outline.

Reply all
Reply to author
Forward
0 new messages