Encoder motors causing I2C problems


#1

I am trying to use my arduino mega (with light sensors) to send commands to an Orion bot (which has 4 mecanum wheels with encoder motors). I’ve managed to get the two boards communicating with I2C, but I have a problem. They send/receive with no issue, but once I connect the motors to ports 1 and 2, the orion “hangs” and stops requesting data from the arduino mega. Once I unplug the motors, the orion resumes requesting and receiving data.

I know the orion bot works fine without being connected to the mega (I am able to control it with a usb joystick). I have a hunch that the encoders are interfering with I2C in some way.

Anyone know what the issue could be?


#2

Hi GBabstII

Since the encoder motor works on I2C, there should be interference when you connect the orion to mega with I2C at the same time. You may try use the other motor like DC motor instead of encoder motor have a try. Or you can try connect orion to arduino mega through TX/RX instead of I2C if you want to use encoder motor at the same time.