ERC check misses unconnected 5V and 0V

I will try to raise this on Launchpad tomorrow as a bug/wishlist item.
It would fix so many schematic errors we get on the forum

OK thanks David,

I must admit, if the ERC confirms there are no problems I believe it !

So it would be great if it could do the above, then I could fully trust ERC as at the moment I have to zoom in on every connection and see if its connected. Depends how many you have, you just may miss one and then your PCB will not work !

regards

Gaz

Raised here https://bugs.launchpad.net/kicad/+bug/1639400

If you could go to Launchpad and be “also affected by the bug” it will help

1 Like

How do you look at net names?
The Power Flags are kinda strange things to deal with. I don’t follow the reason for them to be honest.

Net names are shown in pcbnew and can also be seen in the netlist file with a text editor.

Power Flags are traditional in just about every PCB and simulation package I have ever seen. They are a special case of a Global Label

1 Like

While I agree that any unconnected pin, wire, label, power port, or power flag that is not marked as unconnected should cause an error. However DRC also performs electrical checks and one would expect other errors should have been detected in this case. I think the ops example above represents a misuse of the power flag. DRC checks that all pins designated as “Power Inputs” are driven by a net that also contains a pin designated as a “Power Output” or a power flag. The use of Power flags should be kept to a minimum and are usually attached to a power “source” that is not otherwise designated as a “power output”. An example would be a pin of a connector that supplies power, or a passive component such as an inductor in a power filter. I believe if the op had used power flags differently then errors would have arisen.

2 Likes

Hi all,

I am the one that started this topic, can anyone show me how I could use the power flags differently, as I thought I was using them correctly ?

The 3 power flags as shown are the only ones on the schematic, I then use multiple +3V3 and GND throughout my schematic as shown above. The above is just a simple example in reality there are about 12 of each on my real schematic.

If anyone could help so that DRC would pick up the error, that would be great.

regards

Gaz

By connecting the power flag directly to the power port symbol all matching power ports are now connected to that power flag making them all power “sources” even if none of them actually connect to the actual power source, satisfying DRC. Instead connect the power flag to the actual power source. If pin 3 of P8 is intended to supply power to the circuit then place the power flag directly on or as close as possible to that pin. Same goes for gnd and 5V.

Edit: Power flags are only required on nets that connect to “power input” pins but have no “power output” pins. For example, the output pin of a voltage regulator should already be designated as a “power output” pin and therefore it’s net does not need a power flag. However, if that net were to connect to a fuse or other passive component, then the net that connects to the other pin of that component would need a power flag.

2 Likes

Power flags are not global, nor are they anything like a label. They are nothing more than a pin with their “Electrical type” set to “Power Out”. They allow flagging a net as being driven by a power source. You could accomplish the same thing by editing any pin on the net and setting it’s electrical type to “Power Out”. That however, is usually not a good idea unless the pin is indeed a power source.

But they do connect nets between sheets. They are a peculiar hybrid of label and component

Are you sure you are not confusing the “Power Flag” with the “Power Symbol (Port)”? Power flags don’t connect between nets at all or the op’s example above would have some serious problems.

Yes, its Ports that connect.

TEST.zip (5.0 KB)

Hi,

On the same subject, I have created a very simple schematic, but still it doesn’t detect the connections that are not connected which are 5V and 0V.

Any ideas why ?

Please see attached schematic.

Regards

Gaz

What makes you think they are not connected? And by the way, you’ve changed the grid size which is going to cause you problems. It should be left at the default.

Hi,

I am going by the second comment near the start.

"Because there are no junctions. Place them and then ERC will not complain.

PS. These small circles (or rectangles for some other things) indicate that there is no connection at this point."

Also all connections and lines were made, then the 5V and 0V simple placed on top of the lines. As this is the fault I created on my original full schematic and ERC didn’t pick it up as an error.

Regards

Gaz

Hi again,

Also if you drag the 5V or 0V you will see they are not connected to the wires, as they do not drag the wires with the voltage symbol.

Thanks

Gaz

1 Like

Yes, I see what you are referring to now. You can’t connect a pin, such as a port port, to the middle of a wire. It must connect to a wire end. Edit: Or manually place a junction dot there.

There is no pin on either net that is a power input therefore there is no need for a power output on the net and DRC is satisfied with that. It doesn’t mind that you have orphaned power ports hanging around, which it should in my opinion.

Can this somehow be reported to the Kicad developers ?

As I think its a fault.

Regards

Gaz

I raised this as a Launchpad bug report 4 days ago.
Please note that Launchpad is for Windows and OSX reports, not just Linux

Hi David,

I have added a comment and a link to this page at the launchpad site.

Regards

Gaz