motors interferencing I2C communication with MPU-6050

I’m trying to make self-balancing robot and I’m using these motors:

Unfortunately, they generate a noise which breaks the communication between MPU-6050 and Arduino. I think they are the only cause of this problem because when I turn them off there aren’t any problems with sensor. I2C freezes usually when the robot is shakeing - motors are changing direction of rotation. I use Arduino UNO, and a motor shield from Pololu. Arduino and shield are supplied from USB, but the power supply for motors(12V) is delivered separately from battery pack. So the problem exist despite the fact that uC and MPU-6050 are supplied from another power source than motors. My first thought was that there must be some noise which is induced by motors and it affects 5V and 3V3 lines. I tried some methods of dealing with such problems like soldering 0,1 uF capacitors between terminals of motors. I also tried to solder capacitor between each terminal and case of the motor but none of these methods helped. Then I connected 10k pull-ups to SDA and SCL ports, twisted cables which connect motor driver and motors (high current), but my problem still exist. I cannot go ahead with my project because robot is balancing when it stands steady on the ground but when it is pushed and tries to keep balance by doing quick move it immediately stops working and it must be restarted. Now it can do only very slight moves (when the current is low). I’m thinking of replacing MPU-6050 with some analog sensor, because propably motors won’t affect analog readings.
For now I’d rather stay with my MPU-6050. Does anyone know how to deal with this problem? Maybe somebody had similar…
I would be very grateful for any help.

Maybe try stronger pull ups on SCA and SCL. 2K2 for instance.

Also didn’t help :frowning:

Use a 100 - 300Ohm Resistor (100 if you are going with 3.3V...) in series in the SDA and SCL line. Reduces Ringing and can find this info in the I2C specification.

Hubert, did you ever figure out what the problem is?