Shop OBEX P1 Docs P2 Docs Learn Events
precission Control of a Servo ... — Parallax Forums

precission Control of a Servo ...

farnushfarnush Posts: 1
edited 2007-07-29 07:55 in Robotics
Hey guys i was try to see how precise a servo can move . I mean to say ... how do i make it rotate exactly 1 cm .. I have a wheel with 2 * pi * r = 17 cm Also i am using bs2 where floating point is not allowed .. i wanted to have 1 metre prescision while moving .. Was wondering how to get that

Comments

  • MightorMightor Posts: 338
    edited 2007-07-29 07:55
    Hey Farnush,
    farnush said...
    Hey guys i was try to see how precise a servo can move . I mean to say ... how do i make it rotate exactly 1 cm .. I have a wheel with 2 * pi * r = 17 cm Also i am using bs2 where floating point is not allowed .. i wanted to have 1 metre prescision while moving .. Was wondering how to get that
    You can use wheel encoders, but they may not give you the accuracy you need. Servos are inherently pretty inaccurate, especially when it comes to continuous rotation. I found that out for myself. If you want true accuracy, you will need to use high-resolution encoders together with stepper motors, however, that's expensive.

    Another problem with using encoders is that if you have too high a resolution, your chance of missing a pulse become bigger. The BS2 does not have interrupts and it's not impossible to miss a pulse between polls. I am using a Boe-Bot with 6.7cm diameter wheels (about 21 cms travelled per full revolution), with a resolution of 16 encoder pulses per rotation, that gives me a best case accuracy of 1.3cms. That's of course if the encoders are aligned perfectly, which most often they're not.

    Relying on the number of pulses you've sent to the servo is no good either. You need to factor in the initial acceleration and the final deceleration.

    You could use something like an optical mouse sensor underneath the robot and poll that. That would probably give you the best "distance travelled" accuracy. I have no idea how to implement that though. I am sure if you searched the forums, you'll find something that might be of use to you or perhaps someone who's done it will drop in and give you some hints [noparse]:)[/noparse]

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | What the world needs is more geniuses with humility, there are so few of us left.
Sign In or Register to comment.