When you finish a schematic and are ready to begin the PCB layout, you should perform an electrical rules check (ERC) on the schematic to catch certain basic  mistakes. As humans we are liable to make mistakes or forget small details, especially in very large projects. The ERC helps us catch many of these little mistakes.

Before we can run the ERC, we have to make sure the rules and connection matrix are properly configured. Right-click on your project file in the Projects pane and choose the last menu item: Project Options.

The Connection Matrix

The second tab in the Project Options dialog box is the Connection Matrix for the ERC.

The default ERC connection matrix for new Altium Designer projects has always been problematic since the earliest days of Protel. Part of this stems from having an incomplete array of connection types.

Altium Designer Default Connection Matrix
Altium Designer Default Connection Matrix

It is permitted to have as many inputs in a net as you wish, but having multiple outputs (driving sources) in a net is a conflict and should generate errors. Since IO pins may function as outputs or inputs, having outputs on them only generates a warning. However bidirectional ports are logically chosen for your application and therefore, if you have specified a port to be bidirectional, you don’t want outputs on it, so it should generate an error, unlike an IO Pin.

Note that within a sheet, an Input Port (into the sheet from another sheet) is actually an output (into devices on the sheet) and an Output Port (out of the sheet to another sheet) is actually an input (from devices on the sheet).

If you have a flat hierarchy, it could result in having multiple Input Ports (outputs) on the project as a whole. In this case, you could either disable the report on Input Port to Input Port or alternatively place a No-ERC on the affected nets, however I don’t recommend using flat hierarchy with ports. If your project is simple just use global netlabels. If your project is complex enough to justify ports, use heirarchical with a master sheet with sheet symbols.

For the sake of the absence of missing types of ports, Unspecified Port and Unspecified Sheet Entry are treated as Power Port and Power Sheet Entry as apparently Altium expects that by default. To be picky about it, every type of pin should be reflected as a port and sheet entry. If the output of my sheet is an open collector output, why can’t I specify that?

Open Collector Pin, Open Emitter Pin, HiZ Pin, and Power Pin do not specify direction (input or output), though apparently a direction is implied, particularly given Altium’s default ERC matrix and the driving source warning excludes these types. Except for power, the implied direction for these types is output.

HiZ Pin implies an output which can be disabled, but not function as an input or it would be IO Pin. Inputs are assumed to be high impedance, so there is no need to specify that. HiZ Pin avoids the error of multiple driving sources on a net when those driving sources can be disabled.

Open collector outputs can be used to drive open emitter inputs and vice versa (though you should have a resistor in between them). The default ERC implies these are outputs, except you are allowed to have more than one on a net and they’re allowed to be connected to bidirectional ports and sheet entries, while ordinary outputs are not. This means they are used to force a shared line either high or low, but not both ways which would cause a short. For example, you could have a fixed pull-up and a bunch of open collector outputs in parallel to pull the line down.

You should not use Open Collector and Open Emitter as pin types in transistor components because you will get an error if you connect them to a power symbol.

Power pins may be input or output. We can’t make power outputs as regular outputs: you don’t want any digital or analog output to drive into a power rail, and high-power devices often use multiple pins for power output (though you could pretend that one is output and the rest are input since they are all in the same device).

Suggested Changes to the Connection Matrix

Dena Technologies Custom Connection Matrix for Altium Designer
Dena Technologies Custom Connection Matrix for Altium Designer

Flag all Unconnected

Historically, I’ve always used ERC to find unconnected pins due to older versions of Protel not snapping wire ends to pins and not cleaning up wire ends properly. However, even the newest version is still liable to leave disconnections as a result of updating schematic symbols or working on different grids. Since metric schematics became possible, frustrating grid misalignment has become a problem.

The rightmost column in the matrix is Unconnected. Going down, it sets what type of report is generated for each type of pin if it is not connected to anything on the schematic. Right off the bat we can see that Altium doesn’t think it matters if you leave pins unconnected because a lot of them are green (no report generated). I think it matters a lot, especially because I’ve seen a lot of times where pins weren’t connected by mistake, even recently. If you deliberately want to leave a pin unconnected, you should place a No-ERC symbol (X) on it.

The only place I use Fatal Error is for Unconnected-to-Unconnected because it’s logically impossible.

I set unconnected to generate an error for the following pins because inputs, I/O pins, and power pins should not be left floating/unconnected: Input Pin, Input Sheet Entry, Output Port, IO Pin, Power Pin, Input Port, Bidirectional Port, Unspecified Port, Bidirectional Sheet Entry, Unspecified Sheet Entry.

All of the rest of the unconnected pin types are set to warning.

Fix Problems with Open Collector and Emitter

Elevate Open Emitter to Open Collector to Error. I would strongly recommend having a resistor in between such pins if you want to avoid burning something out.

Removed warning on Open Emitter to Open Emitter. It might be a problem if you had different supply voltages to your devices, but one of the reasons for using Open Emitter output is to connect multiple outputs in parallel.

Allow Power to Inputs

Remove warnings/errors on power (or unspecified) to inputs. For example, a very common practice is to connect op-amp positive inputs to ground.

Power Pin to Output Port
Unspecified Port to Input Pin
Unspecified Port to Output Port
Unspecified Port to Input Sheet Entry
Unspecified Sheet Entry to Input Pin
Unspecified Sheet Entry to Output Port
Unspecified Sheet Entry to Input Sheet Entry


Ports Override Pins

Remove warnings/errors on specifically directional ports and sheet entries (all of these changes are actually just to Output Port, which is actually an input and therefore shouldn’t generate any errors). If you’ve chosen a port type for your schematic application, that should take precedence over the functions of component pins.

If I happen to use an IO pin of a device, I shouldn’t have to treat the entire net as bidirectional especially if there is an explicit output on it, which itself gives a legitimate warning. We want to avoid being heaped with multiple warnings in complex nested schematics.

IO Pin to Output Port
Bidirectional Port to Output Port
Bidirectional Sheet Entry to Output Port
Animated Comparison of Dena Connection Matrix to the Default
Animated Comparison of Dena Connection Matrix to the Default

I made an animated GIF to make is easy to see the changes.

Suggested Changes to Error Reporting

Disable Warning for Inputs without Driving Source

Due to the fact that the electrical rules check can’t see through resistors and capacitors, a large number of warnings will be generated due to having no driving sources directly connected to inputs. This default warning is just terribly annoying. None of the many other settings in this list ever seem to be a problem.

Right-click on the project file in the Projects pane and choose the last menu item: Project Options. In the first tab, Error Reporting, scroll way down to the bottom. Right-click on “Nets with no driving source” and choose Selected Off.

Altium Disable Warning on Nets with No Driving Source
Altium Disable Warning on Nets with No Driving Source


Other changes to Error Reporting

Usually I prefer to see fewer annoying warnings/errors, but there are a few cases which I would prefer to be notified of errors:

Component implementations with duplicate pins usage – Duplicate pins in a component is bad.

Unused sub-part in component – This implies floating inputs and missing power supply connections.

Floating net labels – Unconnected things are bad.

Floating power objects – Unconnected things are very bad. How many times do I have to say it?

Object not completely within sheet boundaries – If something is off the sheet, that is bad.

Off-grid object – If someone is mixing standard and metric schematic symbols, it can cause problems with alignment of pins and wire ends. But maybe you just placed a pin on 1-point grid and it isn’t quite aligned.

Run the ERC

The ERC is performed by compiling the project. Right-click on the project file in the Projects pane and choose the first menu item: Compile (your project). You can compile individual schematic sheets, but that may not compile all the sheets.

How to generate ERC report in Altium Designer 15
How to generate ERC report in Altium Designer 15

If you merely Update the PCB, the Messages pane will be filled by the results of the matching process and you will not see the ERC results. If there are any electrical rules violations, they will not stop you from moving on to the PCB layout. At the bottom of the Engineering Change Order dialog, in red text it will just say:

Altium ERC Error Notification in when Updating PCB
Altium ERC Error Notification in when Updating PCB

Warning: Errors occurred during compilation of the project! Click here to review them before continuing.

If there are warnings but no errors, you will not see this prompt at all.

The results of the ERC will appear in the Messages pane. If no errors are found, it will have “Compile successful, no errors found” at the bottom.

Altium ERC Messages
Altium ERC Messages

Warnings and errors may be suppressed by placing No-ERC (X) symbols targeting the specific messages, including unconnected pins. Right-click on the error or warning in the Messages pane and choose Place Specific No-ERC for this violation. You can change the color of the X to light gray to make it less prominent.

Next Topic

A meaningful ERC report depends on components being designed properly with pin types assigned to each pin, so the next post will be about schematic symbol design in Altium.

Configuring and Running Electrical Rules Check (ERC) in Altium Designer
Tagged on:         

Leave a Reply