Grids, Origins, Offsets, and Pitch

While drawing schematics it is very highly recommended to keep your grid at 50mill or 100mill.
Connectons between wires & components are determined by the coordinates of the endpoints and if they do not line up perfectly (For example by using a mm grid in EEschem) then you will get into trouble.

In the KLC (KiCad Library Convention) it is also stated that all pins of all symbols must fit on this 100mill grid.

1 Like

There are exceptions that can use 50mil grid. But it seems this is not really codified in the KLC.

Would anyone care to comment on how my Solidworks model for a component (exported as a *.wrl file), which was created with the correct component dimensions (in this case, 2 legs 0.200 inches apart), is incorrectly scaled when it is initially linked to the Footprint? Initially, it is 2.54 times too large, the ratio of cm per inch. This seems to be very strange behaviour and mildly annoying (as it requires yet another step of scaling the supposedly perfect proportions of the original)

Kicad assumes one wrl unit is one inch.
This is why freecad stepup scales the wrl file down by 1/2.54

The alternative to scaling the wrl file is to use the kicad internal scaling option (3d settings of the footprint)
But this is not a good solution as it will create problems once you also want to get a step model out of your project.

Oi. The road to Hades is paved with assumptions!
Thanks, Rene. Would you please provide a URL where I can find StepUP (and any associated documentation)?

Stepup is a addon for freecad. If you download freecad 0.17 you can install it from within the freecad addon manager.
More details can be found on this forum.
Two examples:

Given the soon-to-be-released V5, I suppose I should ask: will the routine of using StepUp still be relevant? or has this task been incorporated directly into V5?

Stepup is an extension to freecad. It has nothing (directly) to do with kicad. Most of the features provided by stepup will never be included in kicad. The only thing that will be included is to export boards as step files.

Rene: Thanks for that information, it is good to know that the effort to learn this part of the workflow will have lasting benefit.

I am not certain what you mean by “pitch”; for the moment I assume you mean pin spacing on parts.

One of the best pieces of advice I got on this forum is that the Land Pattern data should be thought of as a “serving suggestion”, and to use what works for you personally.

Second thing I can say is that the first thing one should do in PcbNew is to change the design rules to what the fabricator can actually create.

Third is to retain some form of sanity check between what is on the screen and the actual parts. One way to do this is to print the Footprint to scale and place the part on the print.

With these elements in place, there ends up being a “minimum” realistic (grid) spacing for “normal” designs. One should be able to determine fairly quickly how little clearance space they can get away with due to the design settings.

If one wants to reduce trace routing, likely in half, add a filled Zone and tie it to the GND net. If there is enough spacing, KiCad will build the filled Zone automagically and connect all the GNDs together (with the press of the hotkey “b”).

One is not required to place any parts on any particular grid, but I find it tends to reduce how often I have to move parts around.

Yes, Pitch is the regular spacing between repeated physical entities. See https://www.pad2pad.com/pcb-glossary.htm.

Given my perspective (mechanical CAD and mechanisms), and given that use of the term Pitch is already historically and firmly established in the PCB world, it would seem that using Pitch in reference to constraints on physical objects, and reserving the word Grid in reference to virtual-drawing (“layout”) tools, would avoid a lot of un-necessary confusion when having this sort of discussion (Any KiCad developers listening?).

This is the only meaning of “pitch” thoughout the Kicad documentation. Particularly, the spacing between pads. I cannot see any confusion.

1 Like

Pedro:
You wrote…

“This is the only meaning of “pitch” throughout the KiCad documentation. Particularly, the spacing between pads. I cannot see any confusion.”

As a newbie, I am willing to prove myself wrong, and went looking through the KiCad documentation [in English] that I have access to. Here is what I found:

In KiCad Getting Started, page 11:
18. …“a large pitch grid” [this usage is confusing in the context of PCB work]

In KiCad PM Manual
No reference at all is made to Pitch

in KiCad Eeschema manual
No reference at all is made to Pitch

In KiCad PCBNew manual, page 114
…“Grid origin [ can be relocated to first pad and ] after, the grid size can be set to the pad pitch”

You referred to setting the Pitch in the Design Rules. I viewed the Design Rules dialogue box from PCBNew, and there is not a single reference to “Pitch” in either of the tabbed panels.

Investigating further… from the Pad Properties dialog panel, on the General tab, one can set Position X and Position Y, Size X and Size Y as well as Drill Size X and Drill Size Y. From the Local Clearance and Settings tab, one can only set dimensions for clearances. In summary: no mention of Pitch is made in the Pad Properties dialog panel

From the Preferences drop-down menu, the General dialog makes absolutely no reference to Pitch.

From the Dimensions drop-down menu, if one chooses Grid, the user can set the Grid Size X and Grid Size Y, as well as the Grid Origin X and Grid Origin Y.

From the Dimensions >> Grid dialog, my PCBNew “Grid” is currently set to 0.1 inches (X and Y). It is my conclusion that this “Grid” dimension actually seems to be setting the “Pitch” of the board, not setting a drawing (layout) grid.

