Electrical type of schematic symbol pins (KiCad 4 and KiCad 5)

What are electrical types used for?

The electrical type is used by the electrical rule check (ERC) to determine if you made an obvious mistake. ERC is really quite limited. All it does is read all electrical types of pins connected to a particular net and check their combination against the error matrix.

Example: By default connecting two output pins together will result in an error. (Makes sense as one output can be high and one can be low resulting in a short circuit between the positive supply and ground.)

How to select the correct type (for default interpretation)

To make ERC as useful as possible one needs to take care which electrical types to assign to pins.
The datasheet of your component is a good start for this.

  • Pins through which your component is supplied (vcc, gnd, vss, …) are power inputs.
  • Digital and analog input pins are inputs.
    • Input pins must be driven, see below
  • Digital and analog output pins are output (For digital pins, use this only if the pin is push and pull capable or has an internal pull-up or pull-down network.)
    • output pins can not be connected to other output pins or bidirectional (avoiding of possible short circuit)
  • Certain bus pins (sda of i2c) , … are bidirectional
    • Any pin that can be in both input or output state depending on current system state.
  • Pins for passive devices and pins that are always only connected to other passive devices are passive
  • Pins that are intended to supply power to other devices use power output (output pin of a dc/dc converter, a voltage regulator, …)
    • multiple power output pins can not be connected (avoiding of power supply short) see below
  • Not connected is used for all pins of the footprint that have no function in the symbol. (You can make them invisible to reduce clutter but don’t stack them. Otherwise they will be connected with each other.)
    • NC pins can still be connected in kicad but there will be an error in ERC. Note that stacked NC pins are connected.
  • Open collector is used for open collector or open drain outputs (output pins that need an external pull up)
  • Open emitter are used for open emitter or open source outputs (output pins that need an external pull down)
  • Tri-state is used for output pins that have a high impedance state (high Z) Such pins have the following possible states.
    • High -> low impedance connection to high signal voltage (in most cases the positive supply voltage)
    • Low -> low impedance connection to low signal voltage (in most case GND)
    • High Z -> no connection to anything. (high impedance state)
  • Pins who can be both input or output depending on configuration (a typical GPIO pin) can be either marked as bidirectional or unspecified. See below.

Appendix

“Unspecified” vs. bidirectional for configurable pins

KiCad has a pin type unspecified. This type creates an ERC error no matter what the pin of this type is connected to. It really should only be used to force users to make project specific symbols for components with software configurable pins.

A typical example is a GPIO pin of a micro controller. There is an alternative for a more lenient setup. You can make such a GPIO pin as a bidirectional pin. This weakens ERC but allows the user to directly use the symbol as is in their schematic and still get some use out of it. (Users can also still make a more specific symbol specialized to the final configuration, but they are not forced to do so.)

Another example is the symbol for a generic connector. Here the lenient alternative is passive but unspecified would also be a logical alternative as the symbol designer does not know what the connector represents. (Again unspecified is best used in a setting where one wants to force project specific symbols encoding the real pin type.)

Input pins need to be driven

Pins marked as input need to be connected to something that can drive them. Anything that is not a input or power input pin does fulfill this role.

Connecting Multiple (Power) Output Pins

If you have multiple output pins or power output pins that need to be connected in parallel then you have a choice to make. Let ERC complain about connecting multiple power output pins or give only one of these pins the type output. (The other pins would get the type passive in the later case.)

Such a configuration benefits greatly from being stacked. (all pins on top of each other with all but one pin set to invisible. Make sure the visible pin is the one with the correct electrical type.) The reason being is that if they are not stacked then it would be possible to connect one of the pins marked as non output to something where ERC would otherwise complain. Stacking ensures that this can not happen.

Stacking pins in versions 4.x and earlier
The symbol editor does not like having different settings in a stack. Workaround: finish all settings of the pins while they are not stacked and move them on top of each other as the last step.
(If you open the pin properties of any stacked pin, all pins in the stack get changed by the editor.)

Invisible Power Input Pins

Another special case are invisible power input pins. They are global labels. This is how power symbols are implemented in kicad. Do not use invisble power input pins in any application other than power symbols as they restrict how you can use your symbol. (The use of multiple power lines becomes impossible. Review of a schematic is hindered by connections being invisible.)

