Shop OBEX P1 Docs P2 Docs Learn Events
SOLVED: Servo Controller Not Working?! — Parallax Forums

SOLVED: Servo Controller Not Working?!

Tim1681Tim1681 Posts: 5
edited 2008-05-11 19:49 in BASIC Stamp
Probably around 6 months ago I ordered the Parallax Servo Controller and a Standard Servo. Everything was great and dandy, but at the time I did not have the money to continue with my project, so the controller when into a box.

Now it's 6 months later. I took the controller out of the box, and started to set it up. Everything seemed fine, and then I programmed my BS2 with the sample code provided from the Parallax product page in the PDF file. The servo didn't move (But it did go HOME). I checked to see if the DEBUG could read the version number of the controller. The controller responded just fine with the Version number, which told me the BAUD rate was set correctly. So I continued to experiment for about an hour and a half, but I still could get nothing.

Here's the code ended up with right before I quit:
' {$STAMP BS2}
' {$PBASIC 2.5}
ch VAR Byte
pw VAR Word
ra VAR Byte
Sdat CON 12
baud CON 396
ra = 7
DO
pw = 600
SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 11, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 12, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 500
pw = 200
SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 11, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 12, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 500
LOOP



I thought the controller might be shot, but the problem is the servos will still fight me if I try to move them while the power is on. This makes me suspect there are still PWM's going to the servos and the controller board must still be in working order... But the servos still will not change position their positions from center when sent the command from the BS2.

Should I just buy another servo controller and see if it works, or does anyone have an idea of what I might be doing wrong?

Post Edited (Tim1681) : 5/11/2008 7:47:19 PM GMT

Comments

  • ercoerco Posts: 20,259
    edited 2008-05-11 18:19
    Double check and re-read EVERYTHING. It didn't go bad sitting in a box for 6 months. If it worked last time you used it, it's still good. It's very easy to forget/overlook/miswire/mistype one simple thing when returning to a project after a few months. Unplug everything, start from scratch, follow every step. Use the same code from 6 months ago that worked, if you have it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • FranklinFranklin Posts: 4,747
    edited 2008-05-11 18:36
    What is your bs2 running in? Could you test the servo on that board? I agree with erco, things usually don't go bad in a box.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Tim1681Tim1681 Posts: 5
    edited 2008-05-11 19:49
    For some reason, it turns out, my PSC has either a short or one of the traces in the PCB is not properly connected/soldered around the JUMPER connection.

    There is a JUMPER on the PSC board which is supposed to control the "Networking" feature by telling the IC whether the pins on the board are 0-16, or 17-32.

    On my board, it does not matter if the JUMPER is in or not, the pins are always 17-32, which leads me to believe there is either a short or an open somewhere on the board which deals with the Networking Jumper.
Sign In or Register to comment.