How to check for multiple power symbols on the same net?

I am teaching an undergraduate project-based course, where my students are using KiCad.

One mistake that I have noticed students make is that two power symbols are accidentally connected together. For example +5V could be shorted to GND because a decoupling capacitor was replaced by a short when copying from a reference design.

This situation does not raise any errors or warnings in the electrical rules checker, yet I think it would almost always indicate a mistake, rather than a deliberate design choice. If two nets with different names are intended to be connected, this should be indicated by a net tie.

I tried inspecting the netlist (either by exporting to a file, or the netlist inspector in PCBNew), and there isn’t any indication that the single net originally had two names coming from two different power symbols - this information just seems to be lost.

Is there any way to force the Electrical Rules Checker to flag this as an error, or is there some way to easily see that two different user-specified names exist for this net?

I do not have the answer to your question…but to help you get an answer from somebody else:

Go to help > about > copy version info… and post that into your response.

UPDATE: I just tried it in version 6.0.4. I got this warning:

Is there any way to force the Electrical Rules Checker to flag this as an error, or is there some way to easily see that two different user-specified names exist for this net?

Currently no, as you have seen the ERC doesn’t catches this situation (see picture). But I think it’s worth a gitlab-request.

2 Likes

If I do a similar test, I replace the positive power symbol and gnd symbol one at a time with a text label, KiCad catches the problem with net names. However, when only gnd and positve power symbols are connected, KiCad doesn’t find a problem. IMO this is not a new check to add to KiCad, it’s just a bug. Positive and negative (or reference) power in the same net isn’t logical.

1 Like

I think - currently no.
Most power pins (VCC, GND symbols, but also! IC power pins) are defined as Power Inputs. That allows to connect them together (more then one Power Output pin at one net if flagged by DRC).
As power input pin of any IC can have different name than it is ‘normal’ for KiCad to connect different power input pins together. For any connected pins with different names KiCad selects one of them to use as net name. If you put a Net Label on a net it has a precedence over names like R1_pin1 (I don’t look at that names so not sure how they are constructed). I think Power symbols work as such labels so decide how net is named. The only place where I see a possibility to catch it is if we can add a rule: If two different Net Labels (intentionally used not R1_pin1) are connected together it is a Warning/Error. That could catch VCC connected with GND.
I am writing from Win7 PC so I can’t have here KiCad V6 and can’t check if in the DRC configuration it is possible to flag such situation, but may be.

I don’t know how it happened that I didn’t sow that before writing my previous post.
During writing I realized that I don’t know where from KiCad knows that he should use VCC name for net and not name coming from IC power pin. Til now I supposed that power pin in power symbol is defined exactly the same as power pin of IC. The only difference is that it belongs to Power Symbol. So there is probably the rule: first use as net name the Net Labels, then pin names from Power symbol and then the others.
May be having two different pin names sourced by Power symbols could be flagged.

May be having two different pin names sourced by Power symbols could be flagged.

that.

Thanks all for your responses. It seems that nobody knows a workaround, and there is general agreement that this should be flagged as an error.

I cannot see any similar issue already raised on the KiCad gitlab site, so I have raised the following issue:

2 Likes

There should at least be a warning, for the designer to decide if the joining was intentional

1 Like