I wanted to know if power flag(s) will be required in this schematic I am trying to make?
I am basically generating three voltages and providing supply to various parts of the schematic using labels (ie. for eg. first labeling the output of a 3.3v regulator as ‘VCC_3.3’ and then where-ever 3.3 v is required, I am simply labeling the wire connected to the pin as ‘VCC_3.3’). Screenshot as below:
It looks like you have three power flags applied to the node called “VCC”. (That node does not yet appear anywhere else on your schematic except where you have applied the Power Flags.) One power flag is sufficient for that node.
If the output terminals of those AP1117-xx regulators are defined as “Power output”, then no Power Flags are needed on those three supply rails.
If the input terminals of those three regulators are defined as “Power input”, then you should either:
Add a Power Flag to the node that includes the three regulator inputs, or
Define the cathode of the diode as a “Power output”.
Dale
p.s. - The small green “connection” dot below the input capacitor of the 1.8 volt regulator may indicate a drafting error on that “wire”. (Wire ends close, but not quite touching.)
In the schematic, at the Library Editor --> Pin Properties of AP1117 xx; the input pin has been set as ‘power input’ and for output pin it has been set as ‘passive’. Do you suppose I could change the output pin properties to ‘power output’ to solve this issue? Will that have any effect on the global library instance of the AP1117xx component (I dont want that to happen - would like the global library to be in its as-it-is form and will like to change the instances when used in a schematic). Similarly, if I want to avoid a power flag for input, what could I change the pin properties to? Also, the gnd pin(s) of the 1117 have been defined as power input. Should I keep a power flag connected to gnd symbol or can I change the attribute of this pin as well to avoid it.
BTW, why so many options in the ‘electrical type’ of the component pls? As I understand, all the connections ultimately become pins connected to copper tracks only…
The Vo pin of your regulators should be of “Power Output” type. You will need a power flag on your ground net as well as one on the net that connects the diode to your regulator inputs.
It is bad practice to place power flags the way you have done on your schematic, instead place them on the actual power source for that net, in your case the ground of the barrel jack and the cathode of the diode.
I see this advise given a lot and in my opinion is it bad practice. When you need to place another diode on your schematic you’ll often just copy the existing diode. This can lead to hard to find errors later on when ERC complains that you have multiple power outputs connected together.
And what do the copper tracks connect to? Other pins. Specifying the electrical type allows ERC to perform some rudimentary error checking on your schematic.
OK. Summarizing the issue, I need to do the following:
Remove the power flags in my schematic.
Define the outputs of the regulator ICs as ‘power output’ as it ‘Electrical type’. I hope if I do this in the schematic, it will not affect the global symbol properties.
For gnd, connect a power flag at the gnd of the barrel jack. For all the inputs of the regulator, connect one power flag at the cathode of the input diode.
Also, I can use the pre defined power flags viz. 1v8, 3v3 and so on. Are these points correct pls?
Thanks for mentioning the reason for having power flags. In that case, there are several components in my schematic which require power supply viz. a micro controller, LCD display and so on. Should I:
Connect a power flag at the power supply pin of the micro controller, LCD display also? Also, I am using a micro controller symbol which I downloaded from a website. I checked the pin properties of the power supply pins. They are mentioned as ‘unspecified’. What should I reassign them to – power input or power output? Similarly, should I add power flag for the gnd pins also? Presently, for connectivity purpose, I have added labels for connections between the output of the regulator and power supply pins of the components. For the gnd pins, simply connected a gnd symbol.
Several other components have gnd pins. Also at other places, I have used gnd connections. Should I add power flags there also?
You should not need any other power flags as your “power inputs” will be supplied from your regulators which are “power outputs”. And the gnd net already has a power flag. The main reason to need additional power flags is when your power source passes through a passive component such as a fuse, resistor or inductor, etc. In this case ERC will generate an error message something like “power input pin with nothing to drive it”.
I agree, but (as you observed) it seems to have many faithful fans.
In my personal symbol library all of the 3-terminal regulators have the output pin defined as “Power output”, and both the input pin and the ground pin are defined as “Power input”. (The Enable pin, if present, is an “Input”.) These assignments are correct as I understand the ERC operation. I don’t know how these pins are defined in the “standard” KiCAD libraries, or whether they are defined the same way for ver4 and ver5 libraries.
As I understand the “power flag” symbol, it is used to mark nodes which (under normal operation) are involved with supplying power to the circuit. For example, the terminals of a battery are inherently capable of supplying power, so they are defined in the battery symbol as “Power output” and the schematic nodes they connect to do NOT require a “Power flag” symbol. On the other hand, a connector - such as a two-terminal pin header - is not inherently a power source. The pins on its schematic symbol should normally be “Passive” or “Unspecified”. When you put this symbol on a schematic and use it as a power-input connector, it is necessary to place a “Power flag” on the nodes it connects to. This tells the ERC that these nodes are potentially sources of power to the circuit.
As @1.21Gigawatts pointed out, things become complicated when you add components in series with a power rail - such as switches, fuses, OR’ing diodes, common-mode chokes, etc. Then you have to think through the “power flag” problem, and thinking always makes my brain hurt.
The practice of defining a pin’s “Electrical type”, and applying “Power flags” where needed, comes from the desire to perform a rudimentary ERC. I’m not convinced it’s worth the effort; in my work, it has produced many more false alarms than the number of true problems it has alerted me to. However, I continue to use the tool in the expectation that some day it will demonstrate its value.
Is there a definitive guide somewhere that explains power flags? I think I’ve mostly figured out how they work from experimenting and threads like this, but would love to see a formal explanation.