Arduino Forum
>
Using Arduino
>
Networking, Protocols, and Devices
(Moderator:
fabioc84
)
>
how many devices can you connect to i2c?
Print
Go Down
Pages:
[1]
Topic: how many devices can you connect to i2c?
(Read 10812 times)
previous topic
-
next topic
jasonvanwyk
Guest
how many devices can you connect to i2c?
Apr 11, 2013, 03:29 pm
I'm trying build a homemade weather station with my uno R3. most of the sensors i have comunicate via i2c. the problem i have is that the uno has 1 SCL and SDA line. how many devices can i conect to the UNO's SCL & SDA at the same time? if only one at a time is there another solution? can i change any of the other pins to SCL & SDA?
CrossRoads
Global Moderator
Unlimited Eagle board sizes available.
Brattain Member
Posts: 42,464
Karma: 1802
[add]
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
http://www.crossroadsfencing.com/BobuinoRev17/
Re: how many devices can you connect to i2c?
#1
Apr 11, 2013, 03:33 pm
Theoretically, up to 128 - the limit of unique I2C addresses.
All I2C devices get connected in parallel, and a pair of 4.7K pullup resistors brings the SCL & SDA lines high.
Designing & building electrical circuits for over 25 years. Screw Shield for Mega/Due/Uno, Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at my website.
Erdin
Guest
Re: how many devices can you connect to i2c?
#2
Apr 11, 2013, 06:15 pm
The speed is limited by the "capacitance" (as in capacitor) of the line.
That is the total capacitance of all devices and all wires.
robtillaart
Global Moderator
Brattain Member
Posts: 19,702
Karma: 1119
[add]
In theory there is no difference between theory and practice, however in practice there are many...
Re: how many devices can you connect to i2c?
#3
Apr 11, 2013, 08:19 pm
IIRC there exists I2C multiplexers to increase the number of devices.
But be aware that the more devices you have the less times per second you can talk to them (all).
Rob Tillaart
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)
CrossRoads
Global Moderator
Unlimited Eagle board sizes available.
Brattain Member
Posts: 42,464
Karma: 1802
[add]
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
http://www.crossroadsfencing.com/BobuinoRev17/
Re: how many devices can you connect to i2c?
#4
Apr 11, 2013, 10:22 pm
I2C mux is only needed if you have devices with the same address - say 2 of the same simple sensor that does not support multiple addresses.
Designing & building electrical circuits for over 25 years. Screw Shield for Mega/Due/Uno, Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at my website.
robtillaart
Global Moderator
Brattain Member
Posts: 19,702
Karma: 1119
[add]
In theory there is no difference between theory and practice, however in practice there are many...
Re: how many devices can you connect to i2c?
#5
Apr 11, 2013, 10:28 pm
I2C mux can be used to go beyond the 127 devices , and yes indeed it is done by reuse the same address space again and again and again (4 way mux in mind)
Rob Tillaart
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)
jasonvanwyk
Guest
Re: how many devices can you connect to i2c?
#6
Apr 15, 2013, 01:34 pm
so then, should i have a delay in between the reading and communication with each sensor, or can all the sensors comunicate at the same time?
CrossRoads
Global Moderator
Unlimited Eagle board sizes available.
Brattain Member
Posts: 42,464
Karma: 1802
[add]
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
http://www.crossroadsfencing.com/BobuinoRev17/
Re: how many devices can you connect to i2c?
#7
Apr 15, 2013, 03:28 pm
You can only talk to 1 at a time.
Designing & building electrical circuits for over 25 years. Screw Shield for Mega/Due/Uno, Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at my website.
jasonvanwyk
Guest
Re: how many devices can you connect to i2c?
#8
Apr 15, 2013, 03:31 pm
ok thanks for all your help. one last question please...will 5 millisec be enough delay? if not what should it be?
CrossRoads
Global Moderator
Unlimited Eagle board sizes available.
Brattain Member
Posts: 42,464
Karma: 1802
[add]
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
http://www.crossroadsfencing.com/BobuinoRev17/
Re: how many devices can you connect to i2c?
#9
Apr 15, 2013, 03:46 pm
Read the datasheet for your parts - how much time does each need to do whatever conversion it is doing? Or, are they converting all the time and have a value ready to spit out as soon as requested?
Designing & building electrical circuits for over 25 years. Screw Shield for Mega/Due/Uno, Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at my website.
Print
Go Up
Pages:
[1]
Loading...