Shop OBEX P1 Docs P2 Docs Learn Events
RS-485 and max cable length — Parallax Forums

RS-485 and max cable length

mctriviamctrivia Posts: 3,772
edited 2009-07-25 16:21 in General Discussion
Well I am trying to figure out what the max cable length an RS485 signal can be sent.

http://www.national.com/ds/DS/DS96172.pdf
http://www.national.com/ds/DS/DS96173.pdf

18 gauge copper wire has a resistance of 21.400 ohms/km

if I am not mistaken because of the diferential output return resistance does not matter so I only need to worry about the voltage drop one way.

As I can see the 6172 outputs 2.5V and the ds96173 excepts up to 0.2V so 2.3V drop is acceptable.

I think the DS96173 draws up to 1mA and can have up to 32 on the line.

If I am right about all this then the max cable length is 4.67km


Am I right?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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.

Comments

  • mctriviamctrivia Posts: 3,772
    edited 2009-07-19 06:20
    found the answer.

    http://www.lammertbies.nl/comm/info/RS-485.html

    1200m max cable length. 100kbs at max length.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-07-21 00:51
    Mt,

    just curious - is this an acedemic exercise, or do you really need to drop a·1.2 km '485 cable?

    - H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-21 01:32
    Both

    I need to run 400m for sure. Was wondering how far I could go before repeater was needed

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • JomsJoms Posts: 279
    edited 2009-07-21 02:06
    I just got done with a system where I went about 600m then split it into two different cables for the last 50m. Works just fine. It is to control two pan/tilt cameras that are located across a campus. I ran the data over a spare pair of telco lines.

    I didn't use a repeater so 400m shouldn't be a problem...
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-21 02:10
    My math if right shows well over 2km though I am using 18 gauge untwisted insted of 22 twisted

    Specs show 1.2km and 32 nodes though I found chips that count for 1/8 so I should be able to do 128 nodes

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • BradCBradC Posts: 2,601
    edited 2009-07-21 04:17
    mctrivia said...
    My math if right shows well over 2km though I am using 18 gauge untwisted insted of 22 twisted

    Specs show 1.2km and 32 nodes though I found chips that count for 1/8 so I should be able to do 128 nodes

    Its not just resistance. Capacitance, induced noise and reflections will be also your enemy. Twisted is used for common mode noise rejection. Using untwisted is likely to decrease your S/N ratio in hostile environments.

    There are some very good 485 application notes floating about by some very knowledgeable people that outline the real issues faced when deploying large networks. I don't have any to hand as it's 6 years since I did my last one (google may certainly help here), but there are some oddities that can creep in if you are not careful with termination and bias (particularly).

    Plan your network and terminations carefully grasshopper. The slower you go, the more reliable it will be.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <This space for rent>
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2009-07-21 10:24
    I had a Canbus pair setup with 100m of household telephone wire in coil running on my desk for a few months as a test.

    It would send a message packet, a light would blink and it would return the message, another light would blink. If the error buffers got filled, it would have stopped - but it never did - very stable.

    The real advantage here is that RS485 can use generic wire (twisted pair is ideal but not really necessary in many cases) and perform quite well.

    If you need to do a some testing, buy a coil of wire a bit longer that the distance that you plan to use and run a similar shuttle as a bench test until your satisfied. In that way, you don't have to walk the distance several times to reload code, to change wire, or to reset the microprocessor on the other end.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ain't gadetry a wonderful thing?

    aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-21 13:28
    ya I plan to buy 4 spool of securix 18/10 to test my product out to max length. $400 a spool though hurts but I need to know it will work at very long distances without error.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-07-21 17:08
    But this isn't a real-world test, e-Grasshoppers, you must lay the cable out and catch the EM pebbles from the sky. (DOH!) Said in plain Engfish: the long run, even if common-mode and shielded may still pick up interference. I had a mere 20 foot run outside, t.pair and shielded, buried 2 feet down that still was unstable due to the proximity of a commercial AM/FM radio tower. What a PITA - the two ends worked on the desktop, because the building had a metal roof - it was a Faraday shield! No matter what we did with the cable or what kind we used, it still had problems - even drove a copper/steel ground rod and attached the cables shield to it. (Which probably caused more problems - aka ground loops %-| ... the solution was a tad bizarre: we put the cable through a 1/2 copper water pipe (dry of course [noparse]:)[/noparse]. Don't ask me about their phone, DSL, and cable problems - evil.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-21 17:12
    The pipe would act as faraday cage

    In my situation by law it would not be used in close proximity to radio tower.

    I plan to test in lab best I can then take out to field and run real world tests

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-07-21 17:58
    > The pipe would act as faraday cage

    right - we thought of that after figuring out why it worked inside but not out.

    > take out to field and run real world tests

    thought you would, just erring on the side of testing [noparse]:)[/noparse])

    cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • BradCBradC Posts: 2,601
    edited 2009-07-22 04:48
    mctrivia said...
    ya I plan to buy 4 spool of securix 18/10 to test my product out to max length. $400 a spool though hurts but I need to know it will work at very long distances without error.

    Pop a running hairdryer with a brushed motor in the middle of one of the spools for testing EMI rejection [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <This space for rent>
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-22 04:56
    I think my bigest problem is I am running 220 ac in same cable

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-22 13:22
    Twisted pair with rs485 line drivers/receivers has pretty good common mode noise rejection so the 220Vac should not be a big problem unless it is connected to a load that produces a lot of noise. I have seen runs over 100M sitting on top of fluorescent lights that had no problems.

    BTW - Congrats on your upcoming nuptials.
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-22 13:28
    thanks for the congradulations. I think I will do some more looking to find a 18+ gauge 6 to 10 wire twisted pair wire. the securix I was looking at is not.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • chaosgkchaosgk Posts: 322
    edited 2009-07-23 22:03
    What project is it that you are trying to push rs485 data that far anyway? [noparse]:)[/noparse]
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-23 22:14
    Fireworks ignitor

    Have now figured out I can get 100 boards running 128 matches each, before I need a match

    Remote can be 1km away. All boards need to be within 200m of generator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • chaosgkchaosgk Posts: 322
    edited 2009-07-23 23:16
    I assumed it was the ignition system, but just had to chime in anyway.
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-23 23:19
    Not bad though almost 12000 firworks without repeater. More with. Power draw and safety bigest problems but they have been solved now

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2009-07-24 12:07
    4 spools at $400USD per spool. I would try some shorter tests under hostile conditions with it first. And I might try some cheaper wire as well. Still it is quite a distance for RS485. You might consider CANbus as it catches transmission errors and asks for retransmits. And it even gives you a count of the number of errors since last reset.

    Safetywise, I think Airbus is using CANbus with redundancies for their fly-by-wire controls.

    There is Propeller CANbus project and I made my own boards that use CANbus with BasicStamps and SX28s or any old microcontroller with SPI. It is a bit of a learning curve, but you can have 20 nodes on that wire as it works as a broadcast and ignore packet messages not addressed to individual units.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ain't gadetry a wonderful thing?

    aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan

    Post Edited (Loopy Byteloose) : 7/24/2009 12:16:23 PM GMT
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-24 13:54
    Will definetly try much shorter tests first.

    I am using rs485 for physical layer only writing my own data layer.

    I am using very long cables but the datarate is not that high.

    Packet size is 1-512bytes not including error checking data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2009-07-24 16:09
    I just wonder if 28 gage twisted pair might do better than 18 gage not twisted. You certainly are not going the full 1.2km. Personally, I found that LAN wire was extremely cheap as everybody has stocked it and bought in high volume. Though I didn't need 4 twisted pairs, it was cheaper other choice that actually had less copper content. And you may find it dumped in a bankrupcy or surplus sale with excellent shielding.

    I do understand your need are different than CANbus. With packets as large as 512bytes, you pretty much have to create your own protocol. Besides, you apparently don't need more than a master and a slave on the same line. Still it is worth looking at CANbus to compare safety features that you might want to include in your own proprietary code. They did a lot of things right.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ain't gadetry a wonderful thing?

    aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-24 16:15
    Chose 18 because of power requiements. I need to be able to deliver 20 amps at 12v for 5ms at a time.

    I am going to look for twisted pair to take advantage of noise canceling effect

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2009-07-25 15:39
    The thing about having LAN wire with 4 twisted pairs, I pair can be used for RS-485 and then the other wires might be doubled or tripled up for power transmission. As I mentioned above, I found that LAN wire was generally much cheaper that specialty wire. Telephone wire seems to also be cheaper. So looking into making these work for you might be a rather large savings. When I got my engineering license, part of the exam was engineering economics. There is always costs involved that trade off with design. The 220ac might even work in LAN if the insulation is good quality and it is not abused to heavily in actual use.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ain't gadetry a wonderful thing?

    aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-25 16:21
    if i remember the spec of cat5 cable the insulation is rated to 600V. but 28 guage wire is really thin even doubling up the resistance would be 218ohm/km round trip. so at 200m max current draw to drop the entire 220 is only 5A. Even if I built a switching supply capable of taking 12-240V that would not be enough current capability.

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