Electrical Rules Checker ErrTypes 2 and 3

I’m new at this so I could be making stupid mistakes but yes, I am using PWR_FLAGs :slight_smile:

Uploaded my project files and .erc report here.

Please help me troubleshoot this. I’ll list my pain points for each ERC report item.

  1. It looks connected to me :frowning:
  2. But it’s on a global label?
  3. This represents a USB OTG receptacle that will be disconnected most of the time. When connected, it will supply 5V. (When not connected, an internal battery is used.) So I don’t understand how to clear this error.
  4. Same as above.
  5. Hmm? Looks connected to me.
  6. Same.
  7. The Pi won’t be connected to VCC but will use the USB A plug, J2. So I don’t know how to clear this error.
  8. Same.
  9. Same.
  10. Same.
  11. Hmm? Looks connected to me.

Sincerely, a thoroughly confused newbie :neutral_face:

I solved item 2 by connecting the gate of Q2 directly to the collector of Q1, I don’t think it was a correct error, but it’s gone now.

Firstly, you have quite a few non-connections, you can tell by the small circle (pins) or square (labels, wires). I’ve highlighted some below. Labels have a connection point, by adjusting the properties you can get it to connect in the right place.

For R6, you can place a Junction to connect the wire to the pin. A wire that overlaps a pin doesn’t connect to it.

There are some stylistic points, but I would not worry about those yet.


Some others

The following also applies to SW3 - the wire overlaps the pin, but does not connect to it. The wire must end exactly on the pin.

Labels not connected, need to be adjusted.


Just a note here: Everytime you see a little square or circle around the end of a wire, pin or label it means that there is no connection.

You can also use the “grab” test. press g above the symbol you want to test and move your mouse around. If all wires and labels move with the symbol, everything is connected correctly. If not you have some problems. If you have seen everything, press the ESC key to cancel the grab tool and put the symbol back where it was when you started. (We don’t really want to move something, we only want to see if everything is connected as we think it is.)


Thank you so much! Alright getting closer. The “grab” trick was very useful. Still getting two errors. Here’s version 1.0.1.

And yes, grab trick shows that those two points are firmly connected.

Is it because nothing is connected to the USB sockets?

I have not opened your schematic yet. (My PC works very hard to open it. Don’t know yet why. I try to open it with kicad 4.0.2. Might try a development version later. It’s personal now.)

But i think i know whats going on from your erc log:
You seem to have some pins that are defined as power input. These pins need to be connected to something that is defined as a power output. (You need to supply your pcb.)
Most pcb’s are supplied with a connector. Connectors are not defined as power output. That’s what the power flag symbol is for.
Simply place a power flag where your supply comes in. If you have a passive element in series you need to place the power flag after this element. (Examples could be: A fuse, a series inductance of a filter, a switch, …)

1 Like

I hope you’re not expecting this to become anything useful in the layout, as this ‘To RTC alarm’ track will just vanish when the netlist is being generated.
If you want a pad there you have to put a 1 pin connector into the schematic.


I now know why my kicad could not open your files.
You have absolute windows paths in the project file. (for defining where your libraries live.) This kills my linux somehow. Well at least now i know that aswell. (Will look into that tomorrow. Maybe get the newest stable version running and test it out there.)

I understand the problem you have now. (At least i understand what erc complains about.)

The second error comes from the second usb connector. It’s vbus pin is defined as power input aswell.
The symbol is designed such that it is indented to be used for boards where your pcb supplies the outside world. You use it to supply your board if i see this correctly. So you can either ignore this error. place a power flag at this pin just to get rid of the error or design a new usb symbol where you define the pin as passive or power out.

That was the ticket. Since these are not connected on my PCB (only in practice) I edited the components and created my own library. Changed the power input and output pins to be neutral, now passing with no issues.

1 Like

And I just specified them by browsing to C:\Program Files\etc. so I don’t know how I could have done any better with that :slight_smile: I’m on version 4.0.6.

Grateful for your help! Now on to the next step.

Good catch! Fixed. Here’s version 1.0.2, which passes rules checks now.

This software is seriously tight! I have no EE experience and I’m jumping right in.

Well it’s not your fault. But kicad should not die without an error message when it encounters a path it can’t process. This is definitely a bug. I want to try it on the newest stable version just to be sure that this bug is not yet fixed before i report it over at the bugtracker. (Might also test it on a development build just to get a better understanding whats going on.)


Just a heads up, I run a VERY OLD, very OLD, nightly.

I run Windows, and my friend runs Ubuntu, a stable release.

Eeschema would run just fine on his machine, but PcbNew crashed KiCad on launch on a project that I archived on my machine. In the past we have never had an issue sending archived projects between us.

His fix was the newest nightly build, (about 10 days ago), onto his machine from a certain developers PPA; and I don’t remember at this time which one that was.

I only hope this extra information will help in some way.

The path used by @BetterAutomations has special characters in them:

LibName34=D:/My Documents/Chris’s JunQ 2/Better Automations/PCA9685
This line kills my linux (nightly from last year and 4.0.2)

Edit: It’s the spaces in the path. (The spaces after the “My Documents” part! I really don’t know why this should be. If the space in “My Documents” works why should spaces later on matter?!)
Just to clarify:
This works: LibName34=D:/My Documents/Chris’sJunQ2/BetterAutomations/PCA9685
This does not: LibName34=D:/My Documents/Chris’s JunQ2/BetterAutomations/PCA9685

Normally you should add the directory where your libraries live to the search path and add the libraries relative to the search path. This way sharing your project with others is a bit easier. The person you share the project with only needs to copy the directory containing the symbols to a convenient location and only needs to edit the search path. (The search path can also be relative to your project location. Makes sharing a lot easier if both the libraries and projects are in the same version control repository for example.)

Here a screenshot that hopefully explains that a bit better. (Screenshot is taken with a development version! Small details might differ in the stable release.)

1 Like

So, newbie error. Will fix that before sharing again. Thanks!

Still, I would think the developers would want the software to be better able to handle situations like this.

I encounter similar problems both in publishing projects, and also trying to use projects others have shared. Nearly always there are some libs missing that need to be chased down or paths fixed in config.

I think all software encounters similar problems, so the question is, what is a good way to handle it? Ideally something simple to use but also simple to implement.

In this instance the program is hanging, I gather because of missing paths. So a try: (…) except: should be able to handle that nicely.

I’m only an intermediate Python programmer and I don’t know this code at all, so I could be way off.