Shop OBEX P1 Docs P2 Docs Learn Events
Protocol choices for 2 wire medium distances — Parallax Forums

Protocol choices for 2 wire medium distances

BasilBasil Posts: 380
edited 2010-08-15 02:53 in Propeller 1
Hi All,

I am currently working on a small project and need to decide which protocol to use to communicate from a prop master to multi-dropped slaves (probably a small PIC because thats what I'm familiar with).

The range will not be great, probably 2-3m max between slaves, farthest slave maybe 25m away.
I would like an average data rate, something at least 100kbps (little b) and the maximum nodes on the bus would be around 150 max, but will usually be 10-20.

RS485 first came to mind, but I would prefer not to have a terminating resistor at the end of the bus (to keep it simple for the installer/user if is not me).

If I did use RS485, if I put a terminating resistor in every slave, the only effect this has is increase power consumtion right?

Can anyone suggest another protocol (I dont care if its non-standard)

Thanks!

Comments

  • markaericmarkaeric Posts: 282
    edited 2010-08-13 21:41
    Only two wires is pretty tough. You could possibly use a half-duplex current loop.
  • BasilBasil Posts: 380
    edited 2010-08-13 21:48
    Hmmm that's an interesting idea how would I implement it?
  • T ChapT Chap Posts: 4,223
    edited 2010-08-13 21:50
    I am not understanding what is the issue with putting a terminator on each end? It is as simple as putting dual RJ45 connectors on each board, then daisy chain all the systems, on each end add a CAT5 or CAT6 plug that has a resistor crimped in it instead of the cable. The terminator just plugs in, no mess.
  • BasilBasil Posts: 380
    edited 2010-08-13 22:05
    I was hoping to implement a network which does not have to be installed in a strict daisy-chain, i.e. might have multiple 'ends'.

    I guess the installer (whether its me or not) could simply use a terminator at each of the ends. Would this cause issues with RS485? (Multiple end that is)
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-08-14 01:30
    The resistors serve two purposes - as a terminator to prevent echos, and to bias the volts so that zero is zero when nothing is being transmitted.

    For slow networks, you only need one set of resistors (at the master, usually three in a row). No other resistors needed. The topology can then be star with multiple branch points like a tree.

    As you increase the speed, resistors at the end of longs runs become important. Very important at 10Mhz. Certainly not needed at all at 1200 baud. Somewhere in between those values is the cutoff point and I'm not sure where it is.

    Also RS485 is really a 3 wire network as you will need a common ground. Unless you have a ground from some other source. Or 4 wire 'power over ethernet'.
  • BasilBasil Posts: 380
    edited 2010-08-14 01:35
    Dr_Acula wrote: »
    I'm not sure where it is.

    No point me asking then hehe.

    I'm aiming for maybe 115k (or whatever it is, I forget the exact baud).

    I think RS485 is the best choice then given the helpful replies. Next question, what are the implications of using a non twisted pair? (specifically 4 core flat phone cable)

    EDIT: just saw your last comment about GND.
    I plan on running a common 12V-24V power rail to all nodes (18awg black/red twin code cable through screw terminals), and a separate cable carrying the data (through RJ12 connectors + phone cordage). So, yes there will be a common ground of sorts. Does this sound ok?
  • LeonLeon Posts: 7,620
    edited 2010-08-14 04:21
    You should be OK with that cable over a short distance like that.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-08-14 04:41
    Formula is here http://www.innovatic.dk/knowledg/rs485/rs485.htm

    That assumes twisted pair and termination, but you are so far within the limits at the short distances that I think you will get away with no termination and telephone cable.

    I agree re RS485 being a good choice.

    If you had two way communication with all nodes being of equal status then I would go for RS232 but you then need some sort of router (which the propeller can do very nicely if you ever want to). But for the 'master with many slaves' configuration RS485 is much better.
  • T ChapT Chap Posts: 4,223
    edited 2010-08-14 10:40
    Look at this idea, maybe you could use the same CAT5E to carry the daisy chain to and from each device. Then, at the last device you would need a simple method to insert the terminator resistor, but that could be as easy as switching two little jumpers on some headers that put the terminator resistor into the circuit.
    398 x 605 - 44K
  • BasilBasil Posts: 380
    edited 2010-08-14 22:53
    Thanks for all the replies guys. I think ill stick with good ole RS485 :)
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-08-15 02:53
Sign In or Register to comment.