Footprint Origin Convention

The Kicad documentation states that “By convention, through-hole footprints have pin 1 located at (0,0) and are oriented with pin 1 in the top left.”

This puzzles me. A footprint is a physical thing so you want its origin to be in an appropriate place that simplifies the job of positioning it on the PCB. A Pin 1 origin is fine for many parts like ICs, resistors and capacitors but this is very definitely not the case for many electro-mechanical parts like switches, pots and connectors which need to interface physically with other parts of the design. For these you need an origin that makes it straightforward to position the part on the PCB such that it interfaces in a consistent way with the outside world. For vertical pots or toggle switches for example you want the origin to coincide with the centre of the hole that the parts fits into. And for any part that interfaces with a hole in a panel, for example, you at least need the origin to be on the centre line of that hole.

Despite this, I still find that the library footprints of every electro-mechanical part mentioned above has its origin at pin 1. Even in the create your own footprint example in the Kicad documentation, which makes a new footprint for a switch, still insists on placing the origin at pin 1.

Cheers

Ian

It all comes back to how they are populated.
SMD devices want the origin at the centre of rotation so a PnP machine can take your pos/odb++ file and align the placement accordingly based upon hte reel orientation.

throughhole… its the IPC convention to use pin1 as historically all tht were hand placed and thus a pin1 being a square pad was a nice visual indicator to the person stuffing the card. leaded component (like resistors etc) do not need polarisation markers but also there leads are going to be formed different.

Remember there are more people and consideration in making a populated pcb then you :wink:

1 Like

I fully agree.
In my opinion every footprint should have its origin in the center (or at a mechanical hole).
Pin 1 may have no particular meaning, or even not exist at all, for some footprints.

Additionally, during placement of parts it is very common to rotate the footprint to improve rasternet connection, and helding a part not by its center, but from a corner, forces to move back in place after rotation, momentarily loosing the rasternet view.

Ok, this may be unconventional, but it is my opinion.
Regards.
Mau.

1 Like

Pin 1 is just the convention. If you don’t like that position it can be changed easily by opening the footprint’s properties and editing the footprint (change the anchor).

If you want a permanent change of anchor for future use, save the footprint in a personal library before or after you change the anchor.

1 Like

@jmk yes I understand that and I am prepared to create my own footprint library. Making the change is the easy part. The hard part is calculating where the origin should move to relative to pin 1 from the often sparse information in the datasheets.

If anything I am arguing for a change, or at least a variation, in the convention in recognition that Kicad really does need to make an effort to integrate well with the mechanical aspects of a design.

Cheers

Ian

1 Like

@ZioMau10, I agree with a lot of what you say, especially the rotation aspects. For many years I used a very simple PCB layout program called freePCB. It had not only an origin for a footprint but also a separately defined centroid about which it would rotate. The two functions are quite different and I think they should be separate but I am not sure if Kicad does this.

Cheers

Ian

@Naib, I think we are singing from the same hymn sheet. You are saying there are already different footprint origin conventions depending on the component type, I am simply arguing for one more.

Cheers

Ian

I only use footprints I create myself (sometimes copied from the standard library and then modified) and I place the origin in the center of the body (with few exceptions) whether they are THT or SMD for many of the same reasons stated by others. It makes locating, positioning, rotating, etc. much easier.

I have not experienced the Kicad footprint editor trying to force the origin to pin 1 although the THT footprints in the standard library are done that way. In those cases I simply move the origin where I want it in my version of the footprint.

If I remember correctly, the PCB design software I used previously (DipTrace) has a function in its footprint editor what would center the footprint on the origin with one command. Perhaps a Kicad feature request is in order if a similar function is desired.

It’s just a convention. A convention that makes no sense if you think about it.
The PNP machine might have to rotate the part anyhow and it will have to make the translation of coordinates. The PNP will even take a picture of the part and fine adjust any rotation or translation.
For placement of components in layout, the most intuitive location would be the center. The center of an enclosing rectangle.
For many mechanical parts, it would be “the mechanical center”, whatever that is. Shaft centerline. And just to contradict myself: For a cooling fin, I’d expect it in the lower left corner, or for symmetrical parts centerline / lower edge. That’s how mechanical engineers think.

But I can live with how the parts are designed coming from KiCad, I’ll do my parts the way I want them.

