multi arduino serial interfacing (theory)

Ok. I was thinking, could you have, say for example, 3 arduino boards in a project. One as the main processor (decision maker), one for input control (sensors, external communications[IO]..), and 3 3rd for output (motor, servo, other output [visual audio...]), and have them connected through a shared serial line so that the main board can communicate with the sub boards through an id principle, ie, any com with the io board is preceded with the boards id and the other boards will ignore the com as it wasnt intended for them due to their id not being sent b4 the com.

eg. CPU {IO: read sensors, send input to me at 0.5 second intervals}, IO {CPU: there is a wall}, CPU {DRIVE: rotate 45 degrees, contunue forward until i say otherwise}

i know it might seem complicated but its an example. this could allow the arduino boards to have a bit more sophisticated programs running, and allow better modular systems, also open up for more modules to be added.

The theory comes from my messing around with the Real Robots magazine project where u built Cybot (Cybor in Spanish), and sensing reacting robot. it was cool, and each board seemed to be connected to the main cpu board through a central serial type stack line (on board on top of the other on the same interface), with sub boards for each stack leading off (wil post diagram if wanted). would be good to make some things in this way if its feasible..

discuss?

Bng.

Perhaps use a BT and have complex algorithms performed by a host. You can expand the number of I/O's on the Arduino without using extra arduino's, and with a BT you only need to worry about one conversation rather than stringing a bunch of boards together.

What is it that one board can't do by itself, that requires more than one?

I think there are some ham radio devices/applications that use an rs232 "bus" by using one of the handshaking lines to effectively make a CSMA network using TX, RX, and one of the rs232 handshake lines (sorry, don't remember which one). I guess there is still the issue of collisions, and I don't recall what extra hardware (if any) was involved.

-j

If i recal correctly, there are som problems with the electrical specs of the RS232 protocol that prevents (or makes very difficult) this kind of topology.

In this thread:

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

The RS442 and RS485 protocols a discussed, they seem to be the way to go if you want a bus topology.

It looks like you can make it with a dedicated IC and a few external components, very interesting :-)

Ok. I was thinking, could you have, say for example, 3 arduino boards in a project. One as the main processor (decision maker), one for input control (sensors, external communications[IO]..), and 3 3rd for output (motor, servo, other output [visual audio...]), and have them connected through a shared serial line so that the main board can communicate with the sub boards through an id principle, ie, any com with the io board is preceded with the boards id and the other boards will ignore the com as it wasnt intended for them due to their id not being sent b4 the com.

Have a look at using the Arduino Two Wire Interface (TWI). You can read more about it here: http://www.nearfuturelaboratory.com/index.php?p=279

And there are examples for send and receive as master and slave in the IDE examples for the Wire Library

Back to the original poster, I suspect I2C would be a solution, as I think the Wire library supports master and slave modes. It evel leaves your UART free for other stuff. Not sure about the details, but it should be doable, and I2C is a bus topology, with up to 8 devices.

-j

was thinking on the lines of different subsystems communicating with each other..

Say u wanted to make an R2 based robot (R2Duinoo :D) you'll have one arduino governing the movement (obstacle sensors, speed and direction). The head would have auditory (directional hearing), possible sight (sonar, light), communications/signal receivers (Wireless/BT/RF....), visual output (mood light, laser pointer..) , and also would need movement control for directional rotation. The main body would probably need a central communications hub for each module to communicate of need be with the other modules.

ie. Head hears a command like "stop" then has to tel the motors to stop moving and also would turn head to face direction of sound..

this kind of setup would require decision making on each part of the system involved. also a blutooth or wifi signal could be intercepted to say to hand over control to remote control..

there are many reasons and layouts.. this is just one example (that i wouldn't mind doing in the future)

bongmaster, you can do that using the TWI interface. The 'Head' is the master and your sensors and motor drivers are the slaves.

j, the TWI interface support i2c and the protocol supports more than 100 nodes.

bongmaster, you can do that using the TWI interface. The 'Head' is the master and your sensors and motor drivers are the slaves.

j, the TWI interface support i2c and the protocol supports more than 100 nodes.

that sounds good :)