Re-routing connection across two adjacent pads

image

In the above image which is a snapshot of the PCB there are multiple rows of adjacent pads with the left traces connected to left pad and the right traces connected to the right pad. I can’t make changes to the schematic due to certain reasons. I wanted to find out how I can re-route the left trace to the right pad and vise versa (as depicted by the blue lines) without affecting the surrounding connections/components. I’m new to kicad and pcb layout and have no idea how to proceed. Any help is appreciated.

It seems to me that the pcb connections shown must agree with your schematic. You do not show what these pads C15 - C20 are connected to, so I cannot tell whether this is the case. If this layout is not what you want, I wonder if you need to change your footprint to swap locations of Pad 15 with 16, Pad 17 with 18, and 19 with 20?

@BobZ Yes the PCB connections agree with the schematics. C15-C20 are connected to hole pads. But for a designated reason, I need to re-route the connections under two conditions:

  • without updating the schematic
  • without rearranging the pads

The PCB MUST agree with the schematic. Assuming that the component of interest is passive (R or C non-polarized), there is NO difference.

If the component is a diode that is placed wrong in manufacturing, you may be able to change the part orientation in the assembly instructions. This is a placement change, with no change to the PCB. However, the schematic may be wrong or the footprint doesn’t match the schematic symbol or some other problem. Is this a custom symbol or footprint? The polarity may not be correct in both items.

I believe you can use the WireIt plugin to do that. I personally haven’t use it because my workflow is Schematic->PCB, but I have hear that work very well.

I hope it helps

On a hunch, I want to be clear about one point: I always find it a nuisance that KiCad (and other EDA as well) do not seem to provide for easy pin swap of resistors and ceramic chip capacitors for example. I do not care which resistor or ceramic capacitor pin is which, but during layout I need to rotate the footprint so that the pin connections agree with the schematic. So…are you saying that you cannot swap schematic pins on something like a resistor or most capacitors? I am assuming (perhaps incorrectly) that these C numbers are capacitors.

Is this what you want?

Thank you.

I am using 5.99…I do not know whether that has any bearing on your comment.

In the case of a typical capacitor or resistor, it is not that big a deal to rotate the footprint 180 degrees. It is just that the process seems like it ideally should be unnecessary. Does invoking the plug in require more time or effort than rotating a capacitor/resistor footprint by 180 degrees?

Is the plugin more intended for use with IC gates? (Either gate swapping or swapping input pins on a given gate.) Actually this is probably a bigger deal (requiring more time to do manually) but for me comes up much less often. But I do encounter situations for swapping input pins in a gate (or gates in the IC) occasionally.

Finally…so far as I know, I have never used plugins for KiCad and could use a primer. I followed your link which shows what it does, but no information on where to get it or how to invoke it.

I have no idea if the plugin works with 5.99, I use KiCad for real work and cannot use the experimental builds.
As 5.99 is work in progress, why don’t you file a wishlist item on the bug tracker for pin swapping ro be a built in?

Thanks again.

I think I want to do a bit of homework before adding a wish to the bug tracker.

  1. I think that “swappable” probably needs to be a property of the pin and/or gate in the symbol. It could conceivably be more complicated than that if these two pins can be swapped and those two can be swapped but the first two cannot be swapped with the second two. This point is hypothetical but I prefer to assume that it could arise rather than trying to prove that it cannot.

  2. I need to make sure that this wish is not already listed in the bug tracker.

1 Like

The plugin modifies the .sch files. So it should work with the 5.99 versions older than Apr 7, 2020. From what I’ve seen (mostly commit history) the schematics file format got changed around that time. And since the plugin does not know how to parse/modify new file format it should fail.

As for pin swapping the plugin works 100% only when label (local, global, hierarchical) is connected directly to the pin. If it is connected through a wire it might work or it might fail.

Also I agree that “swappable” should be a parameter for unit (gate) swapping. But swapping two units that are different can be prevented by hashing both units symbol code and comparing it. If both hashes are the same then both units symbols are the same. And I can not think of a case where two units with same symbols would not be swappable. The swap_units plugin does something like this internaly.

But I disagree that “swappable” property should be required for pin swapping. I just can not see the workflow. Take a MCU for example. Analog imputs are swappable but only between analog inputs. Same goes for GPIO. And with digitals pins we can also swap between peripherals (UART0 for UART1). So you would need different swappable properties. Which would have to be edited after the symbol was placed into design (you could connect CAN transciever on a ping with GPIO/UART/CAN/PWM functionalites.) While I agree that it is always a good idea to check the design with automated tools, I thinkg that most designers would hate this workflow. So any kind of pin swapping should be possible without “swappable” property.

