Electronic – How to avoid mixing up pins or mirroring pinouts on pin header connectors

headerpcb-designpinout

A chronic problem for me when laying out PCBs is pinout mixups on header connectors — sometimes I will inadvertently interchange adjacent pins or hook pins to things that seem right but aren't, at others I will mirror or rotate the connector altogether from its expected mating orientation. While debugging tools with flylead cables (my FTDI cable and Bus Pirate both have this) or female-terminated jumper wires can be quite helpful when working around this when prototyping, they're quite a chore to use compared to the correct mating connector, and not always possible now that some things (ARM Cortex-M JTAG/SWD, most notably) are migrating to 50mil header pitch from 100mil. Building one-off adapters is also a hassle, and the extra mounting height an adapter imposes is sometimes undesirable from a mechanical standpoint as well.

How can I prevent these problems at the design stage — especially rotated/mirrored pinouts, as they seem to be a bigger problem for me than swapped pins? Also, are there design strategies I can use to reduce the impact of this class of problems in terms of rework/adaptation effort needed? I am doing schematic capture here — I've had this problem when working both with gEDA in the past and currently with KiCAD. DRC and netlisting aren't able to catch these issues because I'm dealing with generic pins on the header side, and sometimes on the "other end" (i.e. the component the connector is wired to) as well — and these problems are occurring in schematic capture — not necessarily at actual layout time.

Best Answer

If you are not already doing so you should make sure to use a schematic capture tool that can then create a net list of the design connections. This can then be fed into the PCB layout tool to specify all the connections. This goes a long way to eliminating issues because:

  1. It is far easier to get the connections down right on the schematic. In particular things are pictoral and much easier to check.
  2. Working in schematic you can deal with connectors based entirely on the pin numbers. It can help to create schematic symbols that have a connection layout that logically maps to the physical connector. This helps with envisioning what hooks next to what.
  3. Working in the pcb layout package concentrates at the start of creating footprints for all your parts, especially connectors, where you take great care to match the part drawing of the datasheet and assign the pin numbers properly. Also make sure the footprint includes markers or special features that indicate pin one position. DO not fall into the trap of using ready made library symbols that may have somebody elses ideas on how the pins are numbered.
  4. It is extremely valuable to have in hand physical part samples, especially all the connectors and their mating parts. These help to visualize the orientations and pin configurations. They also offer a way to measure dimensions that may translate to silk screen outlines but are not specified in the data sheet.
  5. Done properly these steps should almost 100% eliminate having to define net hook up assignments in the layout tool.....which as you have seen can be error prone.