8
\$\begingroup\$

Update/significant change:

The question below is based on a false premise: taking into account that an IDC with keys pointing out from the cable on both ends swaps the front and back rows, simply rotating one of the connectors gives a 1 -> 1 mapping (thanks @DiBosco for pointing this out). The only remaining difference is that the notch of the connector on one of the footprints has to be on the opposite side relative to pin 1 as compared to the other.

I do believe that the fact that I readily made such an error in my thinking, which would have led to a pair of incompatible boards, shows that the following question is relevant:

  • When making connectors between PCB's, given the orientations of the connectors and the PCB's, and optionally the type of cable used to connect them, how does one make sure that the pins in the connectors are mapped correctly, before manufacturing the boards? For an example where the mapping is non-trivial, if I use two double row SMD connectors, one male the other female, using the same footprint on both PCB's (i.e. same pin numbering when viewed looking into the connector), and directly connect the PCB's (no cable), I do need to swap even/odd numbered pins on one connector relative to the other.

Also, related to the original question: now I still need to have two footprints, or I have to specify externally for assembly that the relation between the notch and pin 1 is different between the connectors on the two PCB's. Is there any neat way to deal with this?

Original question

I need to connect about 24 signals (give or take, depending on how many pins to dedicate to ground and power) between two PCB's. My current idea is to use a 0.050" ribbon cable with IDC connectors on ends (although see the end of this post).

When in use, the two PCB's will be laid side to side, and if I then place the connectors in the same position, and I want them to be keyed (say, a shroud with a notch on the side of the odd numbered pins), and connect the ribbon cable, I get something like this is wrong, I'm leaving it here for reference:

schematic

simulate this circuit – Schematic created using CircuitLab

i.e., pin 1 goes to pin 23, pin 2 goes to pin 24, ... and so on. The notches on the shrouds are on the side of the odd numbered pins.

My question is: while I can of course figure out the correct pin mapping by simply finishing the picture above, I feel it is a bit error prone (since there's no ERC or DRC checks across the two PCB's in my EDA). Also, I would imagine I'm not the first one to come across this problem, or one of a number of related pin mapping problems (say, stacking boards with connectors on facing sides). So I'd like to find a resource which would give the correct pin mappings for this, and preferably other related problems, but my google-fu has not been strong enough. Is there such a web site?

P.S.: any suggestions on better ways to connect the PCB's are welcome. PCB space is at a premium, I was just able to fit a 0.050" SMD -connector, but on the other hand the connection will be made by the end-user, so it must not be too fragile or difficult to connect. The device is a eurorack modular synth, so the user is familiar with connecting 0.100" IDC for the power, which is why the smaller IDC would at least bring some familiarity to the user. Currents and frequencies are rather small, < 50mA and < 1MHz.

Update:

  • an optimal format for the answer would be a footprint file (let's say KiCad, since that's what I'm using) that would give two footprints with differently numbered pins such that 1 -> 1 would give the correct result. The next best thing would be a table of mappings, which while error prone, would save one step where mistakes could be made.
\$\endgroup\$
10
  • 2
    \$\begingroup\$ I don't follow. If you have standard IDC connectors and box headers they are keyed and you can't get them the wrong way round. Why would you not then just connect 1-1, 2-2, 3-3 up to 24-24? \$\endgroup\$
    – DiBosco
    Commented Jan 3, 2018 at 14:43
  • 1
    \$\begingroup\$ I just don't understand why you'd turn it through 180 degrees though. Edit: OK, I see what you mean, 180 degrees to how it is now. However, it's not true to say they wouldn't be 1-1. \$\endgroup\$
    – DiBosco
    Commented Jan 3, 2018 at 14:45
  • 3
    \$\begingroup\$ It could be 1-1 ... 24-24 If you decide it to be like that. How do you think they specified the pinouts for the old IDE hard drive ribbon cables, for example? Do you think the pinouts were different from the motherboard perspective and from the HD perspective? No. They were the same. \$\endgroup\$
    – dim
    Commented Jan 3, 2018 at 14:49
  • 1
    \$\begingroup\$ Whereas it can get confusing whn you plug female connectors into males, especially with DIN 41612 due to some of the odd numbering conventions with certain variants, if you're sticking to IDC, even plugging PCB males into PCB females, as long as you follow the datasheet and number 1-n in the right way for both connectors, as long as you connect 1-1 on schematics you can't go wrong. The important thing is to ensure you read the datasheets correctly and number the pins correctly. \$\endgroup\$
    – DiBosco
    Commented Jan 3, 2018 at 15:13
  • 3
    \$\begingroup\$ You're starting to get it right. However, the hypothesis you now make: "the notch of the connector on one of the footprints has to be on the opposite side relative to pin 1 as compared to the other." is still wrong. The notch will be on the same side (relatively to the pin nr 1) for both connectors. The footprints are the same on both PCBs. It's just that, on the cable, the ribbon will be on the right of connector A and on the left of connector B (opposite sides), while the notch will be on the same side for both connectors. \$\endgroup\$
    – dim
    Commented Jan 3, 2018 at 16:24

2 Answers 2

9
\$\begingroup\$

Here is how you should do. It is actually very straightforward. The PCB footprint is the same on both sides, and the numbering is the same too.

What you had wrong, probably, is that you weren't considering having the notch underneath the ribbon for one of the connector (and only one).

enter image description here

\$\endgroup\$
15
\$\begingroup\$

This is a common issue when interconnecting boards with ribbon cables if you do not think it through properly. There is no real resource for this, other than anecdotal answers like this one. Your proper method is to have the actual parts in hand when you are designing your system and see/understand how things are going to fit together and what that requires for the schematic design.

If you use vertical connectors it is not so much of an issue, you simply need to ensure that Pin1 is oriented in the same direction on both boards when they are in their final relative positions.

enter image description here

The cable is then simply constructed as shown in Dim's answer.

If, however, you use right angle connectors things are different.

Since you want the cable to exit from the edge of the board you are pretty much forced to rotate one of the connectors relative to the other one.

enter image description here

The schematic wiring then needs to be reversed on one of the boards and the ribbon cable needs to be constructed differently, as shown below.

enter image description here

enter image description here

When you get it wrong

Unfortunately, if you do that wrong, there are only three "quick" fixes and that all require twisting the cable through 180 degrees on its way to the target.

Fix 1: Remake the cables so you have to twist them correctly.

Fix 2: Move the right angle connector to the back of the board. This basically flips it 180 degrees.

Fix 3: Swap one or the other to a vertical connector and rotate it 180 degrees.

The other fixes are...

Rotate one or other of the boards so the connectors are pointing in the same direction and use a longer cable, or flip one of the boards and mount it upside down. But that of course will depend on what else is connected to it.

If worst comes to the worst, ditch the ribbon cable and use stranded wires in headers and integrate the polarity change in the harness, or design and have made a gender bender adapter board to go in between.

Ultimately, you need to redesign one or other of the boards to change the pin numbers on the wires going to the connector to be the other way around.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Doin' the Lord's work with this answer here...Great explanation! \$\endgroup\$ Commented Mar 20, 2020 at 15:17
  • \$\begingroup\$ Referring to your first picture, I've just seen an IDC header that appears to place conductor 1 at top-right instead of top left (when seen from above) which swaps every pair of pins compared to the usual convention. Do you happen to know what that would be called? \$\endgroup\$
    – Alnitak
    Commented Aug 6, 2020 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.