Controlling 5 Arduinos with 1 Arduino

I am using one Arduino as a master controller for five others. I need it to send four different types of messages to each of these five boards. My original plan was to wire individual digital pins on the master Arduino to a digital pin on each of the other boards and pulse this pin up and down morse code-style to transmit the different messages. Thus I would use five pins on the Master and one on each of the others. This worked in a test but is failing miserably in the real world. What would be the best way to accomplish this communication? I need something robust.

Thanks so much!

/noha

The key information you didn't provide was the distance you're trying to transmit a 5V logic signal. That should be limited to a couple feet. Solutions:

  1. Multidrop network. Use an RS485 converter on each device, hook into the serial pins. All the Arduinos listen to all messages, but only take action when a specific ID is broadcast.

  2. Do what you're doing now, except with line drivers. http://www.national.com/mpf/DS/DS8921.html is a differential pair driver. In fact it's RS-422 compliant...but the upshot is, you put a digital signal in one end, it goes on a twisted pair, and the digital signal comes out the other end. It should work up to 100kbit/s over a 1200 meter cable. I've used these with good results over 100 foot cables.

Of course the second approach requires 5 different drivers for a total of 10 wires transmit-only and 20 wires bidirectional. The RS485 converter, like SN75176 or MAX485 etc, only requires one extra chip per Arduino.

Search for twi / i2c @ arduino.cc home page.

Or you can have a read through this thread it covers the fundamentals of connecting 2 168's on i2c, 5 or more and considerable distance would not be a problem.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1205243372/0

Search for twi / i2c @ arduino.cc home page.

Or you can have a read through this thread it covers the fundamentals of connecting 2 168's on i2c, 5 or more and considerable distance would not be a problem.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1205243372/0

I2C is also logic level, and other parameters restrict it to a few feet. If you use an extender like the P82B715 you can use it over 100 feet.

Googled "i2c maximum distance".
Many answers, but 3-4M at most speeds and 100M at low speed seems to be common.
Since the OP didn't specify, it's currently moot.

Hmmm, i2c or RS485... the distance I am using ranges from about 2 feet at the minimum to maybe 30 at the max.
What is a "low speed" for i2c communication?
Do I need a 0 - +5v to -2.5v - +2.5v converter for RS485 or can I just directly interface the MAX485/SN75176?
And which can be best accomplished in a week???

!

Doesn't really matter what qualifies as low speed...the Arduino doesn't provide an option for changing the I2C speed.

2 feet should be okay, 30 feet is highly doubtful.

All of the chips I mentioned need only the chip, and the wires to the other Arduino.

you could use a virtual wire wireless option.. it's a 1 way wireless connection. 10$ for a transmitter and receiver. Use one transmitter for the server and receivers for client... they all run on the same frequency, so u can just have 1 transmitter

or use the software code examples for the virtual wire and use a real wire.. just a serial connection i believe (i2c really isn't needed...saying as how each arduino has it's own clock.

thank you all for the advice, I'm going for i2c with a bus extender with a plan B of RS485.

I'll let you know how it goes...

/n

If the communications is all one-way (e.g. single master to slaves) you can use an rs232 transmitter and several receivers. You'll need true rs232 signals (ala MAX232 and friends) to push the signal very far. Use an address to specify which slave should pay attention to the data.

-j

Doesn't really matter what qualifies as low speed...the Arduino doesn't provide an option for changing the I2C speed.

2 feet should be okay, 30 feet is highly doubtful.

All of the chips I mentioned need only the chip, and the wires to the other Arduino.

I can verify that 10' is a problem. (Well, 10' 6", counting internal leads to the external connector.)

Although, it's looking hard to source the i2c buffers. I did some research last night, and saw the LEDuino was using the IE5501 chip, and it seems the only source online is the manufacturer. I requested a sample pack last night, but I'm not holding my breath on that. I'm going to stop by the local electronics shop today that has a good 30' isle of ICs and see if they have the IC you recommended, or one compatible. Digikey has them for about $3.30 each, but I'm hoping to finish up this week =)

!c

You may also want to search for an I2C active terminator circuit, I remember seeing a very simple one with transistors but can't find it at the moment.