Shop Learn
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,106
    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

  • GenetixGenetix Posts: 1,541

    Austin_H,

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

  • jmgjmg Posts: 14,812

    @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: 19,989

    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.

Sign In or Register to comment.