The battery-LED circuit at the top is supposed to not generate ERC errors. However, if I create it in KiCad 5.0.2, I do get errors, namely: ErrType(3): Pin connected …
Upon inspection with the Symbol Library Editor, I find that in KiCad 5.0.2, the pins of the battery symbol are passive instead of Power output as depicted in the aforementioned topic.
Why has the pin type for the battery symbol been changed?
Now I need to add the PWR_FLAG symbol to the schematic, to +3.3V, and to GND. This seems superfluous, but it’s necessary to avoid ERC errors.
Furthermore what I find confusing: +3.3V and GND are also power flags. So I need to add a power flag to a power flag to make it be a proper power flag.
The pwr_flag symbol is very different to power symbols! Power symbols create a global label. The pwr_flag symbol does not. Power symbols demand for a power source to be present on that particular net. The pwr_flag symbol is one way to tell kicad where the power comes from.
That was written long enough ago that I don’t remember the timeline of events and details. As @Rene_Poschl pointed out, not having the cell symbol having it’s pin types set as outputs is probably an oversight; one that I figured would be corrected by this time.
Unless it is a dead battery, on paper, the pins of the cell, or battery, will certainly be of type output; just lick the top posts of a 9V battery to find out!
Anyways, this is a good example of a specific symbol that can easy be changed and allow the schematic to pass ERC without adding Power Flags. Other symbols, especially connectors, are probably not going likely for users to want to edit to have a custom symbol for every schematic that has power introduced via a generic connector.
There is a third option: @Evan_Shultz pointed out in GitHub issue #1635 that batteries may be charging! That is the explanation why the pins are not power output. A nice solution could be to have additional symbols for non-rechargeable batteries.
It is my opinion that a separate symbol for a rechargeable battery be made with the pins defined as Power Input. And, possibly a third symbol for a battery that is used in something like a UPS where it is both the output and the input.
It does seem that if at least there were two symbols it would be more likely for a user to work out what is required to get the pin types set to make the circuit compliant with the ERC.
Or maybe one wants to build a battery of cells in series. For example, You want 6V from coin cells? Use two CR2032, each with their own socket and thus needing their own symbol. If the batteries are all power-output pins then you get an ERC error between the batteries.
Yes, I know there are two cell CR2030 holders out there, but what if you want +3 and -3 for an opamp? Too many possible compinations. Just how many battery symbols do you want?
My vote (if I even get one) is keep the standard library battery symbol with passive (or power input) pins, and if you want battery symbols with power output pins make your own.
That is the problem here to be honest. ERC is simply not strong enough to give us a satisfactory solution here. And i have no idea how to solve it.
One option would be to go the way eagle went and simply do not check for power supplies. The other is a better communicated interface for the power flag. (Having it in the same library as the power symbol is most likely a source of confusion for many. Maybe it should be its own thing like the no connect thingy.)
And with what name? Calling them chargable/not rechargeable will result in the problem with the series connection. Calling them by pin type will mean users will be totally confused.
As stated above i think a true solution would be a better alternative to the power flag symbol. That would make this tool a lot more powerful.
I don’t think this will be that big of an issue. There is a difference between a single cell symbol and a battery symbol.
So, that would make four (4) symbols:
Cell
Cell, rechargeable
Battery
Battery, rechargeable
The reasoning is just to make it clear that there is a distinction in the symbols and their interaction with the ERC for a circuit that is just a single cell and an LED.
I now remember why I changed the symbol in my library. It was done to demonstrate KiCad to the members of the Maker Space without having to introduce the Pwr Flag. The Pwr Flag really does not make much sense in a circuit where the LED is powered by a single cell (battery).