Hey all
I'm currently working on a project which needs around 20 networked arduinos.
e.g. There is 1 master and 20 slaves.
each of the 20 slaves has a piece of data it needs to give to the master based on its sensor readings (about 40bytes per slave).
my current plan is:
attach the TX of the master to the RX of all the slaves. This is the 'request channel'
connect the TX of each slave through a relay (per slave), and then connect together to the RX of the master. This is the 'reply channel'
The master will call out the ID of each slave one by one, e.g.
call on request channel: "ID 0"
then slave #0 will reply. It will engage its relay so that its TX is connected to the masters RX. then it will send its data, and return the relay to unconnected state.
Then the master asks for ID1's data, ID1 replies, etc etc
is this a sensible enough way to go about things?
is there enough current in the arduino's standard TX to feed 20 RX's, or do i need to use a transistor here?
also is the relay even necessary, or can multiple TX's be connected simultaneously to 1 RX?
do i need to allow some time for the different TX's to sync with the master's RX when each one is connected?
speed isn't a huge issue. this only needs to be performed once. ideally all 20 slaves can be read within 5 seconds. also this operation will only be performed once or twice per day.
i think the broadcast ID, reply through a relay is quite an easy solution, if not entirely the most elegant.
I2C looks like maybe another option, but i dont understand it entirely yet. (reading through http://www.neufeld.newton.ks.us/electronics/?p=241).
opinions?