Shop OBEX P1 Docs P2 Docs Learn Events
5 volt I/O over long distance — Parallax Forums

5 volt I/O over long distance

SteveDSteveD Posts: 64
edited 2005-11-30 18:29 in BASIC Stamp
Would it be acceptable for a BS2 to output 5 volts from one of its pins through a 24 AWG wire that is 100' to 150' long and have another BS2 with one of its pins connected to the other end of this wire?··Providing the voltage drop does not fall below 1.4 volts and common ground of course, the receiving stamp should see this as an input.· I guess my real question is, is this the proper method·for·sending a simple I/O from one stamp to another over long distances or is there another method I should use?

Thank you
·

Comments

  • steve_bsteve_b Posts: 1,563
    edited 2005-11-30 13:21
    SteveD...Steve_B here!! haha

    24AWG wire has a resistance of about 25.6ohms per 1000ft!
    Which would work out to about 2.56ohms per 100ft.
    I believe the stamp pins can source (meaning output current on a given pin) about 50mA. So...at 50mA current source and a 2.56ohm run....you'd get a 0.128Vdrop....hmmm, I thought it'd be more!
    Nevertheless, if you don't have any noise on the line, you'll find that so long as you can stay above the logic threshold (typically 2.5Volts) then you'll have enough to indicate a logic 1 on the stamp.
    If you have noise, you'll run in to problems, as the noise will jump up and down across your threshold voltage which will cause false triggers.
    If you have the cable....then run the spool beside both stamps; connecting one end to one stamp, and one to the other.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • John R.John R. Posts: 1,376
    edited 2005-11-30 13:50
    Noise problems could be reduced by using a "twisted pair" for the signal and ground (with a separate ground for each signal line), and/or shielding.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • Tom WalkerTom Walker Posts: 509
    edited 2005-11-30 14:16
    Steve_D,
    It might ease your mind to note that most problems with "long runs" in the hobbyist arena have nothing to do with the resistance of the wire. You really have to look at 1000+ feet or very small-guage wire for this to be a real factor. A more common problem is the wire acting as an "antenna" and picking up signals from its environment. An intended "low" or "0" signal can suddenly appear to be a "high" or "1" if there is anything that can impose a 1.5V signal on the line. This is even more prevalent with higher transmission speeds due to the signal only having to be present for a short period of time. There have been other discussions on how to shield a run from these kinds of glitches.

    (and for the purists, I know I genralized and over-simplified, but I think I kept true to the message...)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-11-30 16:30
    Also another problem for "long runs" is the maximum speed the transmission line can support. This is because the line has an associated capacitance, the longer the run the higher the capacitance. This acts as a low pass filter, limiting the maximum speed the signals can transition on the line.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-11-30 17:19
    What Paul said. What you might do is connect two BS2's with the wire (make SURE you connect a common ground in the cable to both sides, too) and see what SEROUT baud rates continue to work.

    The PIC that the BS2 uses does support 0 to 5 volt signaling at 25 mA or so -- which should make it a reasonably good 'high-current' signaling device (low current being in the 5 mA range). You might want to put a terminating resistor on the recieving end, tied to ground, to give you a 'hard' zero volt signal. I'd start with a 1.1 Kohm resistor.

    The problem you can run into is that an 'input' on a PIC is a high-impedance. Thus it acts like an antenna really well, picking up 'noise' signals on the line.

    Note the MAX232 RS232 driver chip gives a +- 10 volt signal, terminated into 20 Kohms. The RS485 drivers expect terminators both to +5 and Ground.
  • SteelSteel Posts: 313
    edited 2005-11-30 18:29
    I would just give it a shot and test the voltage and current levels at the end of the line. That is the surefire way.
Sign In or Register to comment.