Question about linking avr`s


I`m searching for the easiest way to link an arduino to multiple sensors. I want to make a modular system.

Like this: Temp. module 1 Ph module 1 Relay module 1 etc. Arduino>>> >>> >>> >>>

I this possible with I2C? I allso read something about a can bus?

What would be the best solution?

EDIT: I think the modules will look something like this: small AVR>>Sensors or Relays

Thanks in advance!

C. van Meer

I've done it in industrial products, daisy-chaining up to twenty or thirty AVRs using buffered serial lines and a proprietary real-time kernel.

Typically, the devices were simply monitoring sensors within machines, but no reason not to drive relays.

We didn't do it with I2C because of the length of runs of cable and the environment, but in a small box with a smaller number of nodes, I don't see a reason not to.

Thank you for your reply.

I forgot to say that the cable length beteween two modules may be between 1 and 3 meters.

Depends on whether or not you want a strictly compliant implementation, i.e. if you're mixing real off-the-shelf I2C devices, or if all you're doing is linking AVRs, with the ability to tweak the drivers, speeds and/or the protocol. The I2C spec calls for a bus capacitance of no more than 400pF Lowering the speed may give you a longer run, at the expense of latency. Also depends on how electrically benign the environment is.