A big setback and a solution
The quality of these motors is all over the map. I have been prototyping with better motors than I could get wholesale. One major difference is a set of three EMI suppressor caps assembled as a single ceramic plate mounted on the rotor. Between any two of the three rotor poles, I measured about 5.8nF of capacitance. That is equivalent to three 3.9nF capacitors in a triangle. That’s the good motor I have been prototyping with.
The wholesale motors didn’t have this ceramic plate or anything else to suppress EMI. They generate a ton of noise in the Arduino. The Arduino’s I2C bus is notoriously sensitive to switching noise (see http://forum.arduino.cc/index.php?topic=175312.0). Moreover, the Arduino I2C library does not timeout if the I2C hangs for any reason, thus crashing the entire system. Fortunately, another I2C library has been offered and works well.
Classically adding a 0.1μF capacitor just outside the motor doesn’t help. The real fix is brutal: dismantle each motor, add three capacitors, put the motors back together. That’s 33 hours of labor on top of everything else.
On the upside, the balancing and rotation are slightly improved, and those cheap motors in other respects are better for balancing. And Lil’Bot found a new friend at the Hacker Dojo:
This extra labor (and three frustrating days going to the root of the problem) may or may not cause a delay in the robot deliveries. I don’t think that will be too severe.