Servo motors are programmable motors that have the ability to rotate to positions spanning over 180 degrees. These motors are commonly used in various applications that require movement and come in different sizes.
For Arduino and battery-powered applications, the micro servo or RC servo is often used. Examples include the SG90 and the MG90S. Both of these servos function in the same manner.
A mechanical arm can utilize multiple MG90S servos, as shown in the image below:
Servo motors usually come with various horns that can be attached to them, such as the ones shown below:
The choice of horn depends on the specific application.
The three wires coming out of a servo motor represent different functions: the brown wire is negative (0V), the red wire is positive (5V), and the orange wire is the signal wire.
To control a servo motor, an electrical pulse is sent through the signal wire. The width of the pulse determines the rotation of the motor.
Specifically:
- A 1ms pulse will rotate the servo to 0°
- A 1.5ms pulse will rotate the servo to 90°
- A 2ms pulse will rotate the servo to 180°
Any pulse width between 1ms and 2ms will result in a proportional rotation.
In our projects, we will be using Arduino and a library that simplifies the process of sending the appropriate pulse signals. We can simply specify the desired rotation angle from 0° to 180°.