We will learn how servo motors work and how to control servos using Arduino and PCA9685 PWM driver.
In AC servo motors and Industrial-type servo motors, the position feedback sensor is usually a high-precision encoder, while in smaller RC or hobby servos, the position sensor is usually a simple potentiometer. The actual position captured by these devices is compared to the target position, and then, based on the error, the controller adjusts the motor's actual position to match the target position.
Hobby servos are small actuators used to control RC toy cars, boats, airplanes, etc. They are also used in robotics for projects like building robotic prototypes, robot arms, humanoid robots, etc.
The potentiometer is mounted on the final gear or output shaft so that as the motor rotates, it rotates the potentiometer, producing a voltage corresponding to the absolute angle of the output shaft. In the control circuit, this potentiometer voltage is compared with the voltage coming from the signal line. If necessary, the controller activates an integrated H-bridge to make the motor rotate in both directions until the two signals reach zero difference.
A servo motor is controlled by sending a series of pulses from the signal line. The frequency of the control signal should be 50Hz or a pulse should occur every 20 ms. The pulse width determines the angular position of the servo, and such servos can typically rotate 180 degrees (they have physical travel limits).
Usually, a 1ms pulse duration corresponds to 0 degrees, 1.5ms to 90 degrees, and 2ms to 180 degrees. The minimum and maximum pulse durations may vary with different brands, and these could be 0.5ms for 0 degrees and 2.5ms for 180-degree position.
I will use a hobby SG90 Servo Motor with Arduino to control it. Considering the prices of servo motors, SG90 is the most cost-effective servo motor, widely used by those who want to learn servo motor control in simple projects, school projects, etc. If you need a stronger servo motor with metal gears, you can check out other servo motor varieties.
SG90 Servo Motor Specifications
Operating Voltage: 4.8 - 6.0 VDC
Stall Torque @6V: 1.8 kg.cm
Speed @4.8V: 0.1 sec/60°
Rotation Angle: 0-180°
Gearbox