Convert symbol from use of invisible power input pins to separate power pin unit (Disclaimer: written for version 4, details in the answers might differ for newer versions.)

When is a pin “power input” or “power output”?

A pin is power input if it is a consumer of power. It is power output if it is the source for power. (outputs of a dc/dc converter, of a ldo, …)
The power flag is used to tell ERC that a pin that is not a power output is the source of power. This is needed if the supply is via a generic connector, or if a passive component is in series to the power supply (a fuse, the inductor of a filter, …)

The direction the current flows alone is not what determines if it is a power input. You also need to take into account the potential of the pin compared to the potential of its counterpart.
Now lets look at the pin with the more positive potential. It is power out iff the current flows out and power in otherwise.
For the more negative pin the current direction is exactly opposite. (The current flows out of the positive pin into the negative pin -> both are power output.)

It gets tricky if the power output side shares a common pin with the power input side. In such cases power input should take precedence. (As the whole circuit will not work if there is no external power provided to the common pin.)

Side note: The current directions mentioned above use the convention of “technical current direction”. In most materials electrons are the charge carriers. Sadly our mathematical models define them as having a negative charge. This means they move (on average) opposite to the technical current direction.


Further reading regarding power symbols:

12 Likes
Electrical Type
Electrical type for SPI device MISO pins?
Library symbols pins
Connection Error
(Start Here) Frequently Asked Questions
Mutiple grounds, vdd, etc
Global label autorouting collides with stacked power pin names
DB62 and Pin Receptacle Symbols
I get ERC error "pin not driven" what should I do?
Resolved - Regarding Rule Checks power outputs tied together
Resolved - Regarding Rule Checks power outputs tied together
Strange ERC errors in schematic
Conflict problem between pins. Severity: error (Yet again!)
ERC Warnings how to overcome it , why is that warning coming
Power rail is not connected in netlist output
How to Modify power lib symbols?
BTS6143 Symbol Error?
Unspecified Component Problem
Help with Transistor, Motor Pad Wire
ErrType(3):Pin connected to some other pins but no pin to drive it
Nd Help with Warning
Please explain electrical type when create new IC pin
ERC Pin Problem
Why are ground pins hidden in the official library?
Tutorial: Introduction to PCB design with KiCad version 5.1 (Getting Started)
Not driven errors
Erc severe warnings
Power pin confusion
Self created symbol displayed differently in the schematic entry
Component appears several times in BOM
Schema button ERC issue
Power Flags and ERC Confusion
Connecting multiple Power Output pins
ERC error question
Schematics Errors, pin driving mismatch
Board is finished, massive list of ERC errors
All VCC become GND
How to connect the tristate pin to GND
Purpose of non-logic pins
What am I doing wrong in Eeschema?
Tutorial: How to make a symbol (KiCad v5.1.x)
Tutorial: How to make a symbol (KiCad v5.1.x)
ERC with symbol providing multiple ground outputs
Any libraries for the W65C816 processor?
Suggestions to improve KiCAD
Importing Eagle Schematic of Adafriut Gemma M0 problems
ERC gives a bunch of errors for multiple ICs connected to SPI bus
ErrType(4) on power pins connected to BiDir pins
Transforming a schema into a pcb
Unconnected wires in Power
ErrType(3): Pin connected to some others pins but no pin to drive it
ERC Checker problems with power line
Barebones ATMEGA328 Circuit and the Conflict Between Pins warning
How do I change path segment?
Component Pins, do's and Don't
V5.99 ERC questions
Floating DC to DC IC ground connection
Pin connected to other pins, but not driven by any pin (Data pins)
Unable to understand errors when ERC
How do you connect connect two pins, electrically
Conflicts with components with hidden power pins
Ground Pins Of Multiple Instances Of Same Symbol Tied Together
Connection pspice diodes in series
ERC ErrType 5 Issue
ERC warnings: "Schematic is not fully annotated." & "SPICE model issue*
Why are certain relevant pins hidden in some schematic symbols?
Electrical rules check problem
Switching off some of the netlist checker ( the Bug button)
ERC with symbol providing multiple ground outputs
About power input/output
Multiple power supplies when using a logic symbol from the library causes a power net conflict
[SOLVED] My PCB for my dspic33 is shorted between power and ground, and I don't know how
Global label not connected to any other global label