Power Pin Not Driven problem

If one runs DRC on the attached schematic there is an error requiring PWR_FLAGs on U3 and U4 (e,g. “power pin not driven”.) PWR_FLAGs are always a bit vague to me. I have them where I would expect on the power inputs to the system (page1) but I don’t see why they would be required on U3 and U4.

What am I missing here?
PWR_problem.zip (211.7 KB)

thanks
Fritz

Do some quality reading about what the PWR_FLAG actually is and does instead of running circles in your own assumptions. Once you Know what it is, (instead of having a vague idea), then their use also becomes clear and logical.

In short, A power input (such as power and gnd pins of any IC) must get power from somewhere, and ERC expects them to be connected to an Power Output of some other part (such as a voltage regulator. But a circuit does not always have voltage regulators, Power can for example come directly from a connector. In this case you can put a PWR_FLAG symbol near those connector pins, to indicate they are to be treated as the place where power come from. (Or more correctly, the PWR_FLAG can be put anywhere on a net to suppress the “Input Power Pin not Driven” DRC violation. But because it is supposed to indicate the origin of the power, I prefer to put the power flags at the location where power comes from.

It is also written about many times before. See for example this FAQ article:


About your circuit around U3 and U4…

Those circuits do not make much sense to me.
First they’re different, as the input of U4 is always connected to +12V, while U3 is never connected to power.

Second I expect both circuits are supposed to be the same, and your expectation is that they are current sources which can be turned on or off from your microcontroller. If that is your goal, you have to connect pin 2 of the DMP3056 to +12V and then go from pin 3 of the DMP3056 to the LM317.

100kOhm is also a bit much for a LED powered from 12V. That would result in bout 100uA of current. Is that your intention?

1 Like

Thanks Paul. The document I read some time ago was:

is there another?
I am not clear for example, if I have PWR_FLAG attached to one side of a battery-then an intervening SPST switch. Do I need another PWR_FLAG on the other side. In the document mentioned the title " Power pins and power flags" does not seem to discuss this.

Regarding the schematic I sent–lets try again—I think I sent an older work version (sorry).
CPICS_layout_rev4.zip (458.9 KB)

I still get the error on pin VI of the LM317. This pin is marked “input”. SO–do I need to put a FLAG on any pin marked input for example?

Fritz

I was curious so, I replayed section of your schematic… and had same problem. I re-configured it to simplify/problem-solving (added LED’s and Labels…) and, the recommended Adjust circuit section.

I normally use Labels and/or NetLabels and never had problems until I tried the LM317

I kept getting errors on Pin3 of every LM317 and other LM’s - could Not stop it from occurring.

So, I replaced LM with 2N7002 and No problem with any pins… Thus, I think the problem is the LM parts in Kicad… No, a 2N7002 is not the part you want for this circuit - it’s just a problem-solving test…

I left the circuit with a mixture of Labels, I also removed the GND Labels and added Net Labels for the GND, still No problem if Not using LM317… The circuit below shows mixture of how I left it… and image showing No errors…

Hmmm-happen to be drinking black coffee at the moment while I work!
Regarding your test: If you bring up the Symbol Editor for 2N7002 it has passive and input pins. I think the problem with LM317 is it has pin 3 designated as a “Power_input”. So probably KiCAD wants this pin to have a power designation. My work around was to redraft LM317 without the “Power_” designation.
This of course brings us back to the whole “PWR_FLAG” issue. I respect Paul’s comments regarding reading the doc and other posts but I had done that. I am still not clear exactly how KiCAD wants all these designators to interact. It is trivial to just add the flag to pins designated with the “Power_” but I don’t really like doing that without an understanding.

Thanks
Fritz

I replaced the Power Input to just Input and no problems/errors.

I never use stock parts - I don’t trust them.

I have to agree with BlackCoffee here. Declaring the input of a voltage regulator to be a power input was not the smartest idea of the symbol designer.
Good thinking.

I use power regulator chips like the 7805 with Power input pins and never have any problems.

The rule is simple, a Power input pin must be driven by a Power output. If not, then a PWR_FLAG is required. Batteries and another voltage regulator are Power outputs, but connector pins and bridge rectifier outputs are not. Just restating what Paul and the various documents have said.

I actually did have a look at OP’s circuit. There are various design mistakes in it and I doubt it will work as is. In the case of U3 there is no power at all into it. In the case of U4, it’s supposed to be driven by +12V but that power symbol is connected twice. On ERC is a warning that +12V is on the same net which has the global label SWITCHED_POWER and that SWITCHED_POWER wins. There was discussion of the precedence of power pins and global labels in another thread. So I’m not sure that U4 is connected to a Power output even with the +12V symbol on the net.

Since I didn’t want to delve into debugging how the circuit is supposed to work, I gave up.

Yes, but that’s because you them as they are: voltage regulators.
But the LM317 and similar parts can be placed anywhere in a circuit, for example as current regulators with no connection to the power supples.

That’s no different from connecting it to the output of a bridge rectifier and smoothing capacitor, there is no Power output on that net either, so a PWR_FLAG is needed. It’s simply a matter of understanding the rule behind the message and taking the appropriate step.

1 Like

retiredfeline…
Sorry for the confusion–the circuit you probably are looking at was an old one I had started making from “something else” and when I uploaded my final design this one got sent instead–not sure why. At any rate if you look at my posts I resent the proper circuit I intended to discuss. In fact this one has been boarded and running for a few years without problems but it was in Orcad and I wanted to move it to KiCAD.
I am still not clear how a regulator inputs differ from an input relayed via a FET for example or why KiCAD considers a difference here. And I don’t see much about this in the doc.

Thanks for the input
fritz

Look, I’ll let you in on a tip: Nearly always a power rail, including GND, will need a PWR_FLAG. The exceptions are when that rail is driven by: a battery, the output of a regulator, the output of a power module say a boost converter, and any other symbol that presents a Power output pin. If you are in doubt, attach the PWR_FLAG and if it wasn’t needed you will get a different ERC error saying that more than one Power output is driving the net.

The rule is simple: if there is a Power input pin on a net, then there must also be one Power output pin in the same net. Forget about electrical conductivity. Zero ohm resistors, jumpers, solder links, fuses, highly conductive FETs, and all such symbols will result in distinct nets. The ERC rule is very simplistic and not smart so same net.

Editing the input pin type of the voltage regulator, may get rid of the immediate problem, but what do you do about all those logic ICs and MCUs whose power pins are of type Power input? Are you going to edit all those symbols too? Once you have grokked the ERC rule, it’s second nature to assign PWR_FLAGS correctly.

Thank you Retired.
I think the bottom line in this is your phrase “Forget about electrical conductivity. …FETs…will result in distinct nets.” I was looking too much at the operation of the circuit e.g. the conductivity. I think the attached zip summarizes this- the power flag connects to the converter in the 2nd case.
Looking back on this I think my confusion was abetted by the fact that many power device symbols such as converters just have all the pins marked “passive” or “input” hence I was using them without adding power flags.
Thanks for your help!
P.S. why do kitties always insist on sitting on the circuit board you are working on?

fs
temp.zip (598.5 KB)

They’ve figured out how to get your attention. Think humans are the apex species? Nah, kittens are. :smirk_cat: :wink:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.