The more we know the harder it is to defeat us!

A model servo or servomechanism isn’t anything more than just a small DC motor with a transmission and some electronics.

zgraja

The servo characterizes with a relatively big momentum. What is the momentum? Let’s us assume that in technical note we have read the momentum is equal to 1.7kg/cm. It means that if we attach to the shaft an arm 1cm long we can lift on its end 1,7kg of mass. It is the absolute ratting and the servo should work properly.

There are three wires which come out from a connector. Those are (starting from left) GND, Vcc and SIGNAL.
Every wire has got a standarized color. The Vcc is red, GND is black or brown and the SIGNAL is yellow or orange.

We distinguish different kinds of servos and classify them by size and the momentum. It is fairly truth that the size of the servo reflects what momentum should be expect.

porownanie

Starting from left: micro, mini and standard. Of course there are smaller and a lot larger servos.

kable

How to power the servo?

We usually connect 4,8V ~ 5V to the Vcc. Some of the servos can work with voltage up to 7V and they usually have higher momentum. Most of the time when increasing voltage we increase the maximum momentum. But doing so can reduce the lifespan of the actuator.

Angular velocity

Basically it describes how much the shaft can turn in given period of time. Unfortunately, the speed does not go along with the momentum. The greater the speed is the smaller momentum of the servo is. Slight alterations to the mechanic and electronics of the servo allows to drive it by setting desired angular velocity not the position. In other words, without the ingerention the servo can be set in desired position. Furthermore, the position is limited mechanically.

Altering a servo

In the beginning we have to disassemble the servo. It is worthy of note to mind every piece of the disassembled servo. There are some gears mounted on shafts. In economic models the gears are made of plastic. We have to take them out very carefully and remember the position in which they were set. The most important part is the shaft pointing out of the case. On one side of the shaft should be a projection a small part which limits the movement. It has to be cut out carefully to not to destroy the part itself. It is important to make that right because after reassembling there will be some remains which can rub against the casing. Another thing is lubricant. We can’t make all mechanisms dirty which will lead to improper work and it can even destroy the whole servo. If our cogs are made of steel we can grind the projection but we can’t allow any metal chip to get into other parts of the system. It is advised to clean all parts and add some grease when everything is ready.

An another step is the alternation of the electronic part. We take out (and unsold [we have to remember how wires were connected to PCB]) a potentiometer and we measure its nominal resistance. After that we put a replacement of two resistors. It is important to place those parts carefully so they do not disturb proper work of mechanism.

Let’s assume that the nominal resistance of unmounted potentiometer is 3kOhms. We will need 2 resistors 1,5kOhms each (half of the nominal resistance). We replace the potentiometer with the two resistors so it creates a voltage divider.

Now we can reassemble it. Sometimes it is required to put the modified potentiometer (not connected) with additional resistors to the casing. Putting back the potentiometer is important in some servos. Especially, it is essential to put back the potentiometer in small servos because it is a support for the shaft.

Controlling before and after modification

There were made some screens with oscilloscope while I was measuring the PWM signal from the RC transmitter. Here it is:

The servo in neutral position:

0_neutrum

The same situation but with closer look at period of the PWM signal:

0_pwm_period

The servo leaning to the left side (minimal fill):

0_min

The servo leaning to the right side (maximal fill):

0_max

Now, you have opportunity to get a closer look at timings for three situations. Starting from left: minimum, neutral position and maximum:

1_min

1_neutrum

1_max

BEFORE

To control the actuator we have to give PWM signal on INPUT. We create an impulse of duration of 0,5ms to 2,5ms for “1”. The period of the PWM signal should be around 22ms.

For signal (high level) t = 1,5ms a servo is in its neutral position.

For 0,5ms it leans to the left (counter-clockwise) and analogically for 2,5ms (clockwise). All servos work in the same exact way.
To sum up, by the length of “1” impulse we control how much the servo is leaning of its neutral position. The range varies. Usually it starts from -90 to +90 degrees.

AFTER

The situation is very similar to before but with a slight difference. We don’t control angular position but the angular velocity in desired direction. The shorter the impulse is (minimal 0,5ms) the faster servo spins to the left (counter-clockwise). It is analogical for 2,5ms. The servo spins to the right or clockwise. However, for 1,5ms (previously servo’s neutral position) the servo stops. Of course, everything requires a little bit of good calibration ;).

Below you can find an example of connecting the servo to the microcontroller:

schemat

The source code of sample program is attached below:

serwo_pwm.zip

Leave a Reply

Your email address will not be published. Required fields are marked *

Donate

If you like my blog please consider a small donation.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 223 other subscribers