Shop OBEX P1 Docs P2 Docs Learn Events
Why 1.5 ms Pulses Used To Center Servos? — Parallax Forums

Why 1.5 ms Pulses Used To Center Servos?

ScopeScope Posts: 417
edited 2009-12-23 19:44 in Robotics
So, I plug in the numbers, send it to the Boe-Bot, and it works - but I have no idea why.

Can anyone explain this? I went back to page 67 in the Boe-Bot book but there is no explanation.

Thank you,

Scope

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-20 17:27
    That's the way they're designed (the servos that is).

    The "Robotics with the BoeBot" tutorial discusses this somewhat.

    Standard servos have a controller inside them that responds to pulses between 1ms and 2ms in width. 1ms represents one end of the servo's range of motion and 2ms represents the other end. 1.5ms is "just right" in the middle. If you disable the feedback in the controller to make a continuous motion servo, 1ms represents full speed in one direction, 2ms represents full speed in the other direction, and 1.5ms is used to stop any servo motion. Some servos have a slightly extended pulse range (0.5ms to 2.5ms), but the 1ms to 2ms range is "standard".
  • ScopeScope Posts: 417
    edited 2009-12-20 18:41
    That's what I wanted to know.

    THANKS!!!
    [noparse]:)[/noparse]
  • ScopeScope Posts: 417
    edited 2009-12-23 15:42
    But . . . why the 20 ms pauses between pulses necessary?
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-12-23 16:45
    The servo's you're using were designed to be radio-controlled actuators in model airplanes or model cars. As such, they were designed to be as light as possible, and with a simple control scheme.

    So, each servo has inside it a 'comparator', as well as a variable resistor connected to the shaft. The variable resistor generates a pulse-width based on the shaft position. The 'comparator' compares the input pulse-width to the resistor pulse-width, and then drives the motor in the right direction to make the pulse sizes equal. This can be done with very simple electronics.

    However, the comparator is only triggered when it recieves a command pulse, and it only moves the output shaft a little bit each time. There's no 'memory' in the device (some "digital" servo's do incorporate this memory, these days). So the pulse has to be "refreshed".

    Now, the radio controller generates these pulses (for multiple servo's) and refreshes 50 times a second -- or 20 mSec per refresh. Fortunately, the EXACT refresh time isn't needed -- 20 mSec to 30 mSec will be enough to keep the motor turning until it reaches the "commanded" position. And even then, 'refreshing' the pulse is needed to HOLD that position. So by using the servo, we're getting the benefit of inexpensive hardware mass-produced for the model airplane market.

    Now, a "modified" servo has disconnected the variable-resistor from the shaft, and set it at the center position -- 1.5 msec. So, when you send a 1.5 mSec pulse to the servo, it stops. If more than 1.5 mSec, the shaft spins forward, if less than 1.5 mSec the shaft spins backward.
  • ScopeScope Posts: 417
    edited 2009-12-23 19:44
    Awesome - thanks!!!

    [noparse]:)[/noparse]
Sign In or Register to comment.