Shop OBEX P1 Docs P2 Docs Learn Events
Problems with servo controller — Parallax Forums

Problems with servo controller

Karl WendtKarl Wendt Posts: 7
edited 2009-04-30 21:41 in BASIC Stamp
We are working with the Parallax Servo Controller with the Professional development board with a BS2sx. We are having problems debugging the servo controller with the provided code.
http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/ServoControllerManualRev B v2_4.pdf

' {$STAMP BS2sx}
'{$PBASIC 2.5}
Sdat PIN 15 ' Serial Data I/O pin
[color=#990000] Baud CON 1021[/color] ' Constant for 2400 baud
buff VAR Byte(3) ' temporary variable
FindPSC: ' Find and get the version
DEBUG "Finding PSC", CR ' number of the PSC.
SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCVER?",CR]
SERIN Sdat, Baud, 500, FindPSC, [noparse][[/noparse]STR buff\3]
DEBUG "PSC ver: ", buff(0), buff(1), buff(2), CR
STOP




I have already modified the Baud code in the third row to what we believe is the prober amount for our chipset but I do not know what else needs to be changed in order for the BS2sx to gain communication with the servo controller.

Comments

  • dandreaedandreae Posts: 1,375
    edited 2009-04-30 14:21
    The code that you posted works just fine.· Try a different I/O pin, you may have a damaged I/O pin.· If it turns out that its not the I/O pin, then you may have a damaged servo controller.· Let me know?


    Kind regards,

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support·
  • Karl WendtKarl Wendt Posts: 7
    edited 2009-04-30 17:43
    We are using the servo port/channel on our Professional Development Board. This port as well as the pin it is wired to works perfectly with a servo but not with the PSC. We have switched IO pins (and changed the pin designation in the code) to no success. We are supplying external power to the PSC with a variable power supply at <7.5V so we do not think that is the issue.

    We actually have two Servo controllers and both show the same issue. It seems unlikely we fried both or received two defective ones.

    What does the following code do exactly?
    SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCVER?",CR]
    SERIN Sdat, Baud, 500, FindPSC, [noparse][[/noparse]STR buff\3]
    



    Thanks so much smile.gif
  • ZootZoot Posts: 2,227
    edited 2009-04-30 17:53
    said...
    <7.5V so we do not think that is the issue.

    But if you are supplying Vin to the servo ports, and that's where the PSC is plugged in, and you are supplying the PSC with more than 5v at Vin, that would be a problem. If you have Vdd as the + supply on the servo ports, then something else is going on.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • Karl WendtKarl Wendt Posts: 7
    edited 2009-04-30 20:31
    The power input for the PSC is only for the servo power isn't it? The lights on the PSC work regardless of whether the external power is on or off.

    We also noticed this time that the green light on the PSC blinks when the BS2sx tries to contact it. It is solid when we hold the STAMP reset button. Something is definitely going to the PSC.


    Sorry, we are really new to this lol.gif
  • ZootZoot Posts: 2,227
    edited 2009-04-30 21:41
    I meant if you have the serial connection from the PSC (3 wire header -- serial, gnd, 5v) plugged into a servo port (for convenience) on the PDB, and the servo port on the PDB is drawing from Vin, then the voltage supplying the LOGIC of the PSC would be too high (potentially).

    Yes, the logic power is separate from the "servo" power on the PSC.

    The fact that the light goes green when the Stamp tries to communicate just means that the Stamp is pulling the serial line low (as it should), i.e., that there *is* activity on the serial line, not necessarily that the activity is valid or that anything is "working"; it is not a reflection of what the PSC is actually doing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
Sign In or Register to comment.