IC Network??

I've been kicking around an idea for a while to simplify home automation...

Basically, integrating Ethernet into each board I build is costly. So, I've been looking for a way to daisy-chain simpler boards together to a single ethernet server board. Here's the concept so far...

  • A master unit that has an ethernet interface connecting to my network. This unit provides 4 wires out... 2 for power and 2 for the TWI interface.
  • A number of slave units tapping these wires every 10 feet or so up to say 100 feet. (10 slave units total).

The TWI interfaces of each ATmega168 could be connected to the wire chain and be used to interconnect the smaller devices running my coffee maker, light controls, dishwasher, etc. This way I could only build a few master units and could make a lot more smaller, cheaper devices for control of all my gadgets.

Here are my questions:

  1. Is this even possible? I've read that the TWI (I2C) protocol could work at distances of up to 300 feet if the clock rate is dropped way down. This is backed up by the channel timing maxing out at 300ns.
  2. What about terminating the wires to avoid reflection?
  3. What sort of pullup system would I need to drive the data wires over such distances?
  4. I'm hoping to use Arduino's Wire library for this... Any problems with doing that?
  5. How much would bidirectional communication be in such an environment?
  6. Have I lost my mind here??? Should I be thinking of another solution?

I just hate having to pay an extra $20 - $30 per device plus all that expensive ethernet wiring, jacks, etc. just to control a single device without laying out a spiders web is messenger wires all over the place. A bus-style interconnection system would just be so convenient, inexpensive, easy to add devices to, and an exciting challenge!

Thanks in advance all!!

I don’t know about TWI aka I2C, but I understand Dallas 1-Wire can run long distances.

Another method is good old RS232. With proper construction and cabling 1500 feet is no problem. RS422 can run even farther by virtue of differential signaling, and is identical on the microcontroller side - it just requires a different transceiver and cabling.


One benefit of using RS422, besides the distance it allows, is that the linedriver ICs ( DS26LS31 / 32 for instance) are cheap and frequently can be found in surplus stores. like here :


Given that I'm relatively new to all this, I'm hoping to stay somewhat in the scope of Arduino software to keep things at least within the realm of simple. I'm familiar with all the !@#$ that wireless systems go through to handle multipoint communications so unless there is built in collision avoidance with this protocol I was thinking of a basic polling algorithm from the master to take care of that.

I've never used 422 before.... Any examples of using these drivers/receivers anywhere??

I've never used 422 before.... Any examples of using these drivers/receivers anywhere?

On the microcontroller side, it's exactly the same as using RS232. Physically there are more wires on the line side, due to the differential signals. I've seen 8 pin mini-DIN, DB9 and DB25 as the physical connectors, but standard CAT5 ethernet cables beg to be used - put each of the +/- differential pairs on a twisted pair.

Several hardware vendors have used RS422: the 8 pin round DIN serial connector on the old Macintoshes, Sun SPARCstations, I think some SGI systems, etc.


Ok... That solved the hardware side. How much if any of Arduino will be helpful, and how much will I have to write up myself? Like how do I determine which unit I'm talking to? I'm sure this has to do with the driver IC, but how will it all translate to Arduino??



Not very simple but very good.



Not very simple but very good.

Yeah i was gonna say CAN-bus aswell. Worked with it at school with a couple of PLC's. Worked fine :)

Ok... That's waaay over my head...

I'm only trying to transfer a tiny amount of data here... 56kbps total, for the whole bus, is virtually overkill.

I'm just looking for an easy to communicate uP to uP over a reasonible distance. I'm trying to find a system that can do this:

// Define the Bus IDs of the other units.

define IC_A 1; define IC_B 2; define IC_C 3;

// Send something!

Bus.print("Some request", IC_A);

// Wait for something!

void loop() { if(Bus.available() > 0) { something = Bus.read(); // Got something!!!

// Do something! } }

Of course an interrupt-driven system is preferable, and it's more complicated than this (gotta determine source, handle errors, etc) but this is the gist of it.