Jump to content
 
  • entries
    4
  • comments
    2
  • views
    2,020

Servo Operation


AndyID

713 views

The SG90 is a PWM (Pulse Width Modulation) controlled servo, so the width of the pulses applied to its control input determine the position that the internal controller drives the servo to. Pulse widths are between 1 and 2 milliseconds, and are applied every 20 milliseconds (50 pulses per second). The servo assumes a nominal center position when the pulse widths are 1.5 milliseconds. The nominal extremes of position are plus and minus 45 degrees at the maximum and minimum pulse widths (1 and 2 milliseconds.)

 

At least, that’s the usual information about how to use these devices in their typical RC (radio- control) applications, and that makes a lot of sense. Radio-control requires proportional displacement of rudders, steering etc. applied through various rods and cranks, and the servos need to be able to exert approximately constant forces (torques) throughout their expected range of travel. They also need to be able to respond as quickly as possible to the signals received - any delay or sluggishness is not a good thing when you are trying to fly a model aircraft.

 

Neither of these are particularly important for controlling the points on a model railway, and in some respects, they actually make it difficult to apply these devices as point motors. We need the servo to operate in a much more sort of “binary” mode. In reality, it’s possible to achieve plus and minus 90 degrees of travel (180 degree rotation), and there is no particular reason why it is necessary to apply a pulse as often as 50 times per second.

 

The SG90 incorporates a KC5188 control chip. There is a data sheet for this device available on the Web, but it does not say too much! However, it seems to embody the same features as the old Signetics NE544, so I think it’s not unreasonable to assume that it’s a close functional equivalent, and the KC5188 data does seem to confirm that. The NE544 provides a bit more information, but it is not exactly comprehensive either.

 

Here’s a brief word description of how the things work (as best I can understand):

 

When the control input pulse goes “high” it triggers a monostable that produces a nominal 1.5 millisecond pulse when the servo is in its center position. The servo has a potentiometer on its shaft that alters the duration of the monostable pulse so that it is either greater or less than 1.5 milliseconds in proportion to the displacement from the center position. Over the expected 90 degree rotation, the pulse width adjusts from 1 to 2 milliseconds.

 

The servo motor is driven when there is a difference between the duration of the input pulse and the monostable pulse, and the direction that the motor is driven in depends on whether the input pulse is longer or shorter than the monostable pulse. The particular direction is stored in a flip-flop. So far, so good (I hope).

 

The sneaky bit is that there is a “pulse-stretcher” that produces a pulse to drive the motor. That drive pulse is proportional to the difference between the monostable pulse width and the input pulse width. If there is no difference, or only a very small difference, the motor does not receive any drive pulse. When the difference between the durations is at a maximum, the motor receives a substantial drive pulse to accelerate the motor rapidly. The smaller the difference (sometimes referred to as the error) the shorter the drive pulse.

0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...