Shop OBEX P1 Docs P2 Docs Learn Events
Any advice on how to network multiple PROPs. — Parallax Forums

Any advice on how to network multiple PROPs.

jmbertoncelli@USAjmbertoncelli@USA Posts: 48
edited 2009-09-08 12:55 in Propeller 1
Hello All,

I am building a rover packed with sensors... I want to use the prop and I have 4 proto boards what is from your point of view the best networking model: client/server, peer to peer,...?· Some picture of my work (still in progress).

jm.
2576 x 1920 - 2M
2576 x 1920 - 2M
2576 x 1920 - 2M
2576 x 1920 - 2M
1440 x 900 - 154K

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2009-09-07 17:23
    Nice bot.
    There are a couple of simple answers - serial ports either between all or between a main prop and the others. Another option is I2C, I have used a prop as a I2C slave to another processor. The prop had lots of sensors and was the sensor board to another prop. Heres the link to that project http://forums.parallax.com/forums/default.aspx?f=25&m=355505
  • mctriviamctrivia Posts: 3,772
    edited 2009-09-07 17:32
    serial mesh, paralel bus. many options depends on what speeds you need and what you are trying to optimize.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • hinvhinv Posts: 1,255
    edited 2009-09-07 17:45
    There have been people who have tried many different protocols, buses, serial links, etc.

    If you want fairly high speed and simplicity, check out:
    http://forums.parallax.com/forums/default.aspx?f=25&p=1&m=233212

    I have been able to get it to communicate reliably over 19.5 feet of the orange/white pair of a cat 5 cable that was taken apart.
    I would guess that it would go even farther.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-09-07 17:53
    Easiest way if you can spare the pins is 2 wire serial between each pcb. If one pcb is master then it will use 6 pins while each of the other pcbs will require 2. Otherwise, you will have to use a protocol.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Clock LoopClock Loop Posts: 2,069
    edited 2009-09-07 18:34
    I did a project that has 4 props all talking serially. 3 props talk to 1 central prop using serial at 115200 baud. No complicated coding is necessary, just copy the necessary memory from one prop to the next, you can pass values through props also, depending on your requirements, chances are 115200 baud passing of values is plenty of speed, even when propagating that data through a central prop.

    http://forums.parallax.com/forums/default.aspx?f=21&m=376422&g=377275#m377275

    Repeat   
      go := 0
      
      If Comm.rxtime(1) == 213     'this looks for start number of 213
        BpmStep := Comm.rx        'then receives data and puts it in variable BpmStep
    
      waitcnt(500 + cnt)  '      
    
      Comm.tx(214)           'this transmits for start number of 214
      Repeat go from 0 to 58        'this sets the range of memory locations I want to step through
        Comm.tx(Fx[noparse][[/noparse]go])     'this transmits that same memory range one byte at a time
        waitcnt(500 + cnt)  '1ms   'this waits 1ms to let receiver catch up.
    
    



    And on the other prop

    Repeat   
      go := 0
      
      Comm.tx(213)                        'transmit sync number  
        waitcnt(500 + cnt)              'wait for other prop to catch up
        Comm.tx(BpmStep)                 ' transmit BpmStep position
      
      waitcnt(500 + cnt)
    
      If Comm.rxtime(1) == 214 
                    
        Repeat go from 0 to 58              ' get range of memory
          Fx[noparse][[/noparse]go] := Comm.rx 
    
    




    Pretty easy to do and is fast enough for MY use.
  • ProcessingData...ProcessingData... Posts: 208
    edited 2009-09-07 19:38
    Got anything faster than that? tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • jazzedjazzed Posts: 11,803
    edited 2009-09-08 03:59
    That's a nice looking bot.

    Using the multiple-serial connections is probably easiest/best between Propeller Proto-boards or similar hardware. Of course that means you have to carry the cost of all the proto-boards, but they are often on sale like this weekend (stock-up time).

    One could try the I2C approach, but that limits you to one connection at a time at fairly low speed determined mostly by how much Propeller (and work) you want to throw at the "device" side of the problem.

    I've been working on a "stack of Propellers" ... think I-HOP [noparse]:)[/noparse] ... with a Parallel bus for data transfers and SPI bus for communications startup. It has been difficult (at best) to make it work in the simplest mode. I have 5 Propellers connected and working today ... finally. More in another thread.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
  • Ken PetersonKen Peterson Posts: 806
    edited 2009-09-08 12:45
    Some information to help make a decision about networking configurations:

    1. Asynchronous serial is probably the simplest for coding and only needs two pins per prop. You can also configure multiple drop but need to handle bus contention or master/slave interaction with a higher protocol layer. Async serial is somewhat bandwidth limited.
    2. I2C is a bus configuration designed for interoperability among manufacturers and can do up to 400Kb/s (or more), but is a proprietary protocol (Philips). If you want to market your product you need a license for the slave and a registered address. I think only 100Kb/s is supported with the Propeller I2C object.
    3. SPI is designed for inter-chip communications and can theoretically support several Mb/s, but requires three lines for the bus plus a slave select line for each slave if there is more than one slave because addressing is out-of-band. The protocol is almost as simple as Async serial. You can save one line on the bus if you only need half-duplex (3-wire variant).

    If you have the lines to spare, SPI might be your best bet for performance. However, nothing says you have to conform to a known standard if you are designing a closed system.

    If one propeller is coordinating the activities of the system, then a master/slave configuration will make things the easiest. If each unit needs to be completely autonomous and may or may not become disconnected from the system temporarily, then you need to use a message based protocol with addressing (similar to IP, but can be simpler). Another possibility is a mesh configuration with a dedicated point to point connection between each Prop and all the others. This will give you the best network performance at the cost of increased wiring and pin usage.

    List your network throughput expectations and other requirements for the network to help figure out the most optimal configuration.

    Post Edited (Ken Peterson) : 9/8/2009 12:50:34 PM GMT
  • RaymanRayman Posts: 14,849
    edited 2009-09-08 12:55
    I also agree that fullduplexserial is the easiest way to go...

    There's a serial driver in OBEX that is faster, up to·3 times·115200 baud = 346 kbps.

    If that's still not fast enough, I think Beau has posted some higher speed code somewhere...

    I think I would use the same 2 wires to all the boards and use a simple scheme so that the slaves only speak when spoken to...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Sign In or Register to comment.