Motor controller in an I2C system

General discussion of using Roboclaw motor controllers
Post Reply
stef308
Posts: 10
Joined: Sat Jul 10, 2021 7:40 am
Motor controller in an I2C system

Post by stef308 »

Hello,

I have tried to use a Roboclaw 2x60A or 2x7A in a project with three Arduinos. The Arduinos are communicating over I2C. If I connect the Roboclaw to an Arduino and send a command over serial TX/GND to S1/GND of the Roboclaw, the I2C blocks and does not works until a reset of the master Arduino.
I have tried to connect only the Roboclaw without motors and send the commands. This works without problems. But when I connect the motors and they are moving, the I2C blocks. With different motors, I have also different blockings on the I2C. Sometimes slower, sometimes faster. It is really not a problem of the code, it is a problem with the motor controller I guess. Only the motor controller connected works, but when the motors are connected to them and move to the commands that are sending, I have to reset the master Arduino.
It is like the motors will send back a signal that destroys the I2C signal and make it blocking.

Are any shematics available from the Roboclaws to see how they works or any known issues about that? Do you have tested to use a Roboclaw motor controller in an I2C communicating system with Arduinos? Could also only be a I2C display connected to one Arduino and the motor controller connected over serial and it will block the Arduino until resetting it!

Regards

Stef
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Motor controller in an I2C system

Post by Basicmicro Support »

Sounds like a noise issue. I2C uses pullups. Try using stronger pullups. If you are relying on the internal pullups on the Arduino that is likely your main problem.
stef308
Posts: 10
Joined: Sat Jul 10, 2021 7:40 am
Re: Motor controller in an I2C system

Post by stef308 »

I have tried pullups from 1.6k to 4.7k, no difference. After that, I have installed a LTC4311 between the I2C connection what makes it better, but the same issues after some seconds.

Post Reply