Shield stacking headers for Arduino causing bug?

I'm building a distributed multiaxis robot (8dof) using UNO (5 UNO boards, 4 twi-slaves, 1 master) and motor sheilds. The motor shields come with square pins to be soldered in place to mate with the UNO female sockets, through which the analog and digital lines pass. If you want to use some of the unused lines, you can replace the male pins on the motor shield with shield stacking headers, which both makes the connection to the female socket on the UNO and provides a female socket on the motor shield. I did this so I could use analog 4 and 5 for TWI (I2C) to comm b/t UNO boards and thereby coordinate robot motion.

If you look at a standard male header connector, the pin is square in cross section. If you look at the metal portion of the female part it mates to,
it is a 'fork' which squeezes the male at two contact points. The plastic part of the female guides the male such that the contact points are centered on the male.

The stacking header male pins are rectangular in cross section, with the thin part of the pin oriented against the pins of the fork of the female
part. If the alignment between the female and male is perfect, it works. If there is a slight misalignment (as might occur when soldering the stacking header), the pins do not squeeze the male, the connection is formed from surface contact between the plane of the male and the plane of the female, and the connection is inconsistent. Ergo an intermittent I2C signal.

I've tried resoldering to align the pins better. I've tried adding conductive grease (no-ox-id) to the socket. I've tried creative profanity. The I2C remains unreliable...it works intermittently. If I take the motor shield off, I2C works perfectly.

I'm considering soldering directly to the UNO board, which would be a shame as it makes the system less maintainable. If anyone has a better idea, please share!

--Xnloder

Maybe the motor shield is drawing too much current and disrupts the I2C signals. Have you pull up resistors on the SCL and SDA line?

Have you tried simply soldering the connections, instead of stacking the shields? Is there a particular reason you are using shields in such a project? Do you intend to reuse the Arduinos after you are done? If not, then a more permanent solution is called for (likely in the form of integrating the shield components and the arduino components together where it makes sense). Think of the Arduino and shields as an "alpha-level" prototyping solution; once you know something is working at that level (and you -know- the intermittents are being caused by contact issues), then the "beta-level" prototype should be made using standalone components soldered to perf-board, with connections made between boards using soldered jumpers wires/cables, or positive-contact connectors designed for the purpose.

Robtilaart: yes, 2.2K pullup resistors. The problem isn't current dependent since it occurs when the motor shield has no motors connected.

cr0sh: Soldering was the next iteration of will-this-fix-it, but I was hesitant since it makes subsequent evolutions more difficult. However, difficult evolutions cannot take place unless and until this obstacle is overcome, so out with the iron...

What is a 'positive contact connector'? Do you have a source/item in mind that might give a reliable signal and still allow disconnecting the UNO&motor shield (preferably with 2.54mm pin spacing).