It makes perfect sense if you think about historical reasoning… IE hand populated parts. A human manually fitting the part and thus pin1 is the post significant piece of information.
This is all captured in IPC 7351 A for consistency so anyone making a pcb has a very high chance of reproduceability no matter where it is sent.

These days with PNP machines sure it makes less sense but we still have THT and old designs that are just THT and tearing up an establish standard is just as dangerous as not having one.

Like it or not thats what it is. You are free todo what you like in your own personal libraries but the moment you are engaging with someone else (ie FAB/ASSY house) then do you want to produce nickmBY-7531 or accept that this is the convention a convention that all are aware of and other discussions decades ago could have produced a different reference but here we are today.

Now kicad libraries follow IPC-7351 and that is why this convention is in the official libraries.

A change in centre rotation within kicad irrespective of the centroid position may have some benefits

Personally I prefer the 0,0 position at pin 1 as not all devices have their pins at the grid spacing I’ve chosen. So having pin 1 “snap to grid” is preferrable to me.

As for not “picking” a device from some centroid position, I can pretty much see where I dropping a part on the PCB.

Just my preference.

It is just a convention. Like left hand drive and right hand drive. None makes more sense than the other. Yet, some do insist on driving on the left. :rofl:
Or like the right hand thread is the standard. Just why? Just because of convention.
Like numbering drill bits, then introducing letters and finally deciding to give the actual diameter. Or AWG that introduced some odd numbering system. And believe it or not, there are still people using this convention.

“We always made it that way”.
“I always first route the GND traces and then draw a filled GND zone over them”
“We always made these parts that way”. Initially it took more than 2 minutes, after I changed the process, it takes 40 seconds. Well over 100k per year.

Thank you for all the replies. I know it is just a convention but usually there is some good reasoning behind it. It appears Kicad already has different conventions for SMT components and THT ones and for good reasons. What I am arguing for really is another convention for components where their mechanical interface with of board elements of the design is critical such as the positioning of controls and connectors on panels.

Cheers

Ian

I have been investigating this further. It turns out that changing the grid origin is not what you need to do. If you do change the grid origin it makes no difference to the placement of the part. It is not clear to me exactly what happens if this changes.

To move the physical origin of the footprint you need to use the Place the Footprint Anchor option under the Place menu of the Footprint Editor which, like the grid origin, just happens also the be centred on Pin1 by default. Unfortunately this option only allows you to move a special cursor with the mouse and it sets the Anchor Point wherever you click so placing this accurately is a PITA.

Cheers

Ian

1 Like

I mentioned this about ten posts ago.

Note the Grid Origin is under my cursor in the below screen grab. Also note the “X & Y” results when the cursor is over the grid origin. The grid origin is just one of many aids for measuring when creating a PCB.

@jmk yes I saw your mention of the anchor point after I sent the post. I am afraid it was lost in the noise but once I read it again I knew I was on the right track. Thank you.

KiCad’s main task is PCB design, and exporting placement files is a part of that. Placement machines don’t know whether your part has some mechanical interface to something else. Generating placement files already is a mess, because there are no worldwide common standards (or there are too many of them xkcd: Standards) Currently (KiCad V8) KiCad has 3 footprint types: “SMD”, “Though Hole”, and “Unspecified”, and those are attributes attached to each footprint, and this is still manageable, and also scriptable. Having more different conventions (and exceptions) makes generating placement files more complex and error prone.

Mechanical CAD is not KiCad’s main task, and thus, the holes for the switch in your gadget are also of secondary importance. I do agree that this can and should be improved, but not in a way that makes that complicates output of placement files. There are already some requests on gitlab for extra snap points in footprints. One of the goals is to make it easier for footprints like screw terminals that can be snapped together. Extra snap points for footprints that have a clear mechanical interface (such as center of hole for a switch) also seem a logical extension. Maybe there are other (better?) ways too.

So far one anchor was enough for me.
For footprints related in any way to case I simply place it in the way to help me and not to disturb.
My THT LEDs have anchor in their center and not at pad 1 as I don’t care of pads positions but want to place LED center according to case hole center.
3 holes (so THT) made from 2x2 1.27mm raster pin-header (we use for uC programming) also have the anchor in the original 2x2 ceneter as if there is another parallel PCB the access whole in it should just have center at this position.