I have a 4 layer board with traces and components (mostly SMD) on front and back, and ground and power planes on the inner two layers. I noticed today that on some of my through-hole headers, the copper fills are not respecting zone clearances correctly around the through hole pins. In the same zone, I have a 1x3 header that gets zero clearance from the fill around its pads and a 2x3 that gets the correct zone clearance. I tried adjusting the zone clearance, and with some experimentation I determined that on the 1x3 header, kicad is using the hole as the boundary that it is clearing from, whereas on the 2x3 header it is using the pad. My clearance is set to 0.254mm for this zone, and the 1x3 pad is about that same thickness, which explains why the planes are butted right up against the pad. It makes no sense, though, that it would do that for the 1x3 but then on the 2x3 header it would measure from the edge of the pad. The 2x3 header was added to the board before the zone was created and filled and the 1x3 header was added after. Maybe this has something to do with it??
Has anyone seen this behavior before? To get around this, I had to create a keepout area around the 1x3 header, but I’d rather not do this. Plus, I don’t have confidence the zones are not shorting something else out on the board that I haven’t noticed.
I am running the following:
Application: kicad
Version: 4.0.4-stable release build
wxWidgets: Version 3.0.2 (debug,UTF-8,compiler with C++ ABI 1002,GCC 4.2.1,STL containers,compatible with 2.8)
Platform: Mac OS X (Darwin 16.1.0 x86_64), 64 bit, Little endian, wxMac
Boost version: 1.57.0
USE_WX_GRAPHICS_CONTEXT=ON
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=ON
USE_FP_LIB_TABLE=HARD_CODED_ON
BUILD_GITHUB_PLUGIN=ON
Check the pad and footprint properties for clearance settings for both connectors.
I guess the 1x3 has got some values in either the footprint or pad settings for clearance that override the global values that come to be if the zone is being filled…
OK, that is weird - can’t think of anything else at the moment.
If it’s an option for you I’m sure either I or @keruseykaryu can have a look at your project if you want to (or someone else). Just drop us a PM for mail contacts to exchange files in that case.
On the other hand, some more screenshots with just one or the other power plane layers active, so we can see easier what’s going on) might be in order.
Dale, “all copper layers” is selected on the pads just like in your screenshot. The F.Silk.S. and Eco1.User boxes are not checked, but the F.Mask and B.Mask are.
I opened the .kicad_pcb file for my project in a text editor. I noticed that the entries for some components contain solder_mask_margin and clearance definitions and some are missing those two definitions:
(solder_mask_margin 0.1016)
(clearance 0.1016)
Are those needed? Neither of the two headers I pointed out in the original post have those lines, yet one of the headers has this issue and the other doesn’t.
Normally footprints shouldn’t define those values, as the global settings (per layout/project) are the ones that are defining how and if the fab is able to make your board (or which fab/price bracket you chose).
If some footprint needs different values, one usually modifies them in the layout on a local level just for that project.
But I’m just an amateur, so take with grain of salt
As an experiment, I added another 2x3 header to my project by copying the whole block in the schematic. So, it’s connected to the same nets, has the same footprint, etc. The new one is refdes TC2. The original one is TC1. TC1 is the original 2x3 header that has the correct clearance around its pads. When I added TC2 (inside the same fill zone as TC1), it did not get the clearance, and has the same issue as the 1x3 header (refres J4) in my original post. So, I took a look at the entries for TC1 and TC2 in the .kicad_pcb file for my project. There is a difference in the pad definitions. Take a look below. TC1 (the working one) only has 2 numbers inside the “(at x.xx y.xx)” part. ie, (at -2.54 -1.27) for pad P$1. TC2 has THREE numbers in that same place. For example, pad P$1 on TC2 has this: (at -2.54 1.27 270). What gives?
Maybe I’m being dumb, but I can’t figure out how to send a PM. There’s no “new message” button or anything like that in my PM area. I can read the welcome message from Chris Gammell, but I can’t create a new message. Maybe it’s because I’m a new user? Would you mind sending me one?
So… this issue appears to be caused by the way pins are named in the footprints for the headers I was using. The schematic symbol and footprint came from macrofab.com (for use with their house parts). The pins are named “P$x” where x is the pin number. eg, pin 1 would be named “P$1”. I have no idea why they use that convention, but something about that convention seems to be causing all the trouble. I modified one of their footprints by changing to normal pin names… ie, “1”, “2”, etc… and the problem I was having went away. No other thru-hole footprints have the issue I was having; just the macrofab thru hole footprints.
Maybe the $ is being interpreted as some kind of variable (like how $ is used in bash or perl, for example) and making the zones connect to them? I dunno, but getting rid of it seems to fix my issue.
Now, as I mentioned earlier, the header that was on the layout before I created the fill zones doesn’t have the issue. I’m not sure how to explain that, but any macrofab header I add after the zone was created has the issue.
What good example are you talking about that has P$ tags? I did say that the one component that was added prior to the filled zone being created did not show the issue, but adding another component with $ in the pin names after the zone was added did cause the issue. Removing the $ from the pin names and then adding a new component to the zone did not cause the issue.
Don’t read too much into the layers F&B.Cu vs *.Cu. I was trying a ton of different things to see what was going on at that point. In the end, only the P$ in the pin names mattered. Try it yourself if you don’t believe me. Grab the macrofab libraries and give it a shot with their through-hole components, keeping in mind I am on MacOS, if that matters.