Shop OBEX P1 Docs P2 Docs Learn Events
servo question — Parallax Forums

servo question

karumb2karumb2 Posts: 6
edited 2006-03-30 15:07 in BASIC Stamp
Hi Everyone,

This is probabrly a dumb and easy question but how do it pulsout to a pin that controls a servo motor in both directions? I need the motor to turn one time in both clock wise and counter clocksiwe directions.

Right now it does turn clockwise using : PULSOUT 6,1000

Couterclockwise????

Thanks in advance

Comments

  • JonathanJonathan Posts: 1,023
    edited 2006-03-28 16:35
    It sounds like you are using a Stamp that performs PULSOUT at 2uS per count. So, PULSOUT 500 should reverse the servo.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-03-28 17:05
    Hello,

    ·· Is this a continuous rotation servo?· If so then you can also find many examples in the "Robotics With The BOE-Bot" manual.· You can find a PDF version of the manual free at the bottom of the page.

    http://www.parallax.com/detail.asp?product_id=28125

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-03-29 13:41
    A "continuous" servo will stop with a 1.5 mSec pulse, spin one way with 1.6 msec to 2 msec, and spin the other way with a 1.0 to 1.4 mSec pulse.

    Note that 'PULSOUT' on the BS2 uses units of 2 uSec, so "PULSOUT MyPin, 750" would generate a 1.5 mSec pulse, 1000 generates a 2 mSec pulse, and 500 generates a 1 mSec pulse.

    Note also you have to repeat the pulse every 20 mSec to 50 mSec.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-03-29 16:35
    Allan,

    ·· That is assuming the servo is perfectly calibrated (centered).· I have often seen where the servo isn't calibrated and the user is wondering why the 1.5 ms pulse isn't centering the servo, or it will only go in one direction.· The ones we sell have an adjustment screw to center them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • karumb2karumb2 Posts: 6
    edited 2006-03-29 17:46
    Thanks for the info. I think my servo might not be calibrated because all the values I try (above and below 750) are turning the servo in the same direction.
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-03-29 17:56
    Or, you may not have a "plain vanilla" BS2. The BS2sx, for instance, does not use '2 uSec' as the unit for the pulse-width specification.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-03-29 21:31
    Folks -

    He has never answered the question as to whether this is a continuous rotation servo or not. If not, it will NEVER reverse rotation!

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Tom WalkerTom Walker Posts: 509
    edited 2006-03-30 13:35
    Bruce,
    I don't know that I understand your statement...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-03-30 14:50
    Tom -

    Perhaps a better way to phrase the question is this:

    Are these servo motors being used as drive motors for a mobile robotic platform? If the answer is YES, are you using continuous rotation servos?

    Ordinary R/C servos which have not been specially modified will not operate properly as drive motors. They are designed for less than 360 degrees of rotation.

    Clearer?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Tom WalkerTom Walker Posts: 509
    edited 2006-03-30 15:07
    I'm sorry that I was not clearer, Bruce. I think I understand the operation of servos...it's just your statement that "it will NEVER reverse rotation!" confused me. Either continuous or non-continuous servos should be able to "reverse rotation"...just to different "degrees" (pardon the very weak pun).

    Perhaps it was just the way my "language processor" was working today [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
Sign In or Register to comment.