Shop OBEX P1 Docs P2 Docs Learn Events
HELP, cannot get servos to move — Parallax Forums

HELP, cannot get servos to move

dlinebardlinebar Posts: 13
edited 2009-11-08 05:10 in Robotics
I just got the parallex USB servo controller and installed the drivers, hooked it up, I am using the PSCI drtvo controller interface beta software but cannot get the servos to move. I managed to get the program to rum in a loop, I can see the blue LED light up when data is going to the board but none of the servos move, I am not sure what I am doing wrong.

The red LED is on Solid, I hooked up a battery,

HELP!

Dan hop.gifhop.gif

Comments

  • dlinebardlinebar Posts: 13
    edited 2009-11-04 01:45
    Oh yea when I Get PSC version it reports PSC not found.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2009-11-04 06:03
    dlinebar,

    Can you post a picture of your setup as well as any code that you might be using?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • dlinebardlinebar Posts: 13
    edited 2009-11-05 00:18
    Well it is exactly like in the manual, I have battery set up plugged into it, hooked up to the USB cable, Servos plugged into 3 of the available plugs. I am using the software off of the page where the board is. Its the beta 0.9 version, I will post a picture later but I have it set up just like the manual. Do I need to go into the control panal and adjust the baud rate or anything? I installed the USB drivers but did not configure anything,·just let the drivers install.....help.....



    Dan
  • dlinebardlinebar Posts: 13
    edited 2009-11-05 01:47
    Here is a picture
    1024 x 768 - 98K
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2009-11-05 19:26
    dlinebar,

    Have you tried re-installing the firmware? ... The red light remaining on doesn't sound correct.

    How about just pressing F7 from the Propeller IDE. Does the Propeller Chip identify?

    "I can see the blue LED light up when data is going to the board but none of the servos move" - There should be a second LED that lights up with any serial activity RX or TX ( I can't remember what color, I don't have a board in front of me ...green or yellow)

    Make sure that you are selecting the right COM port from the PSCI software and that you start the PSCI software after you have plugged in the PSC.

    The proper version returned should be "Version 1.0" from the PSCI program

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • dlinebardlinebar Posts: 13
    edited 2009-11-06 01:31
    I loaded the propeller tool and press F7 it returns the following

    "Propeller chip version 1 found on COM3"

    When I load the PSCI software I select COM4 and it says COM PORT OPEN
    U then press "Get PSC version and it says "PSC not found"

    The Red light is on constantly, the green light blinks most of the time a steady pulse, the blue light comes on when I send commands.

    I did a hardware reset (pushed the button on the board) and that did not change anything.

    I am going to re-install the divers on the PC and see if that does anything, then I guess the firmware is next......
  • dlinebardlinebar Posts: 13
    edited 2009-11-06 01:48
    IT WORKS!!!!!!!! I re installed the firmware, and then installed the USB drivers and it WORKS!!!!!!! SUCCESS THANKS!!!

    Dan
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2009-11-06 03:40
    dlinebar,

    That's excellent!!, I'm glad that you were able to get it working.

    BTW) Welcome to the Parallax forum!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • dlinebardlinebar Posts: 13
    edited 2009-11-06 04:27
    THANKS On to next problem!!! I want to send the string to make them move in a program (using a language) and I read the manual but I cannot get it to move. I know the cammands are getting to the port I am just unsure of the syntax. Sooooooo
    is this right

    "!SC", 1, 0, 1100.LOWBYTE, 1000.HIGHBYTE, CR
    or this
    "!SC", 1, 0, 1100, 1000, CR

    Or do I need to do something special to get the carrage return to take???? What do I need to send to get it to move?? The letters CR are obviously not a carrage return adnI tried sending it via ASCII (13) but it does not work....I used Just Basic...here is the code I tried

    open "com3:2400,n,8,1" for random as #commHandle
    hello$ = chr$(34) + "!SC" + chr$(34) + ", 1, 0, 1100, 1000, $0D"
    print hello$
    print #commHandle, hello$

    close #commHandle


    open "com3:2400,n,8,1" for random as #commHandle
    hello$ = chr$(34) + "!SC" + chr$(34) + ", 1, 0, 1100, 1000, " + chr$(13)
    print hello$
    print #commHandle, hello$

    close #commHandle


    open "com3:2400,n,8,1" for random as #commHandle
    hello$ = chr$(34) + "!SC" + chr$(34) + ", 1, 0, 1100.LOWBYTE, 1000.HIGHBYTE, CR"
    print hello$
    print #commHandle, hello$
    close #commHandle

    THANKS
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2009-11-06 04:50
    dlinebar,

    When sending anything serial you can only send BYTES. That is why you must break a larger number down into a HIGHBYTE and a LOWBYTE.

    The Syntax for setting a servo position is...

    “!SC” <channel> <ramp speed> <lowbyte> <highbyte> <CR>

    Refer to the example on page 4 of the PDF ...

    pw = 1100
    SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
    
    



    Where:
    ch - is the channel (0 through 2 for you if you are using the first three servo bays)
    ra - is the ramp speed ( a value ranging from 0 to 63, where 0 is the fastest and 63 is the slowest)
    pw.LOWBYTE - is the LOWBYTE of pw
    pw.HIGHBYTE - is the HIGHBYTE of pw
    CR - command termination


    Since pw is equal to 1100, the HIGHBYTE would be equal to 4 and the LOWBYTE would be equal to 76, so ...

    HIGHBYTE = int( number / 256)
    LOWBYTE = number - (HIGHBYTE * 256)



    SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, 4, 76, CR] .... could be the equivalent

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 11/6/2009 4:58:35 AM GMT
  • dlinebardlinebar Posts: 13
    edited 2009-11-08 05:10
    Thanks for the help... I got it to work using JBASIC....here is the syntax....aka....trick

    open "COM3:2400,n,8,1,ds0,cs0,rs" for random as #commHandle
    position0$ = "!SC"+CHR$(0)+CHR$(0)+CHR$(83)+CHR$(1)+CHR$(13)
    print #commHandle, position0$;
    close #commHandle

    I had to monitor the COM port while using the Parallax program to see what was actually going to the COM port when the board was commanded. When I did that it made it easy to see what was going on with a program that worked. There were other little JBASIC tricks...like the ";" at the end of the print line. That removes the line feeds (0A), otherwise the print send them as well...it all works but there is an extra line feed at the end if the commands if you dont...anyway there it is ... it works fine now....

    THANKS
Sign In or Register to comment.