Is there a way to define relative clearances for nets

I am working on a PCB with different AC voltage levels and some low voltage circuitry. I also have some low voltage circuitry with a ground relative to these high AC voltages with some opto couplers to connect the 2. The problem I am having is that I now have different nets with small voltage differences between them that don’t need big clearances. But they do need big clearances to the other nets. There are even nets in this layout that cross multiple filled zones, some of which I need to keep proper clearance from but others I don’t, and in the mean time there are also electronics in those same zones that need small clearances.

One good example of a problem I am having on my board: lets say I have a ground plane on which I have a microcontroller which is connected to the right side of an optocoupler. The left side of that optocoupler is on that same ground plane, but that side of the optocoupler is a few hundred volt higher than the other side. Therefore I need proper clearance from that side to the ground plane. This clearance should be bigger than the distance between those 2 pins on the left side of the optocoupler which is electrically ok because the difference between the pins on the left side of that optocoupler is relatively small. Is there any way that within the features of kicad, I can have different clearances between certain nets but not others.

Your explanation might be clearer by showing the relevant schematic and pcb section (You should be able to post one image per post so if necessary split this into two answers.)

A clearance matrix is planned for a future release (possibly v6). You might be interested in Crowdfund Clearance Matrix (Contracting KiPro to implement it)

Oh, yes, that clearance matrix thing does seem to bee exactly the feature I am talking about.

I found a bit of a workaround which will be a lot of work and won’t work in every single situation. As you can see in this image, the pads on the right side of the Si8751 have a small clearance from the ground plane and the ones on the left a big clearance. I managed to do it by overlapping a second filled zone with different clearance rules. (I still need to do the ground plane on the other side)

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