Shop OBEX P1 Docs P2 Docs Learn Events
Limited Servo Control — Parallax Forums

Limited Servo Control

Ray0665Ray0665 Posts: 231
edited 2011-08-22 06:29 in Robotics
I am trying to implement PID on a prop BoeBot, I have standard parallax continuous rotation servo motors and Neubotics WW01 encoders. I am trying to characterize the PW control (Using y=mX+B).
To do this I wrote a routine to step through the PW +/- 40000 Clock ticks and record the encoder reading at each step. What I found was that on the high end the control range was only about 12000 clocks before reaching max speed and it was very non linear below 5000 clocks. Is this normal for these servos or do I have a problem here?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-21 09:08
    You need to post your code. Use the Go Advanced button and look for the Attachments Manager to attach your source files to a reply. Do not use cut and paste to put your code into your message.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-08-21 12:31
    Ray0665 wrote: »
    What I found was that on the high end the control range was only about 12000 clocks before reaching max speed and it was very non linear below 5000 clocks. Is this normal for these servos or do I have a problem here?

    Regardless of issues with your code, it's highly non-linear, and your experience sounds about right. The speed control range on a modified servo is only a a hundred or so microseconds +/- center. Anything beyond that up or down has little effect.

    -- Gordon
  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-21 12:50
    Modified servos are just that. They're originally designed for use as servo motors with the control pulse width specifying the desired servo position. They may be literally modified for continuous motion use or built to a stripped down design for continuous motion use. The control pulse width range is still the same, but the response of the servo is very non-linear as you've noticed. How much control you have of speed varies from servo model to servo model and sometimes from servo to servo since they're not designed for a linear response.
  • ercoerco Posts: 20,255
    edited 2011-08-21 14:01
    I've had the opposite experience after modifying some cheapie quarter-scale servos (Vigor VS-11's). My RPM vs. pulsewidth was reasonably linear. The top-end RPM is disappointingly slow (~60 RPM) so the range is not huge. My tests were done pre-encoder, so I manually timed 10 revolutions to get my RPM. Results attached. I like quarter scale servos for the torque output, BTW.
  • Ray0665Ray0665 Posts: 231
    edited 2011-08-22 06:29
    Thank you all for taking the time to respond now at least I know I don't have to replace the servos.
    I've attached the code I used to make my measurements in case anyone may find it useful.
Sign In or Register to comment.