4
\$\begingroup\$

I wanted to connect 2 boards that normally sit on top of each other so I could separate them.

To that end I got a 7x2 pin connector cable with the right (2mm) pitch (there was no M/F for that pitch so I got a F/F and a male header).

When I plug the cable at both ends it all fits, but when power is turned on it doesn't work. It looks like it's not connecting. What could be the reason?

enter image description here enter image description here

UPDATE: It works now, with 2 cables and 2 headers. Thanks, folks!

enter image description here

\$\endgroup\$
12
  • \$\begingroup\$ Are you sure you are matching the correct pins to each other? A straight cable may not be right... \$\endgroup\$
    – Ron Beyer
    Commented Apr 14, 2020 at 1:18
  • \$\begingroup\$ Not sure what you mean by matching the correct pins. I made sure the cable wasn't twisted. What sort of other cable would be needed? \$\endgroup\$
    – JeanB
    Commented Apr 14, 2020 at 1:20
  • 1
    \$\begingroup\$ Did you check with an ohmmeter to make sure there is continuity between the points on one board and the corresponding point on the other board? \$\endgroup\$
    – Barry
    Commented Apr 14, 2020 at 1:43
  • 1
    \$\begingroup\$ To mate the two boards you have to flip the top one, which mirrors its pin layout. The ribbon cable doesn't do that, so either way you connect it will be reversed in one direction. Plug the boards together and mark two pins that are connected. Take it apart and check those pins for continuity with the cable installed. \$\endgroup\$
    – Austin
    Commented Apr 14, 2020 at 3:07
  • 1
    \$\begingroup\$ introduce a second cable ... connect the two cables together with a pin header ... that will mirror the pins and counteract the exising mirrored pins \$\endgroup\$
    – jsotola
    Commented Apr 14, 2020 at 8:09

1 Answer 1

9
\$\begingroup\$

Ribbon cable is intended to connect topside to topside like this...

    1   2       1   2
    3   4       3   4
    5   6       5   6
    7   8       7   8
    9   10      9   10

...but your system's boards have one connector on top and mating connector on bottom. In the photo, one of the boards is flipped over 180 degrees, showing the connector that is on the bottom of the board. The bottom connector is wired up as a mirror image of the top connector, but the straight ribbon cable is wired as straight translation. What you have now is like this:

    1   2       2   1
    3   4       4   3
    5   6       6   5
    7   8       8   7
    9   10      10  9

So the odd numbered pins on one board are going to the even numbered pins on the other board.

One way to fix this is with a pair of right-angle headers, 90 degrees + 90 degrees = 180 degrees. This will swap the even/odd pins again. Alternatively, you could unzip the ribbon cable wires and manually swap them, but that's quite prone to error.

Update: As suggested in the comments, a 180 degrees mirror image can be achieved by using a M-M straight pin header, with one ribbon cable plugged into the "top" and the other plugged into the "bottom".

Since it's hard to explain this configuration in words, here is a 3-dimensional model:

board to board connection Original board to board connection is modeled here in yellow, with pin 1 designated by the blue bricks. One connector is on the top of the bottom board, and the other connector is on the bottom of the top board.

connected by ribbon cables with 180 degree flip/rotate Ribbon cable connection is modeled here in red. There are two ways to connect the ribbon cable, both of them incorrect. Ribbon cable is meant to connect topside to topside, and when the top board is flipped over, the resulting connection is swapped odd/even rows or else it is swapped low pin numbers/high pin numbers (but correct even/odd). Both configurations are misaligned.

For what it's worth, I've been burned several times by this kind of problem during my career; I now require that every board-to-board interconnect has to have a master 'system drawing' showing exactly where pin 1 is located -- sometimes pin 1 on one connector on one board ends up being a different pin number on the other board. Hope this helps you work through the details of getting your system connected.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ If the LCD display has the common pinout for 2-row connector, it means that GND and 5V supply voltage has been applied to the display with wrong polarity. The display may not work any more. \$\endgroup\$
    – Justme
    Commented Apr 14, 2020 at 5:22
  • \$\begingroup\$ @MarkU, thanks for the explanation and the images. So I'd need a M and a F right-angle headers? Do they have to have the exact number of pins or can they have more, as long as they are on 2 rows? \$\endgroup\$
    – JeanB
    Commented Apr 14, 2020 at 21:24
  • \$\begingroup\$ It would need to be 2 rows and two 90 degree bends. Extra 'width' is ok, since most likely you have to work with whatever material is at hand. In my mind I see two M-M right angle headers, soldered together in the middle to make a "U" shape, and a ribbon cable (F) plugged into each leg of the "U". (I assume 2 ribbon cable available). \$\endgroup\$
    – MarkU
    Commented Apr 14, 2020 at 22:09
  • \$\begingroup\$ @MarkU, Thanks for the added info. It was suggested above that simply adding a second cable and connecting the 2 cables with a pin header would in effect counteract the mirror effect of the pins. This would be easier for me (no soldering). Do you think that would work? \$\endgroup\$
    – JeanB
    Commented Apr 15, 2020 at 13:28
  • \$\begingroup\$ Yes, see edits above \$\endgroup\$
    – MarkU
    Commented Apr 15, 2020 at 18:20

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.