Swapping equivalent component nets in PCBnew

I have a set of equivalent components that are repeated a number of times on the board. For example, a FET and a connector. These all go to different pins of an IC.

I would like to swap which pin each fet goes to in PCBnew, rather than going back to eeschema in order to do it.

Is there an easy way to do this?

You will eventually need to swap in SCH, but there are various reasons why you may want to delay a SCH change.

  • Someone else may be revising the SCH
  • Pin-Swap is iterative, and you are unlikely to have a final-map on first pass.
  • SCH change may need more sign-offs, PCB pin swap you can do in lunchtime as proof of concept…

There is not yet a Pin-Swap feature in KiCad PCB, but you can manually swap in the kicad_pcb file.

To make this easier, I’d suggest rats-nets the last segment, and route all traces to close to their ‘new’ pins, until the only tangle is the final rats-set.
Then, save file and make a note of the new mapping names

eg in the below example, I have swapped (net 15 "Net-(P2-Pad5)") with (net 14 "Net-(P2-Pad4)")

(pad 4 thru_hole oval (at 0 7.62 270) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)
  (net 15 "Net-(P2-Pad5)"))
(pad 5 thru_hole oval (at 0 10.16 270) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)
  (net 14 "Net-(P2-Pad4)"))

You do need to change both the net number, and net name, but that is all there is to it.
Load the edited file into PcbNew, and finish routing. Save and Fix as needed…

When you do eventually update from revised SCH, provided the RefDes names have not changed, the NET import process will re-map the net names automatically - it is smart like that.

Just avoid changes of RefDes and nets. :slight_smile: