Shop OBEX P1 Docs P2 Docs Learn Events
making a servo move — Parallax Forums

making a servo move

ArchiverArchiver Posts: 46,084
edited 2003-05-16 13:32 in General Discussion
I have a servo on pin 0 of my boe. when I send it pulsout 0, 150 it
goes alll the way to one side. changing the pulse width value doesn't
make it go the other way. what am I doing wrong? how can I make the
servo go back and fourth? I need help because I'm building a
quadrapod. I think I could figure it out if I just had a "nudge" to
get started... I have a servo on pin 0 and it is powered by a
seperate 4.8vdc supply. any help would be greatly appreciated!!!
thanks!
casey
stamp newbie

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-05-16 03:08
    Hey Casey,

    Here is what you need; first the pulsout command requires three things
    Pin, Length and Pulse width. When controlling the servo I use a
    For...Next statement that is like this

    For reps = 0 to 9
    Pulsout 0, 1000,150
    Pause 20 'Needed by the servo controller board *may vary on

    'Diff servos*
    Next

    This repetition is needed because that is how the servo controller board
    works, It is constantly receiving information in pulses with a 20ms
    pause between commands.
    For more help email me off list.

    -Mike

    Original Message
    From: Casey Holmes [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=kIQ7rKxeKobMV-jruKzoyc3djd8nkcBVQE_ZSa-9INTDpYqlSZi0kYYm_O1HnObV9yChR5Hn1pWVu_zngA]caseyjholmes@y...[/url
    Sent: Wednesday, May 14, 2003 8:35 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] making a servo move

    I have a servo on pin 0 of my boe. when I send it pulsout 0, 150 it
    goes alll the way to one side. changing the pulse width value doesn't
    make it go the other way. what am I doing wrong? how can I make the
    servo go back and fourth? I need help because I'm building a
    quadrapod. I think I could figure it out if I just had a "nudge" to
    get started... I have a servo on pin 0 and it is powered by a
    seperate 4.8vdc supply. any help would be greatly appreciated!!!
    thanks!
    casey
    stamp newbie


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-16 03:14
    My mistake I was confusing it with freqout but the loop is right.
    There is only the pin and the duration of the pulse. Remember that the
    pulsout command is doubled so you 150 is actually 350 so that is
    probably your problem, you just have to find your middle setting on you
    servo.

    -Mike

    Original Message
    From: Mike Dillon [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Y8saaysfEF9x-HMr6qIMOZ3mlcmQTKpe7PG9Dtqvk2pqCa0xYsu6zQAKQ27TQDG8fHKEyzhp7qqBpUqk6iEK]laxboy687@e...[/url
    Sent: Thursday, May 15, 2003 10:08 PM
    To: basicstamps@yahoogroups.com
    Subject: RE: [noparse][[/noparse]basicstamps] making a servo move

    Hey Casey,

    Here is what you need; first the pulsout command requires three things
    Pin, Length and Pulse width. When controlling the servo I use a
    For...Next statement that is like this

    For reps = 0 to 9
    Pulsout 0, 1000,150
    Pause 20 'Needed by the servo controller board *may vary on

    'Diff servos*
    Next

    This repetition is needed because that is how the servo controller board
    works, It is constantly receiving information in pulses with a 20ms
    pause between commands.
    For more help email me off list.

    -Mike

    Original Message
    From: Casey Holmes [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=HntcpoLUBA_h7LVuu3UjOzKfgdU9xS8Zpo4N7esb4ByXcovKZ-TMZ7WHjhLwk2qy9EJOAPdmVmXjV_hl]caseyjholmes@y...[/url
    Sent: Wednesday, May 14, 2003 8:35 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] making a servo move

    I have a servo on pin 0 of my boe. when I send it pulsout 0, 150 it
    goes alll the way to one side. changing the pulse width value doesn't
    make it go the other way. what am I doing wrong? how can I make the
    servo go back and fourth? I need help because I'm building a
    quadrapod. I think I could figure it out if I just had a "nudge" to
    get started... I have a servo on pin 0 and it is powered by a
    seperate 4.8vdc supply. any help would be greatly appreciated!!!
    thanks!
    casey
    stamp newbie


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/





    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-16 13:32
    I was attempting the same thing recently - that is, a separate servo
    power supply. Same results, too - the servo would drive all the way
    to one side.
    The answer was to tie the ground for the servo and the ground for the
    BS2 together. Worked like a charm after that.
    Good luck!


    --- In basicstamps@yahoogroups.com, "Casey Holmes" <caseyjholmes@y...>
    wrote:
    > I have a servo on pin 0 of my boe. when I send it pulsout 0, 150 it
    > goes alll the way to one side. changing the pulse width value doesn't
    > make it go the other way. what am I doing wrong? how can I make the
    > servo go back and fourth? I need help because I'm building a
    > quadrapod. I think I could figure it out if I just had a "nudge" to
    > get started... I have a servo on pin 0 and it is powered by a
    > seperate 4.8vdc supply. any help would be greatly appreciated!!!
    > thanks!
    > casey
    stamp newbie
Sign In or Register to comment.