Shop OBEX P1 Docs P2 Docs Learn Events
Psc comunication help — Parallax Forums

Psc comunication help

AJIAJI Posts: 22
edited 2004-12-30 13:55 in Robotics
Hello

I was wondering if there are limits to the lengh of wire used to comunicate with the PSC from the BOE.

I am using twisted pair lan wire and the PSC will be located some distance from the BOE.

I have found that the servos need to be close to the PSC because they dont work right when seperated from the PSC too far.

Do I need to modify the SEROUT OR SERIN comands over long lines??

One more questioin. What damage will conecting the servo to the PSC backwards ? Ie ground wire where the signal should be.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-12-17 14:06
    What kind of distance are you talking about?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • AJIAJI Posts: 22
    edited 2004-12-17 14:09
    up to 1000' feet max, but· mostly only up to 500 feet
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-12-17 14:13
    You may want to look into an RF solution, or an RS-485 interface -- a direct connection is probably out of the question.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-17 14:19
    Yes, an RS-485 driver with an RS-485 reciever pair will preserve your signal shape, and let you drive it 4,000 feet. The driver will take some current (like 10 mA) to do this, though.

    And, you can use your twisted-pair LAN wire with RS-485.
  • AJIAJI Posts: 22
    edited 2004-12-17 16:58
    Ok I like that solution. RF is not desired Thier will be many radio transmitions in the area. I will be supplying power along with signal so power is not a problem.

    Can you tell me the parts I need and basic connectioin to pull this off.?

    The robot is an ROV and will be equipt with sevral sensors in the future so it will have a teather for power and signals.

    Right now I am using the BOE and the PSC. The manual control sicks are routed through a ADC0838 > BOE and then to the PSC located on the ROV. Also the ROV will be sending back Analog Voltages from sensors. Shoud they be converted at the ROV and then sent back to the controll box as digital?

    When I get all the bug worked out I will be Making an Indusrial version. Any sugestions for controllers for the real deal?
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-17 17:50
    www.maxim-ic.com -- MAXIM makes a lot of 485 devices. I'd recommend an 8-pin DIP form-factor.

    An example using a Max3209 TX and MAX3232 RX are at http://www.maxim-ic.com/appnotes.cfm/appnote_number/723

    It is beginning to sound like your 'ROV' will be quite sophisticated. It may be worth your while to have a rover-based processor talking over a tether to your control-station processor via RS485 drivers (for the distance), using the SERIN/SEROUT protocols (for simplicity).

    Any analog signals should be captured and digitized as close to the source as possible. Then longer range digital transmission can be used to pass the signals to the operator.

    Controllers for the real-deal: Since the BS2 is PIC-based, and others do market compilers compatible with PBasic, you might want to research a PIC 16F876 approach.
    ·
  • AJIAJI Posts: 22
    edited 2004-12-17 19:09
    "It is beginning to sound like your 'ROV' will be quite sophisticated. It may be worth your while to have a rover-based processor talking over a tether to your control-station processor via RS485 drivers (for the distance), using the SERIN/SEROUT protocols (for simplicity)."


    Do you mean as example a BOE on the rover, and one in the controller box??

    I like that to the ROV coud do all the calulations and send only results over the RS485, while the controller box only has to wory about sending servo controll and comands to the ROV
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-17 19:23
    Yes, a BOE in both places as you suggest is a good idea. BasicMicro makes very nice proto-boards which you could use.
    http://www.basicmicro.com/Product.aspx?productID=91&CategoryID=11

    This board will accept a BS2, and fit in a Pac-Tec HML-ET box. You'll need to add your RS-485 transciever chip in the prototyping area.

    On the other hand, for a prototype proof-of-concept·you could use a BOE-Bot (now $179 at Radio Shack) for your ROV (includes a BOE AND a BS2), and use your current BOE for the controller.

    Post Edited (allanlane5) : 12/17/2004 7:27:47 PM GMT
  • AJIAJI Posts: 22
    edited 2004-12-20 02:13
    Thanks looks like my solution !!!!!

    I have 2 MAX485 coming free sampled.· I found that I might need the slewed model as the data rate is far bellow the max.

    My new question is this can I use one DO/DI line with a 1k resistor as·I do with the ADC0838 or do I·have to use seprate IN and OUT pins ?

    Do send SEROUT/SERIN strings as usual or do I need to address the MAX485 in the first part of the [noparse][[/noparse]DATA] followed by "!sc"comands?

    If so where can I find PBASIC samples using the MAX485 for comunication.

    ·Again Thanks
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-20 15:04
    If you are using the RS-485 as a point-to-point link, then you don't need to address anything, just send out the pin connected to the RS-485 driver.

    If you are doing bi-directional RS-485, separate IN and OUT pins will be much easier.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-12-20 15:07
    AJI,

    You should get Jan Axelson's book, "Serial Port Complete" -- it will be a big help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • AJIAJI Posts: 22
    edited 2004-12-29 03:09
    ok I have 2 MAX3464· transivers.

    It looks like I have to tell one to TX·and one to RX·from the BOE.

    Correct me if I am worng

    I need 4 wires·1 twisted pair for data and 1 for RE pin and one for DE pin.

    In my code I tell one MAX3464 to·TX and the onter to RX by setting their pin state, then send the data string. When I want servo pos then I have to do the opposite.

    this brings me to one other question. How do I put a pin in Tri state from the BOE?

    say for exapmle RE pin is going to be Low or Tri state only I will not be using the high state option.qqqqa



    Post Edited (AJI) : 12/29/2004 3:21:52 AM GMT
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-29 16:04
    If you set a pin as input, it will go to tri-state.

    Thus, to set pin 3 as a tri-state:

    INPUT 3

    or DIR3 = 0 ' Set pin 3 to input ('1' is output on the BS2)
  • AJIAJI Posts: 22
    edited 2004-12-30 12:20
    OK Thanks.

    Next question, On the Max3088 Data sheet It shows the controll voltages as either " 1 ", " 0 ", or " X ". Is the " X " tristate or is it disabled??

    Thanks
    ·
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-30 12:51
    An 'X' state is typically a 'don't care' state, indicating that some other pin has precedence. Thus if a Reset pin is held active on a 'D' flip-flop, the output of the flip-flop will go to the Reset state, no matter what the 'D' input pin is doing. Thus the 'D' input pin will be an 'X' on the truth table when the Reset pin is active.
  • AJIAJI Posts: 22
    edited 2004-12-30 13:55
    OK That explains my problem

    So I can connect the same controll wire to both DE and RE pins, because DE=1 RE=X for Transmit and RE=0 DE=X for receive.

    All I have to do is set pin High or Low respectfully.



    I will try it when I get Home.

    thanks. I was using tristate for X
Sign In or Register to comment.