What is Servo?
Servo is a general term for a closed loop control system.
A closed loop system uses a feedback signal to adjust the speed and direction of an engine and to achieve the desired result, for example placing the engine in a specific position.
There are servomotors on the market of many types and sizes, here we refer to those used in modeling and robotics. These servomotors also operate on the above principle. They contain a small DC motor connected to the output shaft via the gears, ie a mechanical gearbox, to ensure high torque with a few turns on the servomotor. The output shaft moves an arm that is connected to a potentiometer (pot) which is part of the electronic control circuit (servo driver). The following figure shows the operating diagram of a servomotor.

The potentiometer provides position feedback to the control unit where the current position of the motor is compared to the target position.
According to the error, the control unit corrects the actual position of the engine so that it matches the target position.

How the servomotor works
In the figure you can see a servomotor. It is connected to three conductors. The GND ground, the 5V voltage which is usually 5 to 7 volts, and the control which is the control signal.

You can control the servomotor by sending a series of pulses to the control line. A conventional analog servomotor, such as e.g. the MG995 expects to receive a pulse approximately every 20 milliseconds (ie the signal must be at 50Hz).
The pulse length (Duty Cycle) determines the position of the servomotor. The following figure shows the position of the motor in relation to the control signal.
