Shop OBEX P1 Docs P2 Docs Learn Events
What’s A Microcontroller? - Servo Delay — Parallax Forums

What’s A Microcontroller? - Servo Delay

Austin_HAustin_H Posts: 6
edited 2021-06-11 05:26 in General Discussion

Hi, I was reading Chapter 4 of What’s A Microcontroller? and I was wondering: why do we need a 20ms delay after the servo goes to a position? But, what I was wondering is why we need a delay in general for a standard servo. I just don’t understand. (Page 106). Thanks,

Austin

Comments

  • tomcrawfordtomcrawford Posts: 1,126
    edited 2021-06-11 15:29

    Standard servos require a pulse every 20 (more or less) ms. The width of each pulse specifies the position the servo is to go to.

  • Austin_HAustin_H Posts: 6
    edited 2021-06-11 16:24

    I understand that the amount of time that the signal is HIGH determines the position of the servo, but what I don't understand is why the servo "requires" a 20 ms LOW pulse. Is it to save power?

  • @Austin_H said:
    why the servo "requires" a 20 ms LOW pulse. Is it to save power?

    I think this is just a hold over from the analog radio control days.
    Analog servo power their motors during the control pulse. A faster control pulse would use up the batteries faster. New digital servos power the servo whenever it is not in the correct position.

  • I still don't understand. May you, please, clarify? So, what I am getting at is that the servo delay is used to save power, or no? It was used in the analog radio days?

  • It's because of the way an RC transmitter transmits to multiple channels. Each channel has its own time slot in the sequence. There has to be a wide gap between the last channel's pulse and the first, so the receiver can synchronize to channel one.

    -Phil

  • Austin_HAustin_H Posts: 6
    edited 2021-06-11 18:43

    "Channel?" Is this about the radio or the actual servo delay? I am very confused.

  • Each servo in, say, a model plane is assigned a "channel," according to where it plugs into the receiver. An RC transmitter transmits servo pulses, one after the other, one per channel, and closely spaced. For example, a six-channel transmitter will transmit six pulses in sequence, followed by a delay. The total length of the transmission, including the delay, is 20 ms. The RC receiver demultiplexes the serial pulse stream and outputs the pulse for each channel on its respective connector. Therefore, each channel's output consists of one pulse, plus a delay, that adds up to 20 ms.

    -Phil

  • Austin_HAustin_H Posts: 6
    edited 2021-06-11 21:59

    Okay, I understand that, but my original question was: why is there a delay? I guess I still don’t understand.

  • As I stated above, the delay is there so the receiver knows when to start over with channel one. If there were no gap after the last channel transmitted, the receiver would not know where to restart.

    -Phil

  • Okay, so is there a receiver in the standard servo or is it the chip inside?

  • This may answer some of your questions

  • Okay, so is there a receiver in the standard servo or is it the chip inside?

    No. A receiver, when used, is a separate unit that receives a radio signal and drives one or more servos.

    -Phil

  • Austin_H,

    These ARE Radio-Control (R/C) servos that are used for airplanes, cars, and boats.

  • jmgjmg Posts: 15,173

    @Austin_H said:
    Hi, I was reading Chapter 4 of What’s A Microcontroller? and I was wondering: why do we need a 20ms delay after the servo goes to a position? But, what I was wondering is why we need a delay in general for a standard servo. I understand that the amount of time that the signal is HIGH determines the position of the servo, but what I don't understand is why the servo "requires" a 20 ms LOW pulse.

    The 20ms defines the update rate for the control, and also gives an identifiable pause/break, in systems where there are multiple servo-pulse widths sent.
    It is not locked in stone, more a convention.
    You could design a single channel servo with a much reduced delay, for a faster update refresh, if you have control of both ends of the control system

    With many systems using low cost MCUs with on board RC oscillators, you might also want your higher precision servo system to calibrate out that oscillator variance.

    One approach would be to agree on the exact frame time as being (eg) 40/3 times the centre or zero width.
    Another approach would be to send an unused channel as a calibrate pulse, always mid-range.

  • ercoerco Posts: 20,256

    As others have said, the 20 ms pause is a traditional carryover from analog multiplexed RC signals. The pause is likely included to be consistent with past discussions of servo control format, and possibly to save a bit of power.

    But you can reduce the delay and analog servos will do just fine. Easy enough to try out and see for yourself.

  • a servo as many describe it is actually 2 units

    1 is the servo controller.

    this unit receives the data signal to operate the servo motor, essentially this is the receiver.
    servo systems operate on signal and error signal propagation.
    this means 2 way communication between the driver and the servo motor.
    20ms delay is typically a standard and offers some leeway in correction control.

    yes you can make the delay smaller but you are asking for trouble.

    consider the controller as a simple computer with limited function,
    a control computer sends the go command with the parameters that the motor needs to perform ( direction, speed, stop position, return delay, return, and home ) and the receiver activates the motor by applying pulses in a rotating magnetic field (both speed and direction)

    2 servo motors

    the rotor in a servo motor has powerful magnets and will lock onto the position of the generated field in the stator
    error correction generally occurs within 8ms but is dependent on the torque on the shaft of the servo motor.
    old time syncro servo systems relied heavily on sensor precision and error correction controls and amplified power systems
    we dealt with a lot of them in the navy for controlling gun mounts and missile mounts.
    but these systems had miles of cabling and were not automated unless a fire control computer was used.

    digital servo systems use the receiver modules generally mounted near the motor and given commands by the control computer
    the biggest benefit of the digital systems is much ,much less wiring, lower power consumption, and the ability of having the control computer automate the actions of the system.

    while the control systems are different the servo motors design and function is basically the same.

  • boneheadradio,

    The term "servo" can refer to any kind of servomechanism, but in the Microcontroller world it refers specifically to the servos used for Radio Controlled models.
    Teardowns of R/C servos show what appears to be a standard DC Motor as the heart of the servo.

    R/C Servos are electromechanical and some Airplane control surface servos are electrohydraulic.

  • evanhevanh Posts: 15,912

    The main discrepancy is the point of view. In industrial servos, the view is from within the control loop - The feedback is not just visible to the programmer but also vital to stable control of the motor.

    In hobby R/C servos, that's all hidden and the view is just the profile generation.

  • @Genetix said:
    boneheadradio,

    The term "servo" can refer to any kind of servomechanism, **but in the Microcontroller world it refers specifically to the servos used for Radio Controlled models.
    Teardowns of R/C servos show what appears to be a standard DC Motor as the heart of the servo.

    R/C Servos are electromechanical and some Airplane control surface servos are electrohydraulic.**

    exactly
    as a servo tech from the service and 31 years in manufacturing Ive serviced and repaired many types (linear and rotary, electro-mechanical, hydraulic, and pneumatic)
    rc units are a small class all to themselves and usually don't use stepper motors
    worm gear drives or reduction gear systems provide significant resistance and is usually enough to halt the motor when power
    is removed.
    however stepper motors like those used in hdd's, 3d printers, inkjet printers, plotters, and many industrial equipment applications does not have a lot of mechanical resistance and is better controlled by magnetic impulse control.

  • ercoerco Posts: 20,256

    @boneheadradio said:
    a servo as many describe it is actually 2 units

    1 is the servo controller.

    True, a standard servo the controller has 2 inputs: servo pulse signals, and potentiometer for output shaft position.

    Then there are continuous rotation servos as used on BoeBot drive wheels & such. These skip position feedback and just translate servo pulse signals into PWM outputs to drive a DC motor. That same function is nicely done by Feetech, a dual motor controller board which can run two small DC motors using servo signals. Considerably simpler to use and connect two H-bridges, and uses only one control pin per channel.

  • evanhevanh Posts: 15,912

    "servo signal" being the desired profile, as opposed to motor demand.

Sign In or Register to comment.