1

I have been reading about using a Raspberry Pi to control an Arduino. My goal is to control several Arduinos using a single Raspberry Pi, in order to automate several tasks, it is important to note that I wont be able to use wifi were I will design this system.

How many Arduinos is the maximum I would be able to control with only one Raspberry Pi? I am planning to use the model 3 B+.

I have checked several post like this one, but they show how to control only one Arduino, or this other one, which is more or less the same.

I found this question which says that it is possible with I2C, but most examples I have found with I2C show how to control 1 device, such as this one.

I have a ton of coding experience, but less so with electronics, is there any place where I could start fairly simple on how to control several Arduinos with I2C, and what is the maximum amount of Arduinos I would be able to control?

Thank you so much

Michielvk
  • 883
  • 5
  • 12
  • 2
    The limit isn't in the number of devices but in the amount of data you need to pass through I²C per second. Please edit your post and tell more about your application. – Janka Sep 10 '18 at 18:21
  • 1
    You should be able to connect multiple Arduinos to the I2C bus as long as they each have a different address set in the Arduino code. The article you linked mentions how to do this. However, you will probably want to start with just one in order to learn how to use the I2C APIs on both ends. In terms of connection, you can use whatever topology you like (basically, daisy chain or star), it will amount to the same thing. – goldilocks Sep 10 '18 at 18:24
  • No need to clarify anything - just read I2C spec.The issue will be how to make Arduino to be a slave with unique addresses and adjusting the I2C bus pull-up resistors. . – Jan Hus Sep 10 '18 at 19:58
  • 1
    Please note that the Pis GPIO are 3V3 whereas most models of Arduino are 5V. You need to ensure that the Pi is not exposed to 5V from the Arduino so you need to ensure that none of the Arduinos pull the bus to 5V. The Pis 3V3 signal will probably be seen as high by the Arduino. If not you need to introduce a level shifting device between the Pi and the I2C bus. – joan Sep 11 '18 at 07:37
  • 1
    You can connect a reasonable number of I²C slaves, but the I²C bus is not suitable for large numbers - even using the number supported by the limited address space at minimum speed is not feasible due to bus loading. I²C is intended for inter-chip connections on a single board. – Milliways Sep 11 '18 at 12:27
  • Here is part of the solution. https://www.arduino.cc/en/Tutorial/MasterWriter It would be interesting to figure out how to initialize the slave address remotely. – Jan Hus Sep 10 '18 at 22:24

0 Answers0