Shop OBEX P1 Docs P2 Docs Learn Events
Servo correct 20ms low? Or is close good enough. — Parallax Forums

Servo correct 20ms low? Or is close good enough.

RonPRonP Posts: 384
edited 2011-06-23 11:00 in General Discussion
Hello All,

Long time no post, but I have been reading the forums often.

In my WAM book and BOE book Servo signals are described like "B" below. I was searching the net for info on a narrow pulse 760uSec Servo that I would like to make a tester for with the Prop. And came across a lot of info on 1520uSec servos and most of them if not all describe Servo signals like the example "A" below.

Which is correct or are they both correct?

2ms            2ms          2ms
5v         __             __           __
          |  |  18ms     |  |  20ms   |  |  20ms
0v________|  |________   |  |_________|  |________

          <-----A---->       <---B--->


For those not familiar a 760uSec servo such as the Futaba s9256 made for RC Helicopter Rudder applications. I have been told that hooking one up to a standard pulse will fry it, but don't know that to be true. I did it once on accident and all it did was make funny noises and didn't move no smoke. So would kinda like to get it right.
Don't know if the 20ms thing might not be important for standard servos, but could be very important for narrow pulse servos.

Thanks

Ron

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-06-22 18:54
    Figure A is the more precise approach to servo control. But Figure B seems to work adequately. I think Parallax adopted the later to avoid a lot on-going explanation of the maths. As with many things in electronics, there is quite a bit of margin. A precise calculation is a beautiful thing, but what works in the real world tends to be a range of options.

    My own preference would be to conform to A.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-06-22 18:55
    I will say that 20ms is important on a standard servo for SMOOTH operation. Mine will run at 20+20ms I know (although VERY choppy) and will cutoff (quiver or not move at all) at some undetermined point less than 20ms. It will however run smooth with a math error like figure B. I don't have an exact number, but I'd say you won't notice much difference at +/- 10%......With that said I imagine 20ms is far too long for a 760us servo. Running a servo IMO at a freq different than it's intended seems to kill it's torque and judging from the sounds it makes, may shorten it's life, I haven't tested this though.

    never heard of a 760us servo though. It must be extremely fast reacting!
  • RonPRonP Posts: 384
    edited 2011-06-22 19:20
    Spiral_72 wrote: »
    With that said I imagine 20ms is far too long for a 760us servo.
    @Spiral_72 Thanks for you insight.

    I suspected the same and thats what I was looking for on the net when i noticed the different signals i cant find anything for a 760uSec low time, or end points. Well I guess I'll have to hook up a gyro to my Fluke 99B that I am afraid to use. Don't know much about scopes.

    @Loopy Byteloose Thanks thats kinda what i though. Needed to hear it from someone else.

    Ron
  • kwinnkwinn Posts: 8,697
    edited 2011-06-22 20:59
    From what I have read about servos they require a pulse every 20mSec for reliable operation. To me that implies the low time should be 20mSec - HighTime. That assumption has worked for everything I have built to date.
  • RonPRonP Posts: 384
    edited 2011-06-22 21:14
    kwinn wrote: »
    From what I have read about servos they require a pulse every 20mSec for reliable operation. To me that implies the low time should be 20mSec - HighTime. That assumption has worked for everything I have built to date.

    If it wasn't a $100+ servo I would assume. I just cant help but think for this particular servo the low time might be less than 20mSec. Still can't find any info on low time or low pulse high pulse I assume now that 760uSec is center for now thats all I am almost sure of.
    Thanks for you insight.

    Ron
  • Mike GreenMike Green Posts: 23,101
    edited 2011-06-22 21:17
    Descriptions I've read about R/C servos say the control pulse normally occurs 50 times a second. That's all. That would make the low time ideally 20ms - high time. However, the behavior of any given servo as the high time varies depends on how the internal controller is implemented. Some designs might not tolerate too short low times, particularly if the servo handles a wide range of high times like 0.5ms to 2.5ms. Similarly, if the low time is kept fixed at 20ms, some designs might not tolerate too few control pulses per second as the high time increases. Clearly, most servos tolerate some deviation from 50 times a second and most servos tolerate low times less than 20ms.

    If I had to write a program to handle the most servos, I'd probably use a low time of 20ms - (high time / 2) or 20ms - (high time / 4). Both are compromises and can be easily done with a shift. In the case of a Stamp, the resolution of the PAUSE statement is 1ms and I'd round up towards 20ms.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-06-22 22:00
    I just sent an E-mail to Futaba to see if I can get an 'official' document on what their servos expect to see in the way of a proper pulse. I have always understood it to be 20ms to 25ms which would be inclusive and fall within the specs of the "A" or "B" option mentioned above,
  • W9GFOW9GFO Posts: 4,010
    edited 2011-06-22 22:19
    This Futaba document specifies 20ms from the beginning of one pulse to the next, or option "A".

    Rich H
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-06-22 22:24
    Thanks W9GFO, I couldn't seem to find that through all of the 'Google noise' when I searched.... I will still wait and see what my E-mail says and pass any information along. I'm looking for something more along the lines of the white papers they might reference during the design process.
  • RonPRonP Posts: 384
    edited 2011-06-22 23:52
    Thanks Mike, Beau and Rich

    Just finished messing with the scope and no smoke came out of it. I got some numbers. I need to get the PropScope need some lessons. Anyway here is what I got out of a Spartan DS760 gyro set to a 760uSec servo.

    Left stick 960us - Center 760us - Right stick 560us with a high and low time combined at 1.80 ms.

    I checked the receiver itself just because and I got a high and low time combined at 22 ms.

    From what I gather here today dealing with ms and us as far a servos are concerned is not as critical as I had always thought.

    I guess it wouldn't hurt to give servos a pulse as close to the desired pulse as one could get for resolution, speed, holding and centering.

    Curious to find out what Futaba has to say.

    Thanks again

    Ron
  • kwinnkwinn Posts: 8,697
    edited 2011-06-23 07:32
    RonP wrote: »
    If it wasn't a $100+ servo I would assume. I just cant help but think for this particular servo the low time might be less than 20mSec. Still can't find any info on low time or low pulse high pulse I assume now that 760uSec is center for now thats all I am almost sure of.
    Thanks for you insight.

    Ron

    No, the servos I used were the low end hobbyist units. The one you have sounds like a high end special purpose unit. I would try to find the data sheet or manual for the required info rather than risk damaging the unit by experimenting. Perhaps you can contact the manufacturer.
  • ctwardellctwardell Posts: 1,716
    edited 2011-06-23 07:57
    Some searching on the web reveals that R/C Heli Tail Rotor (T/R) servos are a special beast...

    Where standard servos have a frame rate of 50Hz (the 20mS total frame width), many T/R servos have a 250Hz frame rate (4mS total frame width).

    Many T/R servo use a 760uS pulse width at center instead of the typical 1mS (1000uS).

    I guess we are in the realm of "It ain't you're father's servo"...

    C.W.
  • ercoerco Posts: 20,261
    edited 2011-06-23 08:36
    Interesting thread. I built a "servo tester" a while back for analog servos... just a PWM servo driver using a 556 timer. I wanted the classic signal output (RonP's signal B above), a 1-2 ms pulse generated every 20 ms (inclusive). So half of the 556 dual timer made a 50 hz signal, which triggered the other timer as a variable one-shot to make the ouput pulse. Worked great.

    But in my pre-Googling research, most people just use a 555 timer, which outputs ~50% duty cycle. For example, the first 2 circuits midway down the page at http://www.horrorseek.com/home/halloween/wolfstone/Motors/svoint_RCServos.html The pot varies the output frequency to change the pulse width. That is, the pulses come at various frequencies, all much faster than 50 hz. Doesn't seem to bother them, so my takeaway is that a timing period less than 20 ms is fine, but longer than 20 starts to get into trouble. I'm sure much depends on the servo's internal circuitry.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-06-23 09:24
    Analog servos were developed to handle the wide fluctuation of timing signals inherent in analog transmitters and receivers. The exact timing of the refresh rate is irrelevant; only the duration of the pulse matters. In an analog servo, the pulse "charges" the motor. At other times the motor is effectively de-powered. This is why torque is reduced if you use a lower refresh rate.

    In an analog servo the internal error signal is generated using an RC network and the control voltage signal is the usual RC slope. If the refresh rate is too fast, the RC network cannot discharge fast enough, so the servo may jitter. Because the motor is powered for longer, it delivers more torque and gets warmer. It is theoretically possible for the motor to draw too much current from its H-bridge in this situation.

    The Futaba S9256 is an odd-ball because it's made to interface to a specific gyro. It has very low dead band. I'd be surprised any digital servo would "burn out" if given the wrong type of input signals, as they'd design the microprocessor in the servo to reject out-of-bounds pulses. But then, I'm not risking $100+ by making this statement!

    Ron's test of the output of the gyro is the best method. Whatever the gyro puts out is what this servo ought to get.

    -- Gordon
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-06-23 09:39
    Here is what Futaba has to say... mostly what I suspected, but I just wanted to hear it from them.
    Dear Valued Customer:

    Thank you for your Email.

    What you're looking for just doesn't exist. There really isn't an "allowed tolerance" for the 20 mS frame rate. It can vary quite a bit. The servos in the radio control hobby are very tolerant of variances, and we've seen transmitters with frame rates as low as 15 mS, and some a little bit higher. It all depends upon the number of control signals sent from the transmitter to the receiver. Smaller transmitters with only two control functions have had lower frame rates, while transmitters with many control functions will have larger frame rates. The 20 mS is a generalized figure that's commonly been used in transmitters with 6 or more control functions.

    A formal "white paper" doesn't exist, as far as we know.

    Sincerely,

    Futaba Service Center North America
    3002 N. Apollo Dr. Suite 1
    Champaign IL 61822
    USA
  • RonPRonP Posts: 384
    edited 2011-06-23 09:53
    kwinn wrote: »
    Perhaps you can contact the manufacturer.

    With all the cloning going on in RC industry I am not sure how much info Futaba would be willing to share I wait and see if Beau gets any info. I think Parallax and Futaba have a business relationship.

    Ron

    I guess its not top secret. Thanks Beau.
  • markaericmarkaeric Posts: 282
    edited 2011-06-23 09:59
    I've been working with some digital servos that hold their position (and apply torque) even when the signal wire is disconnected. I wouldn't be surprised if many digital servos only require a pulse to set the desired position, without the need for refreshing (for lack of better terminology).
  • RonPRonP Posts: 384
    edited 2011-06-23 10:12
    Thanks again everyone.

    I am off to the OBEX to do some more homework, see if I can wrap my head around what needs to be done to drive this servo. Good educational project for me.

    I'll change the title of this tread to reflect the change of discussion, as soon as i think of something good. Any suggestions? The title doesn't make sense anyway.

    Ron
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-06-23 11:00
    markaeric wrote: »
    I wouldn't be surprised if many digital servos only require a pulse to set the desired position, without the need for refreshing (for lack of better terminology).

    This is correct, and is a feature-point for digital servos when used in wireless applications. Considering a primary use is to operate the control surfaces of an airplane, by not depowering the servos, there is less chance of the servo going to some unknown/unplanned position, causing a crash. With all-digital radios this allows for advanced features like slow circling and descent should the signal from the transmitter be lost.

    Wired robotics has much less use for these features, and in the case of digital servos keeping their position at the lost of signal, can actually work against us. That's why it's better to use standard analog servos if you're going to modify them for continuous rotation. It's easiest/best to stop the thing simply by removing the control pulses.

    -- Gordon
Sign In or Register to comment.