There’s the pin/gate swap functionality which has been planned. But I really don’t know how it would work and would or could it address this situation.

https://gitlab.com/kicad/code/kicad/-/issues/1950#note_254389158

I very much agree that swapping those components which don’t have polarity is logically completely unnecessary, and the only reason it has to be done is because it’s complicated to plan and implement the software to take care of it.

Pick and place machines certainly used to have the concept of pin 1 on resistors and this caused wasted time on board assembly as the robot carefully rotated the part.
Flipping components also can make the Fab layers look better

You lost me on this, first because I do not work with MCUs. Why can’t the swappable properties be included in the symbol? I am thinking of some sort of hypothetical logic gate (let’s say that it is an OR gate) with two inverting inputs and two non inverting inputs. I suspect that if I wanted to spend enough time I could find something close enough to this. Anyway the two inverting inputs can easily be swapped, and the two non-inverting inputs can easily be swapped, but you should not swap an inverting input with a non-inverting input.

You lost me on this also… I do not understand “hashing” or “symbol code.”

The MCU’s I am working one (and I assume it is the same all cross the MCU field) have the same peripherals routed to many pins. For example UART1TX (uart port #1, transmit pin) is routed on PIN14, PIN27 and PI39. So if this pin is used as an uart tx pin that the pins 14, 27, 39 are swapable. But on PIN14 you can also have CAN3TX, PWM5, … ). And if CAN3TX is also routed to PIN19, PIN25 and PIN41, then 14, 19, 25 and 41 are swappable. But only of the pin is used as a CAN3 transmit pin. And the symbol by itself can not know how the pins are used so PIN14 can not know if it is swapable with 27 and 39 or with 19, 25 and 41. The number of possible configurations with today’s available peripherals (I’ve seen MCU which have 8 different peripherals routed to one pin) is staggering. You you would need ridiculous amount of symbols for the same MCU. Or you would need to have the option to set pin functionality when placing the symbol in schematics). So the workflow would be, place the symbol into the schematics, select PIN14 to be UART1TX, and connect it within the schematics. When doing the layout you might want to swap it. KiCad parses the symbol and does the lookup to find not connected pins with UART1TX functionality available and presents you the alternatives which you can choose or not. I do hope this is clearer this time.

The desciription (symbol code) defines how the symbol looks like. E.g quad opamp in the official library have five units. For are the opamp, without supply pins and the fifth is the supply pin connection. So the first for pins are interchangable. And if you look at these symbols you’ll see that they are the same. Also their descriptions within the library are the same. And as we are lazy and impatient if we want to check if two symbols are the same we can compare if both symbols descritions are the same or we could just compare if the previously calculated hash sums (control sum, MD5, SHA-1, …) are identical.

Thank you, MitjaN.

I appreciate that you put considerable care into your response. I think you are saying that the ability to swap a given set of pins is conditional. Do I remember correctly that some pins on an MCU might be programmed to operate with different functions? Drilling down deeper into your discussion will take me more time. But…perhaps the idea of pins with programmable functions takes pin swapping beyond what can reasonably be accommodated in any EDA pin swapping capability. I was focused on the simple examples of gates, op amps, comparators, capacitors, resistors, etc.

(EDA = Electronic Design Automation) software, which I think describes KiCad, Altium, Eagle, Cadence, PADs, etc.

For what it is worth; for a (quad op amp or logic gate for example) I use four symbols, with power connections on only one of them. I guess that for the purpose of “gate swapping” the method of using a different 5th symbol for power is probably better…

I am still lost by the “hash” discussion…but I should not impose all of this on you. Other than using an occasional logic gate or flip flop, my design knowledge is completely analog and power.

Thanks again.

Certainly not. :slight_smile: But I understand very well because I have seen that’s true. Which pin can be used for which function depends on what else is used in which way, and may be programmatically defined when the device is running.

If all possibilities were taken into consideration, we would need a logical definition language for pin functions, and an interpreter would check runtime what can be swapped. But I don’t know if that’s possible at all - and who would spend time making those definitions, i.e. writing small logic programs for each MCU. Then the eeschema user should also define the type of each net to correspond with the function. Sounds pretty much something nobody would ever do.

Yes, the 2-pin non-polar passive components are completely different, and so are some components for which “gate swapping” would work.

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