Shop OBEX P1 Docs P2 Docs Learn Events
Long distance communication — Parallax Forums

Long distance communication

underworldmanunderworldman Posts: 22
edited 2010-07-18 20:51 in Propeller 1
Hello there,

I need to know how long distance communication between two micro controllers can take place. What I want is to make vdd & gnd be carried, as part of the cable which can be upto 20 meters between the chips. Please advice me if any of you have done this before. Thanks.

Comments

  • LeonLeon Posts: 7,620
    edited 2010-07-17 12:28
    RS-232 and RS-422 will easily work over 20m. The latter will be OK at up to 1200m, and can be used at up to 10 Mbps. You need to find a suitable 3.3V driver.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 7/17/2010 12:40:03 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-17 15:00
    Instead of carrying Vdd in the cable, I would recommend carrying a higher voltage and regulating it to Vdd at the other end. That way, any cable losses will not have an effect on the final voltage.

    -Phil
  • T ChapT Chap Posts: 4,223
    edited 2010-07-17 16:19
    For very long runs, RS485 works well, datasheets often state 4000 ft. One IC and a cap required on each end, but like Phil said, use 5 volts as the cable power and regulate down to 3v3 at the end for example. Put a small cap at the end of the power lines. 3 pins required off each micro, TX, RX, and Enable. A slight delay required when transitioning the enable pins on or off. Use an RJ45 connector and CAT5E or CAT6.
    287 x 239 - 23K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2010-07-18 00:02
    Someone who posts on this forum had an article about using RS485 to control lights.· (I think he writes a lot of Propeller articles (for Nuts and Volts, I think), but I can't remember his name.)· I think he made a shield for the Propeller Platform using the 5V RS485 chips.· He mentioned the 5V chips cost less than the 3.3V ones and can still be used with the Propeller.· I haven't tried it yet myself but I have purchased a couple of chips to give it a try sometime soon.· The Digi-Key part number is 497-6728-5-ND (I have my latest invoice sitting in front of me).

    Good luck,
    Duane
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-07-18 00:41
    Yes, that nuts and volts article inspired me as well.

    Hopefully the jpg compression on this screenshot will leave the three internet links visible at the bottom left corner.

    Cat 5 or Cat6 is very cheap and convenient. Computer cabling only uses 4 of the 8 wires, and there are pseudo standards around for using the other 4 - two for power and two for data.

    You can daisy chain RS485 - but it might be worth leaving out the bias resistors on some boards if there are lots of nodes.

    I'm using switching regulators LM2574 and LM2575 and so the input volts can be anything from a few volts higher than the regulated volts (7V for 5V) up to 40V. The advantage to higher volts is that less current is needed, and this includes the current in the earth return wire, which can 'lift' the volts at the other end if you draw too much current. Also it is worth just checking the resistance of cat5 cable over long runs but 20 metres would be fine.

    Mind you, RS485 and even RS232 might be overkill for just 20 metres. I've run several hundred metres of cat5 cable using just 3V and 0V signal levels (with 1k current limit resistors) and if the baud rate is low, eg 1200 baud, it works fine.

    So it really depends on how fast you need to go. The faster the speed, the more the complexity. Ballpark figures I've found from experience is that RS232 19200 baud will go about 5 metres with unshielded cable. I sometimes have trouble with 2 metres of RS232 ribbon cable at 115k baud. 1200 baud will go for hundreds of metres. For fun once I sent 110 baud signals a kilometre using fence wires.

    So depending on the speed for your 20 metre link, you might not need anything more than a couple of resistors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
    849 x 586 - 69K
  • underworldmanunderworldman Posts: 22
    edited 2010-07-18 15:43
    Leon said...
    RS-232 and RS-422 will easily work over 20m. The latter will be OK at up to 1200m, and can be used at up to 10 Mbps. You need to find a suitable 3.3V driver.

    Hi Leon,

    I can use EIA-485 as it can also prove to be low cost [noparse]:)[/noparse]
  • underworldmanunderworldman Posts: 22
    edited 2010-07-18 15:45
    Phil Pilgrim (PhiPi) said...
    Instead of carrying Vdd in the cable, I would recommend carrying a higher voltage and regulating it to Vdd at the other end. That way, any cable losses will not have an effect on the final voltage.

    -Phil

    Hi Phil,

    That is an excellent point. I'll be using 9V for PoE and regulators and voltage dividers on the slave side to acquire stabilization.
  • underworldmanunderworldman Posts: 22
    edited 2010-07-18 15:47
    T Chap said...
    For very long runs, RS485 works well, datasheets often state 4000 ft. One IC and a cap required on each end, but like Phil said, use 5 volts as the cable power and regulate down to 3v3 at the end for example. Put a small cap at the end of the power lines. 3 pins required off each micro, TX, RX, and Enable. A slight delay required when transitioning the enable pins on or off. Use an RJ45 connector and CAT5E or CAT6.

    Hi Chap,

    That is exactly what I'll be doing.
  • underworldmanunderworldman Posts: 22
    edited 2010-07-18 15:50
    Duane Degn said...
    Someone who posts on this forum had an article about using RS485 to control lights. (I think he writes a lot of Propeller articles (for Nuts and Volts, I think), but I can't remember his name.) I think he made a shield for the Propeller Platform using the 5V RS485 chips. He mentioned the 5V chips cost less than the 3.3V ones and can still be used with the Propeller. I haven't tried it yet myself but I have purchased a couple of chips to give it a try sometime soon. The Digi-Key part number is 497-6728-5-ND (I have my latest invoice sitting in front of me).



    Good luck,

    Duane

    Hey Duane,

    Thanks for your recommendation. I'll take a look at it.
  • underworldmanunderworldman Posts: 22
    edited 2010-07-18 15:58
    Dr_Acula said...
    Yes, that nuts and volts article inspired me as well.

    Hopefully the jpg compression on this screenshot will leave the three internet links visible at the bottom left corner.

    Cat 5 or Cat6 is very cheap and convenient. Computer cabling only uses 4 of the 8 wires, and there are pseudo standards around for using the other 4 - two for power and two for data.

    You can daisy chain RS485 - but it might be worth leaving out the bias resistors on some boards if there are lots of nodes.

    I'm using switching regulators LM2574 and LM2575 and so the input volts can be anything from a few volts higher than the regulated volts (7V for 5V) up to 40V. The advantage to higher volts is that less current is needed, and this includes the current in the earth return wire, which can 'lift' the volts at the other end if you draw too much current. Also it is worth just checking the resistance of cat5 cable over long runs but 20 metres would be fine.

    Mind you, RS485 and even RS232 might be overkill for just 20 metres. I've run several hundred metres of cat5 cable using just 3V and 0V signal levels (with 1k current limit resistors) and if the baud rate is low, eg 1200 baud, it works fine.

    So it really depends on how fast you need to go. The faster the speed, the more the complexity. Ballpark figures I've found from experience is that RS232 19200 baud will go about 5 metres with unshielded cable. I sometimes have trouble with 2 metres of RS232 ribbon cable at 115k baud. 1200 baud will go for hundreds of metres. For fun once I sent 110 baud signals a kilometre using fence wires.

    So depending on the speed for your 20 metre link, you might not need anything more than a couple of resistors.

    Acula,

    Its really great to know you've done it before. I will be using EIA-485 because of its simplicity in design and not to mention its cost effectiveness. Reason why i need this small network is because the slaves I have need to be powered by the ethernet cable, and that is precisely why i'll be using PoE.
  • LeonLeon Posts: 7,620
    edited 2010-07-18 16:02
    underworldman said...
    Leon said...
    RS-232 and RS-422 will easily work over 20m. The latter will be OK at up to 1200m, and can be used at up to 10 Mbps. You need to find a suitable 3.3V driver.

    Hi Leon,

    I can use EIA-485 as it can also prove to be low cost [noparse]:)[/noparse]

    Electrically, I think they are the same. RS-422 is more suitable for a simple application and the chips might be cheaper.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Duane DegnDuane Degn Posts: 10,588
    edited 2010-07-18 19:02
    underworldman,

    The article I was thinking of was·Spin Zone #3 in Nuts & Volts Magazine, November 2009 by Jon Williams.· Here's a link to the board at Gadget Gangster:· http://gadgetgangster.com/find-a-project/56?projectnum=201

    There are links to the article, schematics and source code on the above page.
    Leon said...
    Electrically, I think they are the same. RS-422
    The ST485 datasheet says it can be used for·both RS-485 and RS-422.

    I haven't found the forum post by Jon discribing his board.· I think there was some additional useful information in his forum post.· I think Jon Williams is JonnyMac here on the forum.

    Duane
  • underworldmanunderworldman Posts: 22
    edited 2010-07-18 20:51
    Thanks Leon & Duane for being kind enough to provide the link. Its an amazing list of modules.
Sign In or Register to comment.