3

I want to know if I could connect many Arduino Nano boards together (Example : 10 boards ) , Also i want to know if there is any problem in Communication between them using I2C , could this affects processing speed on every board , and if there's going to be any kind of delay when communicating?

  • 1
    It is a good (but broad) question. Can you add more information to your question? Do you really need arduino nano boards? Other boards have a extra serial port to be able to connect all boards with serial ports. How far is the distance? What kind of cable do you want to use? Is is okay to use wireless communication? Why do you worry about processing speed and delay? What else do you want to run on the arduino board? The i2c bus might work for short distances, but requires good programming skills. Using the i2c does not work very well with libraries that turn off the interrupts. – Jot Sep 17 '18 at 7:29
2

I want to know if I could connect many Arduino Nano boards together...

Yes, you can read about it here at arduino.cc. Where is says: "...it can be helpful to set up two (or more!) Arduino ... boards to share information with each other..."

... i want to know if there is any problem in Communication between them using I2C ...

This feature, according to the above link, is expected to work. (Can you explain the type of problems you are avoiding?)

...could [i2c communication] affect processing speed on every board ...

Most likely it will. Most Arduino platforms do not run operating systems. So your program is all that is running. If your program is busy sampling sensors, it will be difficult (not impossible) to concurrently handle i2c communications.

  • I am going to connect 4 DC motors encoders and some other sensors but the encoders must be on interrupt pins for best performance , I tried to connect them on an Arduino Mega but it has only 3 pairs of interrupt pins and I need 4 pairs , so the problem I am trying to Avoid is : The interruption of every encoder to the other one . – Omar Khaled Sep 18 '18 at 21:32
  • Consider what your objective is. Can you process the interrupt on an individual embedded processor in such a way as to contain the burden of timing to within that processor? Sometimes the answer is clearer when you refactor the question instead of looking for hard to find hardware. – st2000 Sep 18 '18 at 23:47
2

Yes it certainly is possible. And can work well if done properly. The concern that I have is when longer wiring lengths are used. I2C is not intended for extended distributions. And if that were the plan then I STRONGLY advise using proper I2C buffer chips designed for that purpose.

The more devices, the more wire, all adds to the capacitance on the lines. Because I2C uses pull up resistors to produce a high the added capacitance limits either the length of wire that can be used, or the transmission frequency. I have used I2C buffers in may products and it is very useful when extended length is required. I use both I2C buffers, and also I2C isolated buffers. The company I work for manufactures distributed control electronics. I am one of the hardware designers. I have been using I2C like this for about 15 years.

For now have a look at this web page. http://www.techbitar.com/how-to-network-many-arduinos-with-sensors-using-i2c.html

I'm sure it will spur some questions. It makes things simpler if there is only one master controlling the communications bus. Multimast is possible but can have more conflicts and you then need to deal with that issue. Best not to go there.

I2C is not a very robust protocol but still can be usable between processors if handled carefully. Keep it simple.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.