Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

IMU stops working when running motors

I am trying to build a self balancing robot and I am using the following items:

IMU: MPU6050
Motors (2 pieces): 30:1 Metal Gearmotor 37Dx68L mm 12V with 64 CPR Encoder (Helical Pinion)
MCU: Arduino Uno
Motor driver: Pololu Dual G2 High-Power Motor Driver 24v14 Shield for Arduino

When I am running the IMU without running the motor, the IMU runs will and don’t have any issues. On the other hand, when I run the motors, the IMU freezes and I don’t get any data from the IMU. Arduino uno and MPU6060 communicate using I2C serial communication.

Does anyone have any idea why this is the case?

I really appreciate any help I can get.

I searched the net for similar problems and most people are saying that the problem is there could be noise introduced by the motors that makes the I2C communication between Arduino Uno and the IMU freeze.

I really appreciate any help.

I assume you don’t have access to an oscilloscope? One thing to consider is how the power lines are run. I try to branch out in a hub & spoke pattern from the battery so that the electrical noise from the motors and high current fluctuations combined with finite wire resistance don’t cause power or ground spikes on the IMU/MCU rails.