Networking Arduinos

I have a back burner robotics project I was musing about today and realized I dont know the extents of communications on the Arduino platform.

Is the USB connection on most boards (uno, micro) able to be addressed on a network? For example, if I were to plug four controllers into a USB hub could I ‘name’ or otherwise address each controller seperwtely to send data to them without confusion?

My project could potentially require up to 18 controllers, each using upwards of 20 I/O not counting communications.

I would prefer a bus type layout where each controller can send data between each ither when necessary, but a star layout from one master controller is OK. I would prefer to tie up no more resources than D0and D1 due to the possible high I/O count, and few external components and low cost (the more components that need to be added are multiplied by the number of nodes).

Is it something I can do or am I going to have to give something else up?

Ideally, control signals will be kept at a minimum, and sensor data would be processed at each node, only passing on what is needed to be worked on by the whole system. (Kind of like a highly complex hobby servo)

Yes, you can have multiple Arduino’s connected to a PC, and they’ll show up as multiple serial ports. But they won’t be able to communicate with each other directly. The Arduino boards, for the most part, are slave devices.

Thanks, that helps narrow things down a bit on what I can do then and where to focus. It sounds like I’m going to have a bumpy road finding something to coordinate such a thing, the only ‘connection via USB’ (or ethernet) I’m familiar with is terminal connections and not sure how I would work out making a whole program on a computer to handle it (Arduino seems much more simple.)

I did just get handed an outdated FPGA a friend of mine got in a dumpster dive box (BOB-08595), and it seems at first glance that there is a chance I could program the array as a group of UARTs to handle it, but now I have to learn FPGA… and they don’t make it easy (on to search the forums here).

Take a look at https://www.sparkfun.com/products/11959. RS-485 is what you need. You can get a RS-485 to USB converter to monitor the bussed serial data. You would still use the USB for programming your devices. The only thing I don’t see is that I thought the standard required a master with low impedance and all the slaves be high impedance.

http://en.wikipedia.org/wiki/RS-485

fkatzenb:
Take a look at https://www.sparkfun.com/products/11959. RS-485 is what you need. You can get a RS-485 to USB converter to monitor the bussed serial data. You would still use the USB for programming your devices. The only thing I don’t see is that I thought the standard required a master with low impedance and all the slaves be high impedance.

http://en.wikipedia.org/wiki/RS-485

Wow, I didn’t know you could do that with 485! We used it at my old job for industrial communications for its noise immunity and high transfer rate (video data signals between a processing card and cameras with frame grabbers), but we had up to 4 lines per camera for the ‘low speed’ side, and 10baseT for the ‘high speed’ data side, so I didn’t get the impression it was a bus with that kind of capability. My only problem with that shield is that it would potentially at least double the cost per node of my project and wouldn’t snap directly onto a micro should I go that route (found Unos for $10 and Micros for $8). Still, it is worth looking into, and perhaps I might find a cheaper implementation. Thanks!

It occured to me, while trying to find some way to add communication and decrease cost, how far can TTL communications reach? If I clustered or bussed 20 ATmega chips together via TX and RX (oversimplification) and had them “spread out” with a maximum distance of 3 feet, would I run into any problems? Realisitically, I might use line drivers or opto-isolators to protect the chips, and I’d have to figure out if I would daisy chain them together, bus them with a master, cluster them, or what makes the most sense.

I guess it might make more sense if I described what I’m trying to do. Instead of trying to use one Arduino board, like a Mega, to run everything and keep track of everything in a scaleable system (with no positive definition of where it might go), I figure I’ll go with a modular approach, so that a wheel, or an arm, or a gymbal would be controlled as a unitized module or node, then use a system controller to command each node what it needs to do using a more universal command set to make each node more self-sufficient.

For example (a bad example), a CNC mill has a controller for each axis, the spindle, and possibly other add ons (table clamps, indexers (in the case of a lathe), etc) as well as a interface control that gets commands from your computer and determines what needs to do what. Generally, this is simple enough that a stepper controller is used instead of a full arduino, but the point is you have 4+ different devices that may have their own feedback sensors, encoders, drivers, etc, and the master controller only has to send on/off, step/direction, and other simplified commands without the overhead of directly controlling the motors or whatever else is attached.

In my case, I might have an arm with a 4 axis (3 angles plus rotation) joint and a 1 axis joint (think a shoulder and elbow), with position encoders (1 per axis, if needed), force feedback, and perhaps other features I want to add later. I may also wish to have the module have it’s own battery that might need the level checked. The I/O add up (4 PWM or 4 step + 4 direction or 8 on/off, 4 encoder (analog, or x2 if digital), 1-4 force sensing, 1 battery…) Too much for a controller to handle more than one node. one controller per node and a network of them seems like the way to go.

TrollHammer:
It occured to me, while trying to find some way to add communication and decrease cost, how far can TTL communications reach? If I clustered or bussed 20 ATmega chips together via TX and RX (oversimplification) and had them “spread out” with a maximum distance of 3 feet, would I run into any problems?

At 3' I doubt you'd see many problems. Then again it all depends on the speed.

1Wire runs a few hundred feet but slowly. It can use a simple Arduino pin, no driver.

http://en.wikipedia.org/wiki/1-Wire

http://www.hacktronics.com/Tutorials/ar … orial.html

I2C goes much faster but at limited (?10’?) distance.

Mee_n_Mac:

TrollHammer:
It occured to me, while trying to find some way to add communication and decrease cost, how far can TTL communications reach? If I clustered or bussed 20 ATmega chips together via TX and RX (oversimplification) and had them “spread out” with a maximum distance of 3 feet, would I run into any problems?

At 3' I doubt you'd see many problems. Then again it all depends on the speed.

1Wire runs a few hundred feet but slowly. It can use a simple Arduino pin, no driver.

http://en.wikipedia.org/wiki/1-Wire

http://www.hacktronics.com/Tutorials/ar … orial.html

I2C goes much faster but at limited (?10’?) distance.

That sounds much better. Researching this presently. Thanks!