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

Preventing Servo Buzz


AndyID

603 views

A 90 degree servo shaft rotation is highly appropriate for driving the ailerons on a model aircraft. The motion produced at the aileron through a crank linkage will be proportional to the rotation of the servo shaft, but if the servo were to even approach 180 degrees of rotation, the motion would no longer be proportional and the mechanism would tend to lock.

 

In the case of points, we don’t really care about proportional motion. In fact, if we can make the servo rotate through 180 degrees and convert that rotation into linear motion at the point tiebar, when the servo reaches the extremes of its travel (we could call them Top Dead Center – TDC, and Bottom Dead Center – BDC) the tiebar will not be able to exert any rotational force (torque) on the servo shaft. This is the same effect you see in any sort of engine where the pistons drive a crank of some sort or another.

 

Also, as the servo approaches TDC and BDC, the mechanical advantage increases (less linear motion for a given change in rotational angle), so the force exerted can increase at the extremes of travel.

 

At TDC and BDC, because no torque can be transmitted to the servo shaft, the servo is able to reach its desired position. As the error is effectively zero, the drive pulses stop and there is no buzzing.

 

Obviously this means that the connection between the servo and the tiebar must allow the servo to rotate through 180 degrees, and to make the connection without a lot of precision engineering, there probably needs to be some compliance (spring) in the connection. Compliance in the connection is a problem when the servo only rotates through 90 degrees because the spring exerts a torque at the servo shaft at the end positions, but that cannot happen with 180 degrees of rotation. I will post more on the mechanical connection later.

 

To produce 180 degrees of rotation I am using an Atmel ATiny44a microcontroller programmed to continuously produce short and long pulses. The short or long pulse stream is directed to the SG90 servo through a single pole (no center off) changeover switch. I should be able to connect a large number of servos to the same microcontroller each through its own switch, but I have not actually tried that yet. In some situations it will probably be a good idea to insert some sort of logic buffer between the microcontroller pulse outputs and the switch inputs.

 

The short pulse width is nominally 0.56 milliseconds and the long pulse is nominally 2.448 milliseconds. These are nominal because the ATiny is running on its own internal clock. (An external crystal might not be a bad idea.) To slow the servo’s travel, the pulse repetition interval is 74 milliseconds. At that interval, the motion is still quite smooth, although there is a slight pulsation during the rotation. It’s quite practical to use an even longer interval, but the motion will not be very smooth. I have tested this with ten SG90s, and they all rotate through 180 degrees, but that’s not exactly a very large test sample.

 

If we were prepared to alter the values of some of the components in the servo’s pulse-stretcher circuit to shorten the pulses it would be possible to slow the servo even more, but as the components are surface mounted on a teensy-weensy circuit board, I’m not even going to try it!

 

There is a servo connected to my “pulse generator” on the table beside me, and every so often I can hear it “tick”, and sometimes there are a few “ticks” in sequence. There is no perceptible rotation at the servo shaft when this happens. From time-to-time, the servo is detecting a small difference between the input pulse width and the internal monostable pulse width. Consequently, it tries to correct that error by sending a very short pulse to the motor.

 

I think this effect is a consequence of a small amount of “jitter” in the internal monostable pulse, and it seems to only happen when the servo is receiving long pulses. That tends to reinforce the theory. It may well happen during short pulses too, just less often. The clock source in the ATiny might also tend to wander around slightly so that could also be a contributing factor.

 

Personally, I don’t think it’s a problem, but some people might be less tolerant. If I get around to testing with a crystal oscillator, I will report whether it makes any difference or not. There is another solution, but that would mean surgery on the servo’s circuit board to increase the servo’s “dead band”. Braver souls might try this; I don’t plan to.

 

Going very tangential for a minute, I have actually “hacked” a couple of SG90 servos to operate as point motors by throwing away the electronics and only using the motor and gear train. The trick is to add a microswitch driven by a cam on the servo shaft. The switch is positioned to take advantage of its hysteresis such that it only changes polarity at the “ends” of the cam.

 

It works really well, and it’s 100% immune to noise. It only needs a single-pole changeover switch to operate it, but it’s not all that simple to make a cam that won’t interfere with the servo’s actuator horns. I also found that it works best from a 1.5 volt power supply. If anyone is interested, please let me know.

2 Comments


Recommended Comments

  • RMweb Premium

Hacking servos by removing the electronics and using them as simple stall motor devices has been done quite a lot. Look for the threads here. Although the current draw is high compared to a commercial stall type, at around the 1.5-3v mark it's workable and reliable if momentary power is used. I've done it with digital servos using centre-off switches and gear jamming to set the rotational arc limits.

 

Izzy

Link to comment

Hi Izzy,

My version of the hacked servo does not rely on motor stall. The microswitch cuts off the power at the limits so there is no need for momentary switches. The control switch and the microswitch are connected a bit like the two-way light switches at the top and bottom of a staircase.

Link to comment

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...