Hi. This is my first post so forgive me if this question has been answered already - I couldn’t find anything in my search attempts that matched my topic.
I’ve got the entire schematic laid out in KiCad eeschema - very nice tool, btw - but I’m having trouble getting the electrical rules to pass with respect to the dual power source separated by a diode which acts as a power selection point. Power can come in pin 1 of the USB connector, or it can come in from an external source (voltage regulator). If the voltage regulator is being driven by external power, then it takes priority over the circuit power on the +5V bus, but if not, and there’s a USB cable plugged into the jack, then VBUS drives the circuit.
KiCad gives me the following two issues in the ERC:
Conflict problem between pins. Severity: warning
Pin P$2 (Bidirectional) of component D1 is connected to
pin 1 (Power output) of component #FLG03 (net 54).
Conflict problem between pins. Severity: error
Pin 5 (Power output) of component J5 is connected to
pin 1 (Power output) of component #FLG02 (net67).
Issue one refers to the SS1P3L selector diode, and item 2 refers to the ground pin on the USB connector.
Both of these issues relate to the same thing (I believe) - trying to drive the circuit with two different power sources. Is there a way to get KiCad to understand that the diode protects the circuit from a real conflict?
Reading my answer have in mind that I have never used ERC.
KiCad ERC don’t understand schematic. It only checks pins connected to one net against some rules.
Error 1.
I suppose diode pin should not be specified as bidirectional. Fo me bidirectional are digital ICs pins that can be inputs or outputs and probably ERC has a rule that digital bidirectional pin can’t be connected with power source. Diode pins probably should be passive.
Error 2.
I don’t think connector pins should be specified as power source as connector can be used in many ways. I don’t know what FLG02 is. May be it is PWR_FLAG symbol (I have never used any). If so than such symbols are used to tell ERC that net they are connected to have some power source so if there are some other pin (like J5) being power source than PWR_FLAG is not needed.
I suspect the schematic is an old conversion from eagle, and ERC may be set up a bit differently there. Piotr is right on. I would have written something very similar.
For more background information on how ERC works in KiCad you can just read the official documentation. Either under: "Eeschema / Help or online on https://docs.kicad.org/
Thank you both for the input. I suspect the issue then is how the diode symbol is defined. I’ll check it out - and I’ll read that doc you pointed me to @paulvdh. I’m not really concerned. I’m just a bit OCD and want to get it to agree that all is well.
@Piotr, I have to disagree with you that the connector should not supply power. This is exactly why the diode is in the circuit to begin with - because the USB connector supplies power to the entire module if external power is not supplied to the voltage regulator. So adding a power flag to that net is (I understand) exactly what you’re supposed to do. This is just my opinion of course, and I certainly could be wrong, but it make great sense to me. However, I really appreciate your insight into the possibly improper labeling of the diode pins.
[update] - all that said, I did get rid of one of the ERC issues by removing the power flag from the VBUS line.
Probably in most cases that one USB connector is used in the way to supply power to PCB. But you can always use connector for other purposes.
I have SIGLENT Oscilloscope with HDMI connector used to connect logic state analyzer so I can imagine other oscilloscope using USB connector for something like that. That connector at Oscilloscope PCB will not be power supply.
I have seen in some car specification that some expansion pack adds two USB-C connectors and they also offer USB-C to USB-C cables. At photo it looks as that cables have the same connectors at both ends, but I had no such cable in my hands. So one of connectors is not used as power source to PCB at which it is installed.
I am thinking of it the following way:
If you define connector pins as not being power output and then use it as power supply you can satisfy ERC by adding PWR_FLAGs.
If you (according to your concept) define power connector as power output and then use it that way that it is powered by some IC at PCB (having logically its output defined as power output) you have a conflict and have no way to satisfy ERC.
So I think that things should be defined as they are. Do the connector itself supplies power? If not then don’t specify that yes.
But as I don’t use ERC I don’t care. I also don’t know how other connectors in KiCad library are defined (I use only my own libraries and footprints).
In KiCad you can either define connector pins as “Power Output”, or you can use the “PWR_FLAG” symbol to specify that a net is being powered from “somewhere”, but not both at the same time, because KiCad interprets that as a short circuit between power supply outputs.
I usually prefer to use PWR_FLAG symbols near (generic) connectors, so there is also a visual indication where power comes from, and it’s quick to draw and easy to modify.
When designing a more complex system (for example something bus oriented) Then designing custom symbol for the connector is a good choice and using the “Power Output” on such connector pins helps avoiding mistakes.