Shop OBEX P1 Docs P2 Docs Learn Events
Recommended max length of data bus? — Parallax Forums

Recommended max length of data bus?

MoskogMoskog Posts: 554
edited 2009-09-10 17:12 in BASIC Stamp
Today I hooked up the DS1620 into the parallell CS-Clk-Data-bus on my BS pcb only to discover the temperature could not be read and the RTC on the main board·only gave strange outputs. The 1620 is placed about 35 meters away and connected to the main pcb through an underground·phone cable. When disconnecting the 1620 board·from the cable, leaving the cable still connected to the main board,·I still got the problem with the RTC.. so I guess the cable itself is·making the problems.
Testing the cable with the multimeter indicated no shorts but the capacity between each leader is about 20nF.
The cable is a three pair phone cable including Vss, Vdd, Cs, Clock and Data line.

Will the cable simply be too long?

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2009-09-10 11:58
    If the two devices are connected closer to the Stamp, does the system work correctly? You mention disconnecting the 1620 from the cable but not disconnecting the cable from the RTC.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • LeonLeon Posts: 7,620
    edited 2009-09-10 12:11
    35 m is much too long for that cable. You'll probably have more noise than signal on the wires.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • MoskogMoskog Posts: 554
    edited 2009-09-10 12:24
    No, the RTC· and other stuff is located with the BS2pe on the postcard sized main board·and the 1620·was supposed to be connected on the same data bus as the other things. It is only the 1620 that is far away, about 30 meters or so.

    The RTC only gave indication that something did not work as it stopped showing time in the display,·but resumed showing correct time once the cable was disconnected. That happend even though the 1620 not was connected in the other end of the cable.

    I had another 1620 connected·to the bus-connector with just a couple of meter cable with no problems, this new remote 1620 should replace that one when I faced this new problems.
  • MoskogMoskog Posts: 554
    edited 2009-09-10 12:26
    Well, Leon, you are probably right, guess I have to work out another way·to transmit the temp reading.
  • alphamike27alphamike27 Posts: 10
    edited 2009-09-10 13:56
    You may be able to get away with it if you use a Cat 5 or shielded cable.......................
  • LeonLeon Posts: 7,620
    edited 2009-09-10 14:07
    The capacitance will probably be too high.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • vaclav_salvaclav_sal Posts: 451
    edited 2009-09-10 14:51
    Check the I2C bus specification here http://www.nxp.com/acrobat_download/literature/9398/39340011.pdf
    ·
    It recommends the pairing of each data line with each other.
    I have noticed "each (twisted pair)·data line should be paired with Vss".
    So using 4 pair CAT 5 would be an improvement.
    I am no transmission line expert but 35 meters should not be a big problem.
    Also check the calculation of pull-up resistors, ·they are fairly critical· on longer runs and depend on many factors.
    ·
    As a minor side note – the data bus you are using is serial, not parallel.
    ·
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-09-10 15:51
    35 meters is over 100 feet. I wouldn't signal TTL-level stuff over 10 feet, and RS232 drivers like the MAX232 are only specified out to 50 feet.

    A set of RS423 drivers would be good to 4000 feet, though.
  • MoskogMoskog Posts: 554
    edited 2009-09-10 16:19
    Well,, I was hoping to use an existing cable that was put underground along with·a similar cable used by the fire alarm system. I think it is a 3-pair CAT 5e cable because it looks just like this one: http://en.wikipedia.org/wiki/File:CAT5e_Cable.jpg
    But with 3 individual twisted pairs.
    This means I cant twist each data line with its own ground line using this cable.
    Because I didnt know this would be a problem I paired the lines this way: Vss+Vdd, Clk+Chipselect and Data+Unused line.

    But, before I leave this cable.. What if I connect the DS1620 this way:

    Clk+Vss
    Data+Vss
    Vdd+CS

    I mean, does·the ChipSelect have to be paired, isn't that a clean 5V line when 1620 is selected?


    And, vaclav_sal, you are right on the serial issue, I was just thinking parallell as most of the chips share the lines very parallell except the CS when looking at the pcb.
  • MoskogMoskog Posts: 554
    edited 2009-09-10 16:42
    allanlane5

    I suppose I need to settle down and think, I probably need another BS2 out by the 1620 to read the temperature there and then find another way to transmit the values back to the other BS, maybe by air or another smart way.
  • vaclav_salvaclav_sal Posts: 451
    edited 2009-09-10 17:12
    I agree with your assesment and the pairing:
    Clk+Vss
    Data+Vss
    Vdd+CS
    It should definetly improve the situation.

    I was just looking at this Bluetooth stuff ·if you like to experiment·with wireless.
    There is minor gotcha - as advertized it only works between PC and an embeded device.

    http://cgi.ebay.com/Bluetooth-serial-converter-UART-interface_W0QQitemZ350250094988QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item518c88518c&_trksid=p3286.c0.m14
Sign In or Register to comment.