Shop OBEX P1 Docs P2 Docs Learn Events
use of standard servo using the PWM command? — Parallax Forums

use of standard servo using the PWM command?

christian_hahn13christian_hahn13 Posts: 30
edited 2006-01-30 20:28 in General Discussion
I'm trying to use a servo i have and i was wonder if i could use the PWm command.
Note: Using BS2 and BS2e
······································ -Thanks· ·cool.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-01-30 05:37
    Yes.·· NO.· oops. Try to read the PWM section of you BasicStamp Manuel. It has quite a bit of educational value.

    Please forgive my mistake.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 1/30/2006 8:20:00 AM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 05:41
    No, sorry, the PWM command in PBASIC is designed for charging an RC circuit to a specific voltage level. Use PULSOUT for driving servos.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • christian_hahn13christian_hahn13 Posts: 30
    edited 2006-01-30 05:45
    Does it also work for standard servos not only continous rotation servos?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 05:50
    PULSOUT is used for all servos; when user C/R the pulse becomes a speed control, with a standard servo it's position control.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • christian_hahn13christian_hahn13 Posts: 30
    edited 2006-01-30 05:52
    what are you refering to with : c/r?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • christian_hahn13christian_hahn13 Posts: 30
    edited 2006-01-30 05:53
    Do i need to add anything else as a form of hardware?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 06:04
    C/R = Continuous Rotation. You might want to pop by our web site and download some of our docs. "What's A Microcontroller?" is a great place to start, and after that have a look at "StampWorks."

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • christian_hahn13christian_hahn13 Posts: 30
    edited 2006-01-30 06:58
    The problem i have is that i'm trying to move a standard servo with an extreme amount of precision because if this servo has been going around for a a while(10 min) i still want it to be perfectly calibrated. But i have notice that the pulsout command merely moves the servo and the second number(after pin selection) only controls in which direction it will spin and not the position i want to go. So where should i go from here or am i simply doing something wrong.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • christian_hahn13christian_hahn13 Posts: 30
    edited 2006-01-30 06:59
    Also i heard that usually servos can tell you their exact postion but how will i go about doing that because if i find a way to do that my problems will be all but gone.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • christian_hahn13christian_hahn13 Posts: 30
    edited 2006-01-30 07:00
    Also if the pulse input really controls the postion from which range of numbers should i use with this?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-30 14:31
    Continous rotation servos are not designed for precision rotation, standard servos are designed for semi-precision positioning but there is some "slop" built into the system. For precision rotation, a C/R servo needs a feedback system such as hall effect sensors and magnets or an encoder wheel. Stepper motors also provide precision rotation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 15:55
    Paul is right, "hobby servo" and "precision" are not terms that go together -- their mechanical design·and electronic design just don't allow for it. If you want to get more resolution in the pulses you send to the servo, then you could switch to the BS2p; it will give you 0.8 us pulse resolution versus the 2.0 us pulse resoltion of the BS2. Still, with cheap gears and electronics I don't know that you'll ever get the precision you're after.

    The "standard" pulse range is from 1.0 ms to 2.0 ms, with 1.5 ms being the center point.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 15:57
    That's not so with regular hobby servos -- you "know" where they are (within their limitations) based on the pulse value you're feeding them.
    christian_hahn13 said...
    Also i heard that usually servos can tell you their exact postion but how will i go about doing that because if i find a way to do that my problems will be all but gone.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-30 16:03
    christian_hahn13 said...(trimmed)
    The problem i have is that i'm trying to move a standard servo with an extreme amount of precision because if this servo has been going around for a a while(10 min) i still want it to be perfectly calibrated. But i have notice that the pulsout command merely moves the servo and the second number(after pin selection) only controls in which direction
    Are you using a continuous rotation servo?· If so you won't be able to get position control from it anymore.· A standard servo moves to a given position, but as pointed out, accuracy is an issue.· Also, please try to combine your thoughts and questions into one post at a time rather than two or three in a row.· Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-30 16:56
    Chris Savage (Parallax) said...
    · Also, please try to combine your thoughts and questions into one post at a time rather than two or three in a row.· Thanks.

    Or edit your previous post by clicking on the pencil icon on the upper right of your post.

    As stated before, its unclear if you are using a C/R servo or standard servo (does it spin all the way around? If so its C/R, if not its standard). If its C/R use the advice I gave in my previous post, if its standard and you need a more precise positioning, you'll need to get a digital servo. They are more precise in positioning and thier deadband (the "slop" I was talking about) can be programmed. Digital servos are much more expensive (starting around $50), and require a programmer to program them (usually $100-$150).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • christian_hahn13christian_hahn13 Posts: 30
    edited 2006-01-30 17:09
    Where could i buy a digital servo?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-30 17:20
    Hello,

    ·· Could you please answer the questions we have for you in trying to help you with previous requests before asking new ones?· Thank you.· Is this a Standard or Contiuous Rotation Servo?


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-30 17:58
    Yes we can better help you if you respond to our questions, your comment "because if this servo has been going around for a a while(10 min) i still want it to be perfectly calibrated" leads one to think this is a continuous rotation servo (italisized emphasis added by me). If it is indeed a C/R servo, getting a digital servo won't help you in the slightest, they do not "spin around" as you put it, but only have a travel from 90-180 degrees depending on the model. And getting digital servos + programmer when you want an accurate C/R servo will put you out $200 and no further along on where you want to be, ie they wont work for what you want.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • christian_hahn13christian_hahn13 Posts: 30
    edited 2006-01-30 19:38
    ok thanks but i have decided to use a 1.8 deg stepper motor, cause i already have a few a home. Once again thanks for all your help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-30 20:15
    If you have any questions about driving stepper motors, ask (as an advance warning, do not connect them directly to the Stamp, you will end up damaging the stamp)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • SN96SN96 Posts: 318
    edited 2006-01-30 20:28
    Steppers are even harder to drive than normal servos. Harder meaning there needs to be some kind of controller board. Not a good first project in my opinon.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    ·
Sign In or Register to comment.