Separate power supply still causing Arduino to error, decoupled power supply?

Hello,

I'll get straight to the point. I'm relatively new to Arduino, so I'm confident my issue is far from unique, however I haven't been able to find a solution browsing the internet thus far.

Background: I'm building a self balancing robot. I had the system working a few months ago, and have recently decided to upgrade. I bought new motors, a new motor driver, and lipo battery to power the motors. I have a separate power supply for the Arduino (9V) and motors (11.1V lipo), and a common ground.

Problem: My code works fine when the lipo battery is disconnected. However when I connect the lipo to the motor driver powering both motors, the motors work for a few seconds before the Arduino errors and starts outputting "NaN" for the angle. Sometimes it can work for 10 to 15 seconds, but it will inevitably shutdown.

My current line of thought is that the Arduino is not as decoupled from the motors as I think it is. Is it possible for high frequency noise to enter the Arduino via ground and trip some reset? I believe it is some sort of coupling problem, but I'm not familiar enough with circuits to understand if that is true (as I do have separate power sources for the Arduino and motors), and then if it is a coupling problem how to resolve the issue. I should note that during my troubleshooting I found that when only 1 motor is connected the code works as expected. The addition of the second motor causes the error, which I find quite interesting but I don't know how to use this information yet...

Thanks in advance for reading this,
-Aidan

It sounds like you are on the right track. first check your wiring and the grounds. be sure the new motor driver is compatible with your design, is it connected properly? Also check the capacity of the batteries, I have seen this happen when you first start ok but the battery voltage drops causing problems.

Thanks gilshultz! After doing a few more hours of digging this morning, I've isolated the issue to be interference from the motor/motor driver with the i2c communication of my IMU. By shortening the wiring of the SDA and SCL lines from ~3in to ~1in, I'm able to balance the robot for ~20s consistently before it shuts down.

So, it is actually an i2c interference issue, which is a whole other exciting topic to learn about.

Thanks again!

Change the wires on the i2c to shielded or use a twisted pair or ferrites.

Add small caps to the motors for noise suppression.

Google signal noise suppression or similar.

Hi,
Have you got pullup resistors on your I2C lines?
Do you have bypass capacitors in your circuit?
Can you please post a circuit diagram?

Tom... :slight_smile: