NetClass and Mounting Holes

Hello everybody,
I have this problem. I created several net Classes, including some in high voltage (HV_L & HV_N etc…).
I have kept these classes 5mm from low voltage.
I put all the low voltage nets to net class “Default”, otherwise it’s really stressful to put all the low voltage directives on every single net in the schematic.
Everything works fine until I find the MPTH Mounting Holes, where the system sets a netclass to “default”. So with the HV nets I have a clearance of 5mm from the hole !!! And not the classic 0.3-0.5mm clearance. How can I change the netclass of the hole ? it’s possible to do it? Is there any trick to solve the problem?

KiCad has mounting holes with an electrical connection, I think the symbol is called mounting_hole_pad or something like that. You could use one of those and assign a net to them. Then you could define a clearance between that net and the high voltage net class.

Alternatively you might want to assign a net like earth or gnd to the holes directly.

(And in general, I’d use a larger clearance than 0.5mm between live and a metallised mounting hole with potentially a metal fastener and so on)


That’s exactly what I do.
I needed high voltage between key zones but also to the mounting holes (because they are chassis/earth).

By using the electrical connection mounting holes and defining a unique net (MH_{1,2,3,4) I can use the wildcard class assignment I’m 6.99

I think you can also make good use of: PCB Editor / File / Board Setup / Design Rules / Custom Rules here. This topic has already been answered multiple times on this forum. The thread below is the first that popped up with a search, but there are more of them.

yup, exactly that




Thanks to all, yes of course I’m using Custom Rules very similar to Altium.
But in this case I don’t have a single MPTH as you showed me, but it is part of a connector footprint and the system set it to Default.
See image…



unfortunately non-netting things (like holes) are assigned Default

the workaround, is to add a pin on symbol and add a net to it ( like MH_…) , then on footprint change the MPTH to PTH and on NetCLass set MH_* to other class (eg. MHOLE).
It’s not comfortable but it can be done!

Set NetClasses…

Now is possible to route traces…

However, MPTHs handled this way make little sense. With the introduction of Netclasses and the ability to use the Custom Rule, Mounting Holes cannot remain at “Default”, but must be allowed to change netclasses.
Thank you all :slight_smile:

Mounting holes that aren’t conductive don’t have nets and therefore can’t have a netclass. They can be assigned higher clearance through custom rules though…

But wouldn’t that be the same rules for all NPTH ?
I ask because some use-cases I have larger clearances in certain areas due to high voltage differences while others are more segregation but low CM difference

If something doesn’t have copper, you can’t control clearance to it with a copper clearance rule. So if you want to have different types of NPTH, you need a different mechanism of identifying them with custom rules. You can use various properties (like, hole diameter) or you can put them in a named group or something.

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