Creating a footprint with drilled holes

I am creating a footprint for a USB Micro-B connector, which requires two drilled holes. And I can’t figure out how to add a hole to a footprint. Normally in pcbnew I use the predefined mounting hole footprints, but that won’t work in the footprint editor.

Any hints?

add a pad, open the edit dialog for the pad, and set type to “NPTH, Mechanical” ?

4 Likes

Oh, so that’s where it is! You create a pad that is really a hole! Thank you!

Actually, it isn’t that simple. I need non-plated holes, and all attempts to create them have failed so far. I get errors about pad not being on any layer and “pad is not on a copper layer and has a hole”. Tried both “NPTH, Mechanical” and “Through Hole” pad types.

I tried to recreate the pad setup that I saw for mounting hole footprints, but I can’t — the editor won’t accept those settings.

NPTH, Mechanical -> Non Plated Through Hole … that should be the pad you need…

Just to make sure, we’re talking about holes for the two plastic protrusions at the bottom of something like this?:
http://p.globalsources.com/IMAGES/PDT/B1128389687/SMT-type-MICRO-USB-connector.jpg

Try what you see in the picture… NPTH, circular, 1 mm and for drill settings also circular and 1 mm.
Untick any technical layers this should not ‘affect’, for example F.Silk as you definitely don’t want a silk screen ring around that :smile:

Then, while still in the footprint editor, hit [Alt]+[3] and check what you get…

Once you got that we can keep troubleshooting.

2 Likes

Yes, the holes are for similar protrusions, except my connector is B type:

After some trial and error, I ended up with these settings:

The holes do look OK in the 3D rendering. What worries me is the “All copper layers” setting. Shouldn’t this be set to “None”? And if not, then what is the “None” setting for?

‘None’ is for all the other options you can make there (for example glue pad definitions usually are only on the Adhesive layers…).
I don’t understand either why ‘None’ doesn’t work with NPTH, but when I chose it the same error messages you posted appear and chosing NPTH sets it back to All copper layers, so take it as it comes ;-):

  • Error: pad has no layer
  • Error: the pad is not on a copper layer and has a hole
    For NPTH pad, set pad size value to pad drill value, if you do not want this pad plotted in gerber files

If all worked well check a gerber output of the whole thing. That’s the final test.

PS: yeah, the whole error message doesn’t really make sense. Any of the more knowledgeable people here who want to explain this? I guess it must have something to do how NPTH/PTHs are treated by the program…

could you please attach the footprint model?
so it would be easier to investigate
thanks

Sure. Here it is. I think the holes are OK now, even though the “All copper layers” setting makes little sense to me in this case.

USB-MICRO-B.kicad_mod (2.0 KB)

yes, holes are fine now
all copper layers is normal for NPTH pads in kicad … each EDA has its own way to define objects
:smile:

Thanks for the help!

[quote=“jwr, post:10, topic:1625, full:true”]
. . . the “All copper layers” setting makes little sense to me in this case . . . [/quote]
Like Joan_Sparky said, you probably have to accept this as a bit of quirkiness that helps make KiCAD so “unique”, “versatile”, “charming”, “weird”, “thought provoking”, etc. (Think, for example, of all the different adjectives my wife uses to describe me, depending on what day you ask.)

There probably IS a reasonable explanation in the realm of data and “virtual objects”. It appears that in the KiCAD universe, “holes” don’t exist as objects in their own right. They are always associated with a copper “pad”. In the grand scheme of things this may be either a wise decision or foolish, but for now we must accept that it pleased the Creator to define the universe in this way.

We must also accept that a “pad” must be associated with at least one copper layer. Yeah, this contradicts what we encounter in the “Pad Properties” editing box. (Can somebody give an example where the “None” option is a correct selection in the “Copper Layers” section of the “Pad Properties” dialog? Perhaps it is time for a bug report.)

To create a simple, basic, hole in the KiCAD universe we must define both the hole and its associated pad as having the same size. In the physical world where we live and breathe this is a degenerate case - the hole completely swallows the pad, leaving nothing. (To begin with, since a hole is a place where there is nothing, are we arguing about nothing?) But in the KiCAD universe, both the hole and the pad are virtual objects, they can exist simultaneously, and neither can annihilate the other. Other EDA programs I’ve used would squawk this degenerate case, citing something like “inadequate annular ring”, but KiCAD is more tolerant and less legalistic in that regard.

Even though the KiCAD hole has reduced its associated pad to nothing, that nothing must be placed on a copper layer. And in KiCAD, a hole goes through all the layers so we must specify “All Copper Layers” for its associated pad as well. I know a few good machinists who can make half a hole rather than a whole hole but they obviously aren’t allowed into the KiCAD universe - only complete holes, leaving nothing on any copper layer. Now, since we must specify “ALL Copper Layers” for the pad attributes associated with a simple, basic, hole . . . shouldn’t we also be required to include ALL of the “Technical Layers” in the pad definition?

Is there a less convoluted justification for the definition and behavior of simple holes? Perhaps it’s time to rethink the way holes are defined and used. I see that selecting “NPTH, Mechanical” automatically disables the “Net Name” and “Pad Number” input boxes - could selecting “NPTH” also force the selection of other options? In most cases there won’t be any copper ring around a NPTH, but occasionally you might want a copper ring around the hole as either a chassis grounding connection, or for mechanical reasons. (The slightly elastic copper absorbs vibration and thermal expansion under a fastener, where brittle glass-fiber board material abrades away.)

Dale

1 Like

Hey, I ran into this exact same issue a few weeks ago. There are two issues:

  1. You cannot create a pad that’s not an a copper layer with the same drill and pad sizes.
  2. You can create a NPTH mechanical drill, but I got a separate drill file for that when plotting Gerbers and my boardhouse (in this case Oshpark) does not handle two drill files well.
  3. Looking at existing footprints in the library, like the Mounting Hole, they use exactly what I want - a normal pad, not on any copper layers and same size drill and pad.

I remember there be a bug report for the issue of not being able to create a PTH that is not on a specific layer, but I can’t find it anywhere.

In the end, I just assigned it to the top/bottom copper layers, it leaves the soldermask out and the copper gets drilled out. :frowning:

it is possible to merge NPTH with PTH, during gerber generation, so it should no need to do any workaround

Merging of PTH / NPTH has been removed.

@madworm … I missed that! thanks :smile:

Date:
2015-10-26 07:43:30 UTC
Revision ID:
jp.charras@wanadoo.fr-20151026074330-l735o9z79l6o4wn6
Pcbnew, dialog create drill file: remove option to merge plated holes and not plated holes:
reasons:

  • This option is called “bad practice” in gerber files format specifications and is even forbidden in gerber drill files
  • Generates problems with some board makers because these holes are not identified in a single NC file
  • No one was able to explain us how to identified them in a single NC file
  • Recent change in drill file generation is not compatible with merged holes (minor reason)

That is an option I just used to create gerbers… I’m not sure I understand what the behavior will be from now on. Will we get one drill file, or two files?

Both OSHpark and Itead (where I make my boards) want one drill file, so I’m not sure what to make of this.

@jwr,
I think, if the devs don’t re-introduce that feature, the only option would be to switch from NPTH to a PTH with drill equal to pad size on your footprint…
that will produce a single file and it should be treated as the previous version from OSHpark…
probably OSHpark just doesn’t do the plating when the annular is not present

Maurice

So now I have to go back to manually merging the two drill files for all the PCB services that only take a single file? Sure, it might be bad practice in theory, but the solution forces many people to repeatedly waste their time in practice.

I suspect some user will soon offer a script to merge the drill files.