EESchema has problems with checking ERC for USB-B component

Hello! I’m using KiCad 4.0.7 with corresponding libraries on Arch linux rolling 64-bit. I’ve successfully built the schematics for USBASP programmer and even made PCB for that. After that I decided to change USB_A component on my EESchema document to the USB_B (which looks similar to the USB_A in exception of the small icon). When I tried to check ERC rules I obtained two strange errors. ERC report and schematics are here (sorry, can’t upload files yet). Seems like something is messed with USB_B component in library. Can you help me with these problem? Thank you!

[added by Joan]

ERC report (Fri 22 Sep 2017 01:00:06 PM MSK, Encoding UTF8 )
***** Sheet /
ErrType(5): Conflict problem between pins. Severity: error
@ (177.80 mm,149.86 mm): Pin 4 (Power output) of component J1 is connected to
@ (139.70 mm,147.32 mm): pin 1 (Power output) of component #FLG04 (net 1).
ErrType(5): Conflict problem between pins. Severity: error
@ (139.70 mm,58.42 mm): Pin 1 (Power output) of component #FLG03 is connected to
@ (162.56 mm,142.24 mm): pin 1 (Power output) of component J1 (net 7).
** ERC messages: 2 Errors 2 Warnings 0

This looks like pin mismatches at the symbol level.

How can I fix that manually? Or I should to wait a bit for next update?

That would be done in the part editor.

Here is a screen grab of your main.sch file:

Hard to help with the information you have currently provided.

Hmm, very strange. What KiCad version are you using?
Here is my screenshot

I checked details about USB-B bus in part editor. Pins 1 and 4 set as power outputs, not inputs (as fot USB-A)

1 Like

Not to strange. I obviously do not have all the library parts that you have.

Upload your schematic main-cache.lib and I’ll be able to rescue the part you are using.

1 Like

https://ftp.desolve.ru/ftp/viktor/kicad/main-cache.lib
https://ftp.desolve.ru/ftp/viktor/kicad/main.sch

Short answer:
Change the symbols pin properties on pins 1 and 4 change the “Electrical type:” to “Power input”.

How To:
Mouse the cursor over the USB part.
Depress keys “Ctrl” + “e” on the keyboard.
Mouse the cursor over Pin 1.
Depress key “e”.
Change the Electrical type: to “Power input”.
Repeat for Pin 4.

In the top menu bar of the editor, click the icon “Update current component in current library” (the icon with the green UP-arrow).
In the top menu bar of the editor, click the icon “Save current library to disk” (looks like a book with a 3 1/4" floppy between the pages of the book).

Should be fixed now.

And if that is a KiCad library part, someone should fix it.

Thank you, worked perfectly!
And yes, this is the part of standard KiCad library (‘conn’ library)

1 Like

USB-A connectors are typically used on host devices such as PCs and hubs and supply power to the USB cable. The power pins of a USB-A connector are therefore of electrical type power input. USB-B connectors are typically used on non-host devices and receive power from the USB cable. The power pins on a USB-B connector are therefore of electrical type power output.

The correct way to solve your problem would be to remove the power flags on those nets if you want power supplied from the USB connector. Otherwise, if the device has it’s own power supply then the positive power pin of the USB-B connector shouldn’t be connected at all.

3 Likes

It is interesting to me that I have not seen this approach mentioned before now.

It is also odd to me that the KiCad library allows this part to have it pins set as power outputs, but a single cell battery has it’s pins set as passive. :thinking:

Wish this approach would have been more clearly explained in the past. It is a good method to eliminate the need for the power flags; which are not normally on schematics.

That would be a mistake in the lib.
Care to fix it?

Power flags need to be used if you have a generic connector (one where nobody can say beforehand what it will be used for by the user) or if you have any passive component in series to the power source. (A resistor or inductor of a filter, a fuse, …)

1 Like

Great explanation, thank you! My device (USBASP programmer) consumes power from the USB line so I think the best way to solve the problem is to remove power flags