Menu
Close
SIGN IN REGISTER
Forgot password?
Close
Cart
21.07.2023

How Servo Motors Work and How to Control Servo Motors with Arduino?

How Does a Servo Motor Work and How to Control a Servo Motor with Arduino?

 

We will learn how servo motors work and how to control servos using Arduino and PCA9685 PWM driver.

 

How does a servo motor work
 
There are various types of servo motors, and their main feature is the ability to precisely control the position of their shafts. A servo motor is a closed-loop system that uses position feedback to control its motion and final position.
 
 

 

 

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.

 

RC / Hobby Servo Motor Operating Principle

 

Servo motor operating principle
 
A hobby servo contains four main components: a DC motor, a gearbox, a potentiometer, and a control circuit. The DC motor has high speed and low torque, but the gearbox reduces the speed to 60 RPM and also increases the torque.
 

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.

 

 

 

 

What is a servo motor, how does it work
 

 

 

 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.

 
 
 
 

How to Control Servo Motor with Arduino?

 

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