Massive Propeller Array, Networked
veluxllc
Posts: 30
Okay this could get tricky.
I'm looking to build an array of independent microcontroller boards.
Each board will have DIP switches on SPI or I2C for configuration.
Each board will have a few I/O to drive a stepper, sense the position of a few things as well as some status LEDs.
So the functionality will be pretty basic.
The problem is there will likely be over 1000 of the boards each within their own mechanical assembly.
They WILL be physically next to each other so power/communications can be passed through.
But question for all here is what method of networking would you suggest?
These will all receive commands from a PC. While wireless sounds nice, this may cause a cost over-run. looking for simple, effective and reliable. It doesn't hurt to be non-standard in this situation.
Thanks in advance.
Marc
I'm looking to build an array of independent microcontroller boards.
Each board will have DIP switches on SPI or I2C for configuration.
Each board will have a few I/O to drive a stepper, sense the position of a few things as well as some status LEDs.
So the functionality will be pretty basic.
The problem is there will likely be over 1000 of the boards each within their own mechanical assembly.
They WILL be physically next to each other so power/communications can be passed through.
But question for all here is what method of networking would you suggest?
These will all receive commands from a PC. While wireless sounds nice, this may cause a cost over-run. looking for simple, effective and reliable. It doesn't hurt to be non-standard in this situation.
Thanks in advance.
Marc
Comments
RS-485 is designed for balanced lines and typically uses twisted pair such as CAT 5 etc. I have used 4-core phone cable to carry +24V and RS-485 around factory floors but on a smaller scale inside a large cabinet I have simply strung the modules together using 10-way IDC since the distance between each module was very short. I have a project at the moment which uses standard heavy duty 4-core power cable that is strung hundreds of meters outdoor and has to withstand lightning strikes, but the baud rate is a modest 9600.
Now all this was with the P1 and I built all this networking stuff into Tachyon so that it was transparent to the application code. It would appear as if you were sitting on its console port talking full-duplex, so I could "chat" with my remote modules and interact Forth style. But this also allows for group and global addressing where multiple units could receive the same commands etc, although blindly and without an immediate individual response. This was also useful for code updates too. I just refer to this module as the Intercom module in Tachyon that is always present, just define the pins and the baud-rate and the unit address and I would typically run it at 2Mbd.
Now with the P2 we can do it so much better and the speed is mainly limited by RS485 itself and the length of the bus.
But if you are powering stepper motors from the bus then you will need to build in some local reserve in the form of large caps and a diode to keep it local etc. I hate DIP switches so I program them with an address by connecting directly to the serial pin header on each module, and I only have to do this once and it is locked into EEPROM or somewhere.
The PC can connect to a master Prop that can act as the gateway and also handle the optimal baud rates for the PC and the bus etc.
btw, a smartphone makes a great field terminal for chatting or setting these modules. Just plug a standard USB serial cable in, open your terminal app, and away you. Alternatively I also use Bluetooth serial and just plug the Bluetooth adapter into the module and even have a dedicated one for the master.
Or use one of the chips that have built-in networking.
No PLC that I have heard of that can control 1000 steppers.
How
How do you plan to power the steppers and the microcontrollers? At 100mA per you would need a 100Amps for the micro 3.3V supply plus whatever power the steppers need.
AFAIK there are no driver IC's for SPI/I2C that can drive 1000 loads. Perhaps connecting them as an array of 32x32 or 16x64 would work?
It's not quite that simple.
The 120VAC line can power the 3.3VDC or 5VDC the microcontroller chips need, but do you use one high current (100A or more) power supply for all the micros, several lower current supplies for groups of micros, or one low current supply per micro?
A two wire master slave I2C/SPI connection is not a problem when you have only a few micros connected, but each receiver does draw a bit of current from the sender, and at some point the sender can not provide enough current for the signal to be received.
A simple diagram and description of what you are trying to accomplish would help.
You could one transmit long message for the 1,000 nodes at 2Mbps and if you allowed 2 bytes per node that would take 10ms to transmit. As soon as the line goes quiet for 1ms or so, you could latch that data that is in the buffer for that node.
One cog receives data and another transmits it through from the other end of the buffer (as if it were a shift-register).
(edit: added on Jan. 28th)
I did not think that all the hundreds of modules are to be connected to exactly single physical network ring, but it sounds very much interesting. Some time I might try it ( but I have no sufficient time and/or money, I have to reduce number of modules to be tested ).
Do the math. If each optocoupler in the loop has, say, a 1.5V forward voltage drop, you'd need at least 1500V to drive it.
-Phil