Now… if I right-click anywhere on the layout screen, and choose “Grid Select”, I see that the (layout) grid is set to 50mil, which makes sense when I display it as dots on the screen: i.e., there’s an extra layout grid line between each of the pins on the footprints of the standard components I am using, so the layout grid is 50mil and the Pitch is 100mil (consistent with the “Grid” set via Dimensions >> Grid dialog). If I change the layout grid dimensions using {right mouse click} / Grid Select, I can confirm that the “Grid” spacing set from the Dimensions drop-down menu remains unchanged when I alter this setting.

So, this is what I meant by “confusion.” There are two entities referred to as “grids” in PCBNew, and their functions are un-related.

Dimensions >> Grid sets PITCH, not a “grid” !!

why would you think that one sets a pitch? It sets the origin and spacing of the grid used for drawing.


Edit: I think i understand the source of the confusion.
The dimensions grid dialog sets up a user grid.
You can activate it in the same dialog you described here: (It is the bottom most entry in that)

I know what “pitch” means in EDA and CAD software.

I did not understand your text meaning that followed after the title of “Grid Dimensions vs. component/board Pitch”.

In Escheema, the grid is needed to ensure net connectivity.

Maybe you did not understand it, but I already gave you the answer in my prior post.

One can not put things closer together then the fab houses minimum tolerances; this sets the minimum.

Double this minimum and Kicad, with filled zones, can route GND easily on a two layer board.

At this time I might also suggest that downloading a nightly build might be worthwhile upgrade (standard warnings apply (but should be significantly reduced with as close as the release appears to be)).

Rene:

What do you mean by “a user grid”?

If the user can edit them at any time, are they not all, in a sense, “user grids”?

I think you will have to start by explaining why PCBNew has two “grids”, both of which are editable, though only one is displayed on the screen (dots at grid-line intersections) while the other one is (always?) invisible. I am beginning to sense that one “grid” is the fundamental Cartesian coordinate / reference system which, of course, features an origin, whilst the other is simply a drawing aid overlaid on / stepping out from that reference system. But why would the Cartesian coordinate system (i.e, Dimensions >> Grid) need to have dimensions associated with it at all, if dimensions are fundamental & intrinsic to the Footprints (which then drives the pad spacing) and dimensions are also set in the the drawing (layout) grid?

Pedro expressed his opinion that “Pitch” is consistently used in the KiCad Documentation but, as I feel I’ve rigorously shown in my long note above, Pitch is not a term explicitly used in any of the GUI dialogue panels and, as far as the Documentation is concerned, Pitch is mentioned only fleetingly in the KiCad PCBNew manual and only once (confusingly!) in the KiCad Getting Started manual.

If you are this “hung up” on the single term “pitch” in KiCad, be forewarned that it was much worse in the past; and you are very likely to find a new term to “irk” your sense of how KiCad uses terms.

Meanwhile, the rest of us just deal with the quirks, and enjoy the really cool things that KiCad does EXTREMELY WELL.

Hello, Sprig:

OK—I can understand that you think I am ‘hung up’ on a single term. I can live with that criticism, though I think it misses the point. And, it is not like I don’t appreciate that KiCad is both very cool and very powerful. I am, in fact, quite impressed by what I have seen. And I think, as a newbie, I have made rapid progress getting to know it---- so, the GUI and documentation is certainly good!

On the other hand, I’m trying to do what I can (as a new member of the KiCad community) to point out some things that (as a newcomer to KiCad), I have found to cause…well…head-scratching and knitted eyebrows. I can imagine that things were worse in the past, but they didn’t get any better by the users not discovering bugs, inconsistencies and so forth, then working with the developers to improve the product. Seems to me that, with V5 about to be released, this is a good time to speak up.

By way of summary,

  • From the workflow, it is clear that Eeschema, Footprint Editor, and PcbNew are modular.

  • Each of these modules has an orthogonal coordinate system, and ‘grid’ dimensions. It is now pretty clear to me that these coordinate systems may, in fact, be largely or wholly independent of those in the other modules that they share data with.

  • It is definitely confusing (to a newcomer) when a single module (PcbNew) has more than one ‘grid’ system associated with it. And, that confusion is compounded when indistinct terminology is used. In this particular instance, long-time users might understand that “grid” means one thing in one context, and something else in a different context — but a newcomer would not. Indistinct language steepens the learning curve!

  • I accept that a degree of contextual understanding will always be required. But my philosophy is, simply, that we have a rich language and a vast vocabulary, so there is no need to make learning more difficult than it has to be by drawing from a shallow pool of words.

1 Like

No it doesn’t. And bold caps does not make something true.

Given that no one else has ever had a problem with this term, I suggest that in this case it is not a problem with KiCad. I hope you are not going to quibble over the use of every term in KiCad, otherwise it is going to be a long and arduous journey.

Bobc:
Thank you for your comments. I really don’t intend to quibble endlessly. Rene Poschl has already pointed out that I reached the wrong conclusion there (which is something I did not dispute!) and Rene admits that there is a source of confusion here. I have already asked Rene to elaborate on what he means by a “user” grid, as there certainly seems to be two distinct and active “grids” in PcbNew, and both would seem to be under the control of the user…