What is the real range for Parallax's "standard servo"?
Tom Emerson
Posts: 3
[noparse][[/noparse]this might belong in the basic stamp section, but I suspect the answer given may apply to propellers too]
OK, I have the Basic stamp "discovery" kit [noparse][[/noparse]what is a microcontroller book, BOE board, parts, and basic stamp reference manual], and upon working with the servo, there is a note in the text to not exceed the limits of 500 and 1000 for the PULSOUT(*) command, with some discussion about how doing so might cause the servo to try and "exceed" the mechanical stop(s) within the device. Fair enough.
however, when I got the program set up and limited to those numbers, I measured the rotation from one end to the other to be 90 degrees [noparse][[/noparse]eyeballed, to some extent, but confirmed in that placing my finger at the end of the mounting-bracket "X", it only rotated to the next leg]
the docs on the servo indicate it has a range of 180 degrees, and sure enough gently turning the "X" after it's powered off results in quite a bit more travel on each end than where it stopped via the program.
OTOH, the "750" value does seem to be "in the middle" of the range of motion
obviously, limits of 500 and 1000 are incorrect at best (and highly conservative at worst), but what should the real limits be? do different stamps send out pulses of different widths given the same PULSOUT value? (i.e., do I need a scaling or offseting conversion step in my routines?)
Tom
(*) as I said, this is per the Basic stamp/what is a microcontroller manual; I presume the propeller has a similar command in the "spin" language, but I wouldn't know what the "limits" would be for any parameters to such a command. Ditto for the javalin
OK, I have the Basic stamp "discovery" kit [noparse][[/noparse]what is a microcontroller book, BOE board, parts, and basic stamp reference manual], and upon working with the servo, there is a note in the text to not exceed the limits of 500 and 1000 for the PULSOUT(*) command, with some discussion about how doing so might cause the servo to try and "exceed" the mechanical stop(s) within the device. Fair enough.
however, when I got the program set up and limited to those numbers, I measured the rotation from one end to the other to be 90 degrees [noparse][[/noparse]eyeballed, to some extent, but confirmed in that placing my finger at the end of the mounting-bracket "X", it only rotated to the next leg]
the docs on the servo indicate it has a range of 180 degrees, and sure enough gently turning the "X" after it's powered off results in quite a bit more travel on each end than where it stopped via the program.
OTOH, the "750" value does seem to be "in the middle" of the range of motion
obviously, limits of 500 and 1000 are incorrect at best (and highly conservative at worst), but what should the real limits be? do different stamps send out pulses of different widths given the same PULSOUT value? (i.e., do I need a scaling or offseting conversion step in my routines?)
Tom
(*) as I said, this is per the Basic stamp/what is a microcontroller manual; I presume the propeller has a similar command in the "spin" language, but I wouldn't know what the "limits" would be for any parameters to such a command. Ditto for the javalin
Comments
Rich H
Yes, they do. For the BS2 each unit is equal to two microseconds. Other stamps have different unit values. So for the BS2 a pulsout command of 750 actually sends a pulse of 1,500 microseconds - which is considered "center" for most servos.
Your Parallax standard servo should handle pulsout commands of 300 (600 uS) to 1200 (2,400 uS) without any problems based upon my observations.
Rich H
Chapter 4, Activity 1, explains that using the PULSOUT Duration arguments between 500 and 1000 will sweep the Parallax standard servo approximately between the 10 o'clock and 2 o'clock positions, those values are not expected to give you the full 180 degrees of motion.
For the next activity, we stick with those values to make sure the exercise isn't driving the servo against the stoppers repeatedly. Since each individual servo will vary slightly AND because a teacher may be using some other brand of standard servo, we stayed within that safe range so as not to cause grief to a teacher using a couple dozen servos in a classroom.
The Parallax standard servos do have a full 180 degree range; to find out what values take your individual servo reach the outer limits without hitting the mechanical stoppers, just try enlarging the PULSOUT Duration argument range in small increments. Rich H's target values (and other info in his email) are correct (Thank you Rich!). The Parallax Standard Servo docs list the PULSOUT Duration argument to use as the center value for the different BASIC Stamp microcontrollers.
Sorry this caused you some trouble, and I hope you are otherwise enjoying your kit!
-Steph Lindsay
Editor, Parallax Inc.
I do have a related followup question, but I'm fairly sure the answer is "get a different sensor", but I'll ask anyway: is there a way to "read" the current position of the servo FROM the servo itself?
If the answer is "no", then I presume the answer to the more general question of "what is the current position?" would be to get some sort of position-encoder sensor, which could be as simple as a potentiometer tied to the shaft. I am hoping to avoid the extra complexity of a second sensor (not to mention the need for an additional I/O pin)
What are you trying to accomplish? With a standard servo, if the same microcontroller is setting the position, it already knows where it is. You can use a variable for the PULSOUT command's Duration argument, and check up on the last value used for that argument by querying the variable. Are you using something else to set your servo position?
1) when first powered on, the servo position is ??? [noparse][[/noparse]yeah, I know - either store the last known position in non-volatile memory and read that, or else "presume nothing" and seek a known starting point every time, but what if "seeking a known point" causes irreparable damage or initiates an unrevocable event?] Also, what if something "moved" the servo while power was off (leads into the 2nd and 3rd case here...)
2) when attempting to "move", how would I know if the servo encountered an obstruction that is preventing it from completing the move? (and either back off the attempt, or simply stop sending pulses to prevent the servo from grinding the gears or otherwise burning out)
3) otherwise obtain feedback from the system (a bit of a combination of the above two cases - by not continuously pulsing the servo, external forces can act upon the servo which may provide useful information to the system)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen