Massive Propeller Array, Networked

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

Comments

  • Interesting! Will this network be peer-to-peer (ie, any to any), or more along the lines of a central master talking to many slaves who only reply when queried (ie, interrogate/response)?
  • Cluso99Cluso99 Posts: 17,193
    Peter Jakacki is best to ask so hope he chimes in. He’ll probably suggest RS485 multidropped which I know he’s done commercially with P1.
  • Peter JakackiPeter Jakacki Posts: 9,952
    edited 2021-01-14 02:19
    If they are close as in a meter or so apart then you could just run a single I/O plus power. If it is electrically noisy or if they are much further apart or the total length is say 20 meters or more you might have to use RS485. Either way the bus will be a multidrop half-duplex master/slave (if we are still allowed to say that) configuration. Then you just need one extra I/O to control the TE signal.

    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.

  • Why a propeller? You say that it is cost sensitive so why not use a cheaper $1 micro and spend some of the savings on the networking side.

    Or use one of the chips that have built-in networking.
  • Peter JakackiPeter Jakacki Posts: 9,952
    edited 2021-01-14 06:52
    btw - here's a link to a video I did demonstrating this networking in action.


  • What are you looking to do that would not be better accomplished by a PLC?
  • kwinnkwinn Posts: 8,679
    What are you looking to do that would not be better accomplished by a PLC?

    No PLC that I have heard of that can control 1000 steppers.

    How
    veluxllc wrote: »
    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

    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?

  • kwinnkwinn Posts: 8,679
    movin wrote: »
    wow....just build a simple two wire master slave

    110 ac volts for power and signal...triacs are cool

    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.
  • Btw, I would use the master prop as a network switch to split up the physical connection into 4 or more. There are Rs485 chips that have 1/8 loading too.
  • kbashkbash Posts: 112
    The only thing I can think of that might require 1000 different positioners is a corrective mirror. If that's the case, nearly all the data is going to be one way. Even so, driving 1000 inputs with one line at high speed is still a bit tricky. If you have say.. 16 extra I/O's available on each Prop, instead of a sequential pass through or everthing listening on one line, one prop in the "Middle" with 2 tiers of processors doing a data pass-through may end up even faster than the speed you could get driving 1000 inputs on a single line. 4 tiers would give you minimum delays while allowing you to control over 4000 processors.
  • Yes, if they are mirrors then you could do the whole serial daisy-chain kind of thing where you wouldn't need RS485 since the distance between each node would be short. Think WS2812 LED daisy-chain for instance. A single I/O in and a single I/O out. But then there are other $1 micros you could use for that.

    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).
  • How about current-loop ?
  • yisiguro wrote: »
    How about current-loop ?

    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
Sign In or Register to comment.