Skip to content

A I2C bus between two Arduino boards in a project with motors.

Koepel edited this page Jan 31, 2025 · 3 revisions

A I2C bus between two Arduino boards in a project with motors.

On the Arduino forum, there are sometimes projects with a I2C bus between two Arduino boards. When there are also motors in the project, then the project might fail. It might work with enough knowledge of: the I2C bus, ground currents, electromagnetic noise, current peaks, wiring, and so on. But the project can/should be more reliable.

Better solutions.

  • The best solution is to make the whole project with a single Arduino board.
  • The Serial/UART bus has strong voltage levels and is therefor often better. If the Serial/UART bus can be upgraded to a RS-485 or Bluetooth for communication during development.
  • Wireless communication can be a good solution, even if the Arduino boards are directly next to each other. The ESP32 boards have "ESP-NOW" without extra hardware.
  • Sometimes a CAN bus or other standard bus is the best solution.

Background: the I2C bus is not as strong as you think.

The I2C bus is a weak bus, because the high level is created with pullup resistors. The signals are not fully voltage driven and not fully current driven, that makes it hard to protect them from noise.

A I2C bus between two Arduino board is a I2C bus between two processors. That is not a good idea in my opinion, but it can work. However, if there is a motor in the project, then the noise can disturb the I2C bus. The I2C bus is not a fault tolerant bus. It was not designed to work in a noisy environment.

A motor in a project causes peaks of current trough the ground (GND, negative) wire coming from the motor. Those peaks can travel through the whole project. The current from the motor should be kept away from the GND wire that is part of the I2C bus.