Max servo speed?
Ol' Geo
Posts: 30
Just finished Chapter 4 - Controlling Motion in WAM 2.2.
I am trying to determine what max servo speed is for Parallax std servo. The code below is to estimate the max speed by observing the difference between clockwise and counterclock rotations. Both FOR-NEXT loops have the same number, that is, 20. So, both rotational speeds appear about the same but in the opposite directions. Since I don't have an oscilloscope with me (yet), each loop takes about 20ms. Hence, the total elapse time is 400ms from 10 to 2 o'clock. The rotational travel from 10 to 2 o'clock is 120 degrees. Based on those figures, the max. speed is 400ms / 120 degrees or 133ms / 60 degrees. The figure seems reasonable as compared with those speeds specified at Futaba website. However, the data sheet given for Parallax std servo says 0 degree to 180 degrees in 1.5 sec, or 500ms / 60 degree. Why different? The data sheet hasn't been updated yet? Or, did I miscalculate?
Ref:
www.futaba-rc.com/servos/digitalservos.html
www.parallax.com/dl/docs/prod/motors/stdservo.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ol' Geo
Retired Software Engineer
An oscilloscope is a window of unseen electronic world. - GM
I am trying to determine what max servo speed is for Parallax std servo. The code below is to estimate the max speed by observing the difference between clockwise and counterclock rotations. Both FOR-NEXT loops have the same number, that is, 20. So, both rotational speeds appear about the same but in the opposite directions. Since I don't have an oscilloscope with me (yet), each loop takes about 20ms. Hence, the total elapse time is 400ms from 10 to 2 o'clock. The rotational travel from 10 to 2 o'clock is 120 degrees. Based on those figures, the max. speed is 400ms / 120 degrees or 133ms / 60 degrees. The figure seems reasonable as compared with those speeds specified at Futaba website. However, the data sheet given for Parallax std servo says 0 degree to 180 degrees in 1.5 sec, or 500ms / 60 degree. Why different? The data sheet hasn't been updated yet? Or, did I miscalculate?
Ref:
www.futaba-rc.com/servos/digitalservos.html
www.parallax.com/dl/docs/prod/motors/stdservo.pdf
' {$STAMP BS2} ' {$PBASIC 2.5} duration VAR Word counter VAR Word DO ' Rotate from 10 to 2 o'clock FOR duration = 1000 TO 500 STEP 25 PULSOUT 14, duration PAUSE 20 NEXT ' Return to 10 o'clock quickly FOR counter = 1 TO 20 PULSOUT 14, 1000 PAUSE 20 NEXT LOOP
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ol' Geo
Retired Software Engineer
An oscilloscope is a window of unseen electronic world. - GM
Comments
The first loop simply attempts to position the servo using a pulse width of 2ms (2000us) to 1ms (1000us) in steps of 50us. There's roughly 20 pulses each with a 20ms pause between them for a total time of about 400ms. The loop will always take that time no matter how fast the servo moves. The second loop just puts out repeated pulses of 2ms (2000us) for about the same total time. Again, the motor may or may not complete its movement during this timeframe.
The speed of the servo will be dependant on many factors…Supply voltage/current, loading on the servo, even age. The fastest safe speed would be determined by moving the servo from one extreme to the other by going immediately from the one pulse value (repeated every 20 ms) to the other pulse value (also repeated every 20 ms). The servo will travel at its maximum speed in this manner. If you step the output pulses then you are really slowing down the overall speed. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ol' Geo
Retired Software Engineer
An oscilloscope is a window of unseen electronic world. - GM
Never tried this before, but I'm hoping that will work as an accuate feedback for when the servo reaches the end of travel.
Two more used up I/O lines though. On the other hand, why not give it a test.
As an after thought, I think COMPARE only works with the BS2px Stamp.
Post Edited (LILDI) : 8/20/2007 4:47:21 AM GMT
That doesn’t sound right…Especially since it stopped briefly…I would recommend changing the 20 to 100 or even 150. 20 iterations/refreshes does not seem like enough to get the servo to the other extreme…There will be a pause before it changes directions, but you’re looking for speed from one extreme to the other anyway, so that doesn’t matter.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Yes, LILDI. I don't have BS2px stamp that has COMMARE command to compare voltages. Only one I have is BS2 that comes with BOE kits. Thanks, anyway.
Geo
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ol' Geo
Retired Software Engineer
An oscilloscope is a window of unseen electronic world. - GM