KiCad layers - discussion

I would like to discuss your use of KiCad’s PCBNew layers.
Obviously I want to skip the use of Technology layers as theis use is rather obvious and unambiguous. I’d like to focus on the use of “Auxiliary” layers:
Eco(1&2)
Margin
F/B.CrtYd
F/B.Fab
Dwgs
Cmts
Is there any intended/recommended use for them?

CrtYd: I assume it’s the definition of mechanical “circumfence” of our modules (components/footprints) which may extend away from their pads, and should be used to indicate potential mechanical collission between neighboring components. And so should be used to fully define a footprint. Correct?

ECO to my understanding is the layer used to indicate proposed changes to the design (https://en.wikipedia.org/wiki/Engineering_change_order).
Any ideas/examples on how to use them for this purpose?

Drawings - I use these for any additional drawings that illustrate some mechanical relations between the PCB and the “real world”. E.g. outline of the enclosure used to house my PCB. Is it also the layer that the board related dimensions shall live in?

Comments. I populate my textual items here (designators, values and e.g. changelog), but this makes my project a bit cumbersome for further handling (especially preparing the assembly documentation). Will elaborate on in furhter on.

F/B.Fab - I do my Test jig drawings here. I kind of use a simplified system consisting of two milled plastic boards, one positions my pcb and the other one use to keep my test probes. This way I use both “F/B.Fab” layers to design my Test Jig boards. But maybe I’m doing something wrong here.

Now let’s get back to my assembly drawings. Apart fromt he physical location of compoenents, and their identification (designator, value) what is important: Pin1 location, and Polarity marking.
Where do you locate these? It’s a common practice to have them printed on a silkscreen layer, but there are reasons I don’t use a silkscreen on a board side with SMD components installed. So where to have them indicated, to be able to easily generate proper assembly documentation? Which layer they should be located on? Or maybe this is the kind of information that should live on the “F/B.Fab” layers?

Other thing is, where to put the designators/values? In the default library, the references are put on the Silkscreen. I don’t remember exatly where the values are. I’d prefer if the texual descriptions (des/val) were drawn on separate layers, with the option to include them on the silkscreen. What’s your opinion on the current way of handling these?

And what’s the way other (favored) packages deal with the above mentioned aspects? I don’t have any experience with packages other than KiCad which is my tool of choice since 2012.

My explanation: What is the meaning of the layers in pcb_new and in the footprint editor? (KiCad 5 and earlier)

I think KiCad would benefit from a few layers having a front/back distinction that are free to use for user information and supported in the footprint editor.

used by KiCad DRC to ensure no two parts are too close, So i would consider it a technology layer :wink:

From IPC-7351B (i sadly only have it as a jpg):
courtyard

KiCad library convention: https://kicad.org/libraries/klc/F5.3/

Not as fixed in the use as at least no software feature directly depends on it.
It is however meant for holding the true body size (nominal or maximum depending on your preference) and a pin 1 marker, reference designator and optionally the value for documentation as required by IPC.

Library convention section https://kicad.org/libraries/klc/F5.2/

2 Likes

Great reading, thanks. Very educative!

In PCB package I used since 20 years I identified the proces of making pictures for documentation as being time consuming. I wonted one picture with element values and one with references (if you have a matrix of 0603 there is no place for both) on the background of gray picture of copper. To get that I had to go through gerbers and then mix them.
So before starting to use KiCad I checked how I could do it simpler here. After some investigation my decision was to get it by exporting SVG - you can have several layers together and get directly the picture usable in OpenOffice Write document. So I decided that my footprints will have identical rectangles at CrtYd and Silk and Ref at one of them and value at the second (I have never used standard Silk at PCBs - If I needed the painting I used for it another layer).
After I have done one PCB I found that if I change layer colors to gray and black to get the documentation pictures (for B&W printer) then even I close the PcbNew without saving the PCB I had to set the colors back manually. To make it simpler I could manipulate with configurations files, but I thought it had be done each time (making one configuration file for always would lead me to loosing any other setting I could probably done). So I gave-up and decided that in KiCad I will also mix the output layers out of program. So have modified all my footprints. Now I have Reference and Value at CrtYd layer and use Plot to SVG (only in Plot you have a way to on/off Ref and Value) then mix and color them in Inkscape. I’m not experienced user of Inkscape and have a problem to fit layers one at another if at one of them is something more to the left or down then at another (happens if something is out of Edge.Cuts - like dimensions or element mounted close to edge). In such case I am adding something to Edge.Cuts to be at maximum to the left and down.
Dwgs.User I used to draw the case.
Cmts.User I used for dimension lines.
Eco1.User I used to draw openings in second part of case as I needed to know where they are when placing elements and wonted to be able to hide them when routing (without hiding the first case part picture).
I have no established standard yet. What I write I used for one PCB till now.

If the CrtYd layer is being used by DRC, I would be concerned if these texts written on this layer will not trigger DRC errors. I would leave them for the purpose of indicating footprint “do not cross” area.

I also draw the Ref and Val overlapping, and according to the explanation by @Rene_Poschl their best place is the Fab layer, so I will be in the process of “Tidying” my library.
So I will be moving my Test Jig features from the Fab layers to ECO1&ECO2 layers (which I did not used anyway), thus will free the Fab layers for documentation purposes (polarity/PIN1 marking, etc.)

The “Fab” layer also contains the “value” field of footprints, so if you leave the value texts at the exact center of the component and make sure that the reference text does not overlap any component (which is useful anyway to get a useful silkscreen), you can print Edge.Cuts/F.SilkS/F.Fab together and get a nice diagram of component placement.

Silk and fab typically contain the same information but with different rules. Which means either print silk or fab but not both. I argue silk goes on the board and has no place in documentation drawings.

Silk simply has a lot of restrictions that come from the fact that it is printed onto the board. It has minimum feature size restrictions and can not overlap bare copper. This means the amount of information it can hold is very limited especially in high density boards with small components.

Which is exactly why the fab layer exists. That layer has none of the silk layer restrictions as it is not used on the board but for documentation. Printing documentation has a much higher resolution than silk and can therefore use much smaller feature sizes.
Documentation can even be printed scaled up so the relative feature sizes can be decreased further while still being able to read them in the final document.

And you can even have documentation information overlapping bare copper unless you intent to include pads in your printout.

3 Likes

Great explanation @Rene_Poschl, thanks!
Could you also explain what is the indended use for “margin” layer?
Is it used for the areas which should be left unpopulated due to some mechanical conflicts with mechanical features like frames, holders etc?

AFAIK it was originally meant for copper margin where clearances didn’t have effect next to edge cuts. It’s unused nowadays.

OK so that any copper past Margin area means DRC error?

I don’t think DRC ever checked it. U assume it was meant as a graphical guide for the user.

Fortunately it can be switched off.
I look at CrtYd when placing the elements so the only possibility when CrtYd rectangles are crossed is when I have done it intentionally. And if I did it intentionally then I don’t need to see the Error message telling me that.

In my footprints Fab layer is the real dimensions of the element. It is mych easier to place a Ref and specially the Value text (I use 1mm high text) in CrtYd rectangle (for 0603 I have 1.4x2.6mm) than in Fab rectangle (0.8x1.6mm for 0603). We mainly use 0603 and some 0402.

I don’t know the history behind KiCAD’s “Margin” layer. As stated by others, it currently seems to have no connection to any software features so you are free to use it for whatever purpose you desire.

I use “Margin” to assist with mechanical integration. If I import a *.dxf drawing of an enclosure outline (and mounting hole locations), I put it on the “Margin” layer and use that information to place mounting holes, define my Edge.Cuts contour, etc. I may also use “Margin” to show areas with height restrictions, or perhaps the projected locations of things like front-panel connectors, controls and switches. On some footprints, “Margin” is useful for showing the location of copper keepout areas under the component. If a connector is designed to mount in a particular alignment from the board edge, the enclosure’s wall, or a front panel, I place a line on “Margin” to show the desired location of the edge, wall, or panel.

Dale

1 Like

Thanks @dchisholm for your input here.
Well in my KiCad version, “Margin” layer is disabled in the footprint editor, so (without manual editing of footprint files) I can’t define any footprint features on the Margin layer.

Look closely - if I recall correctly, you can’t select “Margin” as the Active layer (the layer you directly draw on), but it CAN BE displayed. Here is the work-around to put information on “Margin” when you’re in “Footprint Editor”:

  • Activate and display one of the non-copper layers. Things may be easier if it’s one without much information on it, such as “Adhesive”, or “Courtyard”.

  • Draw the shapes or text you want to appear on “Margin”. (It may be helpful to include text comments explaining what the shapes represent.)

  • Select the drawn object(s), and open the “Edit” dialog (hotkey “E”, or right-click and select “Properties”). Change the “Layer” to “Margin” and click “OK”.

  • Once you have one object on the “Margin” layer, you can select it, duplicate it (), drag it around (hotkey “M”), move it exactly (), rotate it (“R”), edit it (“E”), etc, on the “Margin” layer, without going back to another layer.

  • This procedure also works for the other layers you can’t directly draw on - “ECO”, “Comments”, “Edge.Cuts”, “Dwg.User”, etc.

  • If you have a lot of information to put on “Margin” you can temporarily place it on another layer, then attack it with a text editor. This lets you change the layer for ALL of the objects in one operation, but you must be careful that there aren’t any other objects already on that layer.

Dale

What you describe does not work on 5.1.5. Margin and edge cut are not even selectable via the preferences menu.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.