Updated: May 1, 2022
The current era is the period of technology that would make things easy and simple. This article of interfacing a servo motor with #Arduino is also one such example. A servomotor can drive or revolve an object. That is if one wants to rotate an object at some specific angles or distance, then the servo motor comes in use. Servo motors find applications in toy cars, RC helicopters, and planes, Robotics, Machine, etc. The article covers the working and configuration of servo motor with Arduino in detail.
List of components used:
1. Servo motor
A servo motor is actually a rotary actuator which gives a precise control in terms of its angular position, acceleration, and velocity. A servo motor works on the principle of PWM (Pulse width modulation). This implies that depending on the width of the pulse that is applied the rotor will turn in the desire position. For this interfacing, an SG90 servo motor is used. The white piece in the picture is a rotor and is controlled by a bunch of gears inside. If a DC source powers the motor then it is called a DC servo motor and if powered by an AC source then it is called an AC servo motor.
2. Arduino Board
Arduino Board can read inputs such as light on a sensor, a finger on a button, or a Twitter message and convert it to an output such as activating a motor, turning on an LED, publishing something online. All of this can be done by sending a set of instructions to the microcontroller on the board by the use of the Arduino #programming language.
The circuit below shows the connection of an #SG90 servo motor with the Arduino board. There are three wires of the servo motor. The brown wire is the ground wire, the red one goes to the 5 volts, and the orange one is called the #PWM wire which is connected to the digital line.
A circuit diagram image presenting the view before the codes are executed.
Once the codes are connected, the rotor of the #servo motor (one in white color ) starts to move in a particular direction at a slow speed since the angle is reduced by 1. while coming back the rotor moves at a fast speed as the angle here is reduced by 5. In this way, the rotor keeps moving in a too and fro motion. One can try for different degrees of angle for a better understanding.
Video explanation of the interfacing for a better understanding.
The article covers the basic interfacing of servo #motor with Arduino. With this essential concept, one can build may other projects as servo motor finds numerous applications in home electronics, toys, robotics, airplane, etc.