EEVblog Electronics Community Forum

Electronics => PCB/EDA/CAD => KiCad => Topic started by: YurkshireLad on March 12, 2021, 10:00:10 pm

Title: Rules checker fails for barrel jack
Post by: YurkshireLad on March 12, 2021, 10:00:10 pm
I'm trying to add a barrel jack to my schematic, but I'm not sure how to wire it up. It's currently wired as shown in the attachment, but KiCad's rule checker says:

Pin 3 (power input) of component U1 is not driven (net 5)
Pin 1 (power input) of component U1 is not driven (net 7)

I assume I'm doing something wrong but I can't work out. Any suggestions appreciated.
Thanks
Title: Re: Rules checker fails for barrel jack
Post by: golden_labels on March 12, 2021, 10:12:57 pm
The type of pins 1 and 3 of LM1117 is “power input”. Nets that connect to those pins must be connected to the PWR_FLAG element (from the “Place power port” button).

Title: Re: Rules checker fails for barrel jack
Post by: YurkshireLad on March 12, 2021, 10:50:04 pm
Thanks. I put it after the diode, if that makes sense.
Title: Re: Rules checker fails for barrel jack
Post by: retiredfeline on March 12, 2021, 10:57:48 pm
There's a FAQ with far more detail than you might have bargained for here: https://forum.kicad.info/t/errtype-3-pin-connected-to-some-others-pins-but-no-pin-to-drive-it/10946

Although most occurrences are related to power handling components, sometimes they are not so I prefer to think of PWR_FLAG as a Relax, ERC, This Net Is Driven flag.
Title: Re: Rules checker fails for barrel jack
Post by: golden_labels on March 13, 2021, 09:38:19 pm
I put it after the diode, if that makes sense.
Yes, this is the net that must be flagged as providing power.

In this schematic it may seem as a nuisance that is cluttering the diagram and the PWR_FLAG is placed near the component only to tell ERC to shut up. But this is not the case for larger circuits. In such scenarios you will have a power supply section, which will provide power rails to the rest of the circuit. Those rails (nets) will be marked as supplying power only in that section — nowhere else in the schematic. Also note that voltage regulator components usually have their outputs marked as power outputs, so no additional PWR_FLAG is needed.
Title: Re: Rules checker fails for barrel jack
Post by: YurkshireLad on March 13, 2021, 09:44:43 pm
Thanks all.
Title: Re: Rules checker fails for barrel jack
Post by: phil from seattle on March 15, 2021, 03:36:57 am
Sometimes you just have to ignore ERC/DRC. In the end, it's your design and you should understand what works and what doesn't. There are a number of symbols out there that have questionable choices of pin type. Knowing the circuit, I just ignore the error.  Also, I have a couple of connectors that the courtyard is just a little too large and gets flagged in DRC when I butt them together. Since I know it's not a problem, I don't bother to go back and update the footprint. It forces me to go and verify spacing.