Protocol choices for 2 wire medium distances
Basil
Posts: 380
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!
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
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)
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'.
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?
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.
http://www.hw-group.com/download/HWg_Poseion_RS-485_wiring_schemes.pdf
http://www.lvr.com/rs-485_circuits.htm