Arduino i2c communication hangs while running motor

Thread Starter

vasanth_champ

Joined Feb 28, 2021
2
i2c.PNG
I have a Arduino uno board connected with PCA9698(I/O expander) through i2c communication. Controlling if input and output were working correctly. The data pins from the PCA9698 is connected to the 24v DC motor driver(BTS7960) and also sensors(PROXIMITY sensors). While reading the sensors there are no issues, but While running the motor the PCA gets hangs and i2c gets disconnected. Kindly help me with this problem.
 
Last edited:

DickCappels

Joined Aug 21, 2008
7,147
One common problem is that noise from the motor, especially motors with brushes comes sneaking back through the I/O pins or power supply and eventually affects operation of the logic. I don't see any capacitors on your board. You should certainly have a small ceramic capacitor across the motor terminals and small capacitors from each motor terminal to ground.

The logic for your power supply should be well bypassed with an electrolytic capacitor and a ceramic capacitor in parallel with it. In one case I had to put chokes between the motor driver and the motor to keep the stuff on the motor side.

The problem may be elsewhere but the problem cries out "EMI!" to me.
 

Thread Starter

vasanth_champ

Joined Feb 28, 2021
2
One common problem is that noise from the motor, especially motors with brushes comes sneaking back through the I/O pins or power supply and eventually affects operation of the logic. I don't see any capacitors on your board. You should certainly have a small ceramic capacitor across the motor terminals and small capacitors from each motor terminal to ground.

The logic for your power supply should be well bypassed with an electrolytic capacitor and a ceramic capacitor in parallel with it. In one case I had to put chokes between the motor driver and the motor to keep the stuff on the motor side.

The problem may be elsewhere but the problem cries out "EMI!" to me.
Thank You.
 
Top