cuprio

What is an electrical rule check (ERC)?

An electrical rule check (ERC) is an automated review of a schematic that looks for connections that cannot be right: pins left floating, two outputs driving the same net, power inputs with nothing supplying them, labels that connect to nothing. It runs before layout, when a mistake costs a minute to fix rather than a board respin. ERC works from the electrical type given to every symbol pin, so its results are only as good as the symbol libraries.

  • 3 min read
  • 5 sections
  • 2 sources

What does an ERC check?

KiCad's ERC reports unconnected pins, unconnected hierarchical sheet pins and labels, shorted outputs and other illegal combinations of pin types. The heart of it is a pin conflict table: for every pair of pin types (input, output, bidirectional, tri-state, passive, power input, power output, open collector, not connected and so on) it says whether connecting them is fine, a warning or an error. By default an output connected to another output is an error, while two passive pins connected together are fine. Altium calls the same table the connection matrix and offers four levels: no report, warning, error and fatal error.

Each violation is placed as a marker on the sheet (KiCad draws warnings in yellow, errors in red and excluded items in green) and listed in a report you can save with the design.

Why does ERC say a power pin is not driven?

This is the most common ERC message. A chip's supply pins are typed as power inputs, and ERC wants every such net to have a power output on it. When power enters through a connector, a battery holder or a jumper, those pins are usually passive, so ERC sees no source. The fix is to mark the net with a PWR_FLAG symbol, which is simply a single power output pin, or to connect a real power output such as a regulator's output.

Ground often needs its own flag even when the supply rails do not: KiCad explains that regulators declare their outputs as power outputs but their ground pins as power inputs, so several regulators can share a ground without conflict. Power also does not pass through components, so a rail after a series ferrite bead or filter needs its own flag.

How should unused pins be handled?

Place a no-connect flag on every pin that is meant to float. It tells ERC the open pin is deliberate, and it documents the decision for whoever reviews the schematic. Check the datasheet first: many unused inputs must be tied high or low rather than left open, and ERC cannot know that.

What can ERC not catch?

  • Wrong component values, such as a pull-up that is too strong or a capacitor with the wrong voltage rating.
  • Logic-level mismatches, such as a 5 V output driving a 3.3 V-only input.
  • Symbol-to-footprint mapping errors. Symbol pins connect to footprint pads by number, so a symbol whose numbers do not match the package passes ERC and fails on the bench.
  • Pins typed wrongly in the library. KiCad's documentation stresses that ERC quality depends directly on how carefully pin types were assigned.
  • Anything physical: spacing, trace width, routing. That is the job of the design rule check on the layout.

How does ERC fit into the design flow?

Run ERC until it is clean or every remaining item is understood and excluded, then generate the netlist that carries the connections into layout. KiCad's DRC can later test the board against the schematic for parity, which closes the loop between the two checks. Cuprio checks the schematic with electrical rule checks before the board is placed and routed.

Sources

  1. KiCad 9.0 documentation: Schematic Editor

    What ERC checks, pin conflicts map, markers, PWR_FLAG, ground flags, no-connect flags, pin types, pins matched to pads by number

    docs.kicad.org
  2. Altium Designer documentation: Project Options, Connection Matrix

    Connection matrix, report levels, output-to-output error, passive-to-passive allowed

    altium.com
Close view of the two-wheel robot controller, a board designed in Cuprio

Be first in when we open.

Start with 600 welcome credits and get 30% off your first 12 months.