The servo motor is an electrical device that can be used to precisely rotate objects (e.g. a robot arm). The servo motor consists of a DC motor with a negative feedback mechanism for error detection. This enables precise control of the angular velocity and the position of the motor. Motors are used. It is a closed-loop system in which the movement and the end position of the axis are controlled by negative feedback. It is not used for continuous rotation like traditional AC / DC motors. It has an angle of rotation that varies from 0 ° to 180
As shown in the above figure Servo motor has three pins for its operation as,
- +VCC (RED)
– Connect +VCC supply to this pin. For SG90 Micro Servo it is 4.8 V (~5V).
- Ground Brown
– Connect Ground to this pin.
- Control Signal yellow
– Connect PWM of 20ms (50 Hz) period to this pin.
Principle of Operation of Servo Motors
It consists of a DC motor, a gearbox and a control loop The PWM signal is used to control the servo motor It is applied to the control signal pin The control loop of the servo contains a comparator that compares the control signal (PWM) and generates the reference signal from the potentiometer Error signal which is then amplified and sent to the DC motor. The shaft of the DC motor is connected to the shaft of the potentiometer (knob) via the gear wheel. Thus, the rotating DC motor rotates the potentiometer, which in turn changes the potentiometer reference signal supplied to the comparator. The shaft position will match both the potentiometer signal and the control signal strength resulting in a zero error signal output. Therefore, the rotation continues until the comparator output error signal becomes zero and the DC motor stops.
A servo consists of a motor (DC or AC), a potentiometer, a gear and a control circuit. First of all, we will use a set of gears to reduce the speed and increase the motor torque. Speak at the starting position of the servo motor shaft. , the position of the potentiometer knob is such that no electrical signal is generated at the output of the potentiometer. An electrical signal is now sent to another input terminal of the fault detection amplifier. Now the difference between these two signals, one comes from the potentiometer and another comes from other sources, is processed in a feedback mechanism and the output is provided as an error signal.
This error signal serves as an input for the motor and the motor starts to rotate. The shaft of the motor is connected to the potentiometer and when the motor rotates, the potentiometer generates a signal. So when the angular position of the potentiometer changes, its output feedback signal changes. After some time, the position of the potentiometer Area will be in a position in which the potentiometer output corresponds to the external signal supplied. In this state, there is no output signal from the amplifier to the motor input, since there is no difference between the external signal applied and the signal generated at the potentiometer and the motor stops rotating in this situation.
Controlling Servo Motor:
All motors have three wires, two of which are used for supply (positive and negative) and one for the signal to be sent by the MCU. The servo motor is controlled by PWM (pulses with modulation) provided by the control cables. There is a minimum pulse, a maximum pulse, and a repetition rate. The servo motor can rotate 90 degrees from any direction from its neutral position. The servo motor expects to see a pulse every 20 milliseconds (ms), and the length of the pulse determines how much the motor turns. For example, a pulse of 1.5 ms causes the motor to turn to the 90 ° position as if the pulse is shorter than 1.5 ms, the axis moves to 0 ° and if it is longer than 1.5 ms, it turns the servo to 180 °.
The servo motor works according to the PWM principle (pulse width modulation), i. H. its angle of rotation is controlled by the duration of the pulse applied to its control pin. Basically, the servo motor consists of a DC motor controlled by a variable resistor (potentiometer) and some gears. The high-speed power of the DC motor is converted into torque by gears. We know that WORK = FORCE X DISTANCE, with the DC motor the force, is less and the distance (speed) is large and with the servo the force is high and the distance is less. The potentiometer is connected to the servo output shaft to calculate the angle and stop the DC motor at the required angle.
The servo motor can be rotated from 0 to 180 degrees, but up to 210 degrees depending on the manufacturer. This degree of rotation can be controlled by applying an electrical pulse of the appropriate width to its control pin. in every 20 milliseconds. 1 ms (1 millisecond) wide pulse can rotate the servo 0 degrees, 1.5 ms can rotate 90 degrees (neutral position) and 2 ms pulse can rotate 180 degrees. The servo motors work directly on their + 5V supply rails, but we need to be careful about the amount of current the motor would draw, if you plan to use more than two servo motors then a suitable servo shield needs to be designed.