Shop OBEX P1 Docs P2 Docs Learn Events
Servomotor rotation — Parallax Forums

Servomotor rotation

ScopScop Posts: 5
edited 2009-02-02 20:34 in Robotics
Hello, I recently ordered some Parallax servo's, and I am starting my coding before i have them. I was curious on how much the servo's turn with one of the pulse widths.

I am familiar with pulse width modulation, and know ill need different width's for different directions, and all that.

For instance, if going clockwise at "max speed" is 1300microseconds, how far will the wheel turn, ie the angle of rotation?

I suppose I could test this when my board arrives, but I don't have it yet, and have a lot of coding to do. tongue.gif

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-02-02 17:17
    Servos are not all the same. There are generally small differences is where center, left and right are, and sometimes large differences. There are also two kinds of servos: standard servos that move to a certain position, and continuous rotation servos that are like a speed controlled motor.

    Standard servos will move as quickly as possible to the position you tell it, and try to hold. Continuous rotation servos will move at a speed proportional to the pulse width. The longer/shorter the pulse width, the faster it goes.

    The parallax standard servos have about 180 degrees of rotation.
  • ScopScop Posts: 5
    edited 2009-02-02 17:29
    Thanks for the quick reply.

    I am using the parallax continuous rotation servo's. And I am using them for a mini-sumobot project.

    I appreciate the info you gave, it should turn out to be helpful. There is no way around testing the servo's with some test code though, which I don't mind doing.
    I am writing in assembly, which makes a few things different, but over all, I just need to get the counters right for the pulse widths, and I'm good.
    Too short and my motor's will studder, and too long and I'll have to backtrack.
  • Jessica UelmenJessica Uelmen Posts: 490
    edited 2009-02-02 17:39
    Hi Scop,

    If you want some more information on pulse width's for the continuous rotation servo, see Chapters 2 & 4 in Robotics with the Boe-Bot. It covers using pulse width's for performing a variety of maneuvers, and will get you acquainted with using the Parallax Continuous Rotation servo.

    Happy Developing!

    Jessica

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jessica Uelmen
    Education Department
    Parallax, Inc.
  • SRLMSRLM Posts: 5,045
    edited 2009-02-02 17:45
    J. Uelmen said...
    ...see Chapters 2 & 4 in Robotics with the Boe-Bot.

    I suspect that Scop is programming the propeller (or maybe a pic?) on a custom sumo bot project based on the mention of programming in assembly.

    You can use a oscilloscope to measure the pulse width of your output while you wait for the servos, or use any other for of servos for testing purposes. If you're using the propeller, you could also use another cog to monitor the output and see if you get the correct pulsewidth.

    As a side note, most of the sumo bots that I have seen (normal class maybe? About 6"x6") use six big can motors for power, any of which could overpower a servo. From a competition standpoint, servos are a little lightweight to be using to combat. They're good for lots of things (like reducing the amount of engineering you have to do), but they stall easy. Just a thought.
  • ScopScop Posts: 5
    edited 2009-02-02 20:34
    right now I'm designing for the 3''x3" class, at 500g. I'm hoping that I can, in a sense, program more torque out of the servo's, but I haven't gotten to that yet.
    SRLM's assumption is correct, only I'm using a basic 8051 microcontroller.

    looking over some of the specs from chap 2 & 4 (thanks Jessica!) I think I found what I needed under the Run Time section. At max speed each servo is rated at 1 revolution per second. With that I can see that 1 rotation at a pulse1.3ms = 8 inches of clockwise movement. With this information, I can calculate time delays associated with each pulse/pause time width using different coding methods using the 8051 timers. Since I'm using assembly though I had to calculate the time delay (in hex) and load those manually, and Ill also have to take into account the code overhead (machine cycles per line of code = 1.085microseconds, for me at least).
Sign In or Register to comment.