Confuser..Continous rotation servos
From my understanding the following program would run the servo at full speed (RPM) in the clockwise direction.
' Robotics with the Boe-Bot – ServoP13Clockwise.bs2
' Run the servo connected to P13 at full speed clockwise.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
DO
PULSOUT 13, 650
PAUSE 20
LOOP
But I have noticed some progroms use 500 instead of 650.
Why would one use 500 when 650 is max?
Different type of servos?
' Robotics with the Boe-Bot – ServoP13Clockwise.bs2
' Run the servo connected to P13 at full speed clockwise.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
DO
PULSOUT 13, 650
PAUSE 20
LOOP
But I have noticed some progroms use 500 instead of 650.
Why would one use 500 when 650 is max?
Different type of servos?
Comments
I don't want to repeat "the book", but...
Typical servos (not modified to be "continuous-rotation") are guided by pulses from 1 ms long to 2 ms long repeated every 20 ms. Assuming the pulse is repeated every 20 ms, a 1 ms long pulse will tell the servo to go "all the way" in one direction, while a 2 ms pulse will tell the servo the "go all the way" in the other direction. A 1.5 ms long pulse will tell the servo to go to the midway point, and, assuming that it is repeated very 20 ms, it will tell the servo to "stay there". Pulses between 1ms and 1.5 ms long will tell the servo to go to a point between "all the way" in one direction and the midway point while pulses between 1.5 ms and 2 ms long will tell the servo to go to a point between the midway point and "all the way" in the other direction.
If you understand the previous paragraph, then the next step is to understand that the PULSOUT command in the Stamp 2 works in increments of 2 us "units", so a value of 750 sends a pulse length of 1500 us (750 * 2 us) or 1.5 ms (there are 1000 us in a ms). This value will center the servo "in a perfect world." If you are still following along, then the "minimum" pulse (that would direct the servo to turn "all the way" on one direction) of 1 ms would be represented by a PULSOUT value of 500, since 1 ms = 1000 us and we are using 2 us "units" (1000 us/2 us = 500). By the same logic, the maximum PULSOUT value would be 1000, which would output a 2000 us or 2 ms (1000 * 2 us) pulse...directing the servo to go "all the way" in the other direction.
Without getting into the mechanical differences between a continuous and non-continuous servo, these values still apply...but in the case of a continuous servo, they now refer to speed instead of position. A 1 ms pulse will direct the servo to go "as fast as it can" in one direction while a 2 ms pulse will direct it to go "as fast as it can" in the other direction. A pulse of 1.5 ms should direct the servo to "stand still." Variations in servo manufacturing often require that the "midway" or "stand still" (depending on standard or continuous construction) be adjusted slightly "to either side" of 1.5 ms (i.e. slightly more or less than 750).
In the end, yeah, I could have just said that 650 is not the "max" as you stated, but maybe this explanation will help more with the "why" of it... And if you really "get" this, then converting a program for use with a faster Stamp, which uses different "units" in its implementation of the PULSOUT command, shouldn't be any problem...
Sorry if there were just "too many words"...I'm going back to sleep now [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
This is where the confusion comes in, the Robotics with the BoeBot states:
"Example Program: ServoP12Counterclockwise.bs2
You have probably anticipated that making the PULSOUT command’s Duration argument
greater than 750 will cause the servo to rotate counterclockwise. A Duration of 850 will
send 1.7 ms pulses as shown in Figure 2-26. This will make the servo turn full speed
counterclockwise."
Now I know this is for counterclockwise direction, as my example in my orginal post was for clockwise direction and again it states 850 is max rotation (RPM) But in other programs they use 1000 as the max for counterclockwise direction.
I do understand your explanation, but hopefully I explained why I was getting confused?
Now, when you convert that servo into "continuous rotation", what you'd LIKE to happen is, the further away from a 1.5 mSec pulse that you send it, the faster it moves. In that scenario, sending it a 650 (1.3 mSec pulse) would run it slower than sending it a 500 (1.0 mSec pulse). And it would be really convenient if this had a linear response, or even logrithmic so you'd get good control at low speeds.
Sadly, this is not how servo's are built. I believe the 'native' response curve runs at pretty much full speed to each position selected. I understand there is a modification you can do to the resistors on the servo circuit board (inside the servo) to change this 'response curve' to have more speed-selection in it. I haven't done this personally.
It is quite possible that there IS some speed selection in the 'native' mode, but once you've reached 1.3 mSec you've already maxed it out. Sounds like time for some experimentation and measurement.
P.S. I found the website that explained how to modify the servo for better speed control.
http://seattlerobotics.org/encoder/200009/S3003C.html
It's very informative, and also a little scary.· Good luck.
P.P.S.· Note that the 'Continuous Rotation Modification' has already been done for you by Parallax when you purchase their 'Continuous Rotation' servo's -- so all you'll need will be a 330 Kohm 1/4 watt resistor, a 0.1 uF capacitor, a soldering iron, and some luck.· Not to mention pretty good mechanical disassembly/assembly skills.
Post Edited (allanlane5) : 3/30/2006 5:56:47 PM GMT
Let me just add to Allen's excellent response the following bit of historical context, which may help is seeing where this whole mattter came from. I will update this response, or add another, when I have some additional, pertinant information, which is currently pending, to bring this as up-to-date as possible.
Until fairly recently, R/C servos were NOT even DESIGNED for this sort of mobile platform propulsion application. In years gone by, the ONLY way you could obtain a "continuous rotation" (C/R) R/C servo was to disassemble one and make it yourself; in other words "hack it". Not a big deal by any means, and there are still plenty of web sites offering "how to" instructions for nearly any kind of R/C servo you can find, BUT it was slightly time consuming and you had to be careful, otherwise you ended up with a nearly useless, highly geared, DC motor with no way to operate it at all. Beside that, there is always the issue of warranties. As with most electrical or electronics equipment which one might purchase today, if you the end user open the case, you kiss any factory warranty a quick good bye <ouch!>. Something needed to be done about this.
A number of companies which distributed R/C servos, who had customers who dealt with mobile robotic platforms (including Parallax) appealed to the R/C servo manufactures for a method by which they could offer such "stock" C/R, R/C servos (as it might come from the factory) and still have this stock servo maintain its factory warranty. Seeing a new market on the horizon (robotics propulsion), one or two of the R/C servo manufacturers began offering one of their standard R/C servos factory pre-configured for continuous rotation. Soon, the mere one or two manufacturers became many.
Today, a fair number of the R/C servo manufacturers offer a "robot (propulsion) servo" which is nothing more than the C/R, R/C servo of which we speak here. Still, to my knowledge, there has been no effort by the R/C servo manufacturers to re-design the servos for this rather specific and (somewhat) "unnatural" C/R or propulsion application. Thus, we are presently "stucK' with dealing with a C/R, R/C servo which doesn't operate quite the way we might optimally like it to act. This MAY be changing, but don't take that thought as fact or as "gospel" quite yet.
I must add for accuracy and completeness, as usual, Parallax was in one of the the lead positions(*) in offering such a C/R, R/C servo for robotic propulsion use. Thank you Parallax, and thank you Futaba!
Regards,
Bruce Bates
(*) Unless you're the lead dog on the sled, the scenery never changes!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
Post Edited (Bruce Bates) : 3/30/2006 5:17:33 PM GMT