Set all footprint pads NPTH, one-sided

Hi everyone !

I work in a fablab-ish place, and we have a CNC router for making PCBs. Milling PCBs has its drawbacks compared to ordering them, and one of the most notable one is that we don’t make PTH drill holes (I know there are some ways to do it but it seems difficult and a bit time-consuming for prototyping boards). This means that all through-hole component pads have to be routed from the bottom layer, and we can then add vias and route on the other side, just not from the pads since the top layer won’t be connected to the component (unless we solder on both sides but that’s hard to undo and a bit messy).

Now this is not a problem when we design our own boards, we have to keep in mind the design rules specific to our machine, but when we import a board from someone else, it is a pain to convert, having to check each pad one by one.

We do not want to edit all the footprints themselves, so do you know of a way to either :

  • make all TH components one-sided with NPTH holes ? Without editing each footprint as I’ve seen in other similar posts…
  • add a DRC rule that checks if a pad is connected to a track on the top side and add a marker ?

Thank you ! :slightly_smiling_face:

Normally I assume people are working with a stable version of KiCad, unless it’s clear that it’s not so from the post.
You mention custom DRC rules, and those only exist in KiCad-nightly V5.99. I do not have much experience with these rules and can’t comment on them.

Changing all THT pads into NPTH holes probably won’t work. If it’s just a hole instead of a pad you probably can’t connect a track to it, which will lead to many DRC errors. I guess it would work better to just turn the top layer off for the pads. This probably prevents tracks from being connected to a pad on the top layer. Have you tried this?

As you seem to want to do this on a regular basis, a script based approach is probably best. KiCad itself has a scripting interface, but you can also create an external script that works with the text-based KiCad files.

You could start with making a small test project which has both THT pads with copper on both layers, and a footprint with pads on only the bottom layer, then open the file in a text editor and look at how the pads are defined, and how you want to change them.
The files made by KiCad are quite readable, even without a manual. This is what a pad looks like:

 (pad "1" thru_hole rect locked (at 0 0) (size 2 2) (drill 1) (layers *.Cu *.Mask)
 (net 1 "+24V") (tstamp 9582ae04-60c6-480a-b8b1-0fd6b3482b63))

You also have to think about where you change it.
KiCad’s default libraries are designed for plated THT pads, and for every footprint you use a copy is made into the PCB file. Where it persists, unless the footprints are updated explicitly (this can be done via Eeschema / Tools / Update PCB from schematic or by updating them in Pcbnew ( re badged “PCB editor” in KiCad-nightly V5.99) itself.

If it was only for in-house designs, writing a script to modify (a copy of) the libraries may be a good approach, but if you also want it to work with PCB’s made by others then modifying the PCB itself is probably a better approach.

A simpler approach is to just manually edit the footprints, and then copy each modified footprint into a special library. It’s likely you will just use a small sub set of the available footprints. After you’ve done this a few times and build a collection then you can change an "incoming’ project to use the footrpints from your “special library” and then update the footprints in the PCB.

Yet another option is to not change the PCB at all.
If you strip a piece of copper wire you can use individual strands to make bridges:

  • Poke through hole
  • Solder the open end.
  • Pull tight and fold over.
  • Cut it with a knife.
  • Solder on other side of PCB. (Or exchange last two steps).

The wire must be thin enough to be able to fit it in the hole together with the pin of your components.

1 Like

Welcome to the community :slight_smile:

Years ago I could see the benefit of in house CNC pcb. But with places like OSHPark making boards for $10 / SQ inch with 4 to 5 day delivery I wonder if it is still worth dealing with the negatives?

1 Like

Thanks a lot @paulvdh for the detailed reply !
I am using stable version 5.1.9.

Do you mean by editing each footprint or is there a global way to do this ? Sorry for asking, I am sure to understand.

Thanks for the suggestion, I will look into it !

That’s a good idea, although I feel like we work with a wide range of component footprints, and the more external projects the more specific components. But maybe it would be a good start for the regular components and we could then manually edit the weirder ones case by case.

Interesting. Have you tried it ? Is it sturdy and conductive enough ? I’ll give it a try too.

Thanks again for all the suggestions

Thank you for your welcome :slightly_smiling_face:

Unfortunatly as I mentioned we want to use this machine for prototyping, and expect to make functional projects within a day or two (class sessions, hackathons…). So 4-5 days is a bit long for that, especially if you have to reorder them due to design mistakes (we are teaching students…).
Plus we are in France and this manufacturer’s shipping times seem longer for international. We usually order from Seeed which takes about the same time or a bit more, but only for more polished projects that can wait a few days/weeks.

Thanks for the suggestion though !

1 Like

Yep. You can either modify individual pads of a footprint directly in Pcbnew, but you can also load it in the footprint editor with [Ctrl + e].
In the footprint editor you can just hover over a pad, press e to edit it, and then change the copper layer to “B.Cu” only.

So for each pad it is:

  1. Hover over pad.
  2. Select B.Cu for the “Copper” dropdown box.
  3. Click on OK.

And again, a bit tedious, so if you do a few pads then save the symbol in an external library, you can look at it in a text editor, and it may be quicker to do there with search & replace.

I have not done exactly this, because I have never milled a PCB (yet). My regular method of making prototypes is on matrix board (vero board) and make connections with lacquered copper wire (& a hot soldering iron which can burn though the lacquer). A 0.2 square mm wire can handle at least 200mA. I have made quite a lot of PCB’s in this way and with wires up to 10cm long. I advised to use strands from regular plastic insulated wire because availability is good and the bare copper is easy to solder (As long as it clean, Don’t go stripping big batches of wire that start oxidizing after you handled them).

Different pieces of wire have different thicknesses of their strands. so find something that works for you.

Indeed, do just the footprints you are actually using, and then keep track of the footprints you did in a library, so you only have do do each footprint once. Or even better: find a method that works, then make a mini tutorial for it and add a section about the extra constraints for millig PCB’s, and give that tutorial to the persons who design the PCB’s in the first place.

But as JohnRob also already mentioned. This is quite a niche application, and the only advantage you gain is to get your PCB’s quicker, at the cost of extra manual labour.
With a cheap PCB service you get:

  • Pretty tight dimensions for PCB outlines.
  • Dual sided PCB’s.
  • Plated through PCB’s.
  • 2 solder mask layers.
  • 2 Silkscreen layers.
    And all for a pretty cheap price.
1 Like

I understand, thank you for your response.

If you do decide to modify footprints, you should consider creating a new set of library files separate from the Kicad libraries.
Perhaps named NP_OriginalLibraryName

1 Like

First, my apology for not fully reading each post. But, a rough glance suggests I post the following comment(s)…

I regularly CNC mill PCB’s. I’ve done well over 300 of them over many years. Single and Double sided. I’ll spare you the details but will say:

  1. It is quite easy to succeed at it in minimal time…

  2. For most All Footprints (either stock, vendors or, your own):
    The 3D viewer will show Pads/traces on layers that are turned on.
    It will hide pads/traces that are turned Off.

  3. The Gerber’s (and other output file types for milling) can include and/or Exclude desired layers. Done using the Plot tool.

  4. Regardless if the Footprint/Pad have internal THT wall copper, a Single-Sided and a Double-Sided board (used for milling) does Not Care about it and neither does the Milling Machine. User just needs to know there is No connection between Top&Bottom unless manually done.
    Thus, simply use the THT pads that come with the Footprints; you’ll get the Hole and desired Pad (or Pads, if double-sided). No need to mess with the Footprints and turning On/Off pad layers.

  5. For connections, if needed, between Top & Bottom layers, you can simply use a single THT (or NPTH with a Custom Pad but, will need to learn a bit on how to do-it/use-it) with pad with Top and Bottom. However, you can make a Footprint.
    Below screenshot shows a Homemade Via Footprint.

  6. DRC (I never use it) but, you can ignore any errors you choose.

myViaPin0.7-PartBody.step (4.0 KB)

myVia0.7_r0.kicad_mod (487 Bytes)


Why would you modify any footprint if your boards are single sided?
Just forget about top layer and generate gerber files for the bottom layer and generate ordinary drull file with PTH and NPTH holes in one file.
Here you can see where my Aux origin is placed, as I drill my boards on CNC from the bottom sire (vias in corners are for alignement/calculating rotation of the board on machine bed). Drill files are processed wit FlatCam.

From what I understand, she does mill double sided PCB’s, and is looking for the best way to do the metalization with a relatively simple setup.

It’s true that there is no great need to remove the pads from the top side, even if they’re unconnected. Depending on more available area to route signals on the top of the PCB by removing the pads on the top could be a reason, but it is yet another step that takes this method further from a “standard” PCB process, and I doubt it’s a good idea.

There are commercial rivets, and machines to put those rivets in PCB’s. These may be an interesting path to examine. I have never used them myself though.

A few examples of both the rivets and the tools:

Screenshot taken from:

1 Like

Thanks for the detailed explanation ! I think I’ll take your suggestion and make a custom library on our server, that students can indeed complete.

Sure, we do have those and will encourage using them, saves time !
I am exploring CNC milling because I think it might be a better option for those wanting to add SMT components (not too small though because we don’t have a super-fine resolution). I also believe it’s a good way to learn about PCB design and routing, rather than having to wait a few days when ordering boards.

That’s right, we are making double-sided, I just need to route the pads from the bottom layer only, and there make vias if I need to go to the top side. Plus we indeed want to get more area for routing between pads because we use a rather large clearance.

Cool, I haven’t tried those yet. Does anyone have experience with these rivets ? Are they just good for vias or has anyone succeeded soldering THT on them ?

Thanks everyone for your replies, it’s nice to see such an active and helpful forum :pray:

and then:

This is a perfect example of why having custom, curated libraries that are chosen by task is a good idea for your students. This also brings a learning opportunity to your students to show why in some (many?) situations having a small, curated list of items instead of having access to all items of a particular class can be beneficial. Not just footprints curated for CNC milling, but many situations in life.

In a class situation, introduction to the rivets can also be used as part of a lesson on the history of making circuit boards as it was one of the early methods of creating an electrically conductive through-hole. I’ve, personally, never used them. And, sadly, I’m not a historian so I can’t speak with authority on their benefits and disadvantages. Maybe encourage some students to do some research papers to use as a jumping off point for your own future lesson plans?

1 Like

Hello Suzanne,

I have been milling my PCB prototypes since many years as well. I do never use PCB layouts from others but make always my own. As far as I understood, your problem is to take care that you do not forget even one correction on the THT’s. Did you try to insert an F.CrtYd over the top layer of the solder pads of your imported PCB? If that is possible, the DRC should point to every “wrong” THT. That could make your work a lot easier. But I’ve never tried this after the PCB was routed. BTW: I do also use the Rivets paulvdh describes, but I do not press but solder them. I also use them at solder pads that I can not reach at the TOP-Side after the device sits in position. Others I solder from both sides.

On the other Hand: The most PCB fabrications have limits for the Layout which is almost about distances. If you accept PCBs from others, you could have them to follow your restrictions.


Norbert, DL1EBN

1 Like

May be what I can say will be useful for someone.
At my first job (1980…) we made vias using short section of wires (copper plated with silver). It is probably no wonder. But the exact method I think is practical.
You grab the end of the wire (about 1mm long) with flat-nose pliers so tight that it becomes flat and bend it at right angles. You trim about 5mm further. You put such hooks through all vias in the PCB. You put a piece of metal on the plate and turn everything around. Now you cut the protruding ends to about 1mm and bend them by pressing them firmly with flat pliers. It only remains to solder nicely on both sides.

1 